Consistent NoUpgrade flag
Posted: Sat Nov 20, 2021 5:21 am
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).
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.
Code: Select all
[actionenabler_upgrade_unit]
action = "Upgrade Unit"
actor_reqs =
{ "type", "name", "range", "present"
"DiplRel", "Foreign", "Local", FALSE
"UnitFlag", "NoUpgrade", "Local", FALSE
}
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.