From 2f2060971094e7e5f952a15da503eafd58308cf1 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 11 Oct 2024 16:40:17 +0200 Subject: Fix "place or remove insurgent base" event. ... when trying to place a base from elsewhere --- rules.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rules.js b/rules.js index a7b7fde..36605e5 100644 --- a/rules.js +++ b/rules.js @@ -7916,12 +7916,12 @@ states.vm_place_or_remove_insurgent_base = { }, piece(p) { push_undo() - if (piece_space(p) === AVAILABLE) { - log("Placed " + piece_name(p) + " in S" + game.vm.s + ".") - place_piece(p, game.vm.s) - } else { + if (piece_space(p) === game.vm.s) { log("Removed " + piece_name(p) + " from S" + game.vm.s + ".") remove_piece(p) + } else { + log("Placed " + piece_name(p) + " in S" + game.vm.s + ".") + place_piece(p, game.vm.s) } vm_next() }, -- cgit v1.2.3