mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-18 21:39:28 +02:00
Fix merge conflicts
This commit is contained in:
parent
a4d5d87c96
commit
195932c545
@ -36,19 +36,19 @@ const OPTION_3_DISALLOWED_MODIFIERS = [
|
||||
|
||||
const DELIBIRDY_MONEY_PRICE_MULTIPLIER = 2;
|
||||
|
||||
const doEventReward = (scene: BattleScene) => {
|
||||
const event_buff = scene.eventManager.activeEvent()?.delibirdyBuff ?? [];
|
||||
const doEventReward = () => {
|
||||
const event_buff = globalScene.eventManager.activeEvent()?.delibirdyBuff ?? [];
|
||||
if (event_buff.length > 0) {
|
||||
const candidates = event_buff.filter((c => {
|
||||
const mtype = generateModifierType(scene, modifierTypes[c]);
|
||||
const existingCharm = scene.findModifier(m => m.type.id === mtype?.id);
|
||||
return !(existingCharm && existingCharm.getStackCount() >= existingCharm.getMaxStackCount(scene));
|
||||
const mtype = generateModifierType(modifierTypes[c]);
|
||||
const existingCharm = globalScene.findModifier(m => m.type.id === mtype?.id);
|
||||
return !(existingCharm && existingCharm.getStackCount() >= existingCharm.getMaxStackCount());
|
||||
}));
|
||||
if (candidates.length > 0) {
|
||||
scene.unshiftPhase(new ModifierRewardPhase(scene, modifierTypes[randSeedItem(candidates)]));
|
||||
globalScene.unshiftPhase(new ModifierRewardPhase(modifierTypes[randSeedItem(candidates)]));
|
||||
} else {
|
||||
// At max stacks, give a Voucher instead
|
||||
scene.unshiftPhase(new ModifierRewardPhase(scene, modifierTypes.VOUCHER));
|
||||
globalScene.unshiftPhase(new ModifierRewardPhase(modifierTypes.VOUCHER));
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -154,10 +154,10 @@ export const DelibirdyEncounter: MysteryEncounter =
|
||||
await applyModifierTypeToPlayerPokemon(globalScene.getPlayerPokemon()!, shellBell);
|
||||
globalScene.playSound("item_fanfare");
|
||||
await showEncounterText(i18next.t("battle:rewardGain", { modifierName: shellBell.name }), null, undefined, true);
|
||||
doEventReward(scene);
|
||||
doEventReward();
|
||||
} else {
|
||||
globalScene.unshiftPhase(new ModifierRewardPhase(modifierTypes.AMULET_COIN));
|
||||
doEventReward(scene);
|
||||
doEventReward();
|
||||
}
|
||||
|
||||
leaveEncounterWithoutBattle(true);
|
||||
@ -231,10 +231,10 @@ export const DelibirdyEncounter: MysteryEncounter =
|
||||
await applyModifierTypeToPlayerPokemon(globalScene.getPlayerPokemon()!, shellBell);
|
||||
globalScene.playSound("item_fanfare");
|
||||
await showEncounterText(i18next.t("battle:rewardGain", { modifierName: shellBell.name }), null, undefined, true);
|
||||
doEventReward(scene);
|
||||
doEventReward();
|
||||
} else {
|
||||
globalScene.unshiftPhase(new ModifierRewardPhase(modifierTypes.CANDY_JAR));
|
||||
doEventReward(scene);
|
||||
doEventReward();
|
||||
}
|
||||
} else {
|
||||
// Check if the player has max stacks of that Berry Pouch already
|
||||
@ -246,10 +246,10 @@ export const DelibirdyEncounter: MysteryEncounter =
|
||||
await applyModifierTypeToPlayerPokemon(globalScene.getPlayerPokemon()!, shellBell);
|
||||
globalScene.playSound("item_fanfare");
|
||||
await showEncounterText(i18next.t("battle:rewardGain", { modifierName: shellBell.name }), null, undefined, true);
|
||||
doEventReward(scene);
|
||||
doEventReward();
|
||||
} else {
|
||||
globalScene.unshiftPhase(new ModifierRewardPhase(modifierTypes.BERRY_POUCH));
|
||||
doEventReward(scene);
|
||||
doEventReward();
|
||||
}
|
||||
}
|
||||
|
||||
@ -324,10 +324,10 @@ export const DelibirdyEncounter: MysteryEncounter =
|
||||
await applyModifierTypeToPlayerPokemon(globalScene.getPlayerParty()[0], shellBell);
|
||||
globalScene.playSound("item_fanfare");
|
||||
await showEncounterText(i18next.t("battle:rewardGain", { modifierName: shellBell.name }), null, undefined, true);
|
||||
doEventReward(scene);
|
||||
doEventReward();
|
||||
} else {
|
||||
globalScene.unshiftPhase(new ModifierRewardPhase(modifierTypes.HEALING_CHARM));
|
||||
doEventReward(scene);
|
||||
doEventReward();
|
||||
}
|
||||
|
||||
chosenPokemon.loseHeldItem(modifier, false);
|
||||
|
@ -771,8 +771,8 @@ export const pokemonFormChanges: PokemonFormChanges = {
|
||||
new SpeciesFormChange(Species.KYUREM, "", "white", new SpeciesFormChangeItemTrigger(FormChangeItem.LIGHT_STONE), false, getSpeciesDependentFormChangeCondition(Species.RESHIRAM))
|
||||
],
|
||||
[Species.KELDEO]: [
|
||||
new SpeciesFormChange(Species.KELDEO, "ordinary", "resolute", new SpeciesFormChangeMoveLearnedTrigger(Moves.SECRET_SWORD), false, new SpeciesFormChangeCondition((p) => p.scene.gameMode.isDaily !== true)),
|
||||
new SpeciesFormChange(Species.KELDEO, "resolute", "ordinary", new SpeciesFormChangeMoveLearnedTrigger(Moves.SECRET_SWORD, false), false, new SpeciesFormChangeCondition((p) => p.scene.gameMode.isDaily !== true))
|
||||
new SpeciesFormChange(Species.KELDEO, "ordinary", "resolute", new SpeciesFormChangeMoveLearnedTrigger(Moves.SECRET_SWORD), false, new SpeciesFormChangeCondition(() => globalScene.gameMode.isDaily !== true)),
|
||||
new SpeciesFormChange(Species.KELDEO, "resolute", "ordinary", new SpeciesFormChangeMoveLearnedTrigger(Moves.SECRET_SWORD, false), false, new SpeciesFormChangeCondition(() => globalScene.gameMode.isDaily !== true))
|
||||
],
|
||||
[Species.MELOETTA]: [
|
||||
new SpeciesFormChange(Species.MELOETTA, "aria", "pirouette", new MeloettaFormChangePostMoveTrigger(Moves.RELIC_SONG), true),
|
||||
|
@ -1170,7 +1170,7 @@ function getGymLeaderPartyTemplate() {
|
||||
export function getRandomPartyMemberFunc(speciesPool: Species[], trainerSlot: TrainerSlot = TrainerSlot.TRAINER, ignoreEvolution: boolean = false, postProcess?: (enemyPokemon: EnemyPokemon) => void) {
|
||||
return (level: number, strength: PartyMemberStrength) => {
|
||||
let species = Utils.randSeedItem(speciesPool);
|
||||
if (scene.gameMode.isClassic && scene.currentBattle.waveIndex === 20) {
|
||||
if (globalScene.gameMode.isClassic && globalScene.currentBattle.waveIndex === 20) {
|
||||
ignoreEvolution = true;
|
||||
}
|
||||
if (!ignoreEvolution) {
|
||||
|
@ -37,9 +37,9 @@ export class CommandPhase extends FieldPhase {
|
||||
const commandUiHandler = globalScene.ui.handlers[Mode.COMMAND];
|
||||
|
||||
// If one of these conditions is true, we always reset the cursor to Command.FIGHT
|
||||
const cursorResetEvent = this.scene.currentBattle.battleType === BattleType.MYSTERY_ENCOUNTER ||
|
||||
this.scene.currentBattle.battleType === BattleType.TRAINER ||
|
||||
this.scene.arena.biomeType === Biome.END;
|
||||
const cursorResetEvent = globalScene.currentBattle.battleType === BattleType.MYSTERY_ENCOUNTER ||
|
||||
globalScene.currentBattle.battleType === BattleType.TRAINER ||
|
||||
globalScene.arena.biomeType === Biome.END;
|
||||
|
||||
if (commandUiHandler) {
|
||||
if ((globalScene.currentBattle.turn === 1 && (!globalScene.commandCursorMemory || cursorResetEvent)) || commandUiHandler.getCursor() === Command.POKEMON) {
|
||||
|
@ -826,7 +826,7 @@ export function setSetting(setting: string, value: integer): boolean {
|
||||
globalScene.shopCursorTarget = selectedValue;
|
||||
break;
|
||||
case SettingKeys.Command_Cursor_Memory:
|
||||
scene.commandCursorMemory = Setting[index].options[value].value === "On";
|
||||
globalScene.commandCursorMemory = Setting[index].options[value].value === "On";
|
||||
break;
|
||||
case SettingKeys.EXP_Gains_Speed:
|
||||
globalScene.expGainsSpeed = value;
|
||||
|
Loading…
Reference in New Issue
Block a user