Add ignore accuracy move attribute

This commit is contained in:
Flashfyre committed 2023-04-27 20:12:25 -04:00
1 parent 2062d44026
commit 14ba169ea5
3 files changed
+120 -43

No files matched your search

+9
View File
@@ -34,6 +34,7 @@ export enum BattlerTagType {
FIRE_BOOST,
CRIT_BOOST,
NO_CRIT,
IGNORE_ACCURACY,
BYPASS_SLEEP,
IGNORE_FLYING
}
@@ -501,6 +502,12 @@ export class CritBoostTag extends BattlerTag {
}
}
export class IgnoreAccuracyTag extends BattlerTag {
constructor(sourceMove: Moves) {
super(BattlerTagType.IGNORE_ACCURACY, BattlerTagLapseType.TURN_END, 1, sourceMove);
}
}
export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourceMove: Moves, sourceId: integer): BattlerTag {
switch (tagType) {
case BattlerTagType.RECHARGING:
@@ -547,6 +554,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc
return new CritBoostTag(tagType, sourceMove);
case BattlerTagType.NO_CRIT:
return new BattlerTag(tagType, BattlerTagLapseType.AFTER_MOVE, turnCount, sourceMove);
case BattlerTagType.IGNORE_ACCURACY:
return new IgnoreAccuracyTag(turnCount, sourceMove);
case BattlerTagType.BYPASS_SLEEP:
return new BattlerTag(BattlerTagType.BYPASS_SLEEP, BattlerTagLapseType.TURN_END, turnCount, sourceMove);
case BattlerTagType.IGNORE_FLYING: