Skip to content

Commit

Permalink
Merged from official repos
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeyTheA committed Aug 19, 2024
2 parents 1d7ddd0 + a46e35b commit 56da00e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 1 addition & 7 deletions src/battle-scene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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());
});
Expand Down
2 changes: 1 addition & 1 deletion src/data/move.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4441,7 +4441,7 @@ export class CurseAttr extends MoveEffectAttr {
const curseRecoilDamage = Math.max(1, Math.floor(user.getMaxHp() / 2));
user.damageAndUpdate(curseRecoilDamage, HitResult.OTHER, false, true, true);
user.scene.queueMessage(
i18next.t("battle:cursedOnAdd", {
i18next.t("battlerTags:cursedOnAdd", {
pokemonNameWithAffix: getPokemonNameWithAffix(user),
pokemonName: getPokemonNameWithAffix(target)
})
Expand Down
4 changes: 4 additions & 0 deletions src/phases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!);
}
}

Expand Down

0 comments on commit 56da00e

Please sign in to comment.