mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-26 09:19:31 +02:00
Merge branch 'pagefaultgames:main' into main
This commit is contained in:
commit
cee0ab2bb2
@ -371,6 +371,10 @@ export abstract class LapsingPersistentModifier extends PersistentModifier {
|
|||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getIconStackText(_scene: BattleScene, _virtual?: boolean): Phaser.GameObjects.BitmapText | null {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
getBattleCount(): number {
|
getBattleCount(): number {
|
||||||
return this.battleCount;
|
return this.battleCount;
|
||||||
}
|
}
|
||||||
@ -388,7 +392,8 @@ export abstract class LapsingPersistentModifier extends PersistentModifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getMaxStackCount(_scene: BattleScene, _forThreshold?: boolean): number {
|
getMaxStackCount(_scene: BattleScene, _forThreshold?: boolean): number {
|
||||||
return 1;
|
// Must be an abitrary number greater than 1
|
||||||
|
return 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -791,7 +796,7 @@ export class TerastallizeModifier extends LapsingPokemonHeldItemModifier {
|
|||||||
/**
|
/**
|
||||||
* Modifier used for held items, specifically vitamins like Carbos, Hp Up, etc., that
|
* Modifier used for held items, specifically vitamins like Carbos, Hp Up, etc., that
|
||||||
* increase the value of a given {@linkcode PermanentStat}.
|
* increase the value of a given {@linkcode PermanentStat}.
|
||||||
* @extends LapsingPersistentModifier
|
* @extends PokemonHeldItemModifier
|
||||||
* @see {@linkcode apply}
|
* @see {@linkcode apply}
|
||||||
*/
|
*/
|
||||||
export class BaseStatModifier extends PokemonHeldItemModifier {
|
export class BaseStatModifier extends PokemonHeldItemModifier {
|
||||||
|
@ -43,9 +43,9 @@ export class EggSummaryPhase extends Phase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
end() {
|
end() {
|
||||||
this.eggHatchHandler.clear();
|
|
||||||
this.scene.ui.setModeForceTransition(Mode.MESSAGE).then(() => {});
|
|
||||||
this.scene.time.delayedCall(250, () => this.scene.setModifiersVisible(true));
|
this.scene.time.delayedCall(250, () => this.scene.setModifiersVisible(true));
|
||||||
|
this.scene.ui.setModeForceTransition(Mode.MESSAGE).then(() => {
|
||||||
super.end();
|
super.end();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ export function applySystemDataPatches(data: SystemSaveData) {
|
|||||||
if (data.starterData) {
|
if (data.starterData) {
|
||||||
// Migrate ability starter data if empty for caught species
|
// Migrate ability starter data if empty for caught species
|
||||||
Object.keys(data.starterData).forEach(sd => {
|
Object.keys(data.starterData).forEach(sd => {
|
||||||
if (data.dexData[sd].caughtAttr && !data.starterData[sd].abilityAttr) {
|
if (data.dexData[sd]?.caughtAttr && (data.starterData[sd] && !data.starterData[sd].abilityAttr)) {
|
||||||
data.starterData[sd].abilityAttr = 1;
|
data.starterData[sd].abilityAttr = 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -104,9 +104,11 @@ export function applySystemDataPatches(data: SystemSaveData) {
|
|||||||
// --- PATCHES ---
|
// --- PATCHES ---
|
||||||
|
|
||||||
// Fix Starter Data
|
// Fix Starter Data
|
||||||
if (data.starterData) {
|
|
||||||
for (const starterId of defaultStarterSpecies) {
|
for (const starterId of defaultStarterSpecies) {
|
||||||
|
if (data.starterData[starterId]?.abilityAttr) {
|
||||||
data.starterData[starterId].abilityAttr |= AbilityAttr.ABILITY_1;
|
data.starterData[starterId].abilityAttr |= AbilityAttr.ABILITY_1;
|
||||||
|
}
|
||||||
|
if (data.dexData[starterId]?.caughtAttr) {
|
||||||
data.dexData[starterId].caughtAttr |= DexAttr.FEMALE;
|
data.dexData[starterId].caughtAttr |= DexAttr.FEMALE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,6 +97,7 @@ export default class EggSummaryUiHandler extends MessageUiHandler {
|
|||||||
this.pokemonIconsContainer.removeAll(true);
|
this.pokemonIconsContainer.removeAll(true);
|
||||||
this.eggHatchBg.setVisible(false);
|
this.eggHatchBg.setVisible(false);
|
||||||
this.getUi().hideTooltip();
|
this.getUi().hideTooltip();
|
||||||
|
|
||||||
// Note: Questions on garbage collection go to @frutescens
|
// Note: Questions on garbage collection go to @frutescens
|
||||||
const activeKeys = this.scene.getActiveKeys();
|
const activeKeys = this.scene.getActiveKeys();
|
||||||
// Removing unnecessary sprites from animation manager
|
// Removing unnecessary sprites from animation manager
|
||||||
@ -117,7 +118,6 @@ export default class EggSummaryUiHandler extends MessageUiHandler {
|
|||||||
this.eggHatchData.length = 0;
|
this.eggHatchData.length = 0;
|
||||||
// Removes Pokemon icons in EggSummaryUiHandler
|
// Removes Pokemon icons in EggSummaryUiHandler
|
||||||
this.iconAnimHandler.removeAll();
|
this.iconAnimHandler.removeAll();
|
||||||
console.log("Egg Summary Handler cleared");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -256,7 +256,6 @@ export default class EggSummaryUiHandler extends MessageUiHandler {
|
|||||||
if (phase instanceof EggSummaryPhase) {
|
if (phase instanceof EggSummaryPhase) {
|
||||||
phase.end();
|
phase.end();
|
||||||
}
|
}
|
||||||
ui.revertMode();
|
|
||||||
success = true;
|
success = true;
|
||||||
} else {
|
} else {
|
||||||
const count = this.eggHatchData.length;
|
const count = this.eggHatchData.length;
|
||||||
|
Loading…
Reference in New Issue
Block a user