-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathpowerupTypes.mjs
More file actions
71 lines (67 loc) · 1.54 KB
/
Copy pathpowerupTypes.mjs
File metadata and controls
71 lines (67 loc) · 1.54 KB
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
/**
* @file ninjanode powerup definitions.
*/
export const powerupTypes = [
{
id: 'ghost', // Machine name and base class
name: 'Space Ghost', // Name displayed to user
rarity: 0.5, // 1 is common, 0 is never spawned
respawnTime: 120,
size: 64,
active: {
// Effective time, as soon as it's picked up'
time: 15,
cssClass: 'ghost-active',
},
end: {
// Time at end, removed from effect time
time: 5,
cssClass: 'ghost-end',
},
skipAlters: {
collision_ship2ship: (source, target) => {
if (
source.powerups.list['ghost'] &&
source.powerups.list['ghost'].active
) {
return true;
}
if (
target.powerups.list['ghost'] &&
target.powerups.list['ghost'].active
) {
return true;
}
return false;
},
},
},
{
id: 'triple', // Machine name and base class
name: 'Triple Shot', // Name displayed to user
rarity: 0.5, // 1 is common, 0 is never spawned
respawnTime: 120,
size: 64,
active: {
// Effective time, as soon as it's picked up'
time: 15,
cssClass: 'triple-active',
},
end: {
// Time at end, removed from effect time
time: 5,
cssClass: 'triple-end',
},
alters: {
fire_count: (def, source) => {
if (
source.powerups.list['triple'] &&
source.powerups.list['triple'].active
) {
return 3;
}
return def;
},
},
},
];