From 40dd5d3e05e15c86d91575779905bcec5c508241 Mon Sep 17 00:00:00 2001 From: Edward Cree Date: Mon, 10 Jan 2022 08:18:59 +0000 Subject: [PATCH] HP regen softcoding for Classic ruleset --- data/classic/effects.ruleset | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/data/classic/effects.ruleset b/data/classic/effects.ruleset index d71aa5af94..a43c2c913f 100644 --- a/data/classic/effects.ruleset +++ b/data/classic/effects.ruleset @@ -118,6 +118,34 @@ reqs = type = "Tech_Upkeep_Free" value = 3 +; Basic HP regen. Not for helis, as they have hp_loss_pct=10 +; All unit-types' hitpoints are divisible by 10, so no need to worry about rounding +[effect_hp_regen_base] +type = "HP_Regen" +value = 10 +reqs = + { "type", "name", "range", "present" + "UnitClass", "Helicopter", "Local", FALSE + } + +; When hardcoded, effect_hp_regen_base was applied after the HP_Regen_Min +[effect_hp_regen_min_base] +type = "HP_Regen_Min" +value = 10 +reqs = + { "type", "name", "range", "present" + "UnitClass", "Helicopter", "Local", FALSE + } + +; Units in cities regenerate at least 1/3 of their HP regardless +[effect_hp_regen_min_city] +type = "HP_Regen_Min" +value = 34 +reqs = + { "type", "name", "range" + "CityTile", "Center", "Local" + } + ; Fortress HP regen [effect_fortress_hp_regen] type = "HP_Regen" @@ -136,6 +164,23 @@ reqs = "Activity", "Fortified", "Local" } +[effect_fortified_hp_regen] +type = "HP_Regen" +value = 10 +reqs = + { "type", "name", "range" + "Activity", "Fortified", "Local" + } + +; When hardcoded, effect_fortified_hp_regen was applied after the HP_Regen_Min +[effect_fortified_hp_regen_min] +type = "HP_Regen_Min" +value = 10 +reqs = + { "type", "name", "range" + "Activity", "Fortified", "Local" + } + [effect_city_fortified] type = "Fortify_Defense_Bonus" value = 50