gotchi-battler-game-logic 2.0.0 → 2.0.2

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.
package/schemas/team.json CHANGED
@@ -171,6 +171,60 @@
171
171
  "required": ["id", "name", "cooldown", "leaderPassive"],
172
172
  "additionalProperties": false
173
173
  },
174
+ "itemId": {
175
+ "type": ["integer", "null"]
176
+ },
177
+ "item": {
178
+ "type": ["object", "null"],
179
+ "properties": {
180
+ "id": {
181
+ "type": "integer"
182
+ },
183
+ "name": {
184
+ "type": "string"
185
+ },
186
+ "description": {
187
+ "type": "string"
188
+ },
189
+ "image": {
190
+ "type": "string",
191
+ "format": "uri"
192
+ },
193
+ "rarity": {
194
+ "type": "string",
195
+ "enum": ["common", "uncommon", "rare", "legendary", "mythical", "godlike"]
196
+ },
197
+ "cost": {
198
+ "type": "number"
199
+ },
200
+ "stat": {
201
+ "type": "string",
202
+ "enum": ["speed", "health", "crit", "armor", "evade", "resist", "magic", "physical", "accuracy"]
203
+ },
204
+ "statValue": {
205
+ "type": "integer"
206
+ },
207
+ "createdAt": {
208
+ "type": "string"
209
+ },
210
+ "updatedAt": {
211
+ "type": "string"
212
+ }
213
+ },
214
+ "required": ["id", "name", "description", "image", "rarity", "cost", "stat", "statValue"],
215
+ "example": {
216
+ "id": 1,
217
+ "name": "Speed +",
218
+ "description": "Increase speed by 1",
219
+ "image": "https://gotchibattler.com/apple-touch-icon.png",
220
+ "rarity": "common",
221
+ "cost": 0.2,
222
+ "stat": "speed",
223
+ "statValue": 1,
224
+ "createdAt": "2022-02-22T22:22:22Z",
225
+ "updatedAt": "2022-02-22T22:22:22Z"
226
+ }
227
+ },
174
228
  "statuses": {
175
229
  "type": "array",
176
230
  "items": {
@@ -36,6 +36,19 @@
36
36
  "name": "Meditate",
37
37
  "cooldown": 0,
38
38
  "leaderPassive": "Cloud of Zen"
39
+ },
40
+ "itemId": 1,
41
+ "item": {
42
+ "id": 1,
43
+ "name": "Speed +",
44
+ "description": "Increase speed by 1",
45
+ "image": "https://gotchibattler.com/apple-touch-icon.png",
46
+ "rarity": "common",
47
+ "cost": 0.2,
48
+ "stat": "speed",
49
+ "statValue": 1,
50
+ "createdAt": "2022-02-22T22:22:22Z",
51
+ "updatedAt": "2022-02-22T22:22:22Z"
39
52
  }
40
53
  },
41
54
  null,
@@ -1,6 +1,6 @@
1
1
  const fs = require('fs')
2
2
  const path = require('path')
3
- const battle = require('..')
3
+ const { battle } = require('..')
4
4
 
5
5
  // Edit these json files to test different battles
6
6
  // NOTE: Only the in-game stats (speed, health, crit etc..) are used in the game logic
@@ -13,4 +13,6 @@ const timestamp = new Date().getTime()
13
13
  const resultsFilename = `results-${timestamp}.json`
14
14
  fs.writeFileSync(path.join(__dirname, 'output', resultsFilename), JSON.stringify(results, null, '\t'))
15
15
 
16
- console.log(`Results written to ${path.join(__dirname, 'output', resultsFilename)}`)
16
+ console.log(`Results written to ${path.join(__dirname, 'output', resultsFilename)}`)
17
+
18
+ // node scripts/runBattle.js