From 8e829d4497efd6a23514901a1a6724fe7579c6b5 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 27 Aug 2023 15:21:47 +0200 Subject: box in healing centers! --- resources/js/game.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'resources/js/game.js') 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(); -- cgit v1.2.3