mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-05 21:17:43 -05:00
Fix Sheer Force properly
This commit is contained in:
parent
6ba4e24ecd
commit
1209954765
|
|
@ -2336,9 +2336,7 @@ exports.BattleAbilities = {
|
|||
onModifyMove: function (move, pokemon) {
|
||||
if (move.secondaries) {
|
||||
delete move.secondaries;
|
||||
move.negateSecondary = true;
|
||||
// Actual negation of `AfterMoveSecondary` effects implemented in scripts.js
|
||||
// negateSecondary will only happen if the Pokémon keeps having the Sheer Force ability in that step.
|
||||
pokemon.addVolatile('sheerforce');
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ exports.BattleScripts = {
|
|||
this.faint(pokemon, pokemon, move);
|
||||
}
|
||||
|
||||
if (!move.negateSecondary || (move.negateSecondary && !pokemon.hasAbility('sheerforce'))) {
|
||||
if (!move.negateSecondary && !(pokemon.hasAbility('sheerforce') && pokemon.volatiles['sheerforce'])) {
|
||||
this.singleEvent('AfterMoveSecondarySelf', move, null, pokemon, target, move);
|
||||
this.runEvent('AfterMoveSecondarySelf', pokemon, target, move);
|
||||
}
|
||||
|
|
@ -324,7 +324,7 @@ exports.BattleScripts = {
|
|||
|
||||
if (!damage && damage !== 0) return damage;
|
||||
|
||||
if (target && (!move.negateSecondary || (move.negateSecondary && !pokemon.hasAbility('sheerforce')))) {
|
||||
if (target && !move.negateSecondary && !(pokemon.hasAbility('sheerforce') && pokemon.volatiles['sheerforce'])) {
|
||||
this.singleEvent('AfterMoveSecondary', move, null, target, pokemon, move);
|
||||
this.runEvent('AfterMoveSecondary', target, pokemon, move);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user