mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-07-30 03:29:51 +00:00
35
interfaces/AbilityType.ts
Normal file
35
interfaces/AbilityType.ts
Normal file
@ -0,0 +1,35 @@
|
||||
enum AbilityType {
|
||||
POKEBODY,
|
||||
POKEPOWER,
|
||||
TALENT,
|
||||
ANCIENTTRAIT
|
||||
}
|
||||
|
||||
namespace AbilityType {
|
||||
export function getFromText(txt: string): AbilityType {
|
||||
switch (txt) {
|
||||
case "Ability":
|
||||
|
||||
case "Talent":
|
||||
return AbilityType.TALENT
|
||||
|
||||
case "Poké-Body":
|
||||
case "Pok<6F><6B>-Body":
|
||||
return AbilityType.POKEBODY
|
||||
|
||||
case "Poké-Power":
|
||||
case "Pokémon Power":
|
||||
case "Pok<6F><6B>-Power":
|
||||
return AbilityType.POKEPOWER
|
||||
|
||||
case "Ancient Trait":
|
||||
|
||||
case "Trait Antique":
|
||||
return AbilityType.ANCIENTTRAIT
|
||||
default:
|
||||
throw new Error(`Ability Type (${txt}) not found!`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default AbilityType
|
Reference in New Issue
Block a user