Fix Krumblor on Steam

This commit is contained in:
Daniël van Noord committed 2021-09-06 15:43:41 +02:00
1 parent b191d9a434
commit 4be3942af3
5 files changed
+6 -5

No files matched your search

+2 -1
View File
@@ -14,7 +14,8 @@ export default function CacheDragonCost() {
Game.dragonLevel < 25 &&
Game.dragonLevels[Game.dragonLevel].buy.toString().includes('sacrifice')
) {
let target = Game.dragonLevels[Game.dragonLevel].buy.toString().match(/Objects\[(.*)\]/)[1];
const objectMatch = Game.dragonLevels[Game.dragonLevel].buy.toString().match(/Objects\[(.*)\]/);
let target = objectMatch !== null ? objectMatch[1] : Game.ObjectsById[Game.dragonLevel-5].name;
const amount = Game.dragonLevels[Game.dragonLevel].buy
.toString()
.match(/sacrifice\((.*?)\)/)[1];