mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-20 15:22:19 +02:00
Merge branch 'beta' into Part-2-of-Vivillon-update
This commit is contained in:
commit
7ce615df61
@ -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
|
||||
|
@ -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];
|
||||
}
|
||||
@ -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);
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user