From 1f62a4e966f5ba60adc69beeb67a37b4ab852f01 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C5=82awomir=20Lach?= <slawek@lach.art.pl>
Date: Mon, 1 Aug 2022 14:11:45 +0200
Subject: [PATCH] =?UTF-8?q?!OSDN=2045072:=20S=C5=82awomir=20Lach=20<slawek?=
 =?UTF-8?q?@lach.art.pl>?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Ruleset author can look inside sandbox to figure
out how to use counters.
---
 data/sandbox/effects.ruleset | 28 ++++++++++++++++++++++++++++
 data/sandbox/game.ruleset    | 24 ++++++++++++++++++++++++
 2 files changed, 52 insertions(+)

diff --git a/data/sandbox/effects.ruleset b/data/sandbox/effects.ruleset
index c204910511..175d94cea8 100644
--- a/data/sandbox/effects.ruleset
+++ b/data/sandbox/effects.ruleset
@@ -5410,3 +5410,31 @@ reqs    =
     { "type",   "name",         "range", "present"
       "Action", "Upgrade Unit", "Local", TRUE
     }
+
+; Additional unhappy for some turns after conquering the city
+[effect_rebel]
+type = "Enemy_Citizen_Unhappy_Pct"
+value = 30
+reqs =
+  { "type", "name", "range", "present", "quiet"
+     "Counter", "Owned", "City", FALSE, TRUE
+    
+  }
+
+[effect_rebel2]
+type = "Enemy_Citizen_Unhappy_Pct"
+value = 20
+reqs =
+  { "type", "name", "range", "present", "quiet"
+     "Counter", "Owned2", "City", FALSE, TRUE
+    
+  }  
+  
+[effect_strike1]
+type = "Output_Add_Tile"
+value = -1
+reqs =
+  { "type", "name", "range", "present", "quiet"
+     "Counter", "Owned3", "City", FALSE, TRUE
+  }  
+    
diff --git a/data/sandbox/game.ruleset b/data/sandbox/game.ruleset
index 5de8a3d98b..073e32f1c4 100644
--- a/data/sandbox/game.ruleset
+++ b/data/sandbox/game.ruleset
@@ -3588,6 +3588,30 @@ colorlist =
 ; _("Team 4"),
 ; etc...
 
+[counter_owned1]
+name = "Owned"
+def = 0
+checkpoint = 5
+type = "OWNED"
+range = "City"
+
+
+[counter_owned2]
+name = "Owned2"
+def = 0
+checkpoint = 7
+type = "OWNED"
+range = "City"
+
+; Default value are 6, so citizens do not strike right after build the city
+; city may to be conquered to made citizens striking
+[counter_owned3_strike]
+name = "Owned3"
+def = 6
+checkpoint = 5
+type = "OWNED"
+range = "City"
+
 [settings]
 ; freeciv game settings for sandbox ruleset
 ;
-- 
2.37.1

