2023-09-03 20:27:29 +01:00
|
|
|
import EmbedColours from "./EmbedColours";
|
|
|
|
|
2023-09-03 17:26:45 +01:00
|
|
|
export enum CardRarity {
|
|
|
|
Bronze,
|
|
|
|
Silver,
|
|
|
|
Gold,
|
|
|
|
Legendary,
|
2023-09-03 20:27:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export function CardRarityToString(rarity: CardRarity): string {
|
|
|
|
switch (rarity) {
|
|
|
|
case CardRarity.Bronze:
|
|
|
|
return "Bronze";
|
|
|
|
case CardRarity.Silver:
|
|
|
|
return "Silver";
|
|
|
|
case CardRarity.Gold:
|
|
|
|
return "Gold";
|
|
|
|
case CardRarity.Legendary:
|
|
|
|
return "Legendary";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export function CardRarityToColour(rarity: CardRarity): number {
|
|
|
|
switch (rarity) {
|
|
|
|
case CardRarity.Bronze:
|
|
|
|
return EmbedColours.BronzeCard;
|
|
|
|
case CardRarity.Silver:
|
|
|
|
return EmbedColours.SilverCard;
|
|
|
|
case CardRarity.Gold:
|
|
|
|
return EmbedColours.GoldCard;
|
|
|
|
case CardRarity.Legendary:
|
|
|
|
return EmbedColours.LegendaryCard;
|
|
|
|
}
|
2023-09-03 17:26:45 +01:00
|
|
|
}
|