Skip to main content

E. Assign Cost in Ability

Cost is also Gameplay Effect with some modifiers that you will defined as the cost, could be Mana, Health, etc. In AgateGAS we've already created a modular cost for mana, you can find it on Content/AgateGAS/Blueprint/Attribute/GE_CostMana.

  • For now, we just see the existing GE_CostMana.
    image.pngIn the Modifiers part, you will see we add a Mana attribute, and for the calculation type, we also use a Custom Calculation Class because this is what we've made to link the cost with the ability. You can also create a Custom Calculation for modifier by learning this.
    You see AGASCostModCalculation there, so basically, this is calculation that I've just made to multiply any modifier that you assign with this calculation with a multiplier that has been set in ability.
    So, because cost is expected to be reducing Mana, we will set the Coefficient to -1. So, when the ability has multiplier value 10, we will use -10 Mana, and so on.
  • Let's move to GA_AttackSelf, and adjust the Cost Multiplier.

    image.png

    For now, I just assign it 20. So we expect this ability requires 20 Mana.
  • Then move to Costs section, don't forget to assign the GE_CostMana there.

    image.png

  • Let's play and try how much you can use the ability, it should be only twice if you've followed my config, because you need 20 Mana everytime you use the ability and you only have 50 Mana.