#
Create Ability
#
Description
Creates an ability that can be equiped and used. This ability can change depending on context.
#
Example
CreateAbility("test_ability")
:Instantiate(
function(builder, config)
return builder
:TargetType(3) -- Targets single enemy
:ManaCost(2)
:OnUse(
function(context)
context:QueueAction(BattleAction:CreateDamage({
Damage = 6,
Element = 1
}, context.Participant, context.Targets))
end)
:Build();
end)
:Build();
Target types:
Element types:
- FriendlySingle
- FriendlyGroup
- EnemySingle
- EnemyGroup
- EnemyAll
- All
- None
- Ice
- Air
- Ground
- Thunder
- Water
- Fire
#
Create Constant Ability
Creates an ability that does the exact same thing each time. Used for situations, like reviving, or giving status effects.
#
Example
CreateConstantAbility("test_ability_2")
:OnUse(
function(context)
context:QueueAction(BattleAction:CreateDamage({
Damage = 10,
Element = 1
}, context.Participant, context.Targets))
end)
:Build();