Page 1 of 1

Consistent NoUpgrade flag

Posted: Sat Nov 20, 2021 5:21 am
by soundnfury
In my ruleset, I have a NoUpgrade flag that controls the Upgrade action, so that some units can be obsoleted (to declutter the build list) without being able to be upgraded (which e.g. in some cases bypasses an impr_req on the new unit).

Code: Select all

[actionenabler_upgrade_unit]
action = "Upgrade Unit"
actor_reqs    =
    { "type",    "name",       "range", "present"
      "DiplRel", "Foreign",    "Local", FALSE
      "UnitFlag", "NoUpgrade", "Local", FALSE
    }
However, if I have three units X → Y → Z (where → represents obsolete_by), and Y has the NoUpgrade flag, an X can still be directly upgraded to Z; I don't see any way to work around this.

So my request is that the Upgrade Unit action should check that the entire chain of obsolete_by would all pass the actionenabler individually (and if not, upgrade to the point where it fails, so that e.g. X can still upgrade to Y after inventing Z), rather than just looking at the endpoints.

Re: Consistent NoUpgrade flag

Posted: Sat Nov 20, 2021 9:30 am
by cazfi
Sounds like a real glitch. Please open a ticket: https://osdn.net/projects/freeciv/ticket/

Re: Consistent NoUpgrade flag

Posted: Sat Nov 20, 2021 1:00 pm
by soundnfury