Hey, is there a script command to force an (incoming) attack to miss?
I've seen these threads:
https://forums.rpgmakerweb.com/index.php?threads/force-miss-command.62636/#post-604303
https://forums.rpgmakerweb.com/inde...ting-an-always-evade-state.72797/#post-687079
https://forums.rpgmakerweb.com/index.php?threads/force-critical-or-miss.70510/#post-668719
But the solutions involve directly altering either the attacker's hit rate or defender's evasion rate. Would be complicated to factor in for scenarios where a battler already has an altered rate. For eg:
The defender developed a 50% evasion rate through some means. However, using the above methods would change it to 100% evasion (to avoid the incoming attack) and then either leave it as 100% or default back to 0%. Wouldn't it be complicated to retain the previous evasion rate?
That's why I'm asking if there's an equivalent to:
this.actionForceCritical();
this.actionForceNoCritical();
for forcing a miss.
Edit my current attempt using the above methods:
To retain their prior evasion rate, I store it in a variable. However, I'm not sure that is efficient or safe. When multiple enemies capable of evading, via this way, are attacked, the coding is run for each of them in order (So the value stored in variable 99 SHOULD be unaffected by another enemy's evasion rate) - in other words, enemy A's evasion rate is managed in variable 99, and then enemy B's evasion rate is managed.
I'm uncertain if this can cause other complications though.
I've seen these threads:
https://forums.rpgmakerweb.com/index.php?threads/force-miss-command.62636/#post-604303
https://forums.rpgmakerweb.com/inde...ting-an-always-evade-state.72797/#post-687079
https://forums.rpgmakerweb.com/index.php?threads/force-critical-or-miss.70510/#post-668719
But the solutions involve directly altering either the attacker's hit rate or defender's evasion rate. Would be complicated to factor in for scenarios where a battler already has an altered rate. For eg:
The defender developed a 50% evasion rate through some means. However, using the above methods would change it to 100% evasion (to avoid the incoming attack) and then either leave it as 100% or default back to 0%. Wouldn't it be complicated to retain the previous evasion rate?
That's why I'm asking if there's an equivalent to:
this.actionForceCritical();
this.actionForceNoCritical();
for forcing a miss.
Edit my current attempt using the above methods:
Code:
<Custom Select Effect>
$gameVariables.setValue(99,target.eva);
console.log(target.name() + "'s Current Evasion: " + target.eva);
if ($gameVariables.value(280) == 1){
target.setEva(100);
console.log(target.name() + "'s New Evasion: " + target.eva);
}
</Custom Select Effect>
<Custom Deselect Effect>
console.log(target.name() + "'s [Pre-Deselect] Evasion: " + target.eva);
target.setEva($gameVariables.value(99));
console.log(target.name() + "'s [Post-Deselect] Evasion: " + target.eva);
</Custom Deselect Effect>
To retain their prior evasion rate, I store it in a variable. However, I'm not sure that is efficient or safe. When multiple enemies capable of evading, via this way, are attacked, the coding is run for each of them in order (So the value stored in variable 99 SHOULD be unaffected by another enemy's evasion rate) - in other words, enemy A's evasion rate is managed in variable 99, and then enemy B's evasion rate is managed.
I'm uncertain if this can cause other complications though.