<URL: http://bugs.freeciv.org/Ticket/Display.html?id=38245 >
Short analysis of trunk behavior. A save where sun tzu is available to build is attached. Confirmed that the UnitFlag on both effects introduce the strikeout; commenting out any of the nreqs removed the strike. [effect_sun_tzus_war_academy] name = "Veteran_Build" value = 1 reqs = { "type", "name", "range" "Building", "Sun Tzu's War Academy", "Player" "UnitClass", "Land", "Local" } nreqs = { "type", "name", "range" "UnitFlag", "Diplomat", "Local" } [effect_sun_tzus_war_academy_1] name = "Veteran_Combat" value = 50 reqs = { "type", "name", "range" "Building", "Sun Tzu's War Academy", "Player" "UnitClass", "Land", "Local" } nreqs = { "type", "name", "range" "UnitFlag", "Diplomat", "Local" } Looked into is_unitflag_in_range in requirements.c and changed it to test. It accepts that target_unittype is NULL (which it is when we test for improvement obsoleteness), and in that case it returns TRUE for is_unitflag_in_rage, with makes the nreq enabled and the effect disabled! Is this behavior needed?: /* If no target_unittype is given, we allow the req to be met. This is * to allow querying of certain effect types (like the presence of city * walls) without actually knowing the target unit. */ No idea how to work around this yet.
sun-tzu-redundant.sav.gz
Description: GNU Zip compressed data
_______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev