Merge branch 'beta' into bug/roar-enemy-sprite-disappears

This commit is contained in:
flx-sta 2024-08-30 19:57:47 -07:00 committed by GitHub
commit 1c555680d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 13 deletions

View File

@ -4498,7 +4498,7 @@ async function applyAbAttrsInternal<TAttr extends AbAttr>(
applyFunc: AbAttrApplyFunc<TAttr>,
args: any[],
showAbilityInstant: boolean = false,
quiet: boolean = false,
simulated: boolean = false,
messages: string[] = [],
) {
for (const passive of [false, true]) {
@ -4520,33 +4520,29 @@ async function applyAbAttrsInternal<TAttr extends AbAttr>(
if (result instanceof Promise) {
result = await result;
}
if (result) {
if (pokemon.summonData && !pokemon.summonData.abilitiesApplied.includes(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);
}
if (attr.showAbility && !quiet) {
if (attr.showAbility && !simulated) {
if (showAbilityInstant) {
pokemon.scene.abilityBar.showAbility(pokemon, passive);
} else {
queueShowAbility(pokemon, passive);
}
}
if (!quiet) {
const message = attr.getTriggerMessage(pokemon, ability.name, args);
if (message) {
const message = attr.getTriggerMessage(pokemon, ability.name, args);
if (message) {
if (!simulated) {
pokemon.scene.queueMessage(message);
messages.push(message);
}
}
messages.push(message!);
}
}
pokemon.scene.clearPhaseQueueSplice();
}
}

View File

@ -47,7 +47,7 @@ export class EnemyCommandPhase extends FieldPhase {
const trapTag = enemyPokemon.findTag(t => t instanceof TrappedTag) as TrappedTag;
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) {
const partyMemberScores = trainer.getPartyMemberMatchupScores(enemyPokemon.trainerSlot, true);

View File

@ -106,7 +106,7 @@ export default class MenuUiHandler extends MessageUiHandler {
render() {
const ui = this.getUi();
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] }
];