Update variable base power check to original location

This commit is contained in:
Matthew Ross 2024-05-11 18:35:41 -07:00
parent d8a0f38551
commit 1590b0cd26
2 changed files with 3 additions and 4 deletions

View File

@ -990,8 +990,7 @@ export class MoveTypeChangeAttr extends PreAttackAbAttr {
export class DamageBoostAbAttr extends PreAttackAbAttr {
private damageMultiplier: number;
private condition: PokemonAttackCondition
private condition: PokemonAttackCondition;
constructor(damageMultiplier: number, condition: PokemonAttackCondition){
super(true);

View File

@ -1314,7 +1314,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
const sourceTeraType = source.getTeraType();
if (sourceTeraType !== Type.UNKNOWN && sourceTeraType === type && power.value < 60 && move.priority <= 0 && !move.getAttrs(MultiHitAttr).length && !this.scene.findModifier(m => m instanceof PokemonMultiHitModifier && m.pokemonId === source.id))
power.value = 60;
applyMoveAttrs(VariablePowerAttr, source, this, move, power);
applyPreAttackAbAttrs(VariableMovePowerAbAttr, source, this, battlerMove, power);
this.scene.getField(true).map(p => applyPreAttackAbAttrs(FieldVariableMovePowerAbAttr, this, source, battlerMove, power));
@ -1343,6 +1342,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
applyMoveAttrs(IgnoreWeatherTypeDebuffAttr, source, this, move, arenaAttackTypeMultiplier);
if (this.scene.arena.getTerrainType() === TerrainType.GRASSY && this.isGrounded() && type === Type.GROUND && move.moveTarget === MoveTarget.ALL_NEAR_OTHERS)
power.value /= 2;
applyMoveAttrs(VariablePowerAttr, source, this, move, power);
this.scene.applyModifiers(PokemonMultiHitModifier, source.isPlayer(), source, new Utils.IntegerHolder(0), power);
if (!typeless) {
this.scene.arena.applyTags(WeakenMoveTypeTag, type, power);
@ -1409,7 +1409,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
if (!burnDamageReductionCancelled.value)
damage.value = Math.floor(damage.value / 2);
}
applyPreAttackAbAttrs(DamageBoostAbAttr, source, this, battlerMove, damage)
move.getAttrs(HitsTagAttr).map(hta => hta as HitsTagAttr).filter(hta => hta.doubleDamage).forEach(hta => {