summaryrefslogtreecommitdiff
path: root/resources/js/game.js
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-09-01 22:32:45 +0200
committerDaniel Weipert <code@drogueronin.de>2023-09-01 22:32:45 +0200
commit1d29ee6d87d3794a9319bca5bf36afdfe176072c (patch)
tree1e7e89ca87afd313b1806fcc80d456796b0af6db /resources/js/game.js
parent6b3a8aef783368d0ed9a2c104eea3ff5cf9984da (diff)
translations with fallback
Diffstat (limited to 'resources/js/game.js')
-rw-r--r--resources/js/game.js48
1 files changed, 24 insertions, 24 deletions
diff --git a/resources/js/game.js b/resources/js/game.js
index 5abc42f..6c3a393 100644
--- a/resources/js/game.js
+++ b/resources/js/game.js
@@ -98,7 +98,7 @@ const Game = {
const money = calculateAwardedMoney(Memory.state.opponent.activeMonster);
Memory.state.money += money;
Game.addPhaseEvent('postTurn', () => {
- Game.log(translate('game:battle:money:get', true).replace('{amount}', money));
+ Game.log(translate('game:battle:money:get').replace('{amount}', money));
});
// exp
@@ -171,9 +171,9 @@ const Game = {
Memory.state.money -= totalHealingCenterPrice;
Game.addPhaseEvent('postTurnEnd', () => {
- Game.log(translate('game:battle:defeat', true));
+ Game.log(translate('game:battle:defeat'));
Game.log(
- translate('game:battle:defeat:recovery_price', true)
+ translate('game:battle:defeat:recovery_price')
.replace('{amount}', formatPrice(totalHealingCenterPrice))
.replace('{name}', Memory.state.currentArea.name)
);
@@ -251,7 +251,7 @@ const Game = {
};
log(
- translate('game:battle:technique:attempt', true)
+ translate('game:battle:technique:attempt')
.replace('{monster.name}', user.name)
.replace('{technique.name}', technique.name)
);
@@ -264,7 +264,7 @@ const Game = {
UI.drawActionFeedback(feedbackNode);
}
- log(translate('game:battle:technique:attempt:fail:recharge', true), 1);
+ log(translate('game:battle:technique:attempt:fail:recharge'), 1);
canUse = false;
}
@@ -276,7 +276,7 @@ const Game = {
UI.drawActionFeedback(feedbackNode);
}
- log(translate('game:battle:technique:attempt:fail:noddingoff', true), 1);
+ log(translate('game:battle:technique:attempt:fail:noddingoff'), 1);
canUse = false;
}
@@ -290,7 +290,7 @@ const Game = {
technique.use();
Game.doBattleAnimation && UI.drawDamageMiss(UI.createDamageMiss());
- log(translate('game:battle:technique:attempt:fail:miss', true), 1);
+ log(translate('game:battle:technique:attempt:fail:miss'), 1);
return;
}
@@ -309,7 +309,7 @@ const Game = {
Game.addBattlePhaseEvent('action', user, () => {
Game.log(
- translate('game:battle:technique:use', true)
+ translate('game:battle:technique:use')
.replace('{monster.name}', user.name)
.replace('{technique.name}', technique.name)
);
@@ -336,7 +336,7 @@ const Game = {
}
Game.log(
- translate('game:battle:technique:use:damage', true)
+ translate('game:battle:technique:use:damage')
.replace('{amount}', damage)
.replace('{name}', target.name),
1
@@ -367,7 +367,7 @@ const Game = {
recipient.hp += heal;
Game.log(
- translate('game:battle:technique:use:healing', true)
+ translate('game:battle:technique:use:healing')
.replace('{amount}', heal),
1
);
@@ -406,9 +406,9 @@ const Game = {
recipient.statusEffect = statusEffect;
Game.log(
- translate('game:battle:technique:use:status', true)
+ translate('game:battle:technique:use:status')
.replace('{monster.name}', recipient.name)
- .replace('{status_effect.name}', translate(`status_${statusEffect.slug}`, true)),
+ .replace('{status_effect.name}', translate(`status_${statusEffect.slug}`)),
1
);
}
@@ -435,9 +435,9 @@ const Game = {
// if still 0 turns left after remove action
if (monster.statusEffect.turnsLeft === 0) {
Game.log(
- translate('game:battle:status_effect:removed', true)
+ translate('game:battle:status_effect:removed')
.replace('{monster.name}', monster.name)
- .replace('{status_effect.name}', translate(`status_${monster.statusEffect.slug}`, true))
+ .replace('{status_effect.name}', translate(`status_${monster.statusEffect.slug}`))
);
monster.statusEffect = null;
@@ -451,9 +451,9 @@ const Game = {
const logStatusIs = () => {
Game.log(
- translate('game:battle:status_effect:is', true)
+ translate('game:battle:status_effect:is')
.replace('{monster.name}', monster.name)
- .replace('{status_effect.name}', translate(`status_${monster.statusEffect.slug}`, true))
+ .replace('{status_effect.name}', translate(`status_${monster.statusEffect.slug}`))
);
}
@@ -963,7 +963,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));
+ Game.log(translate('game:catch:ball:throw').replace('{ball}', activeBall.name));
activeBall.quantity--;
if (activeBall.quantity === 0) {
Game.removeItemFromInventory(Memory.state.player.inventory, Memory.state.activeBall);
@@ -972,7 +972,7 @@ const Game = {
}
// attempt capture
- Game.log(translate('game:catch:attempt', true), 1);
+ Game.log(translate('game:catch:attempt'), 1);
let success = true;
let attempts = 1;
const maxAttempts = 4;
@@ -980,8 +980,8 @@ const Game = {
success = checkCapture(playerMonster, opposingMonster, activeBall);
if (!success) {
- 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);
+ Game.log(translate('game:catch:attempt:nr:success').replace('{nr}', attempts), 2);
+ Game.log(translate('game:catch:broke_free').replace('{monster}', opposingMonster.name), 1);
Memory.state.Game.isInBattle = true;
UI.drawStatus();
@@ -990,7 +990,7 @@ const Game = {
return; // can't catch
}
- Game.log(translate('game:catch:attempt:nr:fail', true).replace('{nr}', attempts), 2);
+ Game.log(translate('game:catch:attempt:nr:fail').replace('{nr}', attempts), 2);
attempts++;
}
@@ -1002,16 +1002,16 @@ const Game = {
caughtMonster.level = Memory.state.opponent.activeMonster.level;
caughtMonster.hp = Memory.state.opponent.activeMonster.hp;
- Game.log(translate('game:catch:caught', true).replace('{monster}', caughtMonster.name), 1);
+ Game.log(translate('game:catch:caught').replace('{monster}', caughtMonster.name), 1);
if (Memory.state.player.monsters.length < 6) {
Memory.state.player.monsters.push(caughtMonster);
- Game.log(translate('game:catch:to_party', true).replace('{monster}', caughtMonster.name), 2);
+ Game.log(translate('game:catch:to_party').replace('{monster}', caughtMonster.name), 2);
} else {
Memory.state.monsters.push(caughtMonster);
- Game.log(translate('game:catch:to_box', true).replace('{monster}', caughtMonster.name), 2);
+ Game.log(translate('game:catch:to_box').replace('{monster}', caughtMonster.name), 2);
}
await Game.encounterWildMonster();