gotchi-battler-game-logic 4.0.3 → 4.0.5

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.
@@ -5,11 +5,13 @@ const { logToInGameTeams } = require('../utils/transforms')
5
5
  const { battle } = require('..')
6
6
 
7
7
  const main = async () => {
8
+ console.time('Rerun battle')
8
9
  const logs = require('./data/yield_fields_1_2.json')
9
10
  const teams = logToInGameTeams(logs)
10
11
  const result = await battle(teams[0], teams[1], logs.meta.seed)
11
12
 
12
13
  fs.writeFileSync(path.join(__dirname, 'output', `${logs.meta.timestamp}-${Date.now()}.json`), JSON.stringify(result, null, '\t'))
14
+ console.timeEnd('Rerun battle')
13
15
  }
14
16
 
15
17
  // node scripts/rerunBattle.js
@@ -4,10 +4,10 @@ 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
7
- const team1 = require('./data/oggyMaxi.json')
8
- const team2 = require('./data/wagdiddly.json')
7
+ const team1 = require('./data/hangingBattle_k247278.json').teamA
8
+ const team2 = require('./data/hangingBattle_k247278.json').teamB
9
9
 
10
- const results = battle(team1, team2, '82807311112923564712218359337695919195403960526804010606215202651499586140469', {
10
+ const results = battle(team1, team2, 'special-balance-sims-v1', {
11
11
  debug: true,
12
12
  type: 'pvp'
13
13
  })