Good to know.
There are also cases where a "ground" or "naval" flag would be useful, like the following:
[effect_mountains_vision] type = "Unit_Vision_Radius_Sq" value = 4 reqs = { "type", "name", "range", "present" "Terrain", "Mountains", "Local", TRUE ; "UnitClass", "Land", "Local", FALSE ; "UnitClass", "Small Land", "Local", FALSE ; "UnitClass", "Big Land", "Local", FALSE ; "UnitClass", "Merchant", "Local", FALSE "UnitClass", "Sea", "Local", FALSE "UnitClass", "Trireme", "Local", FALSE "UnitClass", "Helicopter", "Local", FALSE "UnitClass", "Air", "Local", FALSE "UnitClass", "Missile", "Local", FALSE }
I did not know the performance was noticeable in those cases. Btw, if flags are not used, what would be better for performance: 1 single effect with 5 requirements, or 4 effects with 1 requirement each one? There are cases with 6 and 3; or even 7 and 2 too.
Reply To bard
what would be better for performance: 1 single effect with 5 requirements, or 4 effects with 1 requirement each one?
Note: Had to use word "non-expensive" in the following, as my original comment got rejected as spam-like.
I don't think it makes sense to try to optimize on that level. What would be best on one freeciv version can very well be worse one with the next version because of some internal changes. In extreme cases you could gain something by ordering requirements smartly (if you have a requirement that is likely not to be fulfilled + non-expensive to check & another that is likely fulfilled + expensive to check, by placing the former first you make the requirement checking to terminate most of the time after performing just the non-expensive check) - and again, the "expensive checks" are what we most likely try to improve internally, so it can turn to be the least expensive one, e.g., just a lookup from some cache, on the next release.
There are some cases where "Missile" should be included, and others where it should not be. Likely we need two separate Unit Class Flags, and term "Aerial" sounds like it includes Missiles. Maybe have the other by name "AirVehicle"?
civ2iv3 would benefit from "Aerial" user unit class flag. So long requirement lists to exclude every other unit class except "Air" and "Helicopter" could be turned to just to requirement of one unit class flag.
There's also other long requirement lists where user flags might help.