Im working on a passive to apply a defence buff for 1 turn and increase evasion whenever you cast an earth skill.
It doesnt seem to work, and if I use an attack that hits more than 1 enemy it applies def buffs equal to enemies hit :S
Code:
<Custom Initiate Effect>
// Create empty pools for skills and skipp types.
var skills = [];
var skillTypes = [];
// Insert the skills this passive can be used with.
skills.push(106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129);
// Insert the skill types this passive can be used with.
// Check if the action is a skill, the skill pool contain the skill or if the skill type pool contains the skill's type
if (this.isSkill() && (skills.contains(this.item().id))) {
user.addBuff(3,1);
user.addState(54);
}
</Custom Initiate Effect>
It doesnt seem to work, and if I use an attack that hits more than 1 enemy it applies def buffs equal to enemies hit :S