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