mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-09 04:23:45 -05:00
Make sure a Pokemon faints properly after using Explosion
This commit is contained in:
parent
7ed807aacc
commit
54bcd9ab33
|
|
@ -1353,7 +1353,9 @@ function Battle(roomid, format, rated) {
|
|||
return Math.random()-0.5;
|
||||
});
|
||||
for (var i=0; i<actives.length; i++) {
|
||||
if (actives[i].isStarted) selfB.runEvent(eventid, actives[i], null, effect, relayVar);
|
||||
if (actives[i].isStarted) {
|
||||
selfB.runEvent(eventid, actives[i], null, effect, relayVar);
|
||||
}
|
||||
}
|
||||
};
|
||||
this.residualEvent = function(eventid, relayVar) {
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ exports.BattleScripts = {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
if (!pokemon.hp) pokemon.faint();
|
||||
} else {
|
||||
if (target.fainted && target.side !== pokemon.side) {
|
||||
// if a targeted foe faints, the move is retargeted
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user