From a091217236c2c201fe9977395ff6d2f9b297df66 Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Fri, 19 Feb 2021 08:06:02 +0100 Subject: [PATCH] sandbox: demonstrate gold theft. This version of gold theft rules are less complex than those I added to webperimental. A spy can perform the action "Steal Gold Escape" once Banking is discovered. See osdn #41609 --- data/sandbox/README.sandbox | 3 +++ data/sandbox/effects.ruleset | 30 ++++++++++++++++++++++++++++++ data/sandbox/game.ruleset | 16 ++++++++++++++++ 3 files changed, 49 insertions(+) diff --git a/data/sandbox/README.sandbox b/data/sandbox/README.sandbox index ae2d02501c..5be63c3d37 100644 --- a/data/sandbox/README.sandbox +++ b/data/sandbox/README.sandbox @@ -61,6 +61,9 @@ Leader unit can destroy domestic cities. Unit Expulsion: Foreign units can be expelled from the territory of a player. +Gold theft: +A Spy can steal gold from other players (unless you forget Banking). + Paradropping: It's impossible for green Paratroopers to land on Forest and Jungle tiles. Veteran, hardened and elite Paratroopers can still do it. diff --git a/data/sandbox/effects.ruleset b/data/sandbox/effects.ruleset index 85810bf01a..ee59d59a0e 100644 --- a/data/sandbox/effects.ruleset +++ b/data/sandbox/effects.ruleset @@ -4547,6 +4547,36 @@ reqs = "UnitFlag", "OneAttack", "Local", TRUE } +; The treasury is better guarded than the drinking water +; See "Poison City Escape" +[effect_steal_gold_escape_lower_chance] +type = "Action_Odds_Pct" +value = -25 +reqs = + { "type", "name", "range", "present" + "Action", "Steal Gold Escape", "Local", TRUE + } + +; Stealing money isn't nice +[effect_steal_gold_escape_incident_success] +type = "Casus_Belli_Success" +value = 1 +reqs = + { "type", "name", "range", "present" + "Action", "Steal Gold Escape", "Local", TRUE + "DiplRel", "War", "Local", FALSE + } + +; Cap the amount possible to steal at 30% of the treasury +[effect_steal_gold_max_stolen_base] +type = "Max_Stolen_Gold_Pm" +value = 300 + +; The Spy is honest enough to only steal 5% of the loot it stole +[effect_steal_gold_thiefs_share_base] +type = "Thiefs_Share_Pm" +value = 50 + [effect_unit_shield_value_recycle] type = "Unit_Shield_Value_Pct" value = -50 diff --git a/data/sandbox/game.ruleset b/data/sandbox/game.ruleset index ed9a721e34..2f448e30c9 100644 --- a/data/sandbox/game.ruleset +++ b/data/sandbox/game.ruleset @@ -838,6 +838,22 @@ target_reqs = "NationGroup", "Barbarian", "Player", FALSE } +; Give spies the ability to steal gold +[actionenabler_steal_gold] +action = "Steal Gold Escape" +actor_reqs = + { "type", "name", "range" + "UnitFlag", "Spy", "Local" + "UnitState", "OnLivableTile", "Local" + "MinMoveFrags", "1", "Local" + "Tech", "Banking", "Player" + "DiplRel", "Foreign", "Local" + } +target_reqs = + { "type", "name", "range", "present" + "NationGroup", "Barbarian", "Player", FALSE + } + [actionenabler_steal_tech_random] action = "Steal Tech" actor_reqs = -- 2.20.1