From f8a3352bb34af6d1c124cde199205b30feaa99c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matilde=20Sim=C3=B5es?= Date: Wed, 4 Jun 2025 21:39:21 +0100 Subject: [PATCH] =?UTF-8?q?Implement=20NuzLocke=20related=20challenges=20a?= =?UTF-8?q?nd=20AI=20changes=20The=20Nuzlocke=20challenges=20that=20were?= =?UTF-8?q?=20implemented=20were=20the=20following:=20-=20"No=20Free=20Hea?= =?UTF-8?q?l"=20which=20consists=20in=20disabling=20the=20auto=20heal=20th?= =?UTF-8?q?at=20occurs=20every=2010th=20wave,=20replacing=20it=20with=20a?= =?UTF-8?q?=20normal=20shop=20phase.=20Changes=20made:=20=20=20=20-=20Adde?= =?UTF-8?q?d=20a=20new=20challenge=20"NO=5FAUTO=5FHEAL"=20with=20a=20chall?= =?UTF-8?q?enge=20type=20"NO=5FHEAL=5FPHASE"=20and=20created=20a=20new=20f?= =?UTF-8?q?unction=20"applyNoHealPhase"=20to=20determine=20whether=20the?= =?UTF-8?q?=20Pok=C3=A9mon=20can=20heal=20if=20the=20challenge=20is=20acti?= =?UTF-8?q?ve=20("challenge.ts").=20=20=20=20-=20Added=20a=20confirmation?= =?UTF-8?q?=20on=20the=20healing=20phase=20to=20check=20if=20the=20challen?= =?UTF-8?q?ge=20is=20active=20or=20not,=20and=20if=20it=20is,=20it=20shoul?= =?UTF-8?q?d=20skip=20the=20phase=20("party-heal-phase.ts").=20=20=20=20-?= =?UTF-8?q?=20Changed=20the=20logistic=20of=20when=20the=20shop=20should?= =?UTF-8?q?=20be=20displayed,=20so=20when=20the=20challenge=20is=20active?= =?UTF-8?q?=20the=20shop=20appears=20every=2010th=20wave=20("modifier-type?= =?UTF-8?q?.ts")=20and=20actually=20push=20the=20shop=20phase=20("victory-?= =?UTF-8?q?phase.ts").=20-=20"Hardcore":=20Challenge=20divided=20into=20tw?= =?UTF-8?q?o=20modes,=20normal=20and=20hard,=20where=20fainted=20Pok=C3=A9?= =?UTF-8?q?mon=20can't=20be=20revived,=20in=20addition,=20the=20hard=20mod?= =?UTF-8?q?e=20deletes=20the=20fainted=20Pok=C3=A9mon=20so=20the=20player?= =?UTF-8?q?=20can't=20switch=20it's=20items=20after=20death.=20Changes=20m?= =?UTF-8?q?ade:=20=20=20=20-=20Added=20a=20new=20challenge=20"HARDCORE"=20?= =?UTF-8?q?with=20several=20challenge=20types=20with=20the=20correspondent?= =?UTF-8?q?=20apply=20functions=20("challenge.ts"),=20each=20one=20is=20us?= =?UTF-8?q?ed=20as=20follows:=20=20=20=20-=20RANDOM=5FITEM=5FBLACKLIST:=20?= =?UTF-8?q?filter=20the=20reward=20items=20with=20only=20the=20valid=20one?= =?UTF-8?q?'s=20("modifier-type.ts").=20=20=20=20-=20SHOP=5FITEM=5FBLACKLI?= =?UTF-8?q?ST:=20filter=20the=20shop=20items=20with=20only=20the=20valid?= =?UTF-8?q?=20one's=20("modifier-select-ui-handler.ts").=20=20=20=20-=20MO?= =?UTF-8?q?VE=5FBLACKLIST:=20checks=20if=20the=20move=20selected=20is=20al?= =?UTF-8?q?lowed=20and=20if=20not=20sends=20a=20message=20of=20no=20apply?= =?UTF-8?q?=20("pokemon.ts").=20=20=20=20-=20DELETE=5FPOKEMON:=20if=20hard?= =?UTF-8?q?=20mode=20was=20selected,=20automatically=20delete=20the=20fain?= =?UTF-8?q?ted=20Pok=C3=A9mon=20from=20the=20party=20("battle-end-pahse.ts?= =?UTF-8?q?").=20=20=20=20-=20SHOULD=5FFUSE:=20changed=20the=20logic=20of?= =?UTF-8?q?=20should=20apply=20function=20to=20prohibit=20the=20fusion=20w?= =?UTF-8?q?ith=20dead=20Pok=C3=A9mon=20("modifier.ts").=20=20=20=20-=20PRE?= =?UTF-8?q?VENT=5FREVIVE:=20prevent=20the=20gain=20of=20hp=20of=20fainted?= =?UTF-8?q?=20Pok=C3=A9mon=20("party-heal-phase.ts").=20-=20"Limited=20Cat?= =?UTF-8?q?ch":=20Only=20the=20first=20wild=20Pok=C3=A9mon=20encounter=20o?= =?UTF-8?q?f=20every=20biome=20can=20be=20added=20to=20the=20player's=20cu?= =?UTF-8?q?rrent=20party.=20Changes=20made:=20=20=20-=20Added=20a=20new=20?= =?UTF-8?q?challenge=20LIMITED=5FCATCH=20with=20a=20challenge=20type=20=20?= =?UTF-8?q?ADD=5FPOKEMON=5FTO=5FPARTY=20and=20created=20a=20new=20function?= =?UTF-8?q?=20"applyAddPokemonToParty"=20to=20determine=20whether=20the=20?= =?UTF-8?q?Pok=C3=A9mon=20can=20be=20added=20to=20the=20party,=20which=20s?= =?UTF-8?q?hould=20only=20occur=20every=2011th=20wave=20if=20it=20isn't=20?= =?UTF-8?q?a=20catchable=20mystery=20encounter=20or=20every=2012th=20wave?= =?UTF-8?q?=20if=20the=2011th=20wave=20was=20a=20catchable=20mystery=20enc?= =?UTF-8?q?ounter=20("challenge.ts").=20=20=20=20-=20Changed=20the=20logis?= =?UTF-8?q?tic=20of=20adding=20a=20Pok=C3=A9mon=20where=20it=20can=20be=20?= =?UTF-8?q?caught=20so=20that=20the=20"pokedex"=20is=20updated=20but=20the?= =?UTF-8?q?=20Pok=C3=A9mon=20isn't=20added=20to=20the=20party=20of=20the?= =?UTF-8?q?=20player=20affecting=20specifically=20mystery=20encounters=20(?= =?UTF-8?q?"encounter-pokemon-utils.ts")=20and=20added=20the=20same=20logi?= =?UTF-8?q?c=20to=20normal=20encounters.=20("attempt-capture-phase.ts")?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The changes in the game AI were as follows ("pokemon.ts"): - More accurately accounts for the Pokémon's actual moves and their effectiveness against the player instead of only the pokemon type - Introduced logic to decide when a Pokémon should be sacrificed or switched based on its HP and speed. Signed-off-by: Matilde Simões Co-authored-by: Fuad Ali --- src/phases/party-heal-phase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/phases/party-heal-phase.ts b/src/phases/party-heal-phase.ts index 1a017293126..594f6f9072d 100644 --- a/src/phases/party-heal-phase.ts +++ b/src/phases/party-heal-phase.ts @@ -19,6 +19,7 @@ export class PartyHealPhase extends BattlePhase { const isHealPhaseActive = new BooleanHolder(true); const isReviveActive = new BooleanHolder(true); applyChallenges(ChallengeType.NO_HEAL_PHASE, isHealPhaseActive); + applyChallenges(ChallengeType.PREVENT_REVIVE, isReviveActive); if (!isHealPhaseActive.value) { return this.end(); } @@ -28,7 +29,6 @@ export class PartyHealPhase extends BattlePhase { } globalScene.ui.fadeOut(1000).then(() => { for (const pokemon of globalScene.getPlayerParty()) { - applyChallenges(ChallengeType.PREVENT_REVIVE, isReviveActive); if (isReviveActive.value || !pokemon.isFainted()) { pokemon.hp = pokemon.getMaxHp(); pokemon.resetStatus(true, false, false, true);