mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-06-02 22:08:36 -05:00
Fix Foresight and Miracle Eye to use ModifyBoost
Also deprecates move.ignorePositiveEvasion
This commit is contained in:
parent
47ea3b5f32
commit
c5bc1a60d1
|
|
@ -4789,8 +4789,10 @@ exports.BattleMovedex = {
|
|||
pokemon.negateImmunity['Fighting'] = true;
|
||||
}
|
||||
},
|
||||
onSourceModifyMove: function (move) {
|
||||
move.ignorePositiveEvasion = true;
|
||||
onModifyBoost: function (boosts) {
|
||||
if (boosts.evasion && boosts.evasion > 0) {
|
||||
boosts.evasion = 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
secondary: false,
|
||||
|
|
@ -8746,8 +8748,10 @@ exports.BattleMovedex = {
|
|||
onModifyPokemon: function (pokemon) {
|
||||
if (pokemon.hasType('Dark')) pokemon.negateImmunity['Psychic'] = true;
|
||||
},
|
||||
onSourceModifyMove: function (move, source, target) {
|
||||
move.ignorePositiveEvasion = true;
|
||||
onModifyBoost: function (boosts) {
|
||||
if (boosts.evasion && boosts.evasion > 0) {
|
||||
boosts.evasion = 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
secondary: false,
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ exports.BattleScripts = {
|
|||
if (!move.ignoreEvasion && !pokemonAbilityIgnoreEvasion) {
|
||||
boosts = this.runEvent('ModifyBoost', pokemon, null, null, Object.clone(this.boosts));
|
||||
boost = this.clampIntRange(boosts['evasion'], -6, 6);
|
||||
if (boost > 0 && !move.ignorePositiveEvasion) {
|
||||
if (boost > 0) {
|
||||
accuracy /= boostTable[boost];
|
||||
} else if (boost < 0) {
|
||||
accuracy *= boostTable[-boost];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user