mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-30 20:22:32 +02:00
Compare commits
3 Commits
0572ac4b91
...
32d4102594
Author | SHA1 | Date | |
---|---|---|---|
|
32d4102594 | ||
|
b6da93a092 | ||
|
a8bb6e7a0b |
BIN
public/audio/bgm/battle_hoenn_champion_g6.mp3
Normal file
BIN
public/audio/bgm/battle_hoenn_champion_g6.mp3
Normal file
Binary file not shown.
@ -1792,8 +1792,10 @@ export default class BattleScene extends SceneBase {
|
|||||||
return 13.950;
|
return 13.950;
|
||||||
case "battle_johto_champion": //B2W2 Johto Champion Battle
|
case "battle_johto_champion": //B2W2 Johto Champion Battle
|
||||||
return 23.498;
|
return 23.498;
|
||||||
case "battle_hoenn_champion": //B2W2 Hoenn Champion Battle
|
case "battle_hoenn_champion_g5": //B2W2 Hoenn Champion Battle
|
||||||
return 11.328;
|
return 11.328;
|
||||||
|
case "battle_hoenn_champion_g6": //ORAS Hoenn Champion Battle
|
||||||
|
return 11.762;
|
||||||
case "battle_sinnoh_champion": //B2W2 Sinnoh Champion Battle
|
case "battle_sinnoh_champion": //B2W2 Sinnoh Champion Battle
|
||||||
return 12.235;
|
return 12.235;
|
||||||
case "battle_champion_alder": //BW Unova Champion Battle
|
case "battle_champion_alder": //BW Unova Champion Battle
|
||||||
|
@ -7905,7 +7905,7 @@ export function initMoves() {
|
|||||||
.makesContact(false)
|
.makesContact(false)
|
||||||
.partial(),
|
.partial(),
|
||||||
new AttackMove(Moves.CLANGING_SCALES, Type.DRAGON, MoveCategory.SPECIAL, 110, 100, 5, -1, 0, 7)
|
new AttackMove(Moves.CLANGING_SCALES, Type.DRAGON, MoveCategory.SPECIAL, 110, 100, 5, -1, 0, 7)
|
||||||
.attr(StatChangeAttr, BattleStat.DEF, -1, true)
|
.attr(StatChangeAttr, BattleStat.DEF, -1, true, null, true, false, MoveEffectTrigger.HIT, true)
|
||||||
.soundBased()
|
.soundBased()
|
||||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||||
new AttackMove(Moves.DRAGON_HAMMER, Type.DRAGON, MoveCategory.PHYSICAL, 90, 100, 15, -1, 0, 7),
|
new AttackMove(Moves.DRAGON_HAMMER, Type.DRAGON, MoveCategory.PHYSICAL, 90, 100, 15, -1, 0, 7),
|
||||||
|
@ -1404,7 +1404,7 @@ export const trainerConfigs: TrainerConfigs = {
|
|||||||
p.generateAndPopulateMoveset();
|
p.generateAndPopulateMoveset();
|
||||||
p.generateName();
|
p.generateName();
|
||||||
})),
|
})),
|
||||||
[TrainerType.STEVEN]: new TrainerConfig(++t).initForChampion(signatureSpecies["STEVEN"],true).setBattleBgm("battle_hoenn_champion").setMixedBattleBgm("battle_hoenn_champion").setHasDouble("steven_wallace_double").setDoubleTrainerType(TrainerType.WALLACE).setDoubleTitle("champion_double")
|
[TrainerType.STEVEN]: new TrainerConfig(++t).initForChampion(signatureSpecies["STEVEN"],true).setBattleBgm("battle_hoenn_champion_g5").setMixedBattleBgm("battle_hoenn_champion_g6").setHasDouble("steven_wallace_double").setDoubleTrainerType(TrainerType.WALLACE).setDoubleTitle("champion_double")
|
||||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([Species.SKARMORY], TrainerSlot.TRAINER, true, p => {
|
.setPartyMemberFunc(0, getRandomPartyMemberFunc([Species.SKARMORY], TrainerSlot.TRAINER, true, p => {
|
||||||
p.generateAndPopulateMoveset();
|
p.generateAndPopulateMoveset();
|
||||||
}))
|
}))
|
||||||
@ -1413,7 +1413,7 @@ export const trainerConfigs: TrainerConfigs = {
|
|||||||
p.generateAndPopulateMoveset();
|
p.generateAndPopulateMoveset();
|
||||||
p.generateName();
|
p.generateName();
|
||||||
})),
|
})),
|
||||||
[TrainerType.WALLACE]: new TrainerConfig(++t).initForChampion(signatureSpecies["WALLACE"],true).setBattleBgm("battle_hoenn_champion").setMixedBattleBgm("battle_hoenn_champion").setHasDouble("wallace_steven_double").setDoubleTrainerType(TrainerType.STEVEN).setDoubleTitle("champion_double")
|
[TrainerType.WALLACE]: new TrainerConfig(++t).initForChampion(signatureSpecies["WALLACE"],true).setBattleBgm("battle_hoenn_champion_g5").setMixedBattleBgm("battle_hoenn_champion_g6").setHasDouble("wallace_steven_double").setDoubleTrainerType(TrainerType.STEVEN).setDoubleTitle("champion_double")
|
||||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([Species.PELIPPER], TrainerSlot.TRAINER, true, p => {
|
.setPartyMemberFunc(0, getRandomPartyMemberFunc([Species.PELIPPER], TrainerSlot.TRAINER, true, p => {
|
||||||
p.abilityIndex = 1; // Drizzle
|
p.abilityIndex = 1; // Drizzle
|
||||||
p.generateAndPopulateMoveset();
|
p.generateAndPopulateMoveset();
|
||||||
|
@ -5,7 +5,8 @@ export const bgmName: SimpleTranslationEntries = {
|
|||||||
"missing_entries" : "{{name}}",
|
"missing_entries" : "{{name}}",
|
||||||
"battle_kanto_champion": "S2W2 Vs. Kanto Champion",
|
"battle_kanto_champion": "S2W2 Vs. Kanto Champion",
|
||||||
"battle_johto_champion": "S2W2 Vs. Johto Champion",
|
"battle_johto_champion": "S2W2 Vs. Johto Champion",
|
||||||
"battle_hoenn_champion": "S2W2 Vs. Hoenn Champion",
|
"battle_hoenn_champion_g5": "S2W2 Vs. Hoenn Champion",
|
||||||
|
"battle_hoenn_champion_g6": "ORAS Vs. Hoenn Champion",
|
||||||
"battle_sinnoh_champion": "S2W2 Vs. Champion Cynthia",
|
"battle_sinnoh_champion": "S2W2 Vs. Champion Cynthia",
|
||||||
"battle_champion_alder": "SW Vs. Champion Lauro",
|
"battle_champion_alder": "SW Vs. Champion Lauro",
|
||||||
"battle_champion_iris": "S2W2 Vs. Champion Lilia",
|
"battle_champion_iris": "S2W2 Vs. Champion Lilia",
|
||||||
|
@ -5,7 +5,8 @@ export const bgmName: SimpleTranslationEntries = {
|
|||||||
"missing_entries" : "{{name}}",
|
"missing_entries" : "{{name}}",
|
||||||
"battle_kanto_champion": "B2W2 Kanto Champion Battle",
|
"battle_kanto_champion": "B2W2 Kanto Champion Battle",
|
||||||
"battle_johto_champion": "B2W2 Johto Champion Battle",
|
"battle_johto_champion": "B2W2 Johto Champion Battle",
|
||||||
"battle_hoenn_champion": "B2W2 Hoenn Champion Battle",
|
"battle_hoenn_champion_g5": "B2W2 Hoenn Champion Battle",
|
||||||
|
"battle_hoenn_champion_g6": "ORAS Hoenn Champion Battle",
|
||||||
"battle_sinnoh_champion": "B2W2 Sinnoh Champion Battle",
|
"battle_sinnoh_champion": "B2W2 Sinnoh Champion Battle",
|
||||||
"battle_champion_alder": "BW Unova Champion Battle",
|
"battle_champion_alder": "BW Unova Champion Battle",
|
||||||
"battle_champion_iris": "B2W2 Unova Champion Battle",
|
"battle_champion_iris": "B2W2 Unova Champion Battle",
|
||||||
|
@ -5,7 +5,8 @@ export const bgmName: SimpleTranslationEntries = {
|
|||||||
"missing_entries" : "{{name}}",
|
"missing_entries" : "{{name}}",
|
||||||
"battle_kanto_champion": "B2W2 - ¡Vs Campeón de Kanto!",
|
"battle_kanto_champion": "B2W2 - ¡Vs Campeón de Kanto!",
|
||||||
"battle_johto_champion": "B2W2 - ¡Vs Campeón de Johto!",
|
"battle_johto_champion": "B2W2 - ¡Vs Campeón de Johto!",
|
||||||
"battle_hoenn_champion": "B2W2 - ¡Vs Campeón de Hoenn!",
|
"battle_hoenn_champion_g5": "B2W2 - ¡Vs Campeón de Hoenn!",
|
||||||
|
"battle_hoenn_champion_g6": "ORAS - ¡Vs Campeón de Hoenn!",
|
||||||
"battle_sinnoh_champion": "B2W2 - ¡Vs Campeón de Sinnoh!",
|
"battle_sinnoh_champion": "B2W2 - ¡Vs Campeón de Sinnoh!",
|
||||||
"battle_champion_alder": "BW - ¡Vs Campeón de Teselia!",
|
"battle_champion_alder": "BW - ¡Vs Campeón de Teselia!",
|
||||||
"battle_champion_iris": "B2W2 - ¡Vs Campeón de Teselia!",
|
"battle_champion_iris": "B2W2 - ¡Vs Campeón de Teselia!",
|
||||||
|
@ -5,7 +5,8 @@ export const bgmName: SimpleTranslationEntries = {
|
|||||||
"missing_entries" : "{{name}}",
|
"missing_entries" : "{{name}}",
|
||||||
"battle_kanto_champion": "N2B2 - Vs. Maitre de Kanto",
|
"battle_kanto_champion": "N2B2 - Vs. Maitre de Kanto",
|
||||||
"battle_johto_champion": "N2B2 - Vs. Maitre de Johto",
|
"battle_johto_champion": "N2B2 - Vs. Maitre de Johto",
|
||||||
"battle_hoenn_champion": "N2B2 - Vs. Maitre de Hoenn",
|
"battle_hoenn_champion_g5": "N2B2 - Vs. Maitre de Hoenn",
|
||||||
|
"battle_hoenn_champion_g6": "ROSA - Vs. Maitre de Hoenn",
|
||||||
"battle_sinnoh_champion": "N2B2 - Vs. Maitresse de Sinnoh",
|
"battle_sinnoh_champion": "N2B2 - Vs. Maitresse de Sinnoh",
|
||||||
"battle_champion_alder": "NB - Vs. Maitre d’Unys",
|
"battle_champion_alder": "NB - Vs. Maitre d’Unys",
|
||||||
"battle_champion_iris": "N2B2 - Vs. Maitresse d’Unys",
|
"battle_champion_iris": "N2B2 - Vs. Maitresse d’Unys",
|
||||||
|
@ -5,7 +5,8 @@ export const bgmName: SimpleTranslationEntries = {
|
|||||||
"missing_entries" : "{{name}}",
|
"missing_entries" : "{{name}}",
|
||||||
"battle_kanto_champion": "B2W2 Kanto Champion Battle",
|
"battle_kanto_champion": "B2W2 Kanto Champion Battle",
|
||||||
"battle_johto_champion": "B2W2 Johto Champion Battle",
|
"battle_johto_champion": "B2W2 Johto Champion Battle",
|
||||||
"battle_hoenn_champion": "B2W2 Hoenn Champion Battle",
|
"battle_hoenn_champion_g5": "B2W2 Hoenn Champion Battle",
|
||||||
|
"battle_hoenn_champion_g6": "ORAS Hoenn Champion Battle",
|
||||||
"battle_sinnoh_champion": "B2W2 Sinnoh Champion Battle",
|
"battle_sinnoh_champion": "B2W2 Sinnoh Champion Battle",
|
||||||
"battle_champion_alder": "BW Unova Champion Battle",
|
"battle_champion_alder": "BW Unova Champion Battle",
|
||||||
"battle_champion_iris": "B2W2 Unova Champion Battle",
|
"battle_champion_iris": "B2W2 Unova Champion Battle",
|
||||||
|
@ -5,7 +5,8 @@ export const bgmName: SimpleTranslationEntries = {
|
|||||||
"missing_entries" : "{{name}}",
|
"missing_entries" : "{{name}}",
|
||||||
"battle_kanto_champion": "BW2 관동 챔피언 배틀",
|
"battle_kanto_champion": "BW2 관동 챔피언 배틀",
|
||||||
"battle_johto_champion": "BW2 성도 챔피언 배틀",
|
"battle_johto_champion": "BW2 성도 챔피언 배틀",
|
||||||
"battle_hoenn_champion": "BW2 호연 챔피언 배틀",
|
"battle_hoenn_champion_g5": "BW2 호연 챔피언 배틀",
|
||||||
|
"battle_hoenn_champion_g6": "ORAS 호연 챔피언 배틀",
|
||||||
"battle_sinnoh_champion": "BW2 신오 챔피언 배틀",
|
"battle_sinnoh_champion": "BW2 신오 챔피언 배틀",
|
||||||
"battle_champion_alder": "BW 하나 챔피언 배틀",
|
"battle_champion_alder": "BW 하나 챔피언 배틀",
|
||||||
"battle_champion_iris": "BW2 하나 챔피언 배틀",
|
"battle_champion_iris": "BW2 하나 챔피언 배틀",
|
||||||
|
@ -5,7 +5,8 @@ export const bgmName: SimpleTranslationEntries = {
|
|||||||
"missing_entries": "{{name}}",
|
"missing_entries": "{{name}}",
|
||||||
"battle_kanto_champion": "B2W2 Batalha do Campeão de Kanto",
|
"battle_kanto_champion": "B2W2 Batalha do Campeão de Kanto",
|
||||||
"battle_johto_champion": "B2W2 Batalha do Campeão de Johto",
|
"battle_johto_champion": "B2W2 Batalha do Campeão de Johto",
|
||||||
"battle_hoenn_champion": "B2W2 Batalha do Campeão de Hoenn",
|
"battle_hoenn_champion_g5": "B2W2 Batalha do Campeão de Hoenn",
|
||||||
|
"battle_hoenn_champion_g6": "ORAS Batalha do Campeão de Hoenn",
|
||||||
"battle_sinnoh_champion": "B2W2 Batalha do Campeão de Sinnoh",
|
"battle_sinnoh_champion": "B2W2 Batalha do Campeão de Sinnoh",
|
||||||
"battle_champion_alder": "BW Batalha do Campeão de Unova",
|
"battle_champion_alder": "BW Batalha do Campeão de Unova",
|
||||||
"battle_champion_iris": "B2W2 Batalha do Campeão de Unova",
|
"battle_champion_iris": "B2W2 Batalha do Campeão de Unova",
|
||||||
|
@ -4,19 +4,19 @@ export const filterBar: SimpleTranslationEntries = {
|
|||||||
"genFilter": "Ger.",
|
"genFilter": "Ger.",
|
||||||
"typeFilter": "Tipo",
|
"typeFilter": "Tipo",
|
||||||
"dexFilter": "Dex",
|
"dexFilter": "Dex",
|
||||||
"unlocksFilter": "Outros",
|
"unlocksFilter": "Desbloqueios",
|
||||||
"miscFilter": "Misc",
|
"miscFilter": "Outros",
|
||||||
"sortFilter": "Ordem",
|
"sortFilter": "Ordem",
|
||||||
"all": "Tudo",
|
"all": "Tudo",
|
||||||
"normal": "Normal",
|
"normal": "Normal",
|
||||||
"uncaught": "Não Capturado",
|
"uncaught": "Não Capturado",
|
||||||
"passive": "Passive",
|
"passive": "Passiva",
|
||||||
"passiveUnlocked": "Passiva Desbloq.",
|
"passiveUnlocked": "Passiva Desbloq.",
|
||||||
"passiveLocked": "Passiva Bloq.",
|
"passiveLocked": "Passiva Bloq.",
|
||||||
"ribbon": "Ribbon",
|
"ribbon": "Fita",
|
||||||
"hasWon": "Ribbon - Yes",
|
"hasWon": "Fita - Sim",
|
||||||
"hasNotWon": "Ribbon - No",
|
"hasNotWon": "Fita - Não",
|
||||||
"sortByNumber": "Núm.",
|
"sortByNumber": "Número",
|
||||||
"sortByCost": "Custo",
|
"sortByCost": "Custo",
|
||||||
"sortByCandies": "# Doces",
|
"sortByCandies": "# Doces",
|
||||||
"sortByIVs": "IVs",
|
"sortByIVs": "IVs",
|
||||||
|
@ -5,7 +5,8 @@ export const bgmName: SimpleTranslationEntries = {
|
|||||||
"missing_entries" : "{{name}}",
|
"missing_entries" : "{{name}}",
|
||||||
"battle_kanto_champion": "黑2白2「决战!关都冠军」",
|
"battle_kanto_champion": "黑2白2「决战!关都冠军」",
|
||||||
"battle_johto_champion": "黑2白2「决战!城都冠军」",
|
"battle_johto_champion": "黑2白2「决战!城都冠军」",
|
||||||
"battle_hoenn_champion": "黑2白2「决战!丰缘冠军」",
|
"battle_hoenn_champion_g5": "黑2白2「决战!丰缘冠军」",
|
||||||
|
"battle_hoenn_champion_g6": "Ω红宝石α蓝宝石「决战!丰缘冠军」",
|
||||||
"battle_sinnoh_champion": "黑2白2「决战!神奥冠军」",
|
"battle_sinnoh_champion": "黑2白2「决战!神奥冠军」",
|
||||||
"battle_champion_alder": "黑白「决战!合众冠军」",
|
"battle_champion_alder": "黑白「决战!合众冠军」",
|
||||||
"battle_champion_iris": "黑2白2「决战!合众冠军」",
|
"battle_champion_iris": "黑2白2「决战!合众冠军」",
|
||||||
|
@ -5,7 +5,8 @@ export const bgmName: SimpleTranslationEntries = {
|
|||||||
"missing_entries" : "{{name}}",
|
"missing_entries" : "{{name}}",
|
||||||
"battle_kanto_champion": "B2W2 Kanto Champion Battle",
|
"battle_kanto_champion": "B2W2 Kanto Champion Battle",
|
||||||
"battle_johto_champion": "B2W2 Johto Champion Battle",
|
"battle_johto_champion": "B2W2 Johto Champion Battle",
|
||||||
"battle_hoenn_champion": "B2W2 Hoenn Champion Battle",
|
"battle_hoenn_champion_g5": "B2W2 Hoenn Champion Battle",
|
||||||
|
"battle_hoenn_champion_g6": "ORAS Hoenn Champion Battle",
|
||||||
"battle_sinnoh_champion": "B2W2 Sinnoh Champion Battle",
|
"battle_sinnoh_champion": "B2W2 Sinnoh Champion Battle",
|
||||||
"battle_champion_alder": "BW Unova Champion Battle",
|
"battle_champion_alder": "BW Unova Champion Battle",
|
||||||
"battle_champion_iris": "B2W2 Unova Champion Battle",
|
"battle_champion_iris": "B2W2 Unova Champion Battle",
|
||||||
|
@ -2966,6 +2966,8 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
|
|
||||||
// Move animation only needs one target
|
// Move animation only needs one target
|
||||||
new MoveAnim(move.id as Moves, user, this.getTarget()?.getBattlerIndex()).play(this.scene, () => {
|
new MoveAnim(move.id as Moves, user, this.getTarget()?.getBattlerIndex()).play(this.scene, () => {
|
||||||
|
/** Has the move successfully hit a target (for damage) yet? */
|
||||||
|
let hasHit: boolean = false;
|
||||||
for (const target of targets) {
|
for (const target of targets) {
|
||||||
if (!targetHitChecks[target.getBattlerIndex()]) {
|
if (!targetHitChecks[target.getBattlerIndex()]) {
|
||||||
this.stopMultiHit(target);
|
this.stopMultiHit(target);
|
||||||
@ -2981,7 +2983,6 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
const isProtected = !this.move.getMove().checkFlag(MoveFlags.IGNORE_PROTECT, user, target) && target.findTags(t => t instanceof ProtectedTag).find(t => target.lapseTag(t.tagType));
|
const isProtected = !this.move.getMove().checkFlag(MoveFlags.IGNORE_PROTECT, user, target) && target.findTags(t => t instanceof ProtectedTag).find(t => target.lapseTag(t.tagType));
|
||||||
|
|
||||||
const firstHit = (user.turnData.hitsLeft === user.turnData.hitCount);
|
const firstHit = (user.turnData.hitsLeft === user.turnData.hitCount);
|
||||||
const firstTarget = (moveHistoryEntry.result === MoveResult.PENDING);
|
|
||||||
|
|
||||||
if (firstHit) {
|
if (firstHit) {
|
||||||
user.pushMoveHistory(moveHistoryEntry);
|
user.pushMoveHistory(moveHistoryEntry);
|
||||||
@ -2991,6 +2992,18 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
|
|
||||||
const hitResult = !isProtected ? target.apply(user, move) : HitResult.NO_EFFECT;
|
const hitResult = !isProtected ? target.apply(user, move) : HitResult.NO_EFFECT;
|
||||||
|
|
||||||
|
const dealsDamage = [
|
||||||
|
HitResult.EFFECTIVE,
|
||||||
|
HitResult.SUPER_EFFECTIVE,
|
||||||
|
HitResult.NOT_VERY_EFFECTIVE,
|
||||||
|
HitResult.ONE_HIT_KO
|
||||||
|
].includes(hitResult);
|
||||||
|
|
||||||
|
const firstTarget = dealsDamage && !hasHit;
|
||||||
|
if (firstTarget) {
|
||||||
|
hasHit = true;
|
||||||
|
}
|
||||||
|
|
||||||
const lastHit = (user.turnData.hitsLeft === 1 || !this.getTarget()?.isActive());
|
const lastHit = (user.turnData.hitsLeft === 1 || !this.getTarget()?.isActive());
|
||||||
|
|
||||||
if (lastHit) {
|
if (lastHit) {
|
||||||
@ -3008,7 +3021,7 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
if (hitResult !== HitResult.NO_EFFECT) {
|
if (hitResult !== HitResult.NO_EFFECT) {
|
||||||
applyFilteredMoveAttrs((attr: MoveAttr) => attr instanceof MoveEffectAttr && (attr as MoveEffectAttr).trigger === MoveEffectTrigger.POST_APPLY
|
applyFilteredMoveAttrs((attr: MoveAttr) => attr instanceof MoveEffectAttr && (attr as MoveEffectAttr).trigger === MoveEffectTrigger.POST_APPLY
|
||||||
&& !(attr as MoveEffectAttr).selfTarget && (!attr.firstHitOnly || firstHit) && (!attr.lastHitOnly || lastHit), user, target, this.move.getMove()).then(() => {
|
&& !(attr as MoveEffectAttr).selfTarget && (!attr.firstHitOnly || firstHit) && (!attr.lastHitOnly || lastHit), user, target, this.move.getMove()).then(() => {
|
||||||
if (hitResult < HitResult.NO_EFFECT && !target.hasAbilityWithAttr(IgnoreMoveEffectsAbAttr)) {
|
if (dealsDamage && !target.hasAbilityWithAttr(IgnoreMoveEffectsAbAttr)) {
|
||||||
const flinched = new Utils.BooleanHolder(false);
|
const flinched = new Utils.BooleanHolder(false);
|
||||||
user.scene.applyModifiers(FlinchChanceModifier, user.isPlayer(), user, flinched);
|
user.scene.applyModifiers(FlinchChanceModifier, user.isPlayer(), user, flinched);
|
||||||
if (flinched.value) {
|
if (flinched.value) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { BattleStat } from "#app/data/battle-stat.js";
|
import { BattleStat } from "#app/data/battle-stat.js";
|
||||||
import {
|
import {
|
||||||
CommandPhase,
|
MoveEffectPhase,
|
||||||
MoveEndPhase,
|
MoveEndPhase,
|
||||||
StatChangePhase,
|
StatChangePhase,
|
||||||
} from "#app/phases";
|
} from "#app/phases";
|
||||||
@ -10,7 +10,7 @@ import { Abilities } from "#enums/abilities";
|
|||||||
import { Moves } from "#enums/moves";
|
import { Moves } from "#enums/moves";
|
||||||
import { Species } from "#enums/species";
|
import { Species } from "#enums/species";
|
||||||
import Phaser from "phaser";
|
import Phaser from "phaser";
|
||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import { SPLASH_ONLY } from "../utils/testUtils";
|
import { SPLASH_ONLY } from "../utils/testUtils";
|
||||||
|
|
||||||
const TIMEOUT = 20 * 1000;
|
const TIMEOUT = 20 * 1000;
|
||||||
@ -44,16 +44,8 @@ describe("Moves - Make It Rain", () => {
|
|||||||
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
|
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
|
||||||
|
|
||||||
const playerPokemon = game.scene.getPlayerField();
|
const playerPokemon = game.scene.getPlayerField();
|
||||||
expect(playerPokemon.length).toBe(2);
|
|
||||||
playerPokemon.forEach(p => expect(p).toBeDefined());
|
|
||||||
|
|
||||||
const enemyPokemon = game.scene.getEnemyField();
|
|
||||||
expect(enemyPokemon.length).toBe(2);
|
|
||||||
enemyPokemon.forEach(p => expect(p).toBeDefined());
|
|
||||||
|
|
||||||
game.doAttack(getMovePosition(game.scene, 0, Moves.MAKE_IT_RAIN));
|
game.doAttack(getMovePosition(game.scene, 0, Moves.MAKE_IT_RAIN));
|
||||||
|
|
||||||
await game.phaseInterceptor.to(CommandPhase);
|
|
||||||
game.doAttack(getMovePosition(game.scene, 1, Moves.SPLASH));
|
game.doAttack(getMovePosition(game.scene, 1, Moves.SPLASH));
|
||||||
|
|
||||||
await game.phaseInterceptor.to(MoveEndPhase);
|
await game.phaseInterceptor.to(MoveEndPhase);
|
||||||
@ -68,10 +60,7 @@ describe("Moves - Make It Rain", () => {
|
|||||||
await game.startBattle([Species.CHARIZARD]);
|
await game.startBattle([Species.CHARIZARD]);
|
||||||
|
|
||||||
const playerPokemon = game.scene.getPlayerPokemon();
|
const playerPokemon = game.scene.getPlayerPokemon();
|
||||||
expect(playerPokemon).toBeDefined();
|
|
||||||
|
|
||||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||||
expect(enemyPokemon).toBeDefined();
|
|
||||||
|
|
||||||
game.doAttack(getMovePosition(game.scene, 0, Moves.MAKE_IT_RAIN));
|
game.doAttack(getMovePosition(game.scene, 0, Moves.MAKE_IT_RAIN));
|
||||||
|
|
||||||
@ -87,14 +76,9 @@ describe("Moves - Make It Rain", () => {
|
|||||||
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
|
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
|
||||||
|
|
||||||
const playerPokemon = game.scene.getPlayerField();
|
const playerPokemon = game.scene.getPlayerField();
|
||||||
playerPokemon.forEach(p => expect(p).toBeDefined());
|
|
||||||
|
|
||||||
const enemyPokemon = game.scene.getEnemyField();
|
const enemyPokemon = game.scene.getEnemyField();
|
||||||
enemyPokemon.forEach(p => expect(p).toBeDefined());
|
|
||||||
|
|
||||||
game.doAttack(getMovePosition(game.scene, 0, Moves.MAKE_IT_RAIN));
|
game.doAttack(getMovePosition(game.scene, 0, Moves.MAKE_IT_RAIN));
|
||||||
|
|
||||||
await game.phaseInterceptor.to(CommandPhase);
|
|
||||||
game.doAttack(getMovePosition(game.scene, 1, Moves.SPLASH));
|
game.doAttack(getMovePosition(game.scene, 1, Moves.SPLASH));
|
||||||
|
|
||||||
await game.phaseInterceptor.to(StatChangePhase);
|
await game.phaseInterceptor.to(StatChangePhase);
|
||||||
@ -102,4 +86,23 @@ describe("Moves - Make It Rain", () => {
|
|||||||
enemyPokemon.forEach(p => expect(p.isFainted()).toBe(true));
|
enemyPokemon.forEach(p => expect(p.isFainted()).toBe(true));
|
||||||
expect(playerPokemon[0].summonData.battleStats[BattleStat.SPATK]).toBe(-1);
|
expect(playerPokemon[0].summonData.battleStats[BattleStat.SPATK]).toBe(-1);
|
||||||
}, TIMEOUT);
|
}, TIMEOUT);
|
||||||
|
|
||||||
|
it("should reduce Sp. Atk if it only hits the second target", async () => {
|
||||||
|
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
|
||||||
|
|
||||||
|
const playerPokemon = game.scene.getPlayerField();
|
||||||
|
|
||||||
|
game.doAttack(getMovePosition(game.scene, 0, Moves.MAKE_IT_RAIN));
|
||||||
|
game.doAttack(getMovePosition(game.scene, 1, Moves.SPLASH));
|
||||||
|
|
||||||
|
await game.phaseInterceptor.to(MoveEffectPhase, false);
|
||||||
|
|
||||||
|
// Make Make It Rain miss the first target
|
||||||
|
const moveEffectPhase = game.scene.getCurrentPhase() as MoveEffectPhase;
|
||||||
|
vi.spyOn(moveEffectPhase, "hitCheck").mockReturnValueOnce(false);
|
||||||
|
|
||||||
|
await game.phaseInterceptor.to(MoveEndPhase);
|
||||||
|
|
||||||
|
expect(playerPokemon[0].summonData.battleStats[BattleStat.SPATK]).toBe(-1);
|
||||||
|
}, TIMEOUT);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user