This repository has been archived by the owner on Aug 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
part.ts
67 lines (62 loc) · 1.57 KB
/
part.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { Cls } from './cls';
/** Stores the dominant and recessive genes of an Axie's part. */
export interface Part {
d: PartGene;
r1: PartGene;
r2: PartGene;
mystic: boolean;
}
/** Holds the data for a single gene of an Axie's part. */
export interface PartGene {
partId: string;
cls: Cls;
specialGenes: string;
type: PartType;
name: string;
}
/** Represents each of an Axies body parts including: Eeyes, Ears, Mouth, Horn, Back, Tail. */
export enum PartType {
Eyes = 'eyes',
Ears = 'ears',
Mouth = 'mouth',
Horn = 'horn',
Back = 'back',
Tail = 'tail',
}
/** Represents the part skin of a given Axie. */
export enum PartSkin {
Global = 'global',
Mystic = 'mystic',
Japan = 'japan',
Xmas1 = 'xmas1',
Xmas2 = 'xmas2',
Bionic = 'bionic',
Summer = 'summer',
StrawberrySummer = 'strawberrySummer',
VanillaSummer = 'vanillaSummer',
Shiny = 'shiny',
StrawberryShiny = 'strawberryShiny',
VanillaShiny = 'vanillaShiny',
}
export const binPartSkinMap = new Map([
// 256 Classes
['00000', PartSkin.Global],
['00001', PartSkin.Japan],
['010101010101', PartSkin.Xmas1],
['01', PartSkin.Bionic],
['10', PartSkin.Xmas2],
['11', PartSkin.Mystic],
// 512 PartSkins
['0000', PartSkin.Global],
['0001', PartSkin.Mystic],
['0011', PartSkin.Japan],
['0100', PartSkin.Xmas1],
['0101', PartSkin.Xmas2],
['0010', PartSkin.Bionic],
['0110', PartSkin.Summer],
['0111', PartSkin.StrawberrySummer],
['1000', PartSkin.VanillaSummer],
['1001', PartSkin.Shiny],
['1010', PartSkin.StrawberryShiny],
['1011', PartSkin.VanillaShiny],
]);