From 1dcf9d56455871f26e7fdbe665ec41ab6221791e Mon Sep 17 00:00:00 2001 From: iainp5 Date: Tue, 24 Sep 2024 07:32:43 +0100 Subject: Fix for Peasant Parties Revolt --- rules.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/rules.js b/rules.js index 537e4d6..ce94a24 100644 --- a/rules.js +++ b/rules.js @@ -1017,17 +1017,21 @@ states.draw_power_cards = { game.persistent_events['roundtable_talks'] = false } - /* if (game.persistent_events['peasant_parties_revolt'] { - - && game.com_pwr_hand_limit >=1) { + if (game.persistent_events['peasant_parties_revolt']) { + let farmer_check + for (let space of game.pieces) { + if (space && spaces[space.space_id].country === game.pwr_struggle_in && spaces[space.space_id].socio === 3 && space.demCtrl === 1) { + farmer_check = true + } + } + if (farmer_check && game.com_pwr_hand_limit > 0) { log('Democrat receives 1 cards from Communist due to C72') game.dem_pwr_hand_limit += 1 game.com_pwr_hand_limit -= 1 permanently_remove(72) game.persistent_events['peasant_parties_revolt'] = false } - - }*/ + } if (game.persistent_events['national_salvation_front'] && game.dem_pwr_hand_limit >=2 && (game.pwr_struggle_in === 'Romania' || game.pwr_struggle_in === 'Bulgaria')) { log('Communist receives 2 cards from Democrat due to C102') -- cgit v1.2.3