Trying to add an effect based on if a certain element did damage, but I can't recall how that is done. This is what I have so far for my state:
<Custom Establish Effect>
if target.result().hpDamage > 0 && (Attack element of 13) {
user.addState(872);
}
</Custom Establish Effect>
Basically if I damage a target with the Holy element I will gain state 872. I just can't remember how to check for element type.
*Edit*
Solution by @emelian65
<Custom Respond Effect>
var element = 13;
if (this.item().damage.elementId === element) {
user.addState(872);
}
</Custom Respond Effect>
You can also see Emelian's work a few posts down where more detail is added.
<Custom Establish Effect>
if target.result().hpDamage > 0 && (Attack element of 13) {
user.addState(872);
}
</Custom Establish Effect>
Basically if I damage a target with the Holy element I will gain state 872. I just can't remember how to check for element type.
*Edit*
Solution by @emelian65
<Custom Respond Effect>
var element = 13;
if (this.item().damage.elementId === element) {
user.addState(872);
}
</Custom Respond Effect>
You can also see Emelian's work a few posts down where more detail is added.