From b38b6cb21008c5cb23c6d18571ab1499d1f99552 Mon Sep 17 00:00:00 2001 From: Pieter Brandsen Date: Sun, 18 Feb 2024 20:20:21 +0100 Subject: [PATCH] Added intent boosts and fixed tests --- files/defaultActions.owned.json | 1882 +++++++++++---------- files/defaultActions.reserved.json | 65 +- files/defaultActions.unknown.json | 1582 +++++++++-------- src/data/broker/processData.js | 9 +- src/data/converter/helper.js | 44 +- src/data/converter/manage/ownedRoom.js | 2 +- src/data/converter/manage/reservedRoom.js | 44 +- src/data/converter/manage/unknownRoom.js | 44 +- src/data/converter/prepare/object.js | 1 - src/helper/users.js | 6 - src/setup/cache.js | 2 + tests/dataTypes/owned.spec.js | 26 +- tests/dataTypes/reserved.spec.js | 22 +- 13 files changed, 1873 insertions(+), 1856 deletions(-) diff --git a/files/defaultActions.owned.json b/files/defaultActions.owned.json index 5a84310..afa52cb 100644 --- a/files/defaultActions.owned.json +++ b/files/defaultActions.owned.json @@ -1,912 +1,972 @@ [ - { - "path": "totals.creeps", - "value": 0, - "type": 1 - }, - { - "path": "totals.structures", - "value": 0, - "type": 1 - }, - { - "path": "totals.constructionSites", - "value": 0, - "type": 1 - }, - { - "path": "totals.resourcesStored", - "value": 0, - "type": 1 - }, - { - "path": "totals.minerals", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.road", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.constructedWall", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.rampart", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.spawn", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.extension", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.link", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.storage", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.tower", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.observer", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.powerSpawn", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.extractor", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.lab", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.terminal", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.container", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.nuker", - "value": 0, - "type": 1 - }, - { - "path": "constructionSites.progressPercentage", - "value": 0, - "type": 1 - }, - { - "path": "constructionSites.progressNeeded", - "value": 0, - "type": 1 - }, - { - "path": "controller.level", - "value": 0, - "type": 1 - }, - { - "path": "controller.progress", - "value": 0, - "type": 1 - }, - { - "path": "controller.progressTotal", - "type": 1, - "value": 0 - }, - { - "path": "controller.ticksToDowngrade", - "value": 0, - "type": 1 - }, - { - "path": "controller.safeModeAvailable", - "type": 1, - "value": 0 - }, - { - "path": "spawning.storedSpawningEnergy", - "value": 0, - "type": 1 - }, - { - "path": "spawning.capacitySpawningEnergy", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.road", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.constructedWall", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.rampart", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.spawn", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.extension", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.link", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.storage", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.tower", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.observer", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.powerSpawn", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.extractor", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.lab", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.terminal", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.container", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.nuker", - "value": 0, - "type": 1 - }, - { - "path": "controller.rclPerTick", - "value": 0, - "type": 0 - }, - { - "path": "intents.income.harvest", - "value": 0, - "type": 0 - }, - { - "path": "intents.income.dismantle", - "value": 0, - "type": 0 - }, - { - "path": "intents.outcome.repair", - "value": 0, - "type": 0 - }, - { - "path": "intents.outcome.build", - "value": 0, - "type": 0 - }, - { - "path": "intents.outcome.upgradeController", - "value": 0, - "type": 0 - }, - { - "path": "intents.offensive.attack", - "value": 0, - "type": 0 - }, - { - "path": "intents.offensive.rangedAttack", - "value": 0, - "type": 0 - }, - { - "path": "intents.offensive.rangedMassAttack", - "value": 0, - "type": 0 - }, - { - "path": "intents.offensive.heal", - "value": 0, - "type": 0 - }, - { - "path": "intents.offensive.rangedHeal", - "value": 0, - "type": 0 - }, - { - "path": "spawning.spawnUptimePercentage", - "value": 0, - "type": 0 - }, - { - "path": "totals.intents", - "value": 0, - "type": 0 - }, - { - "path": "countByType.creepParts.work", - "value": 0, - "type": 1 - }, - { - "path": "countByType.creepParts.carry", - "value": 0, - "type": 1 - }, - { - "path": "countByType.creepParts.move", - "value": 0, - "type": 1 - }, - { - "path": "countByType.intents.harvest", - "value": 0, - "type": 0 - }, - { - "path": "countByType.intents.upgradeController", - "value": 0, - "type": 0 - }, - { - "path": "resourcesStored.energy", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.GO", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.ZH", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.KO", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.UH", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.X", - "value": 0, - "type": 1 - }, - { - "path": "countByType.intents.repair", - "value": 0, - "type": 0 - }, - { - "path": "countByType.constructionSites.road", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.container", - "value": 0, - "type": 1 - }, - { - "path": "countByType.intents.build", - "value": 0, - "type": 0 - }, - { - "path": "resourcesStored.H", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.KH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.KHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.L", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.LO", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.LH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.K", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.OH", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.LHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.KH", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.LH", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.U", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.UO", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.UHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.UL", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.UH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.GHO2", - "value": 0, - "type": 1 - }, - { - "path": "countByType.creepParts.claim", - "value": 0, - "type": 1 - }, - { - "path": "countByType.creepParts.tough", - "value": 0, - "type": 1 - }, - { - "path": "countByType.creepParts.attack", - "value": 0, - "type": 1 - }, - { - "path": "countByType.creepParts.ranged_attack", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.extension", - "value": 0, - "type": 1 - }, - { - "path": "countByType.intents.heal", - "value": 0, - "type": 0 - }, - { - "path": "countByType.creepParts.heal", - "value": 0, - "type": 1 - }, - { - "path": "countByType.intents.attack", - "value": 0, - "type": 0 - }, - { - "path": "countByType.intents.rangedAttack", - "value": 0, - "type": 0 - }, - { - "path": "countByType.constructionSites.tower", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.constructedWall", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.rampart", - "value": 0, - "type": 1 - }, - { - "path": "minerals.O", - "value": 0, - "type": 1 - }, - { - "path": "minerals.U", - "value": 0, - "type": 1 - }, - { - "path": "minerals.K", - "value": 0, - "type": 1 - }, - { - "path": "minerals.L", - "value": 0, - "type": 1 - }, - { - "path": "minerals.H", - "value": 0, - "type": 1 - }, - { - "path": "minerals.Z", - "value": 0, - "type": 1 - }, - { - "path": "minerals.X", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.Z", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XGH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.G", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.GH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.GH", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.ZK", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.reductant", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.battery", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.power", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XLH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.ZO", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XGHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XZH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XUHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XZHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.ZH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.ZHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XKHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XKH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XLHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.purifier", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.oxidant", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.biomass", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.utrium_bar", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.lemergium_bar", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.silicon", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XUH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.wire", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.ghodium_melt", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.liquid", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.ops", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.metal", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.condensate", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.mist", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.zynthium_bar", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.transistor", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.switch", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.fixtures", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.alloy", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.keanium_bar", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.composite", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.concentrate", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.extract", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.crystal", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.microchip", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.spirit", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.tube", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.frame", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.circuit", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.hydraulics", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.lab", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.factory", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.cell", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.phlegm", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.tissue", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.emanation", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.muscle", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.organoid", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.storage", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.link", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.terminal", - "value": 0, - "type": 1 - }, - { - "path": "countByType.intents.rangedHeal", - "value": 0, - "type": 0 - }, - { - "path": "countByType.constructionSites.nuker", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.powerSpawn", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.organism", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.essence", - "value": 0, - "type": 1 - }, - { - "path": "countByType.intents.rangedMassAttack", - "value": 0, - "type": 0 - }, - { - "path": "countByType.constructionSites.extractor", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.spawn", - "value": 0, - "type": 1 - }, - { - "path": "controller.progressCombined", - "value": 0, - "type": 1 - }, - { - "path": "totals.rooms.owned", - "value": 0, - "type": 1 - }, - { - "path": "countByType.intents.move", - "value": 0, - "type": 0 - }, - { - "path": "controller.gclPerTick", - "value": 0, - "type": 0 - } -] \ No newline at end of file + { + "path": "totals.creeps", + "value": 0, + "type": 1 + }, + { + "path": "totals.structures", + "value": 0, + "type": 1 + }, + { + "path": "totals.constructionSites", + "value": 0, + "type": 1 + }, + { + "path": "totals.resourcesStored", + "value": 0, + "type": 1 + }, + { + "path": "totals.minerals", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.road", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.constructedWall", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.rampart", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.spawn", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.extension", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.link", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.storage", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.tower", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.observer", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.powerSpawn", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.extractor", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.lab", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.terminal", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.container", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.nuker", + "value": 0, + "type": 1 + }, + { + "path": "constructionSites.progressPercentage", + "value": 0, + "type": 1 + }, + { + "path": "constructionSites.progressNeeded", + "value": 0, + "type": 1 + }, + { + "path": "controller.level", + "value": 0, + "type": 1 + }, + { + "path": "controller.progress", + "value": 0, + "type": 1 + }, + { + "path": "controller.progressTotal", + "type": 1, + "value": 0 + }, + { + "path": "controller.ticksToDowngrade", + "value": 0, + "type": 1 + }, + { + "path": "controller.safeModeAvailable", + "type": 1, + "value": 0 + }, + { + "path": "spawning.storedSpawningEnergy", + "value": 0, + "type": 1 + }, + { + "path": "spawning.capacitySpawningEnergy", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.road", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.constructedWall", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.rampart", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.spawn", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.extension", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.link", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.storage", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.tower", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.observer", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.powerSpawn", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.extractor", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.lab", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.terminal", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.container", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.nuker", + "value": 0, + "type": 1 + }, + { + "path": "controller.rclPerTick", + "value": 0, + "type": 0 + }, + { + "path": "totals.intents", + "value": 0, + "type": 0 + }, + { + "path": "countByType.creepParts.work", + "value": 0, + "type": 1 + }, + { + "path": "countByType.creepParts.carry", + "value": 0, + "type": 1 + }, + { + "path": "countByType.creepParts.move", + "value": 0, + "type": 1 + }, + { + "path": "countByType.intents.harvest", + "value": 0, + "type": 0 + }, + { + "path": "countByType.intents.upgradeController", + "value": 0, + "type": 0 + }, + { + "path": "resourcesStored.energy", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.GO", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.ZH", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.KO", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.UH", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.X", + "value": 0, + "type": 1 + }, + { + "path": "countByType.intents.repair", + "value": 0, + "type": 0 + }, + { + "path": "countByType.constructionSites.road", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.container", + "value": 0, + "type": 1 + }, + { + "path": "countByType.intents.build", + "value": 0, + "type": 0 + }, + { + "path": "resourcesStored.H", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.KH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.KHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.L", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.LO", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.LH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.K", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.OH", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.LHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.KH", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.LH", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.U", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.UO", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.UHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.UL", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.UH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.GHO2", + "value": 0, + "type": 1 + }, + { + "path": "countByType.creepParts.claim", + "value": 0, + "type": 1 + }, + { + "path": "countByType.creepParts.tough", + "value": 0, + "type": 1 + }, + { + "path": "countByType.creepParts.attack", + "value": 0, + "type": 1 + }, + { + "path": "countByType.creepParts.ranged_attack", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.extension", + "value": 0, + "type": 1 + }, + { + "path": "countByType.intents.heal", + "value": 0, + "type": 0 + }, + { + "path": "countByType.creepParts.heal", + "value": 0, + "type": 1 + }, + { + "path": "countByType.intents.attack", + "value": 0, + "type": 0 + }, + { + "path": "countByType.intents.rangedAttack", + "value": 0, + "type": 0 + }, + { + "path": "countByType.constructionSites.tower", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.constructedWall", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.rampart", + "value": 0, + "type": 1 + }, + { + "path": "minerals.O", + "value": 0, + "type": 1 + }, + { + "path": "minerals.U", + "value": 0, + "type": 1 + }, + { + "path": "minerals.K", + "value": 0, + "type": 1 + }, + { + "path": "minerals.L", + "value": 0, + "type": 1 + }, + { + "path": "minerals.H", + "value": 0, + "type": 1 + }, + { + "path": "minerals.Z", + "value": 0, + "type": 1 + }, + { + "path": "minerals.X", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.Z", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XGH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.G", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.GH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.GH", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.ZK", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.reductant", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.battery", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.power", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XLH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.ZO", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XGHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XZH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XUHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XZHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.ZH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.ZHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XKHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XKH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XLHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.purifier", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.oxidant", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.biomass", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.utrium_bar", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.lemergium_bar", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.silicon", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XUH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.wire", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.ghodium_melt", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.liquid", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.ops", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.metal", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.condensate", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.mist", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.zynthium_bar", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.transistor", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.switch", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.fixtures", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.alloy", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.keanium_bar", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.composite", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.concentrate", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.extract", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.crystal", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.microchip", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.spirit", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.tube", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.frame", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.circuit", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.hydraulics", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.lab", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.factory", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.cell", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.phlegm", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.tissue", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.emanation", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.muscle", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.organoid", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.storage", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.link", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.terminal", + "value": 0, + "type": 1 + }, + { + "path": "countByType.intents.rangedHeal", + "value": 0, + "type": 0 + }, + { + "path": "countByType.constructionSites.nuker", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.powerSpawn", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.organism", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.essence", + "value": 0, + "type": 1 + }, + { + "path": "countByType.intents.rangedMassAttack", + "value": 0, + "type": 0 + }, + { + "path": "countByType.constructionSites.extractor", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.spawn", + "value": 0, + "type": 1 + }, + { + "path": "controller.progressCombined", + "value": 0, + "type": 1 + }, + { + "path": "totals.rooms.owned", + "value": 0, + "type": 1 + }, + { + "path": "countByType.intents.move", + "value": 0, + "type": 0 + }, + { + "path": "controller.gclPerTick", + "value": 0, + "type": 0 + }, + { + "path": "intents.income.harvest.cost", + "value": 0, + "type": 0 + }, + { + "path": "intents.income.harvest.effect", + "value": 0, + "type": 0 + }, + { + "path": "intents.income.dismantle.cost", + "value": 0, + "type": 0 + }, + { + "path": "intents.income.dismantle.effect", + "value": 0, + "type": 0 + }, + { + "path": "intents.outcome.repair.cost", + "value": 0, + "type": 0 + }, + { + "path": "intents.outcome.repair.effect", + "value": 0, + "type": 0 + }, + { + "path": "intents.outcome.build.cost", + "value": 0, + "type": 0 + }, + { + "path": "intents.outcome.build.effect", + "value": 0, + "type": 0 + }, + { + "path": "intents.outcome.upgradeController.cost", + "value": 0, + "type": 0 + }, + { + "path": "intents.outcome.upgradeController.effect", + "value": 0, + "type": 0 + }, + { + "path": "intents.offensive.attack.cost", + "value": 0, + "type": 0 + }, + { + "path": "intents.offensive.attack.effect", + "value": 0, + "type": 0 + }, + { + "path": "intents.offensive.rangedAttack.cost", + "value": 0, + "type": 0 + }, + { + "path": "intents.offensive.rangedAttack.effect", + "value": 0, + "type": 0 + }, + { + "path": "intents.offensive.rangedMassAttack.cost", + "value": 0, + "type": 0 + }, + { + "path": "intents.offensive.rangedMassAttack.effect", + "value": 0, + "type": 0 + }, + { + "path": "intents.offensive.heal.cost", + "value": 0, + "type": 0 + }, + { + "path": "intents.offensive.heal.effect", + "value": 0, + "type": 0 + }, + { + "path": "intents.offensive.rangedHeal.cost", + "value": 0, + "type": 0 + }, + { + "path": "intents.offensive.rangedHeal.effect", + "value": 0, + "type": 0 + }, + { + "path": "resourcesStored.device", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.machine", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.observer", + "value": 0, + "type": 1 + } +] diff --git a/files/defaultActions.reserved.json b/files/defaultActions.reserved.json index 7ba6d9a..c477b75 100644 --- a/files/defaultActions.reserved.json +++ b/files/defaultActions.reserved.json @@ -179,56 +179,6 @@ "value": 0, "type": 1 }, - { - "path": "intents.income.harvest", - "value": 0, - "type": 0 - }, - { - "path": "intents.income.dismantle", - "value": 0, - "type": 0 - }, - { - "path": "intents.outcome.repair", - "value": 0, - "type": 0 - }, - { - "path": "intents.outcome.build", - "value": 0, - "type": 0 - }, - { - "path": "intents.outcome.upgradeController", - "value": 0, - "type": 0 - }, - { - "path": "intents.offensive.attack", - "value": 0, - "type": 0 - }, - { - "path": "intents.offensive.rangedAttack", - "value": 0, - "type": 0 - }, - { - "path": "intents.offensive.rangedMassAttack", - "value": 0, - "type": 0 - }, - { - "path": "intents.offensive.heal", - "value": 0, - "type": 0 - }, - { - "path": "intents.offensive.rangedHeal", - "value": 0, - "type": 0 - }, { "path": "countByType.intents.harvest", "value": 0, @@ -663,5 +613,20 @@ "path": "countByType.constructionSites.storage", "value": 0, "type": 1 + }, + { + "path": "resourcesStored.cell", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.phlegm", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.alloy", + "value": 0, + "type": 1 } ] diff --git a/files/defaultActions.unknown.json b/files/defaultActions.unknown.json index 8c5d6ef..94a9bd3 100644 --- a/files/defaultActions.unknown.json +++ b/files/defaultActions.unknown.json @@ -1,817 +1,767 @@ [ - { - "path": "totals.creeps", - "value": 0, - "type": 1 - }, - { - "path": "totals.structures", - "value": 0, - "type": 1 - }, - { - "path": "totals.constructionSites", - "value": 0, - "type": 1 - }, - { - "path": "totals.resourcesStored", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.road", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.constructedWall", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.rampart", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.spawn", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.extension", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.link", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.storage", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.tower", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.observer", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.powerSpawn", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.extractor", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.lab", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.terminal", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.container", - "value": 0, - "type": 1 - }, - { - "path": "countByType.structures.nuker", - "value": 0, - "type": 1 - }, - { - "path": "constructionSites.progressPercentage", - "value": 0, - "type": 1 - }, - { - "path": "constructionSites.progressNeeded", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.road", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.constructedWall", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.rampart", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.spawn", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.extension", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.link", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.storage", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.tower", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.observer", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.powerSpawn", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.extractor", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.lab", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.terminal", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.container", - "value": 0, - "type": 1 - }, - { - "path": "structureHits.nuker", - "value": 0, - "type": 1 - }, - { - "path": "totals.rooms.unknown", - "value": 0, - "type": 1 - }, - { - "path": "intents.income.harvest", - "value": 0, - "type": 0 - }, - { - "path": "intents.income.dismantle", - "value": 0, - "type": 0 - }, - { - "path": "intents.outcome.repair", - "value": 0, - "type": 0 - }, - { - "path": "intents.outcome.build", - "value": 0, - "type": 0 - }, - { - "path": "intents.outcome.upgradeController", - "value": 0, - "type": 0 - }, - { - "path": "intents.offensive.attack", - "value": 0, - "type": 0 - }, - { - "path": "intents.offensive.rangedAttack", - "value": 0, - "type": 0 - }, - { - "path": "intents.offensive.rangedMassAttack", - "value": 0, - "type": 0 - }, - { - "path": "intents.offensive.heal", - "value": 0, - "type": 0 - }, - { - "path": "intents.offensive.rangedHeal", - "value": 0, - "type": 0 - }, - { - "path": "totals.intents", - "value": 0, - "type": 0 - }, - { - "path": "countByType.creepParts.move", - "value": 0, - "type": 1 - }, - { - "path": "countByType.creepParts.work", - "value": 0, - "type": 1 - }, - { - "path": "countByType.creepParts.carry", - "value": 0, - "type": 1 - }, - { - "path": "countByType.intents.repair", - "value": 0, - "type": 0 - }, - { - "path": "countByType.intents.harvest", - "value": 0, - "type": 0 - }, - { - "path": "countByType.creepParts.ranged_attack", - "value": 0, - "type": 1 - }, - { - "path": "countByType.creepParts.heal", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.road", - "value": 0, - "type": 1 - }, - { - "path": "countByType.creepParts.attack", - "value": 0, - "type": 1 - }, - { - "path": "countByType.intents.attack", - "value": 0, - "type": 0 - }, - { - "path": "countByType.intents.heal", - "value": 0, - "type": 0 - }, - { - "path": "countByType.constructionSites.container", - "value": 0, - "type": 1 - }, - { - "path": "countByType.creepParts.claim", - "value": 0, - "type": 1 - }, - { - "path": "countByType.intents.rangedMassAttack", - "value": 0, - "type": 0 - }, - { - "path": "countByType.intents.build", - "value": 0, - "type": 0 - }, - { - "path": "countByType.intents.rangedAttack", - "value": 0, - "type": 0 - }, - { - "path": "countByType.intents.rangedHeal", - "value": 0, - "type": 0 - }, - { - "path": "countByType.creepParts.tough", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.extension", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.storage", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.rampart", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.energy", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.UH", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.ZH", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.KO", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.GO", - "value": 0, - "type": 1 - }, - { - "path": "countByType.intents.upgradeController", - "value": 0, - "type": 0 - }, - { - "path": "countByType.intents.move", - "value": 0, - "type": 0 - }, - { - "path": "resourcesStored.LO", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.GH", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.LH", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.L", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.battery", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XGH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.GH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.lemergium_bar", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.U", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.H", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.reductant", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.G", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.Z", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.K", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.metal", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.power", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XKHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.LH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XGHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XUH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.ops", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XLHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.OH", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.X", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.UH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.LHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.KHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.UHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.UO", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.ZK", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.zynthium_bar", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.ZO", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.UL", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.KH", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.ZHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.KH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.oxidant", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.keanium_bar", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.utrium_bar", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XKH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XUHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XZHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XZH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.XLH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.ghodium_melt", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.GHO2", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.ZH2O", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.alloy", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.spawn", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.terminal", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.lab", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.silicon", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.wire", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.frame", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.crystal", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.microchip", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.switch", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.transistor", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.composite", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.liquid", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.purifier", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.biomass", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.cell", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.condensate", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.mist", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.extractor", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.fixtures", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.tube", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.hydraulics", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.circuit", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.concentrate", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.constructedWall", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.machine", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.extract", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.spirit", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.emanation", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.essence", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.tissue", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.muscle", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.organoid", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.phlegm", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.organism", - "value": 0, - "type": 1 - }, - { - "path": "resourcesStored.device", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.link", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.tower", - "value": 0, - "type": 1 - }, - { - "path": "countByType.constructionSites.factory", - "value": 0, - "type": 1 - } -] \ No newline at end of file + { + "path": "totals.creeps", + "value": 0, + "type": 1 + }, + { + "path": "totals.structures", + "value": 0, + "type": 1 + }, + { + "path": "totals.constructionSites", + "value": 0, + "type": 1 + }, + { + "path": "totals.resourcesStored", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.road", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.constructedWall", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.rampart", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.spawn", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.extension", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.link", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.storage", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.tower", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.observer", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.powerSpawn", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.extractor", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.lab", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.terminal", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.container", + "value": 0, + "type": 1 + }, + { + "path": "countByType.structures.nuker", + "value": 0, + "type": 1 + }, + { + "path": "constructionSites.progressPercentage", + "value": 0, + "type": 1 + }, + { + "path": "constructionSites.progressNeeded", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.road", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.constructedWall", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.rampart", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.spawn", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.extension", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.link", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.storage", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.tower", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.observer", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.powerSpawn", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.extractor", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.lab", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.terminal", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.container", + "value": 0, + "type": 1 + }, + { + "path": "structureHits.nuker", + "value": 0, + "type": 1 + }, + { + "path": "totals.rooms.unknown", + "value": 0, + "type": 1 + }, + { + "path": "totals.intents", + "value": 0, + "type": 0 + }, + { + "path": "countByType.creepParts.move", + "value": 0, + "type": 1 + }, + { + "path": "countByType.creepParts.work", + "value": 0, + "type": 1 + }, + { + "path": "countByType.creepParts.carry", + "value": 0, + "type": 1 + }, + { + "path": "countByType.intents.repair", + "value": 0, + "type": 0 + }, + { + "path": "countByType.intents.harvest", + "value": 0, + "type": 0 + }, + { + "path": "countByType.creepParts.ranged_attack", + "value": 0, + "type": 1 + }, + { + "path": "countByType.creepParts.heal", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.road", + "value": 0, + "type": 1 + }, + { + "path": "countByType.creepParts.attack", + "value": 0, + "type": 1 + }, + { + "path": "countByType.intents.attack", + "value": 0, + "type": 0 + }, + { + "path": "countByType.intents.heal", + "value": 0, + "type": 0 + }, + { + "path": "countByType.constructionSites.container", + "value": 0, + "type": 1 + }, + { + "path": "countByType.creepParts.claim", + "value": 0, + "type": 1 + }, + { + "path": "countByType.intents.rangedMassAttack", + "value": 0, + "type": 0 + }, + { + "path": "countByType.intents.build", + "value": 0, + "type": 0 + }, + { + "path": "countByType.intents.rangedAttack", + "value": 0, + "type": 0 + }, + { + "path": "countByType.intents.rangedHeal", + "value": 0, + "type": 0 + }, + { + "path": "countByType.creepParts.tough", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.extension", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.storage", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.rampart", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.energy", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.UH", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.ZH", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.KO", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.GO", + "value": 0, + "type": 1 + }, + { + "path": "countByType.intents.upgradeController", + "value": 0, + "type": 0 + }, + { + "path": "countByType.intents.move", + "value": 0, + "type": 0 + }, + { + "path": "resourcesStored.LO", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.GH", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.LH", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.L", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.battery", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XGH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.GH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.lemergium_bar", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.U", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.H", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.reductant", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.G", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.Z", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.K", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.metal", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.power", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XKHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.LH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XGHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XUH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.ops", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XLHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.OH", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.X", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.UH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.LHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.KHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.UHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.UO", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.ZK", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.zynthium_bar", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.ZO", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.UL", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.KH", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.ZHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.KH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.oxidant", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.keanium_bar", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.utrium_bar", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XKH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XUHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XZHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XZH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.XLH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.ghodium_melt", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.GHO2", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.ZH2O", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.alloy", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.spawn", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.terminal", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.lab", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.silicon", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.wire", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.frame", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.crystal", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.microchip", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.switch", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.transistor", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.composite", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.liquid", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.purifier", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.biomass", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.cell", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.condensate", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.mist", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.extractor", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.fixtures", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.tube", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.hydraulics", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.circuit", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.concentrate", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.constructedWall", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.machine", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.extract", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.spirit", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.emanation", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.essence", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.tissue", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.muscle", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.organoid", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.phlegm", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.organism", + "value": 0, + "type": 1 + }, + { + "path": "resourcesStored.device", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.link", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.tower", + "value": 0, + "type": 1 + }, + { + "path": "countByType.constructionSites.factory", + "value": 0, + "type": 1 + } +] diff --git a/src/data/broker/processData.js b/src/data/broker/processData.js index f95a9e8..b44ebbd 100644 --- a/src/data/broker/processData.js +++ b/src/data/broker/processData.js @@ -4,7 +4,6 @@ import handleUnknownObjects from "../converter/manage/unknownRoom.js"; import prepareObject from "../converter/prepare/object.js"; import { summarizeObjects } from "../converter/helper.js"; -import { GetUsernameById } from "../../helper/users.js"; import { cleanSource } from "../../helper/index.js"; import ActionProcessor from "./defaultActions.js" @@ -16,6 +15,8 @@ export default class ProcessDataBroker { static tickRates = {}; + static usernamesById = {}; + static setTickRate(roomData, opts) { const tick = Number(opts.tick); const newTimestamp = this.lastTickTimestamp[ @@ -90,13 +91,13 @@ export default class ProcessDataBroker { const { controller, creeps, structures } = summarize; if (controller && controller.level > 0) { opts.userId = controller.user; - opts.username = await GetUsernameById(opts.userId); + opts.username = this.usernamesById[opts.userId]; if (!opts.username) return "" return "owned"; } if (controller && controller.reservation) { opts.userId = controller.reservation.user; - opts.username = await GetUsernameById(opts.userId); + opts.username = this.usernamesById[opts.userId]; if (!opts.username) return "" return "reserved"; } @@ -116,7 +117,7 @@ export default class ProcessDataBroker { if (userKeys.length === 0) return ""; const user = userKeys.reduce((a, b) => users[a] > users[b] ? a : b); opts.userId = user; - opts.username = await GetUsernameById(opts.userId); + opts.username = this.usernamesById[opts.userId]; if (!opts.username) return "" return "unknown"; } diff --git a/src/data/converter/helper.js b/src/data/converter/helper.js index aec5e8a..022c369 100644 --- a/src/data/converter/helper.js +++ b/src/data/converter/helper.js @@ -114,23 +114,31 @@ export function getIntentEffect(action, originalObject) { }; case "repair": if (originalObject.type === "tower") return { action, energy: 10 }; - return { action, - energy: originalObject.groupedBody.work * 1, - effect: originalObject.groupedBodyEffect.repair }; + return { + action, + energy: originalObject.groupedBody.work * 1, + effect: originalObject.groupedBodyEffect.repair + }; case "upgradeController": - return { action, + return { + action, energy: originalObject.groupedBody.work * 1, - effect: originalObject.groupedBodyEffect.upgradeController }; + effect: originalObject.groupedBodyEffect.upgradeController + }; case "dismantle": - return { action, + return { + action, energy: originalObject.groupedBody.work * 0.25, - effect: originalObject.groupedBodyEffect.dismantle }; + effect: originalObject.groupedBodyEffect.dismantle + }; case "attack": if (originalObject.type === "tower") return { action, energy: 10, damage: 300 }; - return { action, + return { + action, damage: originalObject.groupedBody.attack * 30, - effect: originalObject.groupedBodyEffect.attack }; + effect: originalObject.groupedBodyEffect.attack + }; case "rangedAttack": return { action, @@ -138,20 +146,26 @@ export function getIntentEffect(action, originalObject) { effect: originalObject.groupedBodyEffect.rangedAttack }; case "rangedMassAttack": - return { action, + return { + action, damage: originalObject.groupedBody.ranged_attack * 4, - effect: originalObject.groupedBodyEffect.ranged_attack }; + effect: originalObject.groupedBodyEffect.rangedMassAttack + }; case "heal": if (originalObject.type === "tower") { return { action, energy: 10, damage: 200 }; } - return { action, + return { + action, damage: originalObject.groupedBody.heal * 12, - effect: originalObject.groupedBodyEffect.heal }; + effect: originalObject.groupedBodyEffect.heal + }; case "rangedHeal": - return { action, + return { + action, damage: originalObject.groupedBody.heal * 4, - effect: originalObject.groupedBodyEffect.heal }; + effect: originalObject.groupedBodyEffect.rangedHeal + }; case "move": return { action }; default: diff --git a/src/data/converter/manage/ownedRoom.js b/src/data/converter/manage/ownedRoom.js index 31154dd..95a25d2 100644 --- a/src/data/converter/manage/ownedRoom.js +++ b/src/data/converter/manage/ownedRoom.js @@ -338,7 +338,7 @@ export default async function handleObjects(data, opts) { const intent = intents[c]; if (intentsCategories.income[intent.action] !== undefined) { intentsCategories.income[intent.action].effect += intent.effect; - intentsCategories.outcome[intent.action].cost += intent.energy; + intentsCategories.income[intent.action].cost += intent.energy; } else if (intentsCategories.outcome[intent.action] !== undefined) { intentsCategories.outcome[intent.action].effect += intent.effect; intentsCategories.outcome[intent.action].cost += intent.energy; diff --git a/src/data/converter/manage/reservedRoom.js b/src/data/converter/manage/reservedRoom.js index 42b58d8..0291f37 100644 --- a/src/data/converter/manage/reservedRoom.js +++ b/src/data/converter/manage/reservedRoom.js @@ -1,4 +1,5 @@ import ActionProcessor from "../../broker/defaultActions.js" +import { cleanSource } from "../../../helper/index.js"; export default async function handleObjects(data, opts) { const { summarize } = data; @@ -188,33 +189,39 @@ export default async function handleObjects(data, opts) { // #region Divide100 // #region IntentsCategories + const base = { + cost: 0, + effect: 0 + } const intentsCategories = { income: { - harvest: 0, - dismantle: 0, + harvest: cleanSource(base), + dismantle: cleanSource(base), }, outcome: { - repair: 0, - build: 0, - upgradeController: 0, + repair: cleanSource(base), + build: cleanSource(base), + upgradeController: cleanSource(base), }, offensive: { - attack: 0, - rangedAttack: 0, - rangedMassAttack: 0, - heal: 0, - rangedHeal: 0, + attack: cleanSource(base), + rangedAttack: cleanSource(base), + rangedMassAttack: cleanSource(base), + heal: cleanSource(base), + rangedHeal: cleanSource(base), }, }; for (let c = 0; c < intents.length; c += 1) { const intent = intents[c]; if (intentsCategories.income[intent.action] !== undefined) { - intentsCategories.income[intent.action] += intent.energy; + intentsCategories.income[intent.action].effect += intent.effect; + intentsCategories.income[intent.action].cost += intent.energy; } else if (intentsCategories.outcome[intent.action] !== undefined) { - intentsCategories.outcome[intent.action] += intent.energy; + intentsCategories.outcome[intent.action].effect += intent.effect; + intentsCategories.outcome[intent.action].cost += intent.energy; } if (intentsCategories.offensive[intent.action] !== undefined) { - intentsCategories.offensive[intent.action] += intent.damage; + intentsCategories.offensive[intent.action].effect += intent.effect; } } @@ -225,8 +232,15 @@ export default async function handleObjects(data, opts) { intentsCategoryKeys.forEach((intent) => { actions.push( ActionProcessor.CreateAction( - `intents.${category}.${intent}`, - intentsCategory[intent], + `intents.${category}.${intent}.cost`, + intentsCategory[intent].cost, + ActionProcessor.ActionType.Divide100 + ) + ); + actions.push( + ActionProcessor.CreateAction( + `intents.${category}.${intent}.effect`, + intentsCategory[intent].effect, ActionProcessor.ActionType.Divide100 ) ); diff --git a/src/data/converter/manage/unknownRoom.js b/src/data/converter/manage/unknownRoom.js index 0b8caaa..ef7d017 100644 --- a/src/data/converter/manage/unknownRoom.js +++ b/src/data/converter/manage/unknownRoom.js @@ -1,4 +1,5 @@ import ActionProcessor from "../../broker/defaultActions.js" +import { cleanSource } from "../../../helper/index.js"; export default async function handleObjects(data, opts) { const { summarize } = data; @@ -188,33 +189,39 @@ export default async function handleObjects(data, opts) { // #region Divide100 // #region IntentsCategories + const base = { + cost: 0, + effect: 0 + } const intentsCategories = { income: { - harvest: 0, - dismantle: 0, + harvest: cleanSource(base), + dismantle: cleanSource(base), }, outcome: { - repair: 0, - build: 0, - upgradeController: 0, + repair: cleanSource(base), + build: cleanSource(base), + upgradeController: cleanSource(base), }, offensive: { - attack: 0, - rangedAttack: 0, - rangedMassAttack: 0, - heal: 0, - rangedHeal: 0, + attack: cleanSource(base), + rangedAttack: cleanSource(base), + rangedMassAttack: cleanSource(base), + heal: cleanSource(base), + rangedHeal: cleanSource(base), }, }; for (let c = 0; c < intents.length; c += 1) { const intent = intents[c]; if (intentsCategories.income[intent.action] !== undefined) { - intentsCategories.income[intent.action] += intent.energy; + intentsCategories.income[intent.action].effect += intent.effect; + intentsCategories.income[intent.action].cost += intent.energy; } else if (intentsCategories.outcome[intent.action] !== undefined) { - intentsCategories.outcome[intent.action] += intent.energy; + intentsCategories.outcome[intent.action].effect += intent.effect; + intentsCategories.outcome[intent.action].cost += intent.energy; } if (intentsCategories.offensive[intent.action] !== undefined) { - intentsCategories.offensive[intent.action] += intent.damage; + intentsCategories.offensive[intent.action].effect += intent.effect; } } @@ -225,8 +232,15 @@ export default async function handleObjects(data, opts) { intentsCategoryKeys.forEach((intent) => { actions.push( ActionProcessor.CreateAction( - `intents.${category}.${intent}`, - intentsCategory[intent], + `intents.${category}.${intent}.cost`, + intentsCategory[intent].cost, + ActionProcessor.ActionType.Divide100 + ) + ); + actions.push( + ActionProcessor.CreateAction( + `intents.${category}.${intent}.effect`, + intentsCategory[intent].effect, ActionProcessor.ActionType.Divide100 ) ); diff --git a/src/data/converter/prepare/object.js b/src/data/converter/prepare/object.js index c3d1fb9..fb8f692 100644 --- a/src/data/converter/prepare/object.js +++ b/src/data/converter/prepare/object.js @@ -71,7 +71,6 @@ function getBodyBoostEffect(groupedBodyEffect, part) { groupedBodyEffect.upgradeController += 1 * 1 break; } - break; case "attack": if (!groupedBodyEffect.attack) groupedBodyEffect.attack = 0; diff --git a/src/helper/users.js b/src/helper/users.js index 6a32add..fe30f38 100644 --- a/src/helper/users.js +++ b/src/helper/users.js @@ -1,12 +1,6 @@ // eslint-disable-next-line import/no-cycle import Cache from "../setup/cache.js"; -export async function GetUsernameById(id) { - const users = await Cache.getUserByIdCache(); - const user = users[id]; - if (user) return user.username; -} - let usersCache = []; export function UpdateLocalUsersCache(cache) { usersCache = cache; diff --git a/src/setup/cache.js b/src/setup/cache.js index a0e0efc..089e985 100644 --- a/src/setup/cache.js +++ b/src/setup/cache.js @@ -5,6 +5,7 @@ import { GetRoomTotal } from "../helper/rooms.js"; import { cacheLogger as logger } from "../helper/logger.js"; // eslint-disable-next-line import { UpdateLocalUsersCache } from "../helper/users.js"; +import ProcessDataBroker from "../data/broker/processData.js"; let loginInfo = process.env.SCREEPS_TOKEN; const settings = process.env.API_SETTINGS ? JSON.parse(process.env.API_SETTINGS) : {}; @@ -171,6 +172,7 @@ export default class Cache { for (let u = 0; u < userValues.length; u += 1) { const user = userValues[u]; userById[user.id] = user; + ProcessDataBroker.usernamesById[user.id] = user.username; } userByIdCache.data = userById; } diff --git a/tests/dataTypes/owned.spec.js b/tests/dataTypes/owned.spec.js index bd7d1ef..d7ccfd7 100644 --- a/tests/dataTypes/owned.spec.js +++ b/tests/dataTypes/owned.spec.js @@ -839,6 +839,8 @@ describe("Owned data type process check", () => { 0: { heal: { }, + repair: { + }, } } }) @@ -846,18 +848,18 @@ describe("Owned data type process check", () => { const data = await testHelper1.process(settings) const base = data.stats.users[data.opts.username].stats.combined.shards[data.opts.shard] - expect(base.intents.income.harvest).toBe(20 * 2 / 2) - expect(base.intents.income.dismantle).toBe(2.5 * 2 / 2) - - expect(base.intents.outcome.repair).toBe(10 * 2 / 2) - expect(base.intents.outcome.build).toBe(50 * 2 / 2) - expect(base.intents.outcome.upgradeController).toBe(10 * 2 / 2) - - expect(base.intents.offensive.attack).toBe(300 / 2) - expect(base.intents.offensive.rangedAttack).toBe(100 / 2) - expect(base.intents.offensive.rangedMassAttack).toBe(40 / 2) - expect(base.intents.offensive.heal).toBe(120 / 2) - expect(base.intents.offensive.rangedHeal).toBe(40 / 2) + expect(base.intents.income.harvest.effect).toBe(20 * 2 / 2) + expect(base.intents.income.dismantle.effect).toBe(2.5 * 2 / 2) + + expect(base.intents.outcome.repair.effect).toBe(10 * 2 / 2) + expect(base.intents.outcome.build.effect).toBe(50 * 2 / 2) + expect(base.intents.outcome.upgradeController.effect).toBe(10 * 2 / 2) + + expect(base.intents.offensive.attack.effect).toBe(300 / 2) + expect(base.intents.offensive.rangedAttack.effect).toBe(100 / 2) + expect(base.intents.offensive.rangedMassAttack.effect).toBe(40 / 2) + expect(base.intents.offensive.heal.effect).toBe(120 / 2) + expect(base.intents.offensive.rangedHeal.effect).toBe(40 / 2) }) it('should handle spawns correctly', async () => { const settings = [] diff --git a/tests/dataTypes/reserved.spec.js b/tests/dataTypes/reserved.spec.js index 793857e..f4df854 100644 --- a/tests/dataTypes/reserved.spec.js +++ b/tests/dataTypes/reserved.spec.js @@ -470,6 +470,8 @@ describe("Reserved data type process check", () => { 0: { heal: { }, + repair: { + }, } } }) @@ -477,18 +479,18 @@ describe("Reserved data type process check", () => { const data = await testHelper1.process(settings) const base = data.stats.users[data.opts.username].stats.combined.shards[data.opts.shard] - expect(base.intents.income.harvest).toBe(20 / 2) - expect(base.intents.income.dismantle).toBe(2.5 / 2) + expect(base.intents.income.harvest.effect).toBe(20 / 2) + expect(base.intents.income.dismantle.effect).toBe(2.5 / 2) - expect(base.intents.outcome.repair).toBe(10 / 2) - expect(base.intents.outcome.build).toBe(50 / 2) - expect(base.intents.outcome.upgradeController).toBe(10 / 2) + expect(base.intents.outcome.repair.effect).toBe(10 / 2) + expect(base.intents.outcome.build.effect).toBe(50 / 2) + expect(base.intents.outcome.upgradeController.effect).toBe(10 / 2) - expect(base.intents.offensive.attack).toBe(300 / 2) - expect(base.intents.offensive.rangedAttack).toBe(100 / 2) - expect(base.intents.offensive.rangedMassAttack).toBe(40 / 2) - expect(base.intents.offensive.heal).toBe(120 / 2) - expect(base.intents.offensive.rangedHeal).toBe(40 / 2) + expect(base.intents.offensive.attack.effect).toBe(300 / 2) + expect(base.intents.offensive.rangedAttack.effect).toBe(100 / 2) + expect(base.intents.offensive.rangedMassAttack.effect).toBe(40 / 2) + expect(base.intents.offensive.heal.effect).toBe(120 / 2) + expect(base.intents.offensive.rangedHeal.effect).toBe(40 / 2) }) it('should handle fluctuating values', async () => { const settings = []