mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +02:00
Merge branch 'beta' into bug/roar-enemy-sprite-disappears
This commit is contained in:
commit
1c555680d2
@ -4498,7 +4498,7 @@ async function applyAbAttrsInternal<TAttr extends AbAttr>(
|
|||||||
applyFunc: AbAttrApplyFunc<TAttr>,
|
applyFunc: AbAttrApplyFunc<TAttr>,
|
||||||
args: any[],
|
args: any[],
|
||||||
showAbilityInstant: boolean = false,
|
showAbilityInstant: boolean = false,
|
||||||
quiet: boolean = false,
|
simulated: boolean = false,
|
||||||
messages: string[] = [],
|
messages: string[] = [],
|
||||||
) {
|
) {
|
||||||
for (const passive of [false, true]) {
|
for (const passive of [false, true]) {
|
||||||
@ -4520,33 +4520,29 @@ async function applyAbAttrsInternal<TAttr extends AbAttr>(
|
|||||||
if (result instanceof Promise) {
|
if (result instanceof Promise) {
|
||||||
result = await result;
|
result = await result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
if (pokemon.summonData && !pokemon.summonData.abilitiesApplied.includes(ability.id)) {
|
if (pokemon.summonData && !pokemon.summonData.abilitiesApplied.includes(ability.id)) {
|
||||||
pokemon.summonData.abilitiesApplied.push(ability.id);
|
pokemon.summonData.abilitiesApplied.push(ability.id);
|
||||||
}
|
}
|
||||||
if (pokemon.battleData && !quiet && !pokemon.battleData.abilitiesApplied.includes(ability.id)) {
|
if (pokemon.battleData && !simulated && !pokemon.battleData.abilitiesApplied.includes(ability.id)) {
|
||||||
pokemon.battleData.abilitiesApplied.push(ability.id);
|
pokemon.battleData.abilitiesApplied.push(ability.id);
|
||||||
}
|
}
|
||||||
|
if (attr.showAbility && !simulated) {
|
||||||
if (attr.showAbility && !quiet) {
|
|
||||||
if (showAbilityInstant) {
|
if (showAbilityInstant) {
|
||||||
pokemon.scene.abilityBar.showAbility(pokemon, passive);
|
pokemon.scene.abilityBar.showAbility(pokemon, passive);
|
||||||
} else {
|
} else {
|
||||||
queueShowAbility(pokemon, passive);
|
queueShowAbility(pokemon, passive);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!quiet) {
|
|
||||||
const message = attr.getTriggerMessage(pokemon, ability.name, args);
|
const message = attr.getTriggerMessage(pokemon, ability.name, args);
|
||||||
if (message) {
|
if (message) {
|
||||||
|
if (!simulated) {
|
||||||
pokemon.scene.queueMessage(message);
|
pokemon.scene.queueMessage(message);
|
||||||
messages.push(message);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
messages.push(message!);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pokemon.scene.clearPhaseQueueSplice();
|
pokemon.scene.clearPhaseQueueSplice();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ export class EnemyCommandPhase extends FieldPhase {
|
|||||||
|
|
||||||
const trapTag = enemyPokemon.findTag(t => t instanceof TrappedTag) as TrappedTag;
|
const trapTag = enemyPokemon.findTag(t => t instanceof TrappedTag) as TrappedTag;
|
||||||
const trapped = new Utils.BooleanHolder(false);
|
const trapped = new Utils.BooleanHolder(false);
|
||||||
opponents.forEach(playerPokemon => applyCheckTrappedAbAttrs(CheckTrappedAbAttr, playerPokemon, trapped, enemyPokemon, [], true));
|
opponents.forEach(playerPokemon => applyCheckTrappedAbAttrs(CheckTrappedAbAttr, playerPokemon, trapped, enemyPokemon, [""], true));
|
||||||
if (!trapTag && !trapped.value) {
|
if (!trapTag && !trapped.value) {
|
||||||
const partyMemberScores = trainer.getPartyMemberMatchupScores(enemyPokemon.trainerSlot, true);
|
const partyMemberScores = trainer.getPartyMemberMatchupScores(enemyPokemon.trainerSlot, true);
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ export default class MenuUiHandler extends MessageUiHandler {
|
|||||||
render() {
|
render() {
|
||||||
const ui = this.getUi();
|
const ui = this.getUi();
|
||||||
this.excludedMenus = () => [
|
this.excludedMenus = () => [
|
||||||
{ condition: ![Mode.COMMAND, Mode.TITLE].includes(ui.getModeChain()[0]), options: [MenuOptions.EGG_GACHA, MenuOptions.EGG_LIST] },
|
{ condition: ![Mode.COMMAND, Mode.TITLE].includes(ui.getModeChain().at(-1)!), options: [MenuOptions.EGG_GACHA, MenuOptions.EGG_LIST] },
|
||||||
{ condition: bypassLogin, options: [MenuOptions.LOG_OUT] }
|
{ condition: bypassLogin, options: [MenuOptions.LOG_OUT] }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user