Updated battler-tags to support ALWAYS_CRIT

This commit is contained in:
EmoUsedHM01 2024-04-12 20:37:45 +01:00 committed by GitHub
parent 5a63e136e7
commit 5cbdb5a679
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -956,6 +956,12 @@ export class CritBoostTag extends BattlerTag {
} }
} }
export class AlwaysCritTag extends BattlerTag {
constructor(sourceMove: Moves) {
super(BattlerTagType.ALWAYS_CRIT, BattlerTagLapseType.TURN_END, 2, sourceMove);
}
}
export class IgnoreAccuracyTag extends BattlerTag { export class IgnoreAccuracyTag extends BattlerTag {
constructor(sourceMove: Moves) { constructor(sourceMove: Moves) {
super(BattlerTagType.IGNORE_ACCURACY, BattlerTagLapseType.TURN_END, 2, sourceMove); super(BattlerTagType.IGNORE_ACCURACY, BattlerTagLapseType.TURN_END, 2, sourceMove);
@ -1077,6 +1083,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc
return new TypeBoostTag(tagType, sourceMove, Type.FIRE); return new TypeBoostTag(tagType, sourceMove, Type.FIRE);
case BattlerTagType.CRIT_BOOST: case BattlerTagType.CRIT_BOOST:
return new CritBoostTag(tagType, sourceMove); return new CritBoostTag(tagType, sourceMove);
case BattlerTagType.ALWAYS_CRIT:
return new AlwaysCritTag(tagType, sourceMove);
case BattlerTagType.NO_CRIT: case BattlerTagType.NO_CRIT:
return new BattlerTag(tagType, BattlerTagLapseType.AFTER_MOVE, turnCount, sourceMove); return new BattlerTag(tagType, BattlerTagLapseType.AFTER_MOVE, turnCount, sourceMove);
case BattlerTagType.IGNORE_ACCURACY: case BattlerTagType.IGNORE_ACCURACY: