feature/5-drop-command (#17)
#5 Reviewed-on: https://gitea.vylpes.xyz/External/card-drop/pulls/17 Co-authored-by: Ethan Lane <ethan@vylpes.com> Co-committed-by: Ethan Lane <ethan@vylpes.com>
This commit is contained in:
parent
51d97bacd5
commit
58d1541e47
21 changed files with 382 additions and 48 deletions
|
@ -1,6 +1,34 @@
|
|||
import EmbedColours from "./EmbedColours";
|
||||
|
||||
export enum CardRarity {
|
||||
Bronze,
|
||||
Silver,
|
||||
Gold,
|
||||
Legendary,
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -1,3 +1,7 @@
|
|||
export default class EmbedColours {
|
||||
public static readonly Ok = 0x3050ba;
|
||||
public static readonly BronzeCard = 0xcd7f32;
|
||||
public static readonly SilverCard = 0xc0c0c0;
|
||||
public static readonly GoldCard = 0xffd700;
|
||||
public static readonly LegendaryCard = 0x50c878;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue