diff options
Diffstat (limited to 'resources/js/game.js')
-rw-r--r-- | resources/js/game.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/resources/js/game.js b/resources/js/game.js index 1fdde7d..3ce2aed 100644 --- a/resources/js/game.js +++ b/resources/js/game.js @@ -923,6 +923,7 @@ const Game = { const activeBall = Game.getItemFromInventory(Memory.state.player.inventory, Memory.state.activeBall); // remove ball + Game.log(translate('game:catch:ball:throw', true).replace('{ball}', activeBall.name)); activeBall.quantity--; if (activeBall.quantity === 0) { Game.removeItemFromInventory(Memory.state.player.inventory, Memory.state.activeBall); @@ -931,7 +932,7 @@ const Game = { } // attempt capture - Game.log('Attempting capture!'); + Game.log(translate('game:catch:attempt', true), 1); let success = true; let attempts = 1; const maxAttempts = 4; @@ -939,8 +940,8 @@ const Game = { success = checkCapture(playerMonster, opposingMonster, activeBall); if (!success) { - Game.log(`Escape attempt ${attempts}: succeeded!`); - Game.log(`${opposingMonster.name} broke free!`); + Game.log(translate('game:catch:attempt:nr:success', true).replace('{nr}', attempts), 2); + Game.log(translate('game:catch:broke_free', true).replace('{monster}', opposingMonster.name), 1); Memory.state.Game.isInBattle = true; UI.drawStatus(); @@ -949,7 +950,7 @@ const Game = { return; // can't catch } - Game.log(`Escape attempt ${attempts}: failed!`); + Game.log(translate('game:catch:attempt:nr:fail', true).replace('{nr}', attempts), 2); attempts++; } @@ -961,16 +962,16 @@ const Game = { caughtMonster.level = Memory.state.opponent.activeMonster.level; caughtMonster.hp = Memory.state.opponent.activeMonster.hp; - Game.log(`Caught ${caughtMonster.name}!`); + Game.log(translate('game:catch:caught', true).replace('{monster}', caughtMonster.name), 1); if (Memory.state.player.monsters.length < 6) { Memory.state.player.monsters.push(caughtMonster); - Game.log(`Added ${caughtMonster.name} to Party!`); + Game.log(translate('game:catch:to_party', true).replace('{monster}', caughtMonster.name), 2); } else { Memory.state.monsters.push(caughtMonster); - Game.log(`Transfered ${caughtMonster.name} to Box!`, 1); + Game.log(translate('game:catch:to_box', true).replace('{monster}', caughtMonster.name), 2); } await Game.encounterWildMonster(); |