Added Wonder Room

This commit is contained in:
AJ Fontaine 2024-08-06 22:24:59 -04:00
parent 9875fcc59d
commit 63fafe6a2d
22 changed files with 70 additions and 3 deletions

View File

@ -710,6 +710,31 @@ export class TrickRoomTag extends ArenaTag {
} }
} }
/**
* Arena Tag class for {@link https://bulbapedia.bulbagarden.net/wiki/Wonder_Room_(move) Wonder Room}.
* Swaps the Defense and Special Defense stats for all Pokémon on the field as long as this arena tag is up,
* also reversing the turn order for all Pokémon on the field as well.
*/
export class WonderRoomTag extends ArenaTag {
constructor(turnCount: integer) {
super(ArenaTagType.WONDER_ROOM, turnCount, Moves.WONDER_ROOM);
}
apply(arena: Arena, args: any[]): boolean {
const isWonderRoom = args[0] as Utils.BooleanHolder;
isWonderRoom.value = !isWonderRoom.value;
return true;
}
onAdd(arena: Arena): void {
arena.scene.queueMessage(i18next.t("arenaTag:wonderRoomOnAdd"));
}
onRemove(arena: Arena): void {
arena.scene.queueMessage(i18next.t("arenaTag:wonderRoomOnRemove"));
}
}
/** /**
* Arena Tag class for {@link https://bulbapedia.bulbagarden.net/wiki/Gravity_(move) Gravity}. * Arena Tag class for {@link https://bulbapedia.bulbagarden.net/wiki/Gravity_(move) Gravity}.
* Grounds all Pokémon on the field, including Flying-types and those with * Grounds all Pokémon on the field, including Flying-types and those with
@ -834,5 +859,7 @@ export function getArenaTag(tagType: ArenaTagType, turnCount: integer, sourceMov
return new TailwindTag(turnCount, sourceId, side); return new TailwindTag(turnCount, sourceId, side);
case ArenaTagType.HAPPY_HOUR: case ArenaTagType.HAPPY_HOUR:
return new HappyHourTag(turnCount, sourceId, side); return new HappyHourTag(turnCount, sourceId, side);
case ArenaTagType.WONDER_ROOM:
return new WonderRoomTag(turnCount);
} }
} }

View File

@ -7358,9 +7358,10 @@ export function initMoves() {
new StatusMove(Moves.POWER_SPLIT, Type.PSYCHIC, -1, 10, -1, 0, 5) new StatusMove(Moves.POWER_SPLIT, Type.PSYCHIC, -1, 10, -1, 0, 5)
.unimplemented(), .unimplemented(),
new StatusMove(Moves.WONDER_ROOM, Type.PSYCHIC, -1, 10, -1, 0, 5) new StatusMove(Moves.WONDER_ROOM, Type.PSYCHIC, -1, 10, -1, 0, 5)
.attr(AddArenaTagAttr, ArenaTagType.WONDER_ROOM, 5)
.ignoresProtect() .ignoresProtect()
.target(MoveTarget.BOTH_SIDES) .target(MoveTarget.BOTH_SIDES)
.unimplemented(), .partial(),
new AttackMove(Moves.PSYSHOCK, Type.PSYCHIC, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 5) new AttackMove(Moves.PSYSHOCK, Type.PSYCHIC, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 5)
.attr(DefDefAttr), .attr(DefDefAttr),
new AttackMove(Moves.VENOSHOCK, Type.POISON, MoveCategory.SPECIAL, 65, 100, 10, -1, 0, 5) new AttackMove(Moves.VENOSHOCK, Type.POISON, MoveCategory.SPECIAL, 65, 100, 10, -1, 0, 5)

View File

@ -21,5 +21,6 @@ export enum ArenaTagType {
MAT_BLOCK = "MAT_BLOCK", MAT_BLOCK = "MAT_BLOCK",
CRAFTY_SHIELD = "CRAFTY_SHIELD", CRAFTY_SHIELD = "CRAFTY_SHIELD",
TAILWIND = "TAILWIND", TAILWIND = "TAILWIND",
HAPPY_HOUR = "HAPPY_HOUR" HAPPY_HOUR = "HAPPY_HOUR",
WONDER_ROOM = "WONDER_ROOM"
} }

View File

@ -690,7 +690,18 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
if (this.isPlayer()) { if (this.isPlayer()) {
this.scene.applyModifiers(TempBattleStatBoosterModifier, this.isPlayer(), battleStat as integer as TempBattleStat, statLevel); this.scene.applyModifiers(TempBattleStatBoosterModifier, this.isPlayer(), battleStat as integer as TempBattleStat, statLevel);
} }
const statValue = new Utils.NumberHolder(this.getStat(stat)); const statValue = new Utils.NumberHolder(1);
const wonderRoom = new Utils.BooleanHolder(false);
this.scene.arena.applyTags(ArenaTagType.WONDER_ROOM, wonderRoom);
if (wonderRoom.value) {
if (stat === Stat.DEF) {
statValue.value = this.getStat(Stat.SPDEF);
} else if (stat === Stat.SPDEF) {
statValue.value = this.getStat(Stat.DEF);
}
} else {
statValue.value = this.getStat(stat);
}
this.scene.applyModifiers(StatBoosterModifier, this.isPlayer(), this, stat, statValue); this.scene.applyModifiers(StatBoosterModifier, this.isPlayer(), this, stat, statValue);
const fieldApplied = new Utils.BooleanHolder(false); const fieldApplied = new Utils.BooleanHolder(false);

View File

@ -36,6 +36,7 @@ export const arenaFlyout: SimpleTranslationEntries = {
"stealthRock": "Tarnsteine", "stealthRock": "Tarnsteine",
"stickyWeb": "Klebenetz", "stickyWeb": "Klebenetz",
"trickRoom": "Bizarroraum", "trickRoom": "Bizarroraum",
"wonderRoom": "Wunderraum",
"gravity": "Erdanziehung", "gravity": "Erdanziehung",
"reflect": "Reflektor", "reflect": "Reflektor",
"lightScreen": "Lichtschild", "lightScreen": "Lichtschild",

View File

@ -37,6 +37,8 @@ export const arenaTag: SimpleTranslationEntries = {
"stickyWebActivateTrap": "{{pokemonName}} ist im Klebenetz gefangen!", "stickyWebActivateTrap": "{{pokemonName}} ist im Klebenetz gefangen!",
"trickRoomOnAdd": "{{pokemonNameWithAffix}} hat die Dimensionen verdreht!", "trickRoomOnAdd": "{{pokemonNameWithAffix}} hat die Dimensionen verdreht!",
"trickRoomOnRemove": "Die verdrehte Dimension ist wieder normal!", "trickRoomOnRemove": "Die verdrehte Dimension ist wieder normal!",
"wonderRoomOnAdd": "It created a bizarre area in which the\nDefense and Special Defense stats are swapped!",
"wonderRoomOnRemove": "The Defense and Special Defense stats\nhave returned to normal!",
"gravityOnAdd": "Die Erdanziehung wurde verstärkt!", "gravityOnAdd": "Die Erdanziehung wurde verstärkt!",
"gravityOnRemove": "Die Erdanziehung ist wieder normal!", "gravityOnRemove": "Die Erdanziehung ist wieder normal!",
"tailwindOnAdd": "Die Pokémon erhalten Rückenwind!", "tailwindOnAdd": "Die Pokémon erhalten Rückenwind!",

View File

@ -36,6 +36,7 @@ export const arenaFlyout: SimpleTranslationEntries = {
"stealthRock": "Stealth Rock", "stealthRock": "Stealth Rock",
"stickyWeb": "Sticky Web", "stickyWeb": "Sticky Web",
"trickRoom": "Trick Room", "trickRoom": "Trick Room",
"wonderRoom": "Wonder Room",
"gravity": "Gravity", "gravity": "Gravity",
"reflect": "Reflect", "reflect": "Reflect",
"lightScreen": "Light Screen", "lightScreen": "Light Screen",

View File

@ -37,6 +37,8 @@ export const arenaTag: SimpleTranslationEntries = {
"stickyWebActivateTrap": "The opposing {{pokemonName}} was caught in a sticky web!", "stickyWebActivateTrap": "The opposing {{pokemonName}} was caught in a sticky web!",
"trickRoomOnAdd": "{{pokemonNameWithAffix}} twisted\nthe dimensions!", "trickRoomOnAdd": "{{pokemonNameWithAffix}} twisted\nthe dimensions!",
"trickRoomOnRemove": "The twisted dimensions\nreturned to normal!", "trickRoomOnRemove": "The twisted dimensions\nreturned to normal!",
"wonderRoomOnAdd": "It created a bizarre area in which the\nDefense and Special Defense stats are swapped!",
"wonderRoomOnRemove": "The Defense and Special Defense stats\nhave returned to normal!",
"gravityOnAdd": "Gravity intensified!", "gravityOnAdd": "Gravity intensified!",
"gravityOnRemove": "Gravity returned to normal!", "gravityOnRemove": "Gravity returned to normal!",
"tailwindOnAdd": "The Tailwind blew from behind team!", "tailwindOnAdd": "The Tailwind blew from behind team!",

View File

@ -36,6 +36,7 @@ export const arenaFlyout: SimpleTranslationEntries = {
"stealthRock": "Trampa Rocas", "stealthRock": "Trampa Rocas",
"stickyWeb": "Red Vidcosa", "stickyWeb": "Red Vidcosa",
"trickRoom": "Espacio Raro", "trickRoom": "Espacio Raro",
"wonderRoom": "Wonder Room",
"gravity": "Gravedad", "gravity": "Gravedad",
"reflect": "Reflejo", "reflect": "Reflejo",
"lightScreen": "Pantalla de Luz", "lightScreen": "Pantalla de Luz",

View File

@ -37,6 +37,8 @@ export const arenaTag: SimpleTranslationEntries = {
"stickyWebActivateTrap": "The opposing {{pokemonName}} was caught in a sticky web!", "stickyWebActivateTrap": "The opposing {{pokemonName}} was caught in a sticky web!",
"trickRoomOnAdd": "{{pokemonNameWithAffix}} twisted\nthe dimensions!", "trickRoomOnAdd": "{{pokemonNameWithAffix}} twisted\nthe dimensions!",
"trickRoomOnRemove": "The twisted dimensions\nreturned to normal!", "trickRoomOnRemove": "The twisted dimensions\nreturned to normal!",
"wonderRoomOnAdd": "It created a bizarre area in which the\nDefense and Special Defense stats are swapped!",
"wonderRoomOnRemove": "The Defense and Special Defense stats\nhave returned to normal!",
"gravityOnAdd": "Gravity intensified!", "gravityOnAdd": "Gravity intensified!",
"gravityOnRemove": "Gravity returned to normal!", "gravityOnRemove": "Gravity returned to normal!",
"tailwindOnAdd": "The Tailwind blew from behind team!", "tailwindOnAdd": "The Tailwind blew from behind team!",

View File

@ -36,6 +36,7 @@ export const arenaFlyout: SimpleTranslationEntries = {
"stealthRock": "Piège de Roc", "stealthRock": "Piège de Roc",
"stickyWeb": "Toile Gluante", "stickyWeb": "Toile Gluante",
"trickRoom": "Distorsion", "trickRoom": "Distorsion",
"wonderRoom": "Wonder Room",
"gravity": "Gravité", "gravity": "Gravité",
"reflect": "Protection", "reflect": "Protection",
"lightScreen": "Mur Lumière", "lightScreen": "Mur Lumière",

View File

@ -37,6 +37,8 @@ export const arenaTag: SimpleTranslationEntries = {
"stickyWebActivateTrap": "{{pokemonName}} ennemi\nest pris dans la toile gluante !", "stickyWebActivateTrap": "{{pokemonName}} ennemi\nest pris dans la toile gluante !",
"trickRoomOnAdd": "{{pokemonNameWithAffix}}\nfausse les dimensions !", "trickRoomOnAdd": "{{pokemonNameWithAffix}}\nfausse les dimensions !",
"trickRoomOnRemove": "Les dimensions faussées\nreviennent à la normale !", "trickRoomOnRemove": "Les dimensions faussées\nreviennent à la normale !",
"wonderRoomOnAdd": "It created a bizarre area in which the\nDefense and Special Defense stats are swapped!",
"wonderRoomOnRemove": "The Defense and Special Defense stats\nhave returned to normal!",
"gravityOnAdd": "La gravité sintensifie !", "gravityOnAdd": "La gravité sintensifie !",
"gravityOnRemove": "La gravité est revenue à la normale !", "gravityOnRemove": "La gravité est revenue à la normale !",
"tailwindOnAdd": "Un vent arrière souffle !", "tailwindOnAdd": "Un vent arrière souffle !",

View File

@ -36,6 +36,7 @@ export const arenaFlyout: SimpleTranslationEntries = {
"stealthRock": "Levitoroccia", "stealthRock": "Levitoroccia",
"stickyWeb": "Rete Vischiosa", "stickyWeb": "Rete Vischiosa",
"trickRoom": "Distortozona", "trickRoom": "Distortozona",
"wonderRoom": "Wonder Room",
"gravity": "Gravità", "gravity": "Gravità",
"reflect": "Riflesso", "reflect": "Riflesso",
"lightScreen": "Schermoluce", "lightScreen": "Schermoluce",

View File

@ -37,6 +37,8 @@ export const arenaTag: SimpleTranslationEntries = {
"stickyWebActivateTrap": "The opposing {{pokemonName}} was caught in a sticky web!", "stickyWebActivateTrap": "The opposing {{pokemonName}} was caught in a sticky web!",
"trickRoomOnAdd": "{{pokemonNameWithAffix}} twisted\nthe dimensions!", "trickRoomOnAdd": "{{pokemonNameWithAffix}} twisted\nthe dimensions!",
"trickRoomOnRemove": "The twisted dimensions\nreturned to normal!", "trickRoomOnRemove": "The twisted dimensions\nreturned to normal!",
"wonderRoomOnAdd": "It created a bizarre area in which the\nDefense and Special Defense stats are swapped!",
"wonderRoomOnRemove": "The Defense and Special Defense stats\nhave returned to normal!",
"gravityOnAdd": "Gravity intensified!", "gravityOnAdd": "Gravity intensified!",
"gravityOnRemove": "Gravity returned to normal!", "gravityOnRemove": "Gravity returned to normal!",
"tailwindOnAdd": "The Tailwind blew from behind team!", "tailwindOnAdd": "The Tailwind blew from behind team!",

View File

@ -36,6 +36,7 @@ export const arenaFlyout: SimpleTranslationEntries = {
"stealthRock": "스텔스록", "stealthRock": "스텔스록",
"stickyWeb": "끈적끈적네트", "stickyWeb": "끈적끈적네트",
"trickRoom": "트릭룸", "trickRoom": "트릭룸",
"wonderRoom": "Wonder Room",
"gravity": "중력", "gravity": "중력",
"reflect": "리플렉터", "reflect": "리플렉터",
"lightScreen": "빛의장막", "lightScreen": "빛의장막",

View File

@ -37,6 +37,8 @@ export const arenaTag: SimpleTranslationEntries = {
"stickyWebActivateTrap": "{{pokemonName}}[[는]]\n끈적끈적네트에 걸렸다!", "stickyWebActivateTrap": "{{pokemonName}}[[는]]\n끈적끈적네트에 걸렸다!",
"trickRoomOnAdd": "{{pokemonNameWithAffix}}[[는]]\n시공을 뒤틀었다!", "trickRoomOnAdd": "{{pokemonNameWithAffix}}[[는]]\n시공을 뒤틀었다!",
"trickRoomOnRemove": "뒤틀린 시공이 원래대로 되돌아왔다!", "trickRoomOnRemove": "뒤틀린 시공이 원래대로 되돌아왔다!",
"wonderRoomOnAdd": "It created a bizarre area in which the\nDefense and Special Defense stats are swapped!",
"wonderRoomOnRemove": "The Defense and Special Defense stats\nhave returned to normal!",
"gravityOnAdd": "중력이 강해졌다!", "gravityOnAdd": "중력이 강해졌다!",
"gravityOnRemove": "중력이 원래대로 되돌아왔다!", "gravityOnRemove": "중력이 원래대로 되돌아왔다!",
"tailwindOnAdd": "순풍이 불기 시작했다!", "tailwindOnAdd": "순풍이 불기 시작했다!",

View File

@ -36,6 +36,7 @@ export const arenaFlyout: SimpleTranslationEntries = {
"stealthRock": "Stealth Rock", "stealthRock": "Stealth Rock",
"stickyWeb": "Sticky Web", "stickyWeb": "Sticky Web",
"trickRoom": "Trick Room", "trickRoom": "Trick Room",
"wonderRoom": "Wonder Room",
"gravity": "Gravity", "gravity": "Gravity",
"reflect": "Reflect", "reflect": "Reflect",
"lightScreen": "Light Screen", "lightScreen": "Light Screen",

View File

@ -37,6 +37,8 @@ export const arenaTag: SimpleTranslationEntries = {
"stickyWebActivateTrap": "{{pokemonName}} adversário foi pego por uma Sticky Web!", "stickyWebActivateTrap": "{{pokemonName}} adversário foi pego por uma Sticky Web!",
"trickRoomOnAdd": "{{pokemonNameWithAffix}} distorceu\nas dimensões!", "trickRoomOnAdd": "{{pokemonNameWithAffix}} distorceu\nas dimensões!",
"trickRoomOnRemove": "As dimensões distorcidas\nretornaram ao normal!", "trickRoomOnRemove": "As dimensões distorcidas\nretornaram ao normal!",
"wonderRoomOnAdd": "It created a bizarre area in which the\nDefense and Special Defense stats are swapped!",
"wonderRoomOnRemove": "The Defense and Special Defense stats\nhave returned to normal!",
"gravityOnAdd": "A gravidade aumentou!", "gravityOnAdd": "A gravidade aumentou!",
"gravityOnRemove": "A gravidade retornou ao normal!", "gravityOnRemove": "A gravidade retornou ao normal!",
"tailwindOnAdd": "O Tailwind soprou de trás de sua equipe!", "tailwindOnAdd": "O Tailwind soprou de trás de sua equipe!",

View File

@ -36,6 +36,7 @@ export const arenaFlyout: SimpleTranslationEntries = {
"stealthRock": "隐形岩", "stealthRock": "隐形岩",
"stickyWeb": "黏黏网", "stickyWeb": "黏黏网",
"trickRoom": "戏法空间", "trickRoom": "戏法空间",
"wonderRoom": "Wonder Room",
"gravity": "重力", "gravity": "重力",
"reflect": "反射壁", "reflect": "反射壁",
"lightScreen": "光墙", "lightScreen": "光墙",

View File

@ -37,6 +37,8 @@ export const arenaTag: SimpleTranslationEntries = {
"stickyWebActivateTrap": "{{pokemonName}}\n被黏黏网粘住了", "stickyWebActivateTrap": "{{pokemonName}}\n被黏黏网粘住了",
"trickRoomOnAdd": "{{pokemonNameWithAffix}}\n扭曲了时空", "trickRoomOnAdd": "{{pokemonNameWithAffix}}\n扭曲了时空",
"trickRoomOnRemove": "扭曲的时空复原了!", "trickRoomOnRemove": "扭曲的时空复原了!",
"wonderRoomOnAdd": "It created a bizarre area in which the\nDefense and Special Defense stats are swapped!",
"wonderRoomOnRemove": "The Defense and Special Defense stats\nhave returned to normal!",
"gravityOnAdd": "重力变强了!", "gravityOnAdd": "重力变强了!",
"gravityOnRemove": "重力复原了!", "gravityOnRemove": "重力复原了!",
"tailwindOnAdd": "从身后\n吹起了顺风", "tailwindOnAdd": "从身后\n吹起了顺风",

View File

@ -36,6 +36,7 @@ export const arenaFlyout: SimpleTranslationEntries = {
"stealthRock": "Stealth Rock", "stealthRock": "Stealth Rock",
"stickyWeb": "Sticky Web", "stickyWeb": "Sticky Web",
"trickRoom": "Trick Room", "trickRoom": "Trick Room",
"wonderRoom": "Wonder Room",
"gravity": "Gravity", "gravity": "Gravity",
"reflect": "Reflect", "reflect": "Reflect",
"lightScreen": "Light Screen", "lightScreen": "Light Screen",

View File

@ -37,6 +37,8 @@ export const arenaTag: SimpleTranslationEntries = {
"stickyWebActivateTrap": "The opposing {{pokemonName}} was caught in a sticky web!", "stickyWebActivateTrap": "The opposing {{pokemonName}} was caught in a sticky web!",
"trickRoomOnAdd": "{{pokemonNameWithAffix}} twisted\nthe dimensions!", "trickRoomOnAdd": "{{pokemonNameWithAffix}} twisted\nthe dimensions!",
"trickRoomOnRemove": "The twisted dimensions\nreturned to normal!", "trickRoomOnRemove": "The twisted dimensions\nreturned to normal!",
"wonderRoomOnAdd": "It created a bizarre area in which the\nDefense and Special Defense stats are swapped!",
"wonderRoomOnRemove": "The Defense and Special Defense stats\nhave returned to normal!",
"gravityOnAdd": "Gravity intensified!", "gravityOnAdd": "Gravity intensified!",
"gravityOnRemove": "Gravity returned to normal!", "gravityOnRemove": "Gravity returned to normal!",
"tailwindOnAdd": "The Tailwind blew from behind team!", "tailwindOnAdd": "The Tailwind blew from behind team!",