mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-15 21:02:18 +02:00
Cleanup code
This commit is contained in:
parent
7afe764c28
commit
5a706d7cf8
@ -1276,7 +1276,7 @@ export class CursedTag extends BattlerTag {
|
||||
}
|
||||
}
|
||||
|
||||
export class AuraTag extends BattlerTag {
|
||||
export abstract class AuraTag extends BattlerTag {
|
||||
constructor(tagType: BattlerTagType, sourceId: number) {
|
||||
super(tagType, BattlerTagLapseType.CUSTOM, 0, undefined, sourceId);
|
||||
}
|
||||
|
@ -1455,12 +1455,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
|
||||
applyPreDefendAbAttrs(ReceivedMoveDamageMultiplierAbAttr, this, source, battlerMove, cancelled, power);
|
||||
|
||||
const reducedDamageTag = this.getTag(BattlerTagType.FRIEND_GUARD) as ReceivedMoveDamageMultiplierTag;
|
||||
const abilityBypass = new Utils.BooleanHolder(false);
|
||||
applyAbAttrs(MoveAbilityBypassAbAttr, source, abilityBypass);
|
||||
|
||||
if (!abilityBypass.value && reducedDamageTag) {
|
||||
power.value *= reducedDamageTag.powerMultiplier;
|
||||
if (!abilityBypass.value) {
|
||||
const reducedDamageTags =
|
||||
this.findTags(t => t instanceof ReceivedMoveDamageMultiplierTag) as ReceivedMoveDamageMultiplierTag[];
|
||||
const powerMultiplier = reducedDamageTags.reduce((acc, t) => acc * t.powerMultiplier, 1);
|
||||
power.value *= powerMultiplier;
|
||||
}
|
||||
|
||||
power.value *= typeChangeMovePowerMultiplier.value;
|
||||
|
Loading…
Reference in New Issue
Block a user