-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.ts
76 lines (65 loc) · 1.24 KB
/
types.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
68
69
70
71
72
73
74
75
76
type CritterDatabase = {
[T: string]: {
// How many adoptions needed to have this critter appear
minLevelToAppear: number
// The overall odds of finding once minLevelToAppear is reached
oddsOfFinding: number
}
}
type CritterImageDatabase = {
[T: string]: Array<Image>
}
enum Facing {
Left,
Right
}
interface Critter {
name: string
critterType: string
sprite?: Sprite
tickTimer?: number
locationX: number
locationY: number
level: number
happiness: number // 0-100
health: number // 0-100
timerCount: number
levelProgress: number
}
type MainCharacter = {
adoptionLevel: number
ginny: Sprite
}
type Loc = {
x: number
y: number
}
type Zone = {
topLeft: Loc,
bottomRight: Loc
spawnCoords?: Loc
}
type PlayPen = {
factor: number
}
type FoodCourt = {
factor: number,
spriteLocation: { x: number, y: number },
foodQuantity: number,
sprite?: Sprite
}
type Map = {
wildernessX: number,
mapWidth: number,
mapHeight: number
}
type SaveGame = {
critters?: Array<Critter>
foodCourts?: Array<FoodCourt>
player?: {}
computer?: { numberOfAdoptions: number }
}
enum PhoneResult {
adopted,
canceled
}