Merge branch 'main' into develop
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
commit
3be95bf1ac
6 changed files with 63 additions and 57 deletions
|
@ -1,14 +1,18 @@
|
|||
import EmbedColours from "./EmbedColours";
|
||||
|
||||
export enum CardRarity {
|
||||
Unknown,
|
||||
Bronze,
|
||||
Silver,
|
||||
Gold,
|
||||
Manga,
|
||||
Legendary,
|
||||
}
|
||||
|
||||
export function CardRarityToString(rarity: CardRarity): string {
|
||||
switch (rarity) {
|
||||
case CardRarity.Unknown:
|
||||
return "Unknown";
|
||||
case CardRarity.Bronze:
|
||||
return "Bronze";
|
||||
case CardRarity.Silver:
|
||||
|
@ -17,11 +21,15 @@ export function CardRarityToString(rarity: CardRarity): string {
|
|||
return "Gold";
|
||||
case CardRarity.Legendary:
|
||||
return "Legendary";
|
||||
case CardRarity.Manga:
|
||||
return "Manga";
|
||||
}
|
||||
}
|
||||
|
||||
export function CardRarityToColour(rarity: CardRarity): number {
|
||||
switch (rarity) {
|
||||
case CardRarity.Unknown:
|
||||
return EmbedColours.Grey;
|
||||
case CardRarity.Bronze:
|
||||
return EmbedColours.BronzeCard;
|
||||
case CardRarity.Silver:
|
||||
|
@ -30,5 +38,7 @@ export function CardRarityToColour(rarity: CardRarity): number {
|
|||
return EmbedColours.GoldCard;
|
||||
case CardRarity.Legendary:
|
||||
return EmbedColours.LegendaryCard;
|
||||
case CardRarity.Manga:
|
||||
return EmbedColours.MangaCard;
|
||||
}
|
||||
}
|
7
src/constants/CardRarityChances.ts
Normal file
7
src/constants/CardRarityChances.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
export default class CardRarityChances {
|
||||
public static readonly Bronze = 62;
|
||||
public static readonly Silver = 31;
|
||||
public static readonly Gold = 4.4;
|
||||
public static readonly Manga = 2;
|
||||
// Legendary therefore = 0.6;
|
||||
}
|
|
@ -1,7 +1,9 @@
|
|||
export default class EmbedColours {
|
||||
public static readonly Ok = 0x3050ba;
|
||||
public static readonly Grey = 0xd3d3d3;
|
||||
public static readonly BronzeCard = 0xcd7f32;
|
||||
public static readonly SilverCard = 0xc0c0c0;
|
||||
public static readonly GoldCard = 0xffd700;
|
||||
public static readonly LegendaryCard = 0x50c878;
|
||||
public static readonly MangaCard = 0xffffff;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue