Synchronize Beta with main hotfix #5

Synchronize Beta with Main
This commit is contained in:
Tempoanon 2024-09-29 17:03:52 -04:00 committed by GitHub
commit 3976d115d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
29 changed files with 102 additions and 49 deletions

2
.github/FUNDING.yml vendored
View File

@ -1 +1 @@
github: patapancakes github: pagefaultgames

View File

@ -3091,11 +3091,6 @@ export default class BattleScene extends SceneBase {
private isWaveMysteryEncounter(newBattleType: BattleType, waveIndex: number, sessionDataEncounterType?: MysteryEncounterType): boolean { private isWaveMysteryEncounter(newBattleType: BattleType, waveIndex: number, sessionDataEncounterType?: MysteryEncounterType): boolean {
const [lowestMysteryEncounterWave, highestMysteryEncounterWave] = this.gameMode.getMysteryEncounterLegalWaves(); const [lowestMysteryEncounterWave, highestMysteryEncounterWave] = this.gameMode.getMysteryEncounterLegalWaves();
if (this.gameMode.hasMysteryEncounters && newBattleType === BattleType.WILD && !this.gameMode.isBoss(waveIndex) && waveIndex < highestMysteryEncounterWave && waveIndex > lowestMysteryEncounterWave) { if (this.gameMode.hasMysteryEncounters && newBattleType === BattleType.WILD && !this.gameMode.isBoss(waveIndex) && waveIndex < highestMysteryEncounterWave && waveIndex > lowestMysteryEncounterWave) {
// If ME type is already defined in session data, no need to roll RNG check
if (!isNullOrUndefined(sessionDataEncounterType)) {
return true;
}
// Base spawn weight is BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT/256, and increases by WEIGHT_INCREMENT_ON_SPAWN_MISS/256 for each missed attempt at spawning an encounter on a valid floor // Base spawn weight is BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT/256, and increases by WEIGHT_INCREMENT_ON_SPAWN_MISS/256 for each missed attempt at spawning an encounter on a valid floor
const sessionEncounterRate = this.mysteryEncounterSaveData.encounterSpawnChance; const sessionEncounterRate = this.mysteryEncounterSaveData.encounterSpawnChance;
const encounteredEvents = this.mysteryEncounterSaveData.encounteredEvents; const encounteredEvents = this.mysteryEncounterSaveData.encounteredEvents;

View File

@ -81,7 +81,7 @@ export const speciesEggMoves = {
[Species.LEDYBA]: [ Moves.POLLEN_PUFF, Moves.THIEF, Moves.PARTING_SHOT, Moves.SPORE ], [Species.LEDYBA]: [ Moves.POLLEN_PUFF, Moves.THIEF, Moves.PARTING_SHOT, Moves.SPORE ],
[Species.SPINARAK]: [ Moves.PARTING_SHOT, Moves.ATTACK_ORDER, Moves.GASTRO_ACID, Moves.STRENGTH_SAP ], [Species.SPINARAK]: [ Moves.PARTING_SHOT, Moves.ATTACK_ORDER, Moves.GASTRO_ACID, Moves.STRENGTH_SAP ],
[Species.CHINCHOU]: [ Moves.THUNDERCLAP, Moves.BOUNCY_BUBBLE, Moves.THUNDER_CAGE, Moves.TAIL_GLOW ], [Species.CHINCHOU]: [ Moves.THUNDERCLAP, Moves.BOUNCY_BUBBLE, Moves.THUNDER_CAGE, Moves.TAIL_GLOW ],
[Species.PICHU]: [ Moves.MOONBLAST, Moves.WAVE_CRASH, Moves.AIR_SLASH, Moves.AURA_WHEEL ], [Species.PICHU]: [ Moves.MOONBLAST, Moves.TRIPLE_AXEL, Moves.FIERY_DANCE, Moves.AURA_WHEEL ],
[Species.CLEFFA]: [ Moves.CALM_MIND, Moves.EARTH_POWER, Moves.WISH, Moves.LIGHT_OF_RUIN ], [Species.CLEFFA]: [ Moves.CALM_MIND, Moves.EARTH_POWER, Moves.WISH, Moves.LIGHT_OF_RUIN ],
[Species.IGGLYBUFF]: [ Moves.DRAIN_PUNCH, Moves.GRAV_APPLE, Moves.SOFT_BOILED, Moves.EXTREME_SPEED ], [Species.IGGLYBUFF]: [ Moves.DRAIN_PUNCH, Moves.GRAV_APPLE, Moves.SOFT_BOILED, Moves.EXTREME_SPEED ],
[Species.TOGEPI]: [ Moves.SCORCHING_SANDS, Moves.ROOST, Moves.RELIC_SONG, Moves.FIERY_DANCE ], [Species.TOGEPI]: [ Moves.SCORCHING_SANDS, Moves.ROOST, Moves.RELIC_SONG, Moves.FIERY_DANCE ],
@ -195,7 +195,7 @@ export const speciesEggMoves = {
[Species.REGISTEEL]: [ Moves.BODY_PRESS, Moves.SIZZLY_SLIDE, Moves.RECOVER, Moves.GIGATON_HAMMER ], [Species.REGISTEEL]: [ Moves.BODY_PRESS, Moves.SIZZLY_SLIDE, Moves.RECOVER, Moves.GIGATON_HAMMER ],
[Species.LATIAS]: [ Moves.CORE_ENFORCER, Moves.FUSION_FLARE, Moves.SPARKLY_SWIRL, Moves.MYSTICAL_POWER ], [Species.LATIAS]: [ Moves.CORE_ENFORCER, Moves.FUSION_FLARE, Moves.SPARKLY_SWIRL, Moves.MYSTICAL_POWER ],
[Species.LATIOS]: [ Moves.CORE_ENFORCER, Moves.BLUE_FLARE, Moves.NASTY_PLOT, Moves.TACHYON_CUTTER ], [Species.LATIOS]: [ Moves.CORE_ENFORCER, Moves.BLUE_FLARE, Moves.NASTY_PLOT, Moves.TACHYON_CUTTER ],
[Species.KYOGRE]: [ Moves.RECOVER, Moves.HURRICANE, Moves.FLIP_TURN, Moves.WILDBOLT_STORM ], [Species.KYOGRE]: [ Moves.RECOVER, Moves.HURRICANE, Moves.FREEZY_FROST, Moves.WILDBOLT_STORM ],
[Species.GROUDON]: [ Moves.STONE_AXE, Moves.SOLAR_BLADE, Moves.MORNING_SUN, Moves.SACRED_FIRE ], [Species.GROUDON]: [ Moves.STONE_AXE, Moves.SOLAR_BLADE, Moves.MORNING_SUN, Moves.SACRED_FIRE ],
[Species.RAYQUAZA]: [ Moves.V_CREATE, Moves.DRAGON_DARTS, Moves.CORE_ENFORCER, Moves.OBLIVION_WING ], [Species.RAYQUAZA]: [ Moves.V_CREATE, Moves.DRAGON_DARTS, Moves.CORE_ENFORCER, Moves.OBLIVION_WING ],
[Species.JIRACHI]: [ Moves.TACHYON_CUTTER, Moves.TRIPLE_ARROWS, Moves.ROCK_SLIDE, Moves.SHELL_SMASH ], [Species.JIRACHI]: [ Moves.TACHYON_CUTTER, Moves.TRIPLE_ARROWS, Moves.ROCK_SLIDE, Moves.SHELL_SMASH ],

View File

@ -5226,6 +5226,9 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
*/ */
const switchOutTarget = this.selfSwitch ? user : target; const switchOutTarget = this.selfSwitch ? user : target;
if (switchOutTarget instanceof PlayerPokemon) { if (switchOutTarget instanceof PlayerPokemon) {
if (switchOutTarget.scene.getParty().filter((p) => p.isAllowedInBattle() && !p.isOnField()).length < 1) {
return false;
}
switchOutTarget.leaveField(this.switchType === SwitchType.SWITCH); switchOutTarget.leaveField(this.switchType === SwitchType.SWITCH);
if (switchOutTarget.hp > 0) { if (switchOutTarget.hp > 0) {
@ -5234,6 +5237,9 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
} }
return false; return false;
} else if (user.scene.currentBattle.battleType !== BattleType.WILD) { } else if (user.scene.currentBattle.battleType !== BattleType.WILD) {
if (switchOutTarget.scene.getEnemyParty().filter((p) => p.isAllowedInBattle() && !p.isOnField()).length < 1) {
return false;
}
// Switch out logic for trainer battles // Switch out logic for trainer battles
switchOutTarget.leaveField(this.switchType === SwitchType.SWITCH); switchOutTarget.leaveField(this.switchType === SwitchType.SWITCH);
@ -5244,6 +5250,9 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
false, false), MoveEndPhase); false, false), MoveEndPhase);
} }
} else { } else {
if (user.scene.currentBattle.waveIndex % 10 === 0) {
return false;
}
// Switch out logic for everything else (eg: WILD battles) // Switch out logic for everything else (eg: WILD battles)
switchOutTarget.leaveField(false); switchOutTarget.leaveField(false);

View File

@ -159,7 +159,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter =
return true; return true;
}, },
onHover: () => { onHover: () => {
const formName = tradePokemon.species.forms && tradePokemon.species.forms.length > tradePokemon.formIndex ? tradePokemon.species.forms[pokemon.formIndex].formName : null; const formName = tradePokemon.species.forms && tradePokemon.species.forms.length > tradePokemon.formIndex ? tradePokemon.species.forms[tradePokemon.formIndex].formName : null;
const line1 = i18next.t("pokemonInfoContainer:ability") + " " + tradePokemon.getAbility().name + (tradePokemon.getGender() !== Gender.GENDERLESS ? " | " + i18next.t("pokemonInfoContainer:gender") + " " + getGenderSymbol(tradePokemon.getGender()) : ""); const line1 = i18next.t("pokemonInfoContainer:ability") + " " + tradePokemon.getAbility().name + (tradePokemon.getGender() !== Gender.GENDERLESS ? " | " + i18next.t("pokemonInfoContainer:gender") + " " + getGenderSymbol(tradePokemon.getGender()) : "");
const line2 = i18next.t("pokemonInfoContainer:nature") + " " + getNatureName(tradePokemon.getNature()) + (formName ? " | " + i18next.t("pokemonInfoContainer:form") + " " + formName : ""); const line2 = i18next.t("pokemonInfoContainer:nature") + " " + getNatureName(tradePokemon.getNature()) + (formName ? " | " + i18next.t("pokemonInfoContainer:form") + " " + formName : "");
showEncounterText(scene, `${line1}\n${line2}`, 0, 0, false); showEncounterText(scene, `${line1}\n${line2}`, 0, 0, false);

View File

@ -558,6 +558,10 @@ function onGameOver(scene: BattleScene) {
// Revert BGM // Revert BGM
scene.playBgm(scene.arena.bgm); scene.playBgm(scene.arena.bgm);
// Clear any leftover battle phases
scene.clearPhaseQueue();
scene.clearPhaseQueueSplice();
// Return enemy Pokemon // Return enemy Pokemon
const pokemon = scene.getEnemyPokemon(); const pokemon = scene.getEnemyPokemon();
if (pokemon) { if (pokemon) {

View File

@ -224,7 +224,7 @@ export function getRandomSpeciesByStarterTier(starterTiers: number | [number, nu
// If no filtered mons exist at specified starter tiers, will expand starter search range until there are // If no filtered mons exist at specified starter tiers, will expand starter search range until there are
// Starts by decrementing starter tier min until it is 0, then increments tier max up to 10 // Starts by decrementing starter tier min until it is 0, then increments tier max up to 10
let tryFilterStarterTiers: [PokemonSpecies, number][] = filteredSpecies.filter(s => (s[1] >= min && s[1] <= max)); let tryFilterStarterTiers: [PokemonSpecies, number][] = filteredSpecies.filter(s => (s[1] >= min && s[1] <= max));
while (tryFilterStarterTiers.length === 0 && (min !== 0 && max !== 10)) { while (tryFilterStarterTiers.length === 0 && !(min === 0 && max === 10)) {
if (min > 0) { if (min > 0) {
min--; min--;
} else { } else {

View File

@ -11,6 +11,7 @@ import { Biome } from "#enums/biome";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { TimeOfDay } from "#enums/time-of-day"; import { TimeOfDay } from "#enums/time-of-day";
import { DamageMoneyRewardModifier, ExtraModifierModifier, MoneyMultiplierModifier } from "#app/modifier/modifier";
export enum SpeciesWildEvolutionDelay { export enum SpeciesWildEvolutionDelay {
NONE, NONE,
@ -1647,8 +1648,14 @@ export const pokemonEvolutions: PokemonEvolutions = {
new SpeciesEvolution(Species.FROSMOTH, 1, null, new SpeciesFriendshipEvolutionCondition(90, p => p.scene.arena.getTimeOfDay() === TimeOfDay.DUSK || p.scene.arena.getTimeOfDay() === TimeOfDay.NIGHT), SpeciesWildEvolutionDelay.MEDIUM) new SpeciesEvolution(Species.FROSMOTH, 1, null, new SpeciesFriendshipEvolutionCondition(90, p => p.scene.arena.getTimeOfDay() === TimeOfDay.DUSK || p.scene.arena.getTimeOfDay() === TimeOfDay.NIGHT), SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.GIMMIGHOUL]: [ [Species.GIMMIGHOUL]: [
new SpeciesFormEvolution(Species.GHOLDENGO, "chest", "", 1, null, new SpeciesEvolutionCondition( p => p.evoCounter > 9 ), SpeciesWildEvolutionDelay.VERY_LONG), new SpeciesFormEvolution(Species.GHOLDENGO, "chest", "", 1, null, new SpeciesEvolutionCondition(p => p.evoCounter
new SpeciesFormEvolution(Species.GHOLDENGO, "roaming", "", 1, null, new SpeciesEvolutionCondition( p => p.evoCounter > 9 ), SpeciesWildEvolutionDelay.VERY_LONG) + p.getHeldItems().filter(m => m instanceof DamageMoneyRewardModifier).length
+ p.scene.findModifiers(m => m instanceof MoneyMultiplierModifier
|| m instanceof ExtraModifierModifier).length > 9), SpeciesWildEvolutionDelay.VERY_LONG),
new SpeciesFormEvolution(Species.GHOLDENGO, "roaming", "", 1, null, new SpeciesEvolutionCondition(p => p.evoCounter
+ p.getHeldItems().filter(m => m instanceof DamageMoneyRewardModifier).length
+ p.scene.findModifiers(m => m instanceof MoneyMultiplierModifier
|| m instanceof ExtraModifierModifier).length > 9), SpeciesWildEvolutionDelay.VERY_LONG)
] ]
}; };

View File

@ -71,5 +71,5 @@
"safeguard": "{{targetName}} is protected by Safeguard!", "safeguard": "{{targetName}} is protected by Safeguard!",
"substituteOnOverlap": "{{pokemonName}} already\nhas a substitute!", "substituteOnOverlap": "{{pokemonName}} already\nhas a substitute!",
"substituteNotEnoughHp": "But it does not have enough HP\nleft to make a substitute!", "substituteNotEnoughHp": "But it does not have enough HP\nleft to make a substitute!",
"afterYou": "{{pokemonName}} took the kind offer!" "afterYou": "{{targetName}} took the kind offer!"
} }

View File

@ -67,5 +67,5 @@
"swapArenaTags": "¡{{pokemonName}} ha intercambiado los efectos del terreno de combate!", "swapArenaTags": "¡{{pokemonName}} ha intercambiado los efectos del terreno de combate!",
"exposedMove": "¡{{pokemonName}} ha identificado\n{{targetPokemonName}}!", "exposedMove": "¡{{pokemonName}} ha identificado\n{{targetPokemonName}}!",
"safeguard": "¡{{targetName}} está protegido por Velo Sagrado!", "safeguard": "¡{{targetName}} está protegido por Velo Sagrado!",
"afterYou": "¡{{pokemonName}} ha decidido aprovechar la oportunidad!" "afterYou": "¡{{targetName}} ha decidido aprovechar la oportunidad!"
} }

View File

@ -71,5 +71,5 @@
"safeguard": "{{targetName}} est protégé\npar la capacité Rune Protect !", "safeguard": "{{targetName}} est protégé\npar la capacité Rune Protect !",
"substituteOnOverlap": "{{pokemonName}} a déjà\nun clone !", "substituteOnOverlap": "{{pokemonName}} a déjà\nun clone !",
"substituteNotEnoughHp": "Mais il est trop faible\npour créer un clone !", "substituteNotEnoughHp": "Mais il est trop faible\npour créer un clone !",
"afterYou": "{{pokemonName}} accepte\navec joie !" "afterYou": "{{targetName}} accepte\navec joie !"
} }

View File

@ -28,7 +28,7 @@
"select_prompt": "Choisissez un objet à donner.", "select_prompt": "Choisissez un objet à donner.",
"invalid_selection": "Ce Pokémon ne porte pas ce genre dobjet.", "invalid_selection": "Ce Pokémon ne porte pas ce genre dobjet.",
"selected": "Vous remettez lobjet {{selectedItem}} au Dresseur.", "selected": "Vous remettez lobjet {{selectedItem}} au Dresseur.",
"selected_dialogue": "Sérieux ? {{selectedItem}}, comme ça en cadeau ?\nCest très générieux !$En guise de ma reconnaissance, laisse-moi\nte faire un cadeau un peu spécial !$Il est dans ma famille depusi des générations, et ça me ferait plaisir de te loffrir !" "selected_dialogue": "Sérieux ? {{selectedItem}}, comme ça en cadeau ?\nCest très générieux !$En guise de ma reconnaissance, laisse-moi\nte faire un cadeau un peu spécial !$Il est dans ma famille depuis des générations, et ça me ferait plaisir de te loffrir !"
} }
}, },
"battle_won": "Tes connaissances et tes capacités ont totalement exploité nos faiblesses !$En remerciement de cette leçon, permets-moi\ndapprendre une capacité Insecte à un de tes Pokémon !", "battle_won": "Tes connaissances et tes capacités ont totalement exploité nos faiblesses !$En remerciement de cette leçon, permets-moi\ndapprendre une capacité Insecte à un de tes Pokémon !",

View File

@ -1,7 +1,7 @@
{ {
"intro": "Vous tombez sur du matériel dentrainement.", "intro": "Vous tombez sur du matériel dentrainement.",
"title": "Session dentrainement", "title": "Session dentrainement",
"description": "Ce matériel semble pouvoir être utilisé pour entrainer un membre de votre équipe ! Il existe plusieurs moyens avec lesquels vous pourriez entrainer un Pokémon, comme @[TOOLTIP_TITLE]{en le faisant combattre et vaincre le reste de votre équipe}.", "description": "Ce matériel semble pouvoir être utilisé pour entrainer un membre de votre équipe ! Il existe plusieurs moyens avec lesquels vous pourriez entrainer un Pokémon, comme @[TOOLTIP_TITLE]{en le combattant et le vainquant avec le reste de votre équipe}.",
"query": "Quel entrainement choisir ?", "query": "Quel entrainement choisir ?",
"invalid_selection": "Le Pokémon doit être en bonne santé.", "invalid_selection": "Le Pokémon doit être en bonne santé.",
"option": { "option": {

View File

@ -14,13 +14,13 @@
"label": "Le nourrir", "label": "Le nourrir",
"disabled_tooltip": "Vous avez besoin de 4 Baies pour choisir cette option", "disabled_tooltip": "Vous avez besoin de 4 Baies pour choisir cette option",
"tooltip": "(-) Donner 4 Baies\n(+) Le {{enemyPokemon}} vous apprécie", "tooltip": "(-) Donner 4 Baies\n(+) Le {{enemyPokemon}} vous apprécie",
"selected": "Vous lancer quelques Baies\nau {{enemyPokemon}} !$Il les engloutit avec joie !$Le {{enemyPokemon}} veut se joindre\nà votre équipe !" "selected": "Vous lancez quelques Baies\nau {{enemyPokemon}} !$Il les engloutit avec joie !$Le {{enemyPokemon}} veut se joindre\nà votre équipe !"
}, },
"3": { "3": {
"label": "Devenir amis", "label": "Devenir amis",
"disabled_tooltip": "Votre Pokémon doit connaitre certaines capacités pour choisir cette option", "disabled_tooltip": "Votre Pokémon doit connaitre certaines capacités pour choisir cette option",
"tooltip": "(+) {{option3PrimaryName}} utilise {{option3PrimaryMove}}\n(+) Le {{enemyPokemon}} vous apprécie", "tooltip": "(+) {{option3PrimaryName}} utilise {{option3PrimaryMove}}\n(+) Le {{enemyPokemon}} vous apprécie",
"selected": "Votre {{option3PrimaryName}} utilise {{option3PrimaryMove}} pour charmer le {{enemyPokemon}} !$The {{enemyPokemon}} veut se joindre\nà votre équipe !" "selected": "Votre {{option3PrimaryName}} utilise {{option3PrimaryMove}} pour charmer le {{enemyPokemon}} !$Le {{enemyPokemon}} veut se joindre\nà votre équipe !"
} }
} }
} }

View File

@ -11,7 +11,7 @@
"expGainsSpeed": "Vit. barre dExp", "expGainsSpeed": "Vit. barre dExp",
"expPartyDisplay": "Afficher Exp équipe", "expPartyDisplay": "Afficher Exp équipe",
"skipSeenDialogues": "Passer dialogues connus", "skipSeenDialogues": "Passer dialogues connus",
"eggSkip": "Animation déclosion", "eggSkip": "Passer les éclosions",
"never": "Jamais", "never": "Jamais",
"always": "Toujours", "always": "Toujours",
"ask": "Demander", "ask": "Demander",

View File

@ -68,5 +68,5 @@
"exposedMove": "{{pokemonName}} ha identificato\n{{targetPokemonName}}!", "exposedMove": "{{pokemonName}} ha identificato\n{{targetPokemonName}}!",
"chillyReception": "{{pokemonName}} sta per fare una battuta!", "chillyReception": "{{pokemonName}} sta per fare una battuta!",
"safeguard": "Salvaguardia protegge {{targetName}}!", "safeguard": "Salvaguardia protegge {{targetName}}!",
"afterYou": "{{pokemonName}} approfitta della cortesia!" "afterYou": "{{targetName}} approfitta della cortesia!"
} }

View File

@ -68,5 +68,5 @@
"chillyReception": "{{pokemonName}}は\n寒い ギャグを かました", "chillyReception": "{{pokemonName}}は\n寒い ギャグを かました",
"swapArenaTags": "{{pokemonName}}は\nお互いの 場の 効果を 入れ替えた", "swapArenaTags": "{{pokemonName}}は\nお互いの 場の 効果を 入れ替えた",
"exposedMove": "{{pokemonName}}は {{targetPokemonName}}の\n正体を 見破った", "exposedMove": "{{pokemonName}}は {{targetPokemonName}}の\n正体を 見破った",
"afterYou": "{{pokemonName}}は\nお言葉に 甘えることにした" "afterYou": "{{targetName}}は\nお言葉に 甘えることにした"
} }

View File

@ -69,5 +69,5 @@
"chillyReception": "{{pokemonName}}[[는]] 썰렁한 개그를 선보였다!", "chillyReception": "{{pokemonName}}[[는]] 썰렁한 개그를 선보였다!",
"exposedMove": "{{pokemonName}}[[는]]\n{{targetPokemonName}}의 정체를 꿰뚫어 보았다!", "exposedMove": "{{pokemonName}}[[는]]\n{{targetPokemonName}}의 정체를 꿰뚫어 보았다!",
"safeguard": "{{targetName}}[[는]] 신비의 베일이 지켜 주고 있다!", "safeguard": "{{targetName}}[[는]] 신비의 베일이 지켜 주고 있다!",
"afterYou": "{{pokemonName}}[[는]]\n배려를 받아들이기로 했다!" "afterYou": "{{targetName}}[[는]]\n배려를 받아들이기로 했다!"
} }

View File

@ -64,5 +64,5 @@
"chillyReception": "{{pokemonName}} está prestes a contar uma piada gelada!", "chillyReception": "{{pokemonName}} está prestes a contar uma piada gelada!",
"exposedMove": "{{pokemonName}} identificou\n{{targetPokemonName}}!", "exposedMove": "{{pokemonName}} identificou\n{{targetPokemonName}}!",
"safeguard": "{{targetName}} está protegido por Safeguard!", "safeguard": "{{targetName}} está protegido por Safeguard!",
"afterYou": "{{pokemonName}} aceitou a gentil oferta!" "afterYou": "{{targetName}} aceitou a gentil oferta!"
} }

View File

@ -360,7 +360,7 @@
}, },
"EVOLUTION_TRACKER_GIMMIGHOUL": { "EVOLUTION_TRACKER_GIMMIGHOUL": {
"name": "金子宝物", "name": "金子宝物",
"description": "这个小精靈爱金子! 继续挑金子然后谁知道什么会发生!" "description": "这个宝可梦最爱金币!多收集点金币的话会发生什么呢?"
}, },
"BATON": { "BATON": {
"name": "接力棒", "name": "接力棒",

View File

@ -68,5 +68,5 @@
"chillyReception": "{{pokemonName}}\n说出了冷笑话", "chillyReception": "{{pokemonName}}\n说出了冷笑话",
"exposedMove": "{{pokemonName}}识破了\n{{targetPokemonName}}的原型!", "exposedMove": "{{pokemonName}}识破了\n{{targetPokemonName}}的原型!",
"safeguard": "{{targetName}}\n正受到神秘之幕的保护", "safeguard": "{{targetName}}\n正受到神秘之幕的保护",
"afterYou": "{{pokemonName}}\n接受了对手的好意" "afterYou": "{{targetName}}\n接受了对手的好意"
} }

View File

@ -68,5 +68,5 @@
"chillyReception": "{{pokemonName}}\n說了冷笑話", "chillyReception": "{{pokemonName}}\n說了冷笑話",
"exposedMove": "{{pokemonName}}識破了\n{{targetPokemonName}}的原形!", "exposedMove": "{{pokemonName}}識破了\n{{targetPokemonName}}的原形!",
"safeguard": "{{targetName}}\n正受到神秘之幕的保護", "safeguard": "{{targetName}}\n正受到神秘之幕的保護",
"afterYou": "{{pokemonName}}\n接受了對手的好意" "afterYou": "{{targetName}}\n接受了對手的好意"
} }

View File

@ -1387,7 +1387,8 @@ export const modifierTypes = {
FORM_CHANGE_ITEM: () => new FormChangeItemModifierTypeGenerator(false), FORM_CHANGE_ITEM: () => new FormChangeItemModifierTypeGenerator(false),
RARE_FORM_CHANGE_ITEM: () => new FormChangeItemModifierTypeGenerator(true), RARE_FORM_CHANGE_ITEM: () => new FormChangeItemModifierTypeGenerator(true),
EVOLUTION_TRACKER_GIMMIGHOUL: () => new PokemonHeldItemModifierType("modifierType:ModifierType.EVOLUTION_TRACKER_GIMMIGHOUL", "relic_gold", (type, _args) => new Modifiers.EvoTrackerModifier(type, (_args[0] as Pokemon).id, Species.GIMMIGHOUL, 10)), EVOLUTION_TRACKER_GIMMIGHOUL: () => new PokemonHeldItemModifierType("modifierType:ModifierType.EVOLUTION_TRACKER_GIMMIGHOUL", "relic_gold",
(type, args) => new Modifiers.EvoTrackerModifier(type, (args[0] as Pokemon).id, Species.GIMMIGHOUL, 10)),
MEGA_BRACELET: () => new ModifierType("modifierType:ModifierType.MEGA_BRACELET", "mega_bracelet", (type, _args) => new Modifiers.MegaEvolutionAccessModifier(type)), MEGA_BRACELET: () => new ModifierType("modifierType:ModifierType.MEGA_BRACELET", "mega_bracelet", (type, _args) => new Modifiers.MegaEvolutionAccessModifier(type)),
DYNAMAX_BAND: () => new ModifierType("modifierType:ModifierType.DYNAMAX_BAND", "dynamax_band", (type, _args) => new Modifiers.GigantamaxAccessModifier(type)), DYNAMAX_BAND: () => new ModifierType("modifierType:ModifierType.DYNAMAX_BAND", "dynamax_band", (type, _args) => new Modifiers.GigantamaxAccessModifier(type)),

View File

@ -1,5 +1,5 @@
import * as ModifierTypes from "./modifier-type"; import * as ModifierTypes from "./modifier-type";
import { ModifierType, modifierTypes } from "./modifier-type"; import { getModifierType, ModifierType, modifierTypes } from "./modifier-type";
import BattleScene from "../battle-scene"; import BattleScene from "../battle-scene";
import { getLevelTotalExp } from "../data/exp"; import { getLevelTotalExp } from "../data/exp";
import { MAX_PER_TYPE_POKEBALLS, PokeballType } from "../data/pokeball"; import { MAX_PER_TYPE_POKEBALLS, PokeballType } from "../data/pokeball";
@ -852,26 +852,47 @@ export class EvoTrackerModifier extends PokemonHeldItemModifier {
} }
matchType(modifier: Modifier): boolean { matchType(modifier: Modifier): boolean {
if (modifier instanceof EvoTrackerModifier) { return modifier instanceof EvoTrackerModifier && modifier.species === this.species && modifier.required === this.required;
return (modifier as EvoTrackerModifier).species === this.species;
}
return false;
} }
clone(): PersistentModifier { clone(): PersistentModifier {
return new EvoTrackerModifier(this.type, this.pokemonId, this.species, this.stackCount); return new EvoTrackerModifier(this.type, this.pokemonId, this.species, this.required, this.stackCount);
} }
getArgs(): any[] { getArgs(): any[] {
return super.getArgs().concat(this.species); return super.getArgs().concat([this.species, this.required]);
} }
apply(args: any[]): boolean { apply(args: any[]): boolean {
return true; return true;
} }
getMaxHeldItemCount(_pokemon: Pokemon): integer { getIconStackText(scene: BattleScene, virtual?: boolean): Phaser.GameObjects.BitmapText | null {
return this.required; if (this.getMaxStackCount(scene) === 1 || (virtual && !this.virtualStackCount)) {
return null;
}
const pokemon = scene.getPokemonById(this.pokemonId);
this.stackCount = pokemon
? pokemon.evoCounter + pokemon.getHeldItems().filter(m => m instanceof DamageMoneyRewardModifier).length
+ pokemon.scene.findModifiers(m => m instanceof MoneyMultiplierModifier || m instanceof ExtraModifierModifier).length
: this.stackCount;
const text = scene.add.bitmapText(10, 15, "item-count", this.stackCount.toString(), 11);
text.letterSpacing = -0.5;
if (this.getStackCount() >= this.required) {
text.setTint(0xf89890);
}
text.setOrigin(0, 0);
return text;
}
getMaxHeldItemCount(pokemon: Pokemon): integer {
this.stackCount = pokemon.evoCounter + pokemon.getHeldItems().filter(m => m instanceof DamageMoneyRewardModifier).length
+ pokemon.scene.findModifiers(m => m instanceof MoneyMultiplierModifier || m instanceof ExtraModifierModifier).length;
return 999;
} }
} }
@ -2414,9 +2435,8 @@ export class MoneyRewardModifier extends ConsumableModifier {
scene.getParty().map(p => { scene.getParty().map(p => {
if (p.species?.speciesId === Species.GIMMIGHOUL || p.fusionSpecies?.speciesId === Species.GIMMIGHOUL) { if (p.species?.speciesId === Species.GIMMIGHOUL || p.fusionSpecies?.speciesId === Species.GIMMIGHOUL) {
p.evoCounter++; p.evoCounter ? p.evoCounter++ : p.evoCounter = 1;
const modifierType: ModifierType = modifierTypes.EVOLUTION_TRACKER_GIMMIGHOUL(); const modifier = getModifierType(modifierTypes.EVOLUTION_TRACKER_GIMMIGHOUL).newModifier(p) as EvoTrackerModifier;
const modifier = modifierType!.newModifier(p);
scene.addModifier(modifier); scene.addModifier(modifier);
} }
}); });
@ -2586,7 +2606,7 @@ export class HealShopCostModifier extends PersistentModifier {
constructor(type: ModifierType, shopMultiplier: number, stackCount?: integer) { constructor(type: ModifierType, shopMultiplier: number, stackCount?: integer) {
super(type, stackCount); super(type, stackCount);
this.shopMultiplier = shopMultiplier; this.shopMultiplier = shopMultiplier ?? 2.5;
} }
match(modifier: Modifier): boolean { match(modifier: Modifier): boolean {
@ -2598,11 +2618,16 @@ export class HealShopCostModifier extends PersistentModifier {
} }
apply(args: any[]): boolean { apply(args: any[]): boolean {
(args[0] as Utils.IntegerHolder).value *= this.shopMultiplier; const moneyCost = args[0] as Utils.NumberHolder;
moneyCost.value = Math.floor(moneyCost.value * this.shopMultiplier);
return true; return true;
} }
getArgs(): any[] {
return super.getArgs().concat(this.shopMultiplier);
}
getMaxStackCount(scene: BattleScene): integer { getMaxStackCount(scene: BattleScene): integer {
return 1; return 1;
} }

View File

@ -238,7 +238,7 @@ export class GameOverPhase extends BattlePhase {
enemyModifiers: this.scene.findModifiers(() => true, false).map(m => new PersistentModifierData(m, false)), enemyModifiers: this.scene.findModifiers(() => true, false).map(m => new PersistentModifierData(m, false)),
arena: new ArenaData(this.scene.arena), arena: new ArenaData(this.scene.arena),
pokeballCounts: this.scene.pokeballCounts, pokeballCounts: this.scene.pokeballCounts,
money: this.scene.money, money: Math.floor(this.scene.money),
score: this.scene.score, score: this.scene.score,
waveIndex: this.scene.currentBattle.waveIndex, waveIndex: this.scene.currentBattle.waveIndex,
battleType: this.scene.currentBattle.battleType, battleType: this.scene.currentBattle.battleType,

View File

@ -25,6 +25,7 @@ import { GameOverPhase } from "#app/phases/game-over-phase";
import { SwitchPhase } from "#app/phases/switch-phase"; import { SwitchPhase } from "#app/phases/switch-phase";
import { SeenEncounterData } from "#app/data/mystery-encounters/mystery-encounter-save-data"; import { SeenEncounterData } from "#app/data/mystery-encounters/mystery-encounter-save-data";
import { SwitchType } from "#enums/switch-type"; import { SwitchType } from "#enums/switch-type";
import { BattlerTagType } from "#enums/battler-tag-type";
/** /**
* Will handle (in order): * Will handle (in order):
@ -218,9 +219,17 @@ export class MysteryEncounterBattleStartCleanupPhase extends Phase {
start() { start() {
super.start(); super.start();
// Lapse any residual flinches/endures but ignore all other turn-end battle tags
const includedLapseTags = [BattlerTagType.FLINCHED, BattlerTagType.ENDURING];
const field = this.scene.getField(true).filter(p => p.summonData); const field = this.scene.getField(true).filter(p => p.summonData);
field.forEach(pokemon => { field.forEach(pokemon => {
pokemon.lapseTags(BattlerTagLapseType.TURN_END); const tags = pokemon.summonData.tags;
tags.filter(t => includedLapseTags.includes(t.tagType)
&& t.lapseTypes.includes(BattlerTagLapseType.TURN_END)
&& !(t.lapse(pokemon, BattlerTagLapseType.TURN_END))).forEach(t => {
t.onRemove(pokemon);
tags.splice(tags.indexOf(t), 1);
});
}); });
// Remove any status tick phases // Remove any status tick phases

View File

@ -46,8 +46,7 @@ export class PokemonHealPhase extends CommonAnimPhase {
const pokemon = this.getPokemon(); const pokemon = this.getPokemon();
if (!pokemon.isOnField() || (!this.revive && !pokemon.isActive())) { if (!pokemon.isOnField() || (!this.revive && !pokemon.isActive())) {
super.end(); return super.end();
return;
} }
const hasMessage = !!this.message; const hasMessage = !!this.message;
@ -58,7 +57,7 @@ export class PokemonHealPhase extends CommonAnimPhase {
if (healBlock && this.hpHealed > 0) { if (healBlock && this.hpHealed > 0) {
this.scene.queueMessage(healBlock.onActivation(pokemon)); this.scene.queueMessage(healBlock.onActivation(pokemon));
this.message = null; this.message = null;
super.end(); return super.end();
} else if (healOrDamage) { } else if (healOrDamage) {
const hpRestoreMultiplier = new Utils.IntegerHolder(1); const hpRestoreMultiplier = new Utils.IntegerHolder(1);
if (!this.revive) { if (!this.revive) {

View File

@ -957,7 +957,7 @@ export class GameData {
enemyModifiers: scene.findModifiers(() => true, false).map(m => new PersistentModifierData(m, false)), enemyModifiers: scene.findModifiers(() => true, false).map(m => new PersistentModifierData(m, false)),
arena: new ArenaData(scene.arena), arena: new ArenaData(scene.arena),
pokeballCounts: scene.pokeballCounts, pokeballCounts: scene.pokeballCounts,
money: scene.money, money: Math.floor(scene.money),
score: scene.score, score: scene.score,
waveIndex: scene.currentBattle.waveIndex, waveIndex: scene.currentBattle.waveIndex,
battleType: scene.currentBattle.battleType, battleType: scene.currentBattle.battleType,
@ -1047,7 +1047,7 @@ export class GameData {
scene.pokeballCounts = Overrides.POKEBALL_OVERRIDE.pokeballs; scene.pokeballCounts = Overrides.POKEBALL_OVERRIDE.pokeballs;
} }
scene.money = sessionData.money || 0; scene.money = Math.floor(sessionData.money || 0);
scene.updateMoneyText(); scene.updateMoneyText();
if (scene.money > this.gameStats.highestMoney) { if (scene.money > this.gameStats.highestMoney) {

View File

@ -6,6 +6,10 @@ const LATEST_VERSION = "1.0.5";
export function applySessionDataPatches(data: SessionSaveData) { export function applySessionDataPatches(data: SessionSaveData) {
const curVersion = data.gameVersion; const curVersion = data.gameVersion;
// Always sanitize money as a safeguard
data.money = Math.floor(data.money);
if (curVersion !== LATEST_VERSION) { if (curVersion !== LATEST_VERSION) {
switch (curVersion) { switch (curVersion) {
case "1.0.0": case "1.0.0":