#
AbilityBuilder
#
Description
Allows to build abilities that can be cast in battles.
#
Methods
#
OnReceiveDamage(function)
Is called when the player with the ability receives damage.
function
(ReceiveDamageFunction)
#
OnDealDamage(function)
Is called when the player with the ability deals damage.
function
(DealDamageFunction)
#
OnTargetWithSpell(function)
Is called when the player with the ability targets someone with any spell.
function
(TargetWithSpellFunction)
#
OnTargetedBySpell(function)
Is called when the player with the ability is targeted by someone with any spell.
function
(TargetedBySpellFunction)
#
OnCalculateStats(function)
Is called when the stats of the player are calculated. This might be called frequently.
function
(CalculateStatsFunction)
#
OnNextTurn(function)
Is called when next turn starts
function
(NextTurnFunction)
#
AbilityOnUse(function)
Is called when the ability used and handles the main part of your ability logic
function
(UseFunction)
#
AbilityCanUse(function)
Helps to define if the ability currently can be cast or not. If not the ability will be hidden in the ability selection.
function
(CanUseFunction)
#
OnTurnEnd(function)
Is called when the turn ends
function
(EndTurnFunction)
#
CategoryId(categoryId)
Defines the category the ability is grouped in menus. Defaults to ability
if not set.
- categoryId (string) the category
#
ManaCost(cost)
Sets the amount of mana required to use the function.
- cost (int) must be >= 0
#
TargetType(type)
The target type. Values are:
- 0 = FriendlySingle
- 1 = FriendlyGroup
- 2 = EnemyGroup
- 3 = EnemySingle
- 4 = EnemyAll
- 5 = All
- type (int) the target type
#
AllowDeadTargets(allow)
Used to define if this ability can target dead participants. If not set the ability will not allow targeting dead.
allow
(bool) allow to target dead participants
#
AllowLivingTargets(allow)
Used to define if this ability can target living participants. If not set the ability will allow targeting living.
allow
(bool) allow to target living participants
#
Build()
Builds the ability to a useable format.