From 8f15788b39930906d1c451a51c5731cec10d5f2f Mon Sep 17 00:00:00 2001 From: Jimmybald1 <122436263+Jimmybald1@users.noreply.github.com> Date: Mon, 24 Feb 2025 17:43:38 +0100 Subject: [PATCH 1/4] [Misc] Added a Daily Run Seed Override to the overrides. Only works locally. (#5330) * [Misc] Added a Daily Run Seed Override to the overrides. Only works locally. * [Misc] Changed Daily Run Seed Override to string | null Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --------- Co-authored-by: Jimmybald1 <147992650+IBBCalc@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: damocleas --- src/overrides.ts | 1 + src/phases/title-phase.ts | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/overrides.ts b/src/overrides.ts index e53d3b766c4..d15370259fc 100644 --- a/src/overrides.ts +++ b/src/overrides.ts @@ -47,6 +47,7 @@ class DefaultOverrides { // ----------------- /** a specific seed (default: a random string of 24 characters) */ readonly SEED_OVERRIDE: string = ""; + readonly DAILY_RUN_SEED_OVERRIDE: string | null = null; readonly WEATHER_OVERRIDE: WeatherType = WeatherType.NONE; /** * If `null`, ignore this override. diff --git a/src/phases/title-phase.ts b/src/phases/title-phase.ts index 0d486da1998..a560897037e 100644 --- a/src/phases/title-phase.ts +++ b/src/phases/title-phase.ts @@ -21,6 +21,7 @@ import { SelectChallengePhase } from "./select-challenge-phase"; import { SelectStarterPhase } from "./select-starter-phase"; import { SummonPhase } from "./summon-phase"; import { globalScene } from "#app/global-scene"; +import Overrides from "#app/overrides"; export class TitlePhase extends Phase { @@ -256,7 +257,11 @@ export class TitlePhase extends Phase { console.error("Failed to load daily run:\n", err); }); } else { - generateDaily(btoa(new Date().toISOString().substring(0, 10))); + let seed: string = btoa(new Date().toISOString().substring(0, 10)); + if (!Utils.isNullOrUndefined(Overrides.DAILY_RUN_SEED_OVERRIDE)) { + seed = Overrides.DAILY_RUN_SEED_OVERRIDE; + } + generateDaily(seed); } }); } From 9fb654ce736d5f670466fad858f90a9911619d6a Mon Sep 17 00:00:00 2001 From: Xavion3 Date: Tue, 25 Feb 2025 03:44:22 +1100 Subject: [PATCH 2/4] [Balance] Make dual STABs way more likely #5401 --- src/field/pokemon.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 214c667f1c1..ed27dd41f6a 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2395,14 +2395,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { while (baseWeights.length > this.moveset.length && this.moveset.length < 4) { if (this.hasTrainer()) { // Sqrt the weight of any damaging moves with overlapping types. This is about a 0.05 - 0.1 multiplier. - // Other damaging moves 2x weight if 0-1 damaging moves, 0.5x if 2, 0.125x if 3. These weights double if STAB. + // Other damaging moves 2x weight if 0-1 damaging moves, 0.5x if 2, 0.125x if 3. These weights get 20x if STAB. // Status moves remain unchanged on weight, this encourages 1-2 movePool = baseWeights.filter(m => !this.moveset.some(mo => m[0] === mo?.moveId)).map((m) => { let ret: number; if (this.moveset.some(mo => mo?.getMove().category !== MoveCategory.STATUS && mo?.getMove().type === allMoves[m[0]].type)) { ret = Math.ceil(Math.sqrt(m[1])); } else if (allMoves[m[0]].category !== MoveCategory.STATUS) { - ret = Math.ceil(m[1] / Math.max(Math.pow(4, this.moveset.filter(mo => (mo?.getMove().power ?? 0) > 1).length) / 8, 0.5) * (this.isOfType(allMoves[m[0]].type) ? 2 : 1)); + ret = Math.ceil(m[1] / Math.max(Math.pow(4, this.moveset.filter(mo => (mo?.getMove().power ?? 0) > 1).length) / 8, 0.5) * (this.isOfType(allMoves[m[0]].type) ? 20 : 1)); } else { ret = m[1]; } From 5996f8c6ebbe6063c87065f35df52db3796be702 Mon Sep 17 00:00:00 2001 From: Dean <69436131+emdeann@users.noreply.github.com> Date: Mon, 24 Feb 2025 08:46:54 -0800 Subject: [PATCH 3/4] [Move] Add Taunt Removal Message #5407 --- src/data/battler-tags.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 8d5f21c0a42..7b16c718f07 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -2752,6 +2752,12 @@ export class TauntTag extends MoveRestrictionBattlerTag { globalScene.queueMessage(i18next.t("battlerTags:tauntOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }), 1500); } + public override onRemove(pokemon: Pokemon): void { + super.onRemove(pokemon); + + globalScene.queueMessage(i18next.t("battlerTags:tauntOnRemove", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })); + } + /** * Checks if a move is a status move and determines its restriction status on that basis * @param {Moves} move the move under investigation From 0cb3a28dfa757b6d2e5b758923728ce006ef4335 Mon Sep 17 00:00:00 2001 From: Xavion3 Date: Tue, 25 Feb 2025 04:33:39 +1100 Subject: [PATCH 4/4] Fix tera type access (#5364) --- src/field/pokemon.ts | 4 ++-- src/phases/tera-phase.ts | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index ed27dd41f6a..61815ec649c 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2848,7 +2848,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { stabMultiplier.value += 0.5; } - if (source.isTerastallized && source.teraType === Type.STELLAR && (!source.stellarTypesBoosted.includes(moveType) || source.hasSpecies(Species.TERAPAGOS))) { + if (source.isTerastallized && source.getTeraType() === Type.STELLAR && (!source.stellarTypesBoosted.includes(moveType) || source.hasSpecies(Species.TERAPAGOS))) { if (matchesSourceType) { stabMultiplier.value += 0.5; } else { @@ -4632,7 +4632,7 @@ export class PlayerPokemon extends Pokemon { newPokemon.fusionVariant = this.fusionVariant; newPokemon.fusionGender = this.fusionGender; newPokemon.fusionLuck = this.fusionLuck; - newPokemon.fusionTeraType = this.teraType; + newPokemon.fusionTeraType = this.fusionTeraType; newPokemon.usedTMs = this.usedTMs; globalScene.getPlayerParty().push(newPokemon); diff --git a/src/phases/tera-phase.ts b/src/phases/tera-phase.ts index f4b72d39192..462a4e1882e 100644 --- a/src/phases/tera-phase.ts +++ b/src/phases/tera-phase.ts @@ -20,9 +20,7 @@ export class TeraPhase extends BattlePhase { start() { super.start(); - console.log(this.pokemon.name, "terastallized to", Type[this.pokemon.teraType].toString()); - - globalScene.queueMessage(i18next.t("battle:pokemonTerastallized", { pokemonNameWithAffix: getPokemonNameWithAffix(this.pokemon), type: i18next.t(`pokemonInfo:Type.${Type[this.pokemon.teraType]}`) })); + globalScene.queueMessage(i18next.t("battle:pokemonTerastallized", { pokemonNameWithAffix: getPokemonNameWithAffix(this.pokemon), type: i18next.t(`pokemonInfo:Type.${Type[this.pokemon.getTeraType()]}`) })); new CommonBattleAnim(CommonAnim.TERASTALLIZE, this.pokemon).play(false, () => { this.end(); }); @@ -41,7 +39,7 @@ export class TeraPhase extends BattlePhase { if (this.pokemon.isPlayer()) { globalScene.validateAchv(achvs.TERASTALLIZE); - if (this.pokemon.teraType === Type.STELLAR) { + if (this.pokemon.getTeraType() === Type.STELLAR) { globalScene.validateAchv(achvs.STELLAR_TERASTALLIZE); } }