' +
- '
' +
+ '
' +
'' +
'
'
);
@@ -1221,6 +1242,12 @@
if (!this.choice) return;
this.tooltips.hideTooltip();
+ if (this.battle.myPokemon[this.choice.choices.length].reviving) {
+ this.choice.choices.push('switch ' + (parseInt(pos, 10) + 1));
+ this.endChoice();
+ return;
+ }
+
if (pos !== undefined) { // pos === undefined if called by chooseSwitchTarget()
this.choice.switchFlags[pos] = true;
if (this.choice.freedomDegrees >= 1) {
@@ -1292,6 +1319,8 @@
app.addPopupMessage("You are trapped and cannot select " + data[0] + "!");
} else if (data[1] === 'active') {
app.addPopupMessage("" + data[0] + " is already in battle!");
+ } else if (data[1] === 'notfainted') {
+ app.addPopupMessage("" + data[0] + " still has energy to battle!");
} else {
app.addPopupMessage("" + data[0] + " is already selected!");
}
diff --git a/src/battle.ts b/src/battle.ts
index a94f6b044..61a3fe41b 100644
--- a/src/battle.ts
+++ b/src/battle.ts
@@ -1719,6 +1719,18 @@ export class Battle {
case 'wish':
this.scene.runResidualAnim('wish' as ID, poke);
break;
+ case 'revivalblessing':
+ this.scene.runResidualAnim('wish' as ID, poke);
+ const {siden} = this.parsePokemonId(args[1]);
+ const side = this.sides[siden];
+ poke.fainted = false;
+ poke.status = '';
+ this.scene.updateSidebar(side);
+ // Revived while still on the field
+ if (!side.active[poke.slot]) {
+ poke.side.replace(poke);
+ }
+ break;
}
}
this.scene.runOtherAnim('heal' as ID, [poke]);