mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-09 04:23:45 -05:00
Fix Protean for moves targetting the field
This commit is contained in:
parent
126b633ceb
commit
c2966e1d51
|
|
@ -115,7 +115,7 @@ exports.BattleScripts = {
|
|||
if (damage === false) this.add('-fail', target);
|
||||
return true;
|
||||
}
|
||||
damage = this.moveHit(target, pokemon, move);
|
||||
damage = this.tryMoveHit(target, pokemon, move);
|
||||
} else if (move.target === 'allAdjacent' || move.target === 'allAdjacentFoes') {
|
||||
var targets = [];
|
||||
if (move.target === 'allAdjacent') {
|
||||
|
|
@ -203,6 +203,10 @@ exports.BattleScripts = {
|
|||
|
||||
this.runEvent('PrepareHit', pokemon, target, move);
|
||||
|
||||
if (move.target === 'all' || move.target === 'foeSide' || move.target === 'allySide' || move.target === 'allyTeam') {
|
||||
return this.moveHit(target, pokemon, move);
|
||||
}
|
||||
|
||||
if ((move.affectedByImmunities && !target.runImmunity(move.type, true)) || (move.isSoundBased && (pokemon !== target || this.gen <= 4) && !target.runImmunity('sound', true))) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user