pokerogue/test/battle/inverse_battle.test.ts

283 lines
9.3 KiB
TypeScript
Raw Normal View History

[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
import { BattlerIndex } from "#app/battle";
import { Type } from "#enums/type";
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
import { Abilities } from "#enums/abilities";
import { ArenaTagType } from "#enums/arena-tag-type";
import { Challenges } from "#enums/challenges";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { StatusEffect } from "#enums/status-effect";
import GameManager from "#test/testUtils/gameManager";
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
describe("Inverse Battle", () => {
let phaserGame: Phaser.Game;
let game: GameManager;
beforeAll(() => {
phaserGame = new Phaser.Game({
type: Phaser.HEADLESS,
});
});
afterEach(() => {
game.phaseInterceptor.restoreOg();
});
beforeEach(() => {
game = new GameManager(phaserGame);
game.challengeMode.addChallenge(Challenges.INVERSE_BATTLE, 1, 1);
game.override
.battleType("single")
.starterSpecies(Species.FEEBAS)
.ability(Abilities.BALL_FETCH)
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(Moves.SPLASH);
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
});
it("Immune types are 2x effective - Thunderbolt against Ground Type", async () => {
game.override
2024-10-04 13:08:31 +08:00
.moveset([ Moves.THUNDERBOLT ])
.enemySpecies(Species.SANDSHREW);
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
await game.challengeMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
vi.spyOn(enemy, "getMoveEffectiveness");
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
game.move.select(Moves.THUNDERBOLT);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
await game.phaseInterceptor.to("MoveEffectPhase");
expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(2);
});
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
it("2x effective types are 0.5x effective - Thunderbolt against Flying Type", async () => {
game.override
2024-10-04 13:08:31 +08:00
.moveset([ Moves.THUNDERBOLT ])
.enemySpecies(Species.PIDGEY);
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
await game.challengeMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
vi.spyOn(enemy, "getMoveEffectiveness");
game.move.select(Moves.THUNDERBOLT);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
await game.phaseInterceptor.to("MoveEffectPhase");
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(0.5);
});
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
it("0.5x effective types are 2x effective - Thunderbolt against Electric Type", async () => {
game.override
2024-10-04 13:08:31 +08:00
.moveset([ Moves.THUNDERBOLT ])
.enemySpecies(Species.CHIKORITA);
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
await game.challengeMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
vi.spyOn(enemy, "getMoveEffectiveness");
game.move.select(Moves.THUNDERBOLT);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
await game.phaseInterceptor.to("MoveEffectPhase");
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(2);
});
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
it("Stealth Rock follows the inverse matchups - Stealth Rock against Charizard deals 1/32 of max HP", async () => {
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
game.scene.arena.addTag(ArenaTagType.STEALTH_ROCK, 1, Moves.STEALTH_ROCK, 0);
game.override
.enemySpecies(Species.CHARIZARD)
.enemyLevel(100);
await game.challengeMode.startBattle();
const charizard = game.scene.getEnemyPokemon()!;
const maxHp = charizard.getMaxHp();
const damage_prediction = Math.max(Math.round(charizard.getMaxHp() / 32), 1);
console.log("Damage calcuation before round: " + charizard.getMaxHp() / 32);
const currentHp = charizard.hp;
const expectedHP = maxHp - damage_prediction;
console.log("Charizard's max HP: " + maxHp, "Damage: " + damage_prediction, "Current HP: " + currentHp, "Expected HP: " + expectedHP);
expect(currentHp).toBeGreaterThan(maxHp * 31 / 32 - 1);
});
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
it("Freeze Dry is 2x effective against Water Type like other Ice type Move - Freeze Dry against Squirtle", async () => {
game.override
2024-10-04 13:08:31 +08:00
.moveset([ Moves.FREEZE_DRY ])
.enemySpecies(Species.SQUIRTLE);
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
await game.challengeMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
vi.spyOn(enemy, "getMoveEffectiveness");
game.move.select(Moves.FREEZE_DRY);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
await game.phaseInterceptor.to("MoveEffectPhase");
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(2);
});
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
it("Water Absorb should heal against water moves - Water Absorb against Water gun", async () => {
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
game.override
2024-10-04 13:08:31 +08:00
.moveset([ Moves.WATER_GUN ])
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
.enemyAbility(Abilities.WATER_ABSORB);
await game.challengeMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
enemy.hp = enemy.getMaxHp() - 1;
game.move.select(Moves.WATER_GUN);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
await game.phaseInterceptor.to("MoveEndPhase");
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
expect(enemy.hp).toBe(enemy.getMaxHp());
});
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
it("Fire type does not get burned - Will-O-Wisp against Charmander", async () => {
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
game.override
2024-10-04 13:08:31 +08:00
.moveset([ Moves.WILL_O_WISP ])
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
.enemySpecies(Species.CHARMANDER);
await game.challengeMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
game.move.select(Moves.WILL_O_WISP);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
await game.move.forceHit();
await game.phaseInterceptor.to("MoveEndPhase");
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
expect(enemy.status?.effect).not.toBe(StatusEffect.BURN);
});
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
it("Electric type does not get paralyzed - Nuzzle against Pikachu", async () => {
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
game.override
2024-10-04 13:08:31 +08:00
.moveset([ Moves.NUZZLE ])
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
.enemySpecies(Species.PIKACHU)
.enemyLevel(50);
await game.challengeMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
game.move.select(Moves.NUZZLE);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
await game.phaseInterceptor.to("MoveEndPhase");
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
expect(enemy.status?.effect).not.toBe(StatusEffect.PARALYSIS);
});
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
it("Ground type is not immune to Thunder Wave - Thunder Wave against Sandshrew", async () => {
game.override
2024-10-04 13:08:31 +08:00
.moveset([ Moves.THUNDER_WAVE ])
.enemySpecies(Species.SANDSHREW);
await game.challengeMode.startBattle();
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
const enemy = game.scene.getEnemyPokemon()!;
game.move.select(Moves.THUNDER_WAVE);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
await game.move.forceHit();
await game.phaseInterceptor.to("MoveEndPhase");
expect(enemy.status?.effect).toBe(StatusEffect.PARALYSIS);
});
it("Anticipation should trigger on 2x effective moves - Anticipation against Thunderbolt", async () => {
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
game.override
2024-10-04 13:08:31 +08:00
.moveset([ Moves.THUNDERBOLT ])
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
.enemySpecies(Species.SANDSHREW)
.enemyAbility(Abilities.ANTICIPATION);
await game.challengeMode.startBattle();
expect(game.scene.getEnemyPokemon()?.summonData.abilitiesApplied[0]).toBe(Abilities.ANTICIPATION);
});
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
it("Conversion 2 should change the type to the resistive type - Conversion 2 against Dragonite", async () => {
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
game.override
2024-10-04 13:08:31 +08:00
.moveset([ Moves.CONVERSION_2 ])
.enemyMoveset([ Moves.DRAGON_CLAW, Moves.DRAGON_CLAW, Moves.DRAGON_CLAW, Moves.DRAGON_CLAW ]);
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
await game.challengeMode.startBattle();
const player = game.scene.getPlayerPokemon()!;
game.move.select(Moves.CONVERSION_2);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]);
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
await game.phaseInterceptor.to("TurnEndPhase");
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
expect(player.getTypes()[0]).toBe(Type.DRAGON);
});
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
it("Flying Press should be 0.25x effective against Grass + Dark Type - Flying Press against Meowscarada", async () => {
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
game.override
2024-10-04 13:08:31 +08:00
.moveset([ Moves.FLYING_PRESS ])
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
.enemySpecies(Species.MEOWSCARADA);
await game.challengeMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
vi.spyOn(enemy, "getMoveEffectiveness");
game.move.select(Moves.FLYING_PRESS);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
await game.phaseInterceptor.to("MoveEffectPhase");
expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(0.25);
});
it("Scrappy ability has no effect - Tackle against Ghost Type still 2x effective with Scrappy", async () => {
game.override
2024-10-04 13:08:31 +08:00
.moveset([ Moves.TACKLE ])
.ability(Abilities.SCRAPPY)
.enemySpecies(Species.GASTLY);
await game.challengeMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
vi.spyOn(enemy, "getMoveEffectiveness");
game.move.select(Moves.TACKLE);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
await game.phaseInterceptor.to("MoveEffectPhase");
expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(2);
});
it("FORESIGHT has no effect - Tackle against Ghost Type still 2x effective with Foresight", async () => {
game.override
2024-10-04 13:08:31 +08:00
.moveset([ Moves.FORESIGHT, Moves.TACKLE ])
.enemySpecies(Species.GASTLY);
await game.challengeMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
vi.spyOn(enemy, "getMoveEffectiveness");
game.move.select(Moves.FORESIGHT);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]);
await game.phaseInterceptor.to("TurnEndPhase");
game.move.select(Moves.TACKLE);
2024-10-04 13:08:31 +08:00
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
await game.phaseInterceptor.to("MoveEffectPhase");
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(2);
});
[Challenge] Inverse battle challenge (#3525) * add inverse battle challenge. refactoring type.ts for inverse battle challenge * update type integer -> number * add inverse battle condition to thunder wave, conversion 2. * add inverse_battle test code, add checking gameMode in runToSummon not to overwrite gameMode to CLASSIC always * update startBattle with isClassicMode default = true * add inverse achievement * fix achv validation condition * remove unnecessary new line * update defaultWidth 160 -> 200 * update locales * fix korean translation * fix korean translation2 * Update src/locales/de/achv.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * resize challenge description 96 -> 84 * update challenge select UI size. * revert font size to 84. update de translation * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/challenges.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/challenges.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/es/achv.ts Co-authored-by: Asdar <asdargmng@gmail.com> * Update src/locales/fr/achv.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * shrink de font size on achivement * set middle align to achv title * Update src/locales/zh_CN/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/achv.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_CN/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * Update src/locales/zh_TW/challenges.ts Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> * fix zh_TW ahiv.ts * fix import code on inverse battle test for updated phase * Update src/data/type.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * update requested changes * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/achv.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/pt_BR/challenges.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * [draft] update inverse battle apply function * change the way how to use applyChallenge for inverse type * resolve confilct * fix test codes * remove unnecessary multiplier variable and break codes * update getTypeDamageMultiplier argument type from `number` to `Type` * Fix inverse types tests (#1) * Fix Inverse Battle tests * Add timeout parameter to tests * update requested changes * update requested changes * update requested changes2 * update comments * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Update src/test/utils/helpers/challengeModeHelper.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * fix mis pasted code * revert loadChallenge code for FreshStartChallenge * code refactoring * restore challenge.json lost translations * revert UI changes * revert unreverted newlines * Run History inclusion * requested changes from torranx * update WaterSuperEffectTypeMultiplierAttr for inverse battle matchup. * fix test code. adding flying press test code * update requested change from xavion3 * updated requested change from xavion 2 * update requested changes from xavion 3 * remove exception code which is not valid * attach partial mark to Freeze dry. requested by xavion * add missing game over phase code when we delete old phases.ts * fix test codes * merge conflict * fix achv condition * updated achv block condition. we don't want to change desc now * resolve conflict * Eternatus Moveset Tinkering * Cleaning it up --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Asdar <asdargmng@gmail.com> Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: frutescens <info@laptop>
2024-08-30 03:59:33 +09:00
});