[Hotfix] Steal-able Mini Black Hole Pt 2 (#3632)

* Still have no idea where Eternatus is given the MBH....

* typedocs

---------

Co-authored-by: frutescens <info@laptop>
This commit is contained in:
Mumble 2024-08-18 16:59:18 -07:00 committed by GitHub
parent 1db26dab96
commit a46e35b8dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 7 deletions

View File

@ -2419,13 +2419,7 @@ 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 => {
const enemyModifier = mt.newModifier(enemyPokemon);
if (enemyModifier instanceof TurnHeldItemTransferModifier) {
enemyModifier.setTransferrableFalse();
}
enemyModifier.add(this.enemyModifiers, false, this);
});
.map(mt => mt.newModifier(enemyPokemon).add(this.enemyModifiers, false, this));
});
this.updateModifiers(false).then(() => resolve());
});

View File

@ -878,6 +878,10 @@ export class EncounterPhase extends BattlePhase {
} else if (!(battle.waveIndex % 1000)) {
enemyPokemon.formIndex = 1;
enemyPokemon.updateScale();
const bossMBH = this.scene.findModifier(m => m instanceof TurnHeldItemTransferModifier && m.pokemonId === enemyPokemon.id, false) as TurnHeldItemTransferModifier;
this.scene.removeModifier(bossMBH!);
bossMBH?.setTransferrableFalse();
this.scene.addEnemyModifier(bossMBH!);
}
}