pokerogue/src/battle-tag.ts

33 lines
608 B
TypeScript
Raw Normal View History

2023-04-13 09:16:36 -07:00
export enum BattleTagType {
NONE,
FLYING,
UNDERGROUND
}
export enum BattleTagLapseType {
FAINT,
MOVE,
TURN_END
}
export class BattleTag {
public tagType: BattleTagType;
public lapseType: BattleTagLapseType;
public turnCount: integer;
constructor(tagType: BattleTagType, lapseType: BattleTagLapseType, turnCount: integer) {
this.tagType = tagType;
this.lapseType = lapseType;
this.turnCount = turnCount;
}
isHidden() {
switch (this.tagType) {
case BattleTagType.FLYING:
case BattleTagType.UNDERGROUND:
return true;
}
return false;
}
}