-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathachievements.js
132 lines (125 loc) · 3.07 KB
/
achievements.js
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/*
*
* Mouse Pro
*
* Achievements.js
*/
Achievements = {};
(function (Display, Shop, Achievements) {
Achievements.achievements = [
{
name: 'Mover Noob',
shortName: 'mover',
description: 'Reach level 1 in Mouse Mover',
acquired: false
},
{
name: 'Clicker Noob',
shortName: 'clicker',
description: 'Reach level 1 in Mouse Clicker',
acquired: false
},
{
name: 'General Noob',
shortName: 'together',
description: 'Reach level 5 in both currencies',
acquired: false
},
{
name: '101010(b) = 42',
shortName: '42',
description: 'Reach level 10 in both currencies',
acquired: false
},
{
name: 'Battle of Marignan',
shortName: 'marignan',
description: 'Reach level 15 in both currencies',
acquired: false
},
{
name: 'Pro tuner',
shortName: 'jacky',
description: 'Reach level 1 in both currencies',
acquired: false
},
{
name: 'Bootloader',
shortName: 'bootloader',
description: 'Load a saved game',
acquired: false
},
{
name: 'Quarter of a century',
shortName: 'quartercentury',
description: 'Reach level 25 in both currencies',
acquired: false
},
{
name: 'Say Cheese',
shortName: 'saycheese',
description: 'Get cheese',
acquired: false
},
{
name: 'Glowing proficiency',
shortName: 'glowing',
description: 'Reach level 30 in both currencies',
acquired: false
},
{
name: 'Statistician',
shortName: 'statistician',
description: 'Have any xp at 123',
acquired: false
},
{
name: '20/20 MODE',
shortName: 'fnafMaster',
description: 'Reach level 20 in both currencies',
acquired: false
},
{
name: 'Cutting down to business',
shortName: 'cutting',
description: 'Made 5 sacrifices',
acquired: false
},
{
name: 'OCD Hell',
shortName: 'ocd',
description: 'You\'ll never get this one. <span style="font-size:2pt">Thank you /u/jverity</span>',
acquired: false
},
{
name: '... again',
shortName: 'again',
description: 'Reach a level you already had reached before',
acquired: false
},
{
name: 'Died of old age',
shortName: 'ephemeral',
description: 'Miss 10 ephemeral boosts by letting them die',
acquired: false
}
];
Achievements.achievement = function(shortName) {
return Achievements.achievements.filter(a => a.shortName == shortName)[0];
}
Achievements.gain = function(achievementShortName) {
let ach = Achievements.achievement(achievementShortName);
if (ach == undefined || ach.acquired) return;
ach.acquired = true;
Display.notifyAchievementGained(ach);
if (!Shop.has('vitrine') && Shop.has('settings')) Shop.unlock('vitrine');
}
Achievements.has = function(achievementShortName) {
let ach = Achievements.achievement(achievementShortName);
if (ach == undefined) {
console.debug('cant find ach ', achievementShortName);
return false;
}
return ach.acquired;
}
})(gameObjects.Display, gameObjects.Shop, gameObjects.Achievements);