diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-08-27 15:21:47 +0200 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-08-27 15:21:47 +0200 |
commit | 8e829d4497efd6a23514901a1a6724fe7579c6b5 (patch) | |
tree | a829ba890ad0dfafdf7689fc8e6e0c5f22a0670e /resources/js/game.js | |
parent | 5582c3c07069f7766aabd81f3a4a3f97def134e9 (diff) |
box in healing centers!
Diffstat (limited to 'resources/js/game.js')
-rw-r--r-- | resources/js/game.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/resources/js/game.js b/resources/js/game.js index 3e7a4c8..1fdde7d 100644 --- a/resources/js/game.js +++ b/resources/js/game.js @@ -961,10 +961,18 @@ const Game = { caughtMonster.level = Memory.state.opponent.activeMonster.level; caughtMonster.hp = Memory.state.opponent.activeMonster.hp; - Memory.state.player.monsters.push(caughtMonster); - Game.log(`Caught ${caughtMonster.name}!`); + if (Memory.state.player.monsters.length < 6) { + Memory.state.player.monsters.push(caughtMonster); + + Game.log(`Added ${caughtMonster.name} to Party!`); + } else { + Memory.state.monsters.push(caughtMonster); + + Game.log(`Transfered ${caughtMonster.name} to Box!`, 1); + } + await Game.encounterWildMonster(); Memory.saveToLocalStorage(); |