As in pokémon I would like to apply skills that exist in the game, however, I am having problems with the formulas to execute 3 types of states that will be executed practically in the same way, and will only have some small changes in the formula. The effects work, but as soon as an ally tries to use the buff, healing, or other support ability on the character with these states, the ally also receives the effects of these passive abilities, so I'm just looking for help to fix the formula so that it applies the effects correctly on enemies.
These will be passive skills, where I use the plugin: Auto Passive States (YEP).
Passive States:
STICKY: if there is physical damage, it slows down the enemy (30%)
FLAMING BODY: if there is physical damage, it burns the enemy (30%)
BRAND OF THE WITCH: if there is physical damage (20%), magic damage (10%), curses the enemy.
---------------------------------------------
The formulas I'm using:
<Custom Respond Effect>
if (target.isStateAffected (96) && Math.random () <0.3) {
user.addState (15);}
</ Custom Respond Effect>
-----------------------------------------------
What I tried:
<Custom Respond Effect>
if (target.isStateAffected (196) && this.isMagical () && Math.random () <0.3) {
user.addState (15);}
</ Custom Respond Effect>
These will be passive skills, where I use the plugin: Auto Passive States (YEP).
Passive States:
STICKY: if there is physical damage, it slows down the enemy (30%)
FLAMING BODY: if there is physical damage, it burns the enemy (30%)
BRAND OF THE WITCH: if there is physical damage (20%), magic damage (10%), curses the enemy.
---------------------------------------------
The formulas I'm using:
<Custom Respond Effect>
if (target.isStateAffected (96) && Math.random () <0.3) {
user.addState (15);}
</ Custom Respond Effect>
-----------------------------------------------
What I tried:
<Custom Respond Effect>
if (target.isStateAffected (196) && this.isMagical () && Math.random () <0.3) {
user.addState (15);}
</ Custom Respond Effect>