# 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:
  1. FriendlySingle
  2. FriendlyGroup
  3. EnemySingle
  4. EnemyGroup
  5. EnemyAll
  6. All
  1. None
  2. Ice
  3. Air
  4. Ground
  5. Thunder
  6. Water
  7. 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();