Skip to content

Commit

Permalink
[Bug] Preventing the MBH from being stolen in Endless (pagefaultgames…
Browse files Browse the repository at this point in the history
…#3630)

* Endless MBH Fix

* add import

* Revert "add import"

This reverts commit 814a405.

* Revert "Endless MBH Fix"

This reverts commit 8eb4481.

* removed newline

---------

Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: frutescens <info@laptop>
  • Loading branch information
3 people authored Aug 18, 2024
1 parent c8ed89e commit 65af7a5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/battle-scene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2419,9 +2419,14 @@ export default class BattleScene extends SceneBase {
count = Math.max(count, Math.floor(chances / 2));
}
getEnemyModifierTypesForWave(difficultyWaveIndex, count, [ enemyPokemon ], this.currentBattle.battleType === BattleType.TRAINER ? ModifierPoolType.TRAINER : ModifierPoolType.WILD, upgradeChance)
.map(mt => mt.newModifier(enemyPokemon).add(this.enemyModifiers, false, this));
.map(mt => {
const enemyModifier = mt.newModifier(enemyPokemon);
if (enemyModifier instanceof TurnHeldItemTransferModifier) {
enemyModifier.setTransferrableFalse();
}
enemyModifier.add(this.enemyModifiers, false, this);
});
});

this.updateModifiers(false).then(() => resolve());
});
}
Expand Down

0 comments on commit 65af7a5

Please sign in to comment.