From 31c91a4441fff0e24534d5004be809ed55e6b5f6 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 28 Apr 2023 01:43:21 +0200 Subject: Fix Cultivate placement (only in Rally _Department_). --- play.js | 6 +++--- rules.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/play.js b/play.js index d870438..cbac289 100644 --- a/play.js +++ b/play.js @@ -364,7 +364,7 @@ function create(t, p, ...c) { function register_action(e, action, id) { e.my_action = action e.my_id = id - e.onclick = on_click_action + e.onmousedown = on_click_action } function is_action(action, arg) { @@ -580,7 +580,7 @@ function init_ui() { my_id: id, my_x_offset: x, my_y_offset: y, - onclick: on_click_action + onmousedown: on_click_action }) document.getElementById("pieces").appendChild(e) return e @@ -1421,7 +1421,7 @@ function sub_card(match, p1) { function sub_space(match, p1) { let x = p1 | 0 let n = data.space_name[x] - return `${n}` + return `${n}` } function on_log(text) { diff --git a/rules.js b/rules.js index 0a54d51..0ebc435 100644 --- a/rules.js +++ b/rules.js @@ -5458,7 +5458,7 @@ function goto_cultivate() { states.cultivate = { prompt() { - view.prompt = "Cultivate: Select Department or City to place or relocate Base." + view.prompt = "Cultivate: Relocate Base to City or Department (or place if Rally Department)." for (let s = first_pop; s <= last_pop; ++s) if (can_cultivate_in_space(s)) gen_action_space(s) @@ -5466,7 +5466,7 @@ states.cultivate = { space(s) { push_undo() game.sa.where = s - if (is_selected_op_space(s) && game.op.type === "Rally") { + if (is_selected_op_space(s) && is_dept(s) && game.op.type === "Rally") { if (auto_place_piece(s, CARTELS, BASE)) { log_space(game.sa.where, "Cultivate") logi("Placed Cartels Base") -- cgit v1.2.3