One of the skills I want to use in my game would be as such: "B is hit with an Instant KO, A receives damage equal to B's current HP."
I can't make an attack formula for that can I?
(The mechanic going to an assassin-type character with low HP and defenses, as part of the beginning of their skill progression. )
"Damage to user = to Target's HP." Would I need a plugin for this kind of skill?
● ARCHIVED · READ-ONLY
-
-
Type: Damage HP
Element: Physical
Formula: a.gainHp(0 - b.hp); b.die()
Damage Formulas 101 Link
the issue now is how you make bosses immune to this skill.
you could make an element type "Death"
make all enemies immune to instant KO have Trait: element rate: Death 0%
then make the formula
b.elementRate(X) === 1 ? a.gainHp(0 - b.hp); b.die() : Y
where X is the ID of the Death element.
and Y is the damage formula for if they are immune
you could make Y the same as a basic attack or you could make it 0 so it just has no effect.
example: b.elementRate(10) === 1 ? a.gainHp(0 - b.hp); b.die() : a.gainHP(0 - (a.atk * 4 - b.def * 2)); a.atk * 4 - b.def * 2
this will do the instant KO + hurt the user based on target remaining hp if they are not immune to KO skills
if they are immune to KO its will damage the user the same amount of damage dealt (give or take the variance %) -
Wow, thanks! You incidentally solved another issue I was going to need to figure out ("If Element type is" Conditions) I need to give the formulas a much deeper dive.