gotchi-battler-game-logic 4.0.13 → 4.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,112 +1,10 @@
1
- const PASSIVES = ['sharp_blades', 'cloud_of_zen', 'frenzy', 'fortify', 'spread_the_fear', 'cleansing_aura', 'channel_the_coven', 'clan_momentum']
2
- const DEBUFF_STATUSES = ['bleed', 'stun', 'fear']
3
- const BUFF_STATUSES = ['taunt']
1
+ const AUTO_ATTACK_MULTIPLIER = 0.85
2
+ const COUNTER_ATTACK_MULTIPLIER = 0.5
4
3
 
5
- const BUFF_MULT_EFFECTS = {
6
- cloud_of_zen: {
7
- magic: 0.138,
8
- physical: 0.138
9
- },
10
- power_up_2: {
11
- magic: 0.75,
12
- physical: 0.50
13
- },
14
- frenzy: {
15
- crit: 1.14
16
- },
17
- fortify: {
18
- armor: 1
19
- },
20
- taunt: {
21
- armor: 1.65
22
- },
23
- channel_the_coven: {
24
- magic: 0.18
25
- },
26
- clan_momentum: {
27
- physical: 0.16
28
- }
29
- }
30
-
31
- const BUFF_FLAT_EFFECTS = {
32
-
33
- }
34
-
35
- // Combine all buffs
36
- const BUFFS = [...PASSIVES, ...BUFF_STATUSES, ...Object.keys(BUFF_MULT_EFFECTS), ...Object.keys(BUFF_FLAT_EFFECTS)]
37
-
38
- const DEBUFF_MULT_EFFECTS = {
39
- fear: {
40
- resist: 1
41
- },
42
- stun: {
43
- speed: 0.23
44
- }
45
- }
46
-
47
- const DEBUFF_FLAT_EFFECTS = {
48
-
49
- }
50
-
51
- // Combine all debuffs
52
- const DEBUFFS = [...DEBUFF_STATUSES, ...Object.keys(DEBUFF_MULT_EFFECTS), ...Object.keys(DEBUFF_FLAT_EFFECTS)]
53
-
54
- const MULTS = {
55
- // General
56
- FRONT_ROW_ATK_BONUS: 1.1,
57
- FRONT_ROW_DEF_NERF: 0.8,
58
- EXPIRE_LEADERSKILL: 0,
59
- SPEED_PENALTY: 2.5,
60
- MAX_STATUSES: 3,
61
- CRIT_MULTIPLIER_FAST: 2,
62
- CRIT_MULTIPLIER_SLOW: 2,
63
- // Ninja
64
- SHARP_BLADES_BLEED_CHANCE: 0.76,
65
- BLEED_DAMAGE: 10,
66
- SPECTRAL_STRIKE_DAMAGE: 1.25,
67
- // Enlightened
68
- // Cleaver
69
- CLEAVE_DAMAGE: 1.55,
70
- // Tank
71
- COUNTER_SPEED_MULTIPLIER: 0.5,
72
- FORTIFY_COUNTER_CHANCE: 32,
73
- COUNTER_DAMAGE: 1.9,
74
- FORTIFY_COUNTER_DAMAGE: 1.9,
75
- // Cursed
76
- SPREAD_THE_FEAR_CHANCE: 0.84,
77
- SPREAD_THE_FEAR_SPEED_PENALTY: 0,
78
- SPREAD_THE_FEAR_CURSE_DAMAGE: 1.3,
79
- CURSE_DAMAGE: 1.2,
80
- CURSE_HEAL: 1,
81
- CURSE_SPEED_PENALTY: 0,
82
- // Healer
83
- CLEANSING_AURA_REGEN: 0.2,
84
- CLEANSING_AURA_NON_HEALER_REGEN: 0.1,
85
- CLEANSING_AURA_HEAL: 3.4,
86
- CLEANSING_AURA_HEAL_SPEED_PENALTY: 1,
87
- BLESSING_HEAL: 2.7,
88
- BLESSING_HEAL_SPEED_PENALTY: 1,
89
- BLESSING_HEAL_CRIT_MULTIPLIER: 1.25,
90
- // Mage
91
- CHANNEL_THE_COVEN_STUN_CHANCE: 0.9,
92
- THUNDER_STUN_CHANCE: 0.65,
93
- THUNDER_DAMAGE: 1,
94
- // Troll
95
- CLAN_MOMENTUM_CHANCE: 0.9,
96
- DEVESTATING_SMASH_X2_CHANCE: 0.65,
97
- DEVESTATING_SMASH_DAMAGE: 2.5,
98
- DEVESTATING_SMASH_X2_DAMAGE: 1.9,
99
- }
4
+ const DEFAULT_MAX_STATUSES = 9
100
5
 
101
6
  module.exports = {
102
- PASSIVES,
103
- DEBUFF_STATUSES,
104
- BUFF_STATUSES,
105
- BUFF_MULT_EFFECTS,
106
- BUFF_FLAT_EFFECTS,
107
- BUFFS,
108
- DEBUFF_MULT_EFFECTS,
109
- DEBUFF_FLAT_EFFECTS,
110
- DEBUFFS,
111
- MULTS
7
+ AUTO_ATTACK_MULTIPLIER,
8
+ COUNTER_ATTACK_MULTIPLIER,
9
+ DEFAULT_MAX_STATUSES
112
10
  }
@@ -1,4 +1,5 @@
1
1
  const STATUSES = require('./statuses.json')
2
+ const { DEFAULT_MAX_STATUSES } = require('./constants')
2
3
 
3
4
  const getTeamGotchis = (team) => {
4
5
  return [...team.formation.front, ...team.formation.back].filter(x => x)
@@ -460,7 +461,7 @@ const addStatusToGotchi = (gotchi, statusCode, count) => {
460
461
 
461
462
  const status = getStatusByCode(statusCode)
462
463
 
463
- const maxStack = status.maxStack || 3
464
+ const maxStack = status.maxStack || DEFAULT_MAX_STATUSES
464
465
 
465
466
  // Only allow a maximum of maxStack of the same status
466
467
  const currentStacks = gotchi.statuses.filter(x => x === status.code).length
@@ -2,14 +2,14 @@
2
2
  {
3
3
  "code": "spd_up",
4
4
  "name": "Speed Buff",
5
- "description": "+15% SPD per stack",
5
+ "description": "+10% SPD per stack",
6
6
  "category": "stat_modifier",
7
7
  "isBuff": true,
8
8
  "maxStack": null,
9
9
  "statModifiers": [
10
10
  {
11
11
  "statName": "speed",
12
- "value": 15,
12
+ "value": 10,
13
13
  "valueType": "percent"
14
14
  }
15
15
  ]
@@ -17,14 +17,14 @@
17
17
  {
18
18
  "code": "atk_up",
19
19
  "name": "Attack Buff",
20
- "description": "+8% ATK per stack",
20
+ "description": "+10% ATK per stack",
21
21
  "category": "stat_modifier",
22
22
  "isBuff": true,
23
23
  "maxStack": null,
24
24
  "statModifiers": [
25
25
  {
26
26
  "statName": "attack",
27
- "value": 8,
27
+ "value": 10,
28
28
  "valueType": "percent"
29
29
  }
30
30
  ]
@@ -32,14 +32,14 @@
32
32
  {
33
33
  "code": "def_up",
34
34
  "name": "Defense Buff",
35
- "description": "+8% DEF per stack",
35
+ "description": "+10% DEF per stack",
36
36
  "category": "stat_modifier",
37
37
  "isBuff": true,
38
38
  "maxStack": null,
39
39
  "statModifiers": [
40
40
  {
41
41
  "statName": "defense",
42
- "value": 8,
42
+ "value": 10,
43
43
  "valueType": "percent"
44
44
  }
45
45
  ]
@@ -47,74 +47,74 @@
47
47
  {
48
48
  "code": "crt_up",
49
49
  "name": "Critical-Rate Buff",
50
- "description": "+2 CRT per stack",
50
+ "description": "+10% CRT per stack",
51
51
  "category": "stat_modifier",
52
52
  "isBuff": true,
53
53
  "maxStack": null,
54
54
  "statModifiers": [
55
55
  {
56
56
  "statName": "criticalRate",
57
- "value": 2,
58
- "valueType": "flat"
57
+ "value": 10,
58
+ "valueType": "percent"
59
59
  }
60
60
  ]
61
61
  },
62
62
  {
63
63
  "code": "crd_up",
64
64
  "name": "Critical-Damage Buff",
65
- "description": "+8 CRD per stack",
65
+ "description": "+10% CRD per stack",
66
66
  "category": "stat_modifier",
67
67
  "isBuff": true,
68
68
  "maxStack": null,
69
69
  "statModifiers": [
70
70
  {
71
71
  "statName": "criticalDamage",
72
- "value": 8,
73
- "valueType": "flat"
72
+ "value": 10,
73
+ "valueType": "percent"
74
74
  }
75
75
  ]
76
76
  },
77
77
  {
78
78
  "code": "res_up",
79
79
  "name": "Resistance Buff",
80
- "description": "+14 RES per stack",
80
+ "description": "+10% RES per stack",
81
81
  "category": "stat_modifier",
82
82
  "isBuff": true,
83
83
  "maxStack": null,
84
84
  "statModifiers": [
85
85
  {
86
86
  "statName": "resist",
87
- "value": 14,
88
- "valueType": "flat"
87
+ "value": 10,
88
+ "valueType": "percent"
89
89
  }
90
90
  ]
91
91
  },
92
92
  {
93
93
  "code": "foc_up",
94
94
  "name": "Focus Buff",
95
- "description": "+12 FOC per stack",
95
+ "description": "+10% FOC per stack",
96
96
  "category": "stat_modifier",
97
97
  "isBuff": true,
98
98
  "maxStack": null,
99
99
  "statModifiers": [
100
100
  {
101
101
  "statName": "focus",
102
- "value": 12,
103
- "valueType": "flat"
102
+ "value": 10,
103
+ "valueType": "percent"
104
104
  }
105
105
  ]
106
106
  },
107
107
  {
108
108
  "code": "spd_down",
109
109
  "name": "Speed Debuff",
110
- "description": "-15% SPD per stack",
110
+ "description": "-10% SPD per stack",
111
111
  "category": "stat_modifier",
112
112
  "isBuff": false,
113
113
  "maxStack": null,
114
114
  "statModifiers": [
115
115
  {
116
116
  "statName": "speed",
117
- "value": -15,
117
+ "value": -10,
118
118
  "valueType": "percent"
119
119
  }
120
120
  ]
@@ -122,14 +122,14 @@
122
122
  {
123
123
  "code": "atk_down",
124
124
  "name": "Attack Debuff",
125
- "description": "-8% ATK per stack",
125
+ "description": "-10% ATK per stack",
126
126
  "category": "stat_modifier",
127
127
  "isBuff": false,
128
128
  "maxStack": null,
129
129
  "statModifiers": [
130
130
  {
131
131
  "statName": "attack",
132
- "value": -8,
132
+ "value": -10,
133
133
  "valueType": "percent"
134
134
  }
135
135
  ]
@@ -137,14 +137,14 @@
137
137
  {
138
138
  "code": "def_down",
139
139
  "name": "Defense Debuff",
140
- "description": "-8% DEF per stack",
140
+ "description": "-10% DEF per stack",
141
141
  "category": "stat_modifier",
142
142
  "isBuff": false,
143
143
  "maxStack": null,
144
144
  "statModifiers": [
145
145
  {
146
146
  "statName": "defense",
147
- "value": -8,
147
+ "value": -10,
148
148
  "valueType": "percent"
149
149
  }
150
150
  ]
@@ -152,60 +152,60 @@
152
152
  {
153
153
  "code": "crt_down",
154
154
  "name": "Critical-Rate Debuff",
155
- "description": "-2 CRT per stack",
155
+ "description": "-10% CRT per stack",
156
156
  "category": "stat_modifier",
157
157
  "isBuff": false,
158
158
  "maxStack": null,
159
159
  "statModifiers": [
160
160
  {
161
161
  "statName": "criticalRate",
162
- "value": -2,
163
- "valueType": "flat"
162
+ "value": -10,
163
+ "valueType": "percent"
164
164
  }
165
165
  ]
166
166
  },
167
167
  {
168
168
  "code": "crd_down",
169
169
  "name": "Critical-Damage Debuff",
170
- "description": "-8 CRD per stack",
170
+ "description": "-10% CRD per stack",
171
171
  "category": "stat_modifier",
172
172
  "isBuff": false,
173
173
  "maxStack": null,
174
174
  "statModifiers": [
175
175
  {
176
176
  "statName": "criticalDamage",
177
- "value": -8,
178
- "valueType": "flat"
177
+ "value": -10,
178
+ "valueType": "percent"
179
179
  }
180
180
  ]
181
181
  },
182
182
  {
183
183
  "code": "res_down",
184
184
  "name": "Resistance Debuff",
185
- "description": "-14 RES per stack",
185
+ "description": "-10% RES per stack",
186
186
  "category": "stat_modifier",
187
187
  "isBuff": false,
188
188
  "maxStack": null,
189
189
  "statModifiers": [
190
190
  {
191
191
  "statName": "resist",
192
- "value": -14,
193
- "valueType": "flat"
192
+ "value": -10,
193
+ "valueType": "percent"
194
194
  }
195
195
  ]
196
196
  },
197
197
  {
198
198
  "code": "foc_down",
199
199
  "name": "Focus Debuff",
200
- "description": "-12 FOC per stack",
200
+ "description": "-10% FOC per stack",
201
201
  "category": "stat_modifier",
202
202
  "isBuff": false,
203
203
  "maxStack": null,
204
204
  "statModifiers": [
205
205
  {
206
206
  "statName": "focus",
207
- "value": -12,
208
- "valueType": "flat"
207
+ "value": -10,
208
+ "valueType": "percent"
209
209
  }
210
210
  ]
211
211
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gotchi-battler-game-logic",
3
- "version": "4.0.13",
3
+ "version": "4.0.14",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "mocha \"tests/**/*.test.js\"",