mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-29 14:23:26 -05:00
Fix Perish Song volatile tag
Fix Perish Song being shown more than once if the attack is repeated in subsequent turns.
This commit is contained in:
10
js/battle.js
10
js/battle.js
@@ -4286,8 +4286,14 @@ function Battle(frame, logFrame, noPreload) {
|
||||
switch (effect.id) {
|
||||
case 'perishsong':
|
||||
actions += 'All Pokémon hearing the song will faint in three turns!';
|
||||
if (self.mySide.active[0]) self.mySide.active[0].addVolatile('perish3');
|
||||
if (self.yourSide.active[0]) self.yourSide.active[0].addVolatile('perish3');
|
||||
if (self.mySide.active[0] && !self.mySide.active[0].volatiles['perish0']
|
||||
&& !self.mySide.active[0].volatiles['perish1'] && !self.mySide.active[0].volatiles['perish2']) {
|
||||
self.mySide.active[0].addVolatile('perish3');
|
||||
}
|
||||
if (self.yourSide.active[0] && !self.yourSide.active[0].volatiles['perish0']
|
||||
&& !self.yourSide.active[0].volatiles['perish1'] && !self.yourSide.active[0].volatiles['perish2']) {
|
||||
self.yourSide.active[0].addVolatile('perish3');
|
||||
}
|
||||
self.mySide.updateStatbar();
|
||||
self.yourSide.updateStatbar();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user