From b4af2a71d5da416a545501f39f0a3d9574796950 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 1/2] =?UTF-8?q?!OSDN=2047292:=20S=C5=82awomir=20Lach=20<sl?=
 =?UTF-8?q?awek@lach.art.pl>?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Introducing unit counter framework - data only
It does nothing - only for testing
---
 data/sandbox/effects.ruleset | 28 ++++++++++++++++++++++++++++
 data/sandbox/game.ruleset    | 31 +++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+)

diff --git a/data/sandbox/effects.ruleset b/data/sandbox/effects.ruleset
index b33cfdd1b9..1c0a3d5653 100644
--- a/data/sandbox/effects.ruleset
+++ b/data/sandbox/effects.ruleset
@@ -5367,3 +5367,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 = -100
+reqs =
+  { "type", "name", "range", "present", "quiet"
+     "Counter", "Owned3", "City", FALSE, TRUE
+  }  
+
diff --git a/data/sandbox/game.ruleset b/data/sandbox/game.ruleset
index 5cb41ac482..fb37a61584 100644
--- a/data/sandbox/game.ruleset
+++ b/data/sandbox/game.ruleset
@@ -862,6 +862,37 @@ colorlist =
 ; _("Team 4"),
 ; etc...
 
+
+[counter_owned1]
+name = "Owned"
+def = 0
+checkpoint = 5
+type = "OWNED"
+target = "City"
+
+
+[counter_owned2]
+name = "Owned2"
+def = 0
+checkpoint = 7
+type = "OWNED"
+target = "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"
+target = "City"
+
+[counter_unit_test]
+name = "Unit"
+def = 0
+checkpoint = 5
+target = "Unit"
+
 [settings]
 ; freeciv game settings for sandbox ruleset
 ;
-- 
2.40.0

