summaryrefslogtreecommitdiff
path: root/rules.ts
diff options
context:
space:
mode:
Diffstat (limited to 'rules.ts')
-rw-r--r--rules.ts18
1 files changed, 8 insertions, 10 deletions
diff --git a/rules.ts b/rules.ts
index 9c5be20..52f6bea 100644
--- a/rules.ts
+++ b/rules.ts
@@ -1214,9 +1214,10 @@ states.change_bonus = {
game.bonuses[MORALE_BONUS] === ON) ||
(args.v === OFF && game.bonuses[args.t] === OFF)
) {
+ view.prompt = `${bonus_names[args.t]} is already ${args.v === OFF ? 'off' : 'on'}.`;
gen_action('skip');
}
- if (args.t === ANY && args.v === ON) {
+ else if (args.t === ANY && args.v === ON) {
view.prompt = 'Turn on a Bonus.';
for (const bonus of bonuses) {
if (game.bonuses[bonus] === OFF) {
@@ -1224,9 +1225,7 @@ states.change_bonus = {
}
}
} else {
- view.prompt = `Turn ${args.v === OFF ? 'off' : 'on'} ${
- bonus_names[args.t]
- }.`;
+ view.prompt = `Turn ${args.v === OFF ? 'off' : 'on'} ${bonus_names[args.t]}.`;
gen_action_bonus(args.t);
}
},
@@ -1239,6 +1238,8 @@ states.change_bonus = {
resolve_active_and_proceed();
},
skip() {
+ const args = get_active_node_args();
+ logi(`${bonus_names[args.t]} ${args.v === OFF ? 'off' : 'on'}`);
resolve_active_and_proceed();
},
};
@@ -2837,10 +2838,10 @@ function resolve_fascist_test() {
const hero_point_actions: EngineNode[] = [];
- log_header("C" + get_current_event_id(), 'f');
+ log_header(front_names[front] + ' Test', 'f')
if (test_passed) {
- log(front_names[front] + ' Test successful:');
+ log('Test successful:');
for (const faction of get_player_order()) {
let hero_points_gain = game.fronts[front].contributions.includes(
@@ -2864,7 +2865,7 @@ function resolve_fascist_test() {
insert_after_active_node(create_seq_node(hero_point_actions));
}
} else {
- log(front_names[front] + ' Test failed:');
+ log('Test failed:');
}
const effect = test_passed ? test.pass : test.fail;
@@ -3078,9 +3079,6 @@ function insert_use_organization_medallion_node(
}
function update_bonus(bonus_id: number, status: number) {
- if (game.bonuses[bonus_id] === status) {
- return;
- }
game.bonuses[bonus_id] = status;
if (status === ON)
logi(`${bonus_names[bonus_id]} on`);