From dc84c17947724731c968efe232f7917f563b4782 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sat, 10 May 2025 19:46:50 +0300
Subject: [PATCH 51/51] Make Shield2Gold_Pct to consider individual unit's
 properties

See RM #1349

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 common/unittype.c  | 5 ++++-
 doc/README.effects | 2 --
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/common/unittype.c b/common/unittype.c
index f313563892..8df69de464 100644
--- a/common/unittype.c
+++ b/common/unittype.c
@@ -159,7 +159,10 @@ int utype_upkeep_cost(const struct unit_type *ut, const struct unit *punit,
     gold_upkeep_factor = get_target_bonus_effects(NULL,
                                   &(const struct req_context) {
                                     .player   = pplayer,
-                                    .unittype = ut
+                                    .unittype = ut,
+                                    .unit     = punit,
+                                    .tile     = ptile,
+                                    .city     = pcity
                                   },
                                   NULL, EFT_SHIELD2GOLD_PCT);
 
diff --git a/doc/README.effects b/doc/README.effects
index e42fe6741c..5231d8ceb3 100644
--- a/doc/README.effects
+++ b/doc/README.effects
@@ -655,8 +655,6 @@ Revolution_Unhappiness
 Shield2Gold_Pct
     Factor in percent for the conversion of unit shield upkeep to gold upkeep.
     A value of 200 would transfer 1 shield upkeep to 2 gold upkeep.
-    This works on unit type granularity, properties of individual units
-    do not count.
 
 Shrink_Food
     Food left after cities shrink is amount percent of the capacity of
-- 
2.47.2

