gotchi-battler-game-logic 2.0.8 → 3.0.0
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/README.md +3 -3
- package/game-logic/index.js +2 -1
- package/game-logic/v1.7/helpers.js +16 -1
- package/game-logic/v1.8/constants.js +135 -0
- package/game-logic/v1.8/helpers.js +628 -0
- package/game-logic/v1.8/index.js +826 -0
- package/package.json +1 -1
- package/schemas/team.json +2 -2
- package/scripts/balancing/createCSV.js +1 -1
- package/scripts/balancing/createTrainingGotchis.js +267 -0
- package/scripts/balancing/extractOnchainTraits.js +61 -0
- package/scripts/balancing/processSims.js +1 -1
- package/scripts/balancing/sims.js +2 -2
- package/scripts/balancing/v1.7/mapGotchi.js +119 -0
- package/scripts/balancing/v1.7/training_gotchis_traits.json +520 -0
- package/scripts/balancing/v1.7.1/mapGotchi.js +119 -0
- package/scripts/balancing/v1.7.1/training_gotchis_traits.json +520 -0
- package/scripts/balancing/v1.7.2/mapGotchi.js +157 -0
- package/scripts/balancing/v1.7.2/training_gotchis_traits.json +520 -0
- package/scripts/balancing/v1.7.3/class_combos.js +44 -0
- package/scripts/balancing/v1.7.3/mapGotchi.js +164 -0
- package/scripts/balancing/v1.7.3/setTeamPositions.js +122 -0
- package/scripts/balancing/v1.7.3/training_gotchis.json +22402 -0
- package/scripts/balancing/v1.7.3/training_gotchis_traits.json +37 -0
- package/scripts/balancing/v1.7.3/trait_combos.json +10 -0
- package/scripts/data/tournaments.json +5 -0
- package/scripts/validateBattle.js +11 -2
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"godlike": {
|
|
3
|
+
"brs": 783,
|
|
4
|
+
"traits": [-10, 109],
|
|
5
|
+
"eyes": 94
|
|
6
|
+
},
|
|
7
|
+
"mythical": {
|
|
8
|
+
"brs": 690,
|
|
9
|
+
"traits": [-5, 104],
|
|
10
|
+
"eyes": 92
|
|
11
|
+
},
|
|
12
|
+
"legendary": {
|
|
13
|
+
"brs": 638,
|
|
14
|
+
"traits": [-1, 100],
|
|
15
|
+
"eyes": 90
|
|
16
|
+
},
|
|
17
|
+
"rare": {
|
|
18
|
+
"brs": 597,
|
|
19
|
+
"traits": [4, 95],
|
|
20
|
+
"eyes": 89
|
|
21
|
+
},
|
|
22
|
+
"uncommon": {
|
|
23
|
+
"brs": 556,
|
|
24
|
+
"traits": [12, 87],
|
|
25
|
+
"eyes": 87
|
|
26
|
+
},
|
|
27
|
+
"common": {
|
|
28
|
+
"brs": 501,
|
|
29
|
+
"traits": [19, 80],
|
|
30
|
+
"eyes": 83
|
|
31
|
+
},
|
|
32
|
+
"garbage": {
|
|
33
|
+
"brs": 400,
|
|
34
|
+
"traits": [49, 50],
|
|
35
|
+
"eyes": 50
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
[
|
|
2
|
+
["avg-magic", "avg-physical"],
|
|
3
|
+
["avg-magic", "avg-physical"],
|
|
4
|
+
["avg-magic", "avg-physical"],
|
|
5
|
+
["avg-magic", "avg-physical"],
|
|
6
|
+
["avg-magic", "avg-physical"],
|
|
7
|
+
["avg-magic", "avg-physical"],
|
|
8
|
+
["avg-magic", "avg-magic"],
|
|
9
|
+
["avg-physical", "avg-physical"]
|
|
10
|
+
]
|
|
@@ -18,7 +18,7 @@ const main = async (battleId, seed, gameLogicVersion) => {
|
|
|
18
18
|
if (!gameVersions[gameLogicVersion]) throw new Error('Invalid game logic version')
|
|
19
19
|
|
|
20
20
|
const gameLoop = gameVersions[gameLogicVersion].gameLoop
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
const res = await axios.get(`https://storage.googleapis.com/gotchi-battler-live_battles/v1/${battleId}.json`)
|
|
23
23
|
|
|
24
24
|
if (!res || !res.data || !res.data.layout) {
|
|
@@ -29,11 +29,20 @@ const main = async (battleId, seed, gameLogicVersion) => {
|
|
|
29
29
|
// Transform the logs to in-game teams
|
|
30
30
|
const teams = logToInGameTeams(res.data)
|
|
31
31
|
|
|
32
|
+
// If the game logic has a removeStatItems function, call it
|
|
33
|
+
// This is so the item buffs don't get applied twice
|
|
34
|
+
const helpers = require(`../game-logic/${gameLogicVersion}/helpers`)
|
|
35
|
+
|
|
36
|
+
if (helpers.removeStatItems) {
|
|
37
|
+
helpers.removeStatItems(helpers.getAlive(teams[0]))
|
|
38
|
+
helpers.removeStatItems(helpers.getAlive(teams[1]))
|
|
39
|
+
}
|
|
40
|
+
|
|
32
41
|
try {
|
|
33
42
|
// Run the game loop
|
|
34
43
|
const logs = await gameLoop(teams[0], teams[1], seed, true)
|
|
35
44
|
|
|
36
|
-
fs.writeFileSync(path.join(__dirname, 'output', `${battleId}_${Date.now()}.json`), JSON.stringify(logs, null, '\t'))
|
|
45
|
+
// fs.writeFileSync(path.join(__dirname, 'output', `${battleId}_${Date.now()}.json`), JSON.stringify(logs, null, '\t'))
|
|
37
46
|
|
|
38
47
|
// Validate the results
|
|
39
48
|
compareLogs(res.data, logs)
|