Overload

For this week’s state, I’m providing a much more basic ability than usual. Overload, when active,  causes skills that belong to a certain skilltype to deal 1.8 times normal damage. It also causes those same skills to deal 15% of the dealt damage back to the caster. As a passive ability, it can cause a mage-type character to turn into a true glass cannon, and as a toggleable ability, gives the player an extra strategic choice, in deciding if dealing that massive damage is worth healing the actor later (or possible).

What do we need?

  • The usual plugins
  • A way to have this state applied
  • The state.

Our paste code is quite simple. For this example, I have created the state as a passive, in that anyone who will make use of it will do so passively. In my project this is to allow players to ‘equip’ passive skills to the actors, to further customize them.

<Custom Confirm Effect>
if (this.isMagical() && this._item.isSkill() && $dataSkills[this._item._itemId].stypeId == 12 && value !== 0) {
value = Math.ceil(value * 1.8)
user.gainHp(-Math.floor(Math.abs(value * 0.15)))
}
</Custom Confirm Effect>

Our If condition is checking for the following:

  • Was this a magical skill
  • Was this a skill
  • Does the skill belong to sType 12?
  • Did the skill deal more than 0 damage?

These checks can be further modified to your liking, of course. When all checks are passed, damage is multiplied by 1.8, and 15% of that is dealt to the caster.

 

That’s all for now.

Leave a comment