mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-24 01:02:19 +02:00
Make tera type actually apply in run
This commit is contained in:
parent
c83c4c21ee
commit
29aa525926
@ -12,6 +12,7 @@ import type { Starter } from "#app/ui/starter-select-ui-handler";
|
|||||||
import { Mode } from "#app/ui/ui";
|
import { Mode } from "#app/ui/ui";
|
||||||
import type { Species } from "#enums/species";
|
import type { Species } from "#enums/species";
|
||||||
import SoundFade from "phaser3-rex-plugins/plugins/soundfade";
|
import SoundFade from "phaser3-rex-plugins/plugins/soundfade";
|
||||||
|
import * as Utils from "../utils";
|
||||||
|
|
||||||
export class SelectStarterPhase extends Phase {
|
export class SelectStarterPhase extends Phase {
|
||||||
|
|
||||||
@ -79,6 +80,12 @@ export class SelectStarterPhase extends Phase {
|
|||||||
starterPokemon.nickname = starter.nickname;
|
starterPokemon.nickname = starter.nickname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Utils.isNullOrUndefined(starter.teraType)) {
|
||||||
|
starterPokemon.teraType = starter.teraType;
|
||||||
|
} else {
|
||||||
|
starterPokemon.teraType = starterPokemon.species.type1;
|
||||||
|
}
|
||||||
|
|
||||||
if (globalScene.gameMode.isSplicedOnly || Overrides.STARTER_FUSION_OVERRIDE) {
|
if (globalScene.gameMode.isSplicedOnly || Overrides.STARTER_FUSION_OVERRIDE) {
|
||||||
starterPokemon.generateFusionSpecies(true);
|
starterPokemon.generateFusionSpecies(true);
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,7 @@ export interface Starter {
|
|||||||
moveset?: StarterMoveset;
|
moveset?: StarterMoveset;
|
||||||
pokerus: boolean;
|
pokerus: boolean;
|
||||||
nickname?: string;
|
nickname?: string;
|
||||||
|
teraType?: Type;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface LanguageSetting {
|
interface LanguageSetting {
|
||||||
@ -3220,7 +3221,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
this.dexAttrCursor |= globalScene.gameData.getFormAttr(formIndex !== undefined ? formIndex : (formIndex = oldProps!.formIndex)); // TODO: is this bang correct?
|
this.dexAttrCursor |= globalScene.gameData.getFormAttr(formIndex !== undefined ? formIndex : (formIndex = oldProps!.formIndex)); // TODO: is this bang correct?
|
||||||
this.abilityCursor = abilityIndex !== undefined ? abilityIndex : (abilityIndex = oldAbilityIndex);
|
this.abilityCursor = abilityIndex !== undefined ? abilityIndex : (abilityIndex = oldAbilityIndex);
|
||||||
this.natureCursor = natureIndex !== undefined ? natureIndex : (natureIndex = oldNatureIndex);
|
this.natureCursor = natureIndex !== undefined ? natureIndex : (natureIndex = oldNatureIndex);
|
||||||
this.teraCursor = teraType !== undefined ? teraType : (teraType = species.type1);
|
this.teraCursor = !Utils.isNullOrUndefined(teraType) ? teraType : (teraType = species.type1);
|
||||||
const [ isInParty, partyIndex ]: [boolean, number] = this.isInParty(species); // we use this to firstly check if the pokemon is in the party, and if so, to get the party index in order to update the icon image
|
const [ isInParty, partyIndex ]: [boolean, number] = this.isInParty(species); // we use this to firstly check if the pokemon is in the party, and if so, to get the party index in order to update the icon image
|
||||||
if (isInParty) {
|
if (isInParty) {
|
||||||
this.updatePartyIcon(species, partyIndex);
|
this.updatePartyIcon(species, partyIndex);
|
||||||
@ -3751,7 +3752,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
abilityIndex: thisObj.starterAbilityIndexes[i],
|
abilityIndex: thisObj.starterAbilityIndexes[i],
|
||||||
passive: !(globalScene.gameData.starterData[starterSpecies.speciesId].passiveAttr ^ (PassiveAttr.ENABLED | PassiveAttr.UNLOCKED)),
|
passive: !(globalScene.gameData.starterData[starterSpecies.speciesId].passiveAttr ^ (PassiveAttr.ENABLED | PassiveAttr.UNLOCKED)),
|
||||||
nature: thisObj.starterNatures[i] as Nature,
|
nature: thisObj.starterNatures[i] as Nature,
|
||||||
tera: thisObj.starterTeras[i] as Type,
|
teraType: thisObj.starterTeras[i] as Type,
|
||||||
moveset: thisObj.starterMovesets[i],
|
moveset: thisObj.starterMovesets[i],
|
||||||
pokerus: thisObj.pokerusSpecies.includes(starterSpecies),
|
pokerus: thisObj.pokerusSpecies.includes(starterSpecies),
|
||||||
nickname: thisObj.starterPreferences[starterSpecies.speciesId]?.nickname,
|
nickname: thisObj.starterPreferences[starterSpecies.speciesId]?.nickname,
|
||||||
|
Loading…
Reference in New Issue
Block a user