summaryrefslogtreecommitdiff
path: root/resources/js/game.js
diff options
context:
space:
mode:
Diffstat (limited to 'resources/js/game.js')
-rw-r--r--resources/js/game.js12
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();