diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-03-24 22:39:13 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-05-03 18:48:16 +0200 |
commit | 878d5e4da8db7f419c01dd0ffef890b000ce8d64 (patch) | |
tree | e519cd536cbcc896debb66fb5326d4061e3e26bb | |
parent | 4a374a395750dd97f375871d72764b4c5a74b784 (diff) | |
download | andean-abyss-878d5e4da8db7f419c01dd0ffef890b000ce8d64.tar.gz |
Automatic Earnings.
-rw-r--r-- | rules.js | 61 |
1 files changed, 15 insertions, 46 deletions
@@ -4831,56 +4831,25 @@ function calc_cartels_earnings() { function goto_resources_phase() { game.prop.step = 3 log_h2("Resources Phase") - game.current = GOVT - game.state = "govt_earnings" -} -states.govt_earnings = { - prompt() { - view.prompt = `Earnings: Government +${calc_govt_earnings()} Resources.` - gen_action_resources(GOVT) - }, - resources(f) { - log("Government +" + calc_govt_earnings() + " Resources") - add_resources(GOVT, calc_govt_earnings()) - game.state = "farc_earnings" - }, -} + let govt_earnings = calc_govt_earnings() + let farc_earnings = calc_farc_earnings() + let auc_earnings = calc_auc_earnings() + let cartels_earnings = calc_cartels_earnings() -states.farc_earnings = { - prompt() { - view.prompt = `Earnings: FARC +${calc_farc_earnings()} Resources.` - gen_action_resources(FARC) - }, - resources(_) { - log("FARC +" + calc_farc_earnings() + " Resources") - add_resources(FARC, calc_farc_earnings()) - game.state = "auc_earnings" - }, -} + log("Government +" + govt_earnings + " Resources") + add_resources(GOVT, govt_earnings) -states.auc_earnings = { - prompt() { - view.prompt = `Earnings: AUC +${calc_auc_earnings()} Resources.` - gen_action_resources(AUC) - }, - resources(_) { - log("AUC +" + calc_auc_earnings() + " Resources") - add_resources(AUC, calc_auc_earnings()) - game.state = "cartels_earnings" - }, -} + log("FARC +" + farc_earnings + " Resources") + add_resources(FARC, farc_earnings) -states.cartels_earnings = { - prompt() { - view.prompt = `Earnings: Cartels +${calc_cartels_earnings()} Resources.` - gen_action_resources(CARTELS) - }, - resources(_) { - log("Cartels +" + calc_cartels_earnings() + " Resources") - add_resources(CARTELS, calc_cartels_earnings()) - goto_drug_profits() - }, + log("AUC +" + auc_earnings + " Resources") + add_resources(AUC, auc_earnings) + + log("Cartels +" + cartels_earnings + " Resources") + add_resources(CARTELS, cartels_earnings) + + goto_drug_profits() } function goto_drug_profits() { |