mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-05-04 23:44:01 +01:00
[Bug] fix pre defend power multiplier (#2416)
This commit is contained in:
parent
46135b5a68
commit
28b2dd15c2
@ -1769,8 +1769,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
aura.applyPreAttack(null, null, null, move, [power]);
|
aura.applyPreAttack(null, null, null, move, [power]);
|
||||||
}
|
}
|
||||||
|
|
||||||
applyPreDefendAbAttrs(ReceivedMoveDamageMultiplierAbAttr, this, source, move, cancelled, power);
|
|
||||||
|
|
||||||
power.value *= typeChangeMovePowerMultiplier.value;
|
power.value *= typeChangeMovePowerMultiplier.value;
|
||||||
|
|
||||||
if (!typeless) {
|
if (!typeless) {
|
||||||
@ -1796,7 +1794,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
if (this.scene.arena.getTerrainType() === TerrainType.GRASSY && this.isGrounded() && move.type === Type.GROUND && move.moveTarget === MoveTarget.ALL_NEAR_OTHERS) {
|
if (this.scene.arena.getTerrainType() === TerrainType.GRASSY && this.isGrounded() && move.type === Type.GROUND && move.moveTarget === MoveTarget.ALL_NEAR_OTHERS) {
|
||||||
power.value /= 2;
|
power.value /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
applyMoveAttrs(VariablePowerAttr, source, this, move, power);
|
applyMoveAttrs(VariablePowerAttr, source, this, move, power);
|
||||||
|
|
||||||
this.scene.applyModifiers(PokemonMultiHitModifier, source.isPlayer(), source, new Utils.IntegerHolder(0), power);
|
this.scene.applyModifiers(PokemonMultiHitModifier, source.isPlayer(), source, new Utils.IntegerHolder(0), power);
|
||||||
if (!typeless) {
|
if (!typeless) {
|
||||||
this.scene.arena.applyTags(WeakenMoveTypeTag, move.type, power);
|
this.scene.arena.applyTags(WeakenMoveTypeTag, move.type, power);
|
||||||
@ -1934,6 +1934,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
applyMoveAttrs(ModifiedDamageAttr, source, this, move, damage);
|
applyMoveAttrs(ModifiedDamageAttr, source, this, move, damage);
|
||||||
|
applyPreDefendAbAttrs(ReceivedMoveDamageMultiplierAbAttr, this, source, move, cancelled, power);
|
||||||
|
|
||||||
if (power.value === 0) {
|
if (power.value === 0) {
|
||||||
damage.value = 0;
|
damage.value = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user