summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-05-02 15:15:36 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-03 18:48:16 +0200
commit6bb0a56bad375b3ceaa1cf41dd8e0e247578f735 (patch)
treea67de0b8260736aa0b06234d34ae18a41e1b0176
parent676c67ddcdc0f702baa216315028267c5363b806 (diff)
downloadandean-abyss-6bb0a56bad375b3ceaa1cf41dd8e0e247578f735.tar.gz
Process logging.
-rw-r--r--rules.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/rules.js b/rules.js
index 5f7855a..6b7e631 100644
--- a/rules.js
+++ b/rules.js
@@ -5565,20 +5565,25 @@ states.process = {
},
piece(p) {
push_undo()
+ log_action("Process - Remove Bases")
+ game.sa.count = 0
do_process_remove_base(p)
},
}
function do_process_remove_base(p) {
- log_space(piece_space(p), "Process")
- logi("Removed Cartels Base")
+ logi("S" + piece_space(p))
remove_piece(p)
add_resources(CARTELS, 3)
- if (has_pieces_on_map(CARTELS, BASE))
+ game.sa.count += 3
+
+ if (has_pieces_on_map(CARTELS, BASE)) {
game.state = "process_remove_bases"
- else
+ } else {
+ logi_resources(CARTELS, game.sa.count)
end_special_activity()
+ }
}
states.process_place_shipments = {
@@ -5621,7 +5626,7 @@ states.process_place_shipments = {
states.process_remove_bases = {
prompt() {
- view.prompt = "Process: Remove Cartels Bases for Resources."
+ view.prompt = "Process: Remove Cartels Bases for +3 Resources each."
for_each_piece(CARTELS, BASE, p => {
if (piece_space(p) !== AVAILABLE)
gen_action_piece(p)
@@ -5634,6 +5639,7 @@ states.process_remove_bases = {
},
end_process() {
push_undo()
+ logi_resources(CARTELS, game.sa.count)
end_special_activity()
},
}