New 3.1 unit type field tp_defense

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Post Reply
Dino the Dinosore
Hardened
Posts: 183
Joined: Sun Dec 31, 2017 3:41 am

New 3.1 unit type field tp_defense

Post by Dino the Dinosore »

New unit type field tp_defense tells if unit can defend while transported. Has 2 values -
"Blocked" - Can't defend when transported
"Alight" - Can defend if can alight or unload (current default)

But I'd like to have Marines defend a ship transporting them, even when not in a port (so they can't alight or unload). I tried experimenting with Attack action enabler with target reqs

Code: Select all

target_reqs={"type","name","range","present"
"UnitType","Marines","Local",TRUE
"UnitState","Transported","Local",TRUE
}
but that doesn't help. Maybe the field tp_defense takes precedence over action enablers?
If I could use action enablers, I'd allow Marines to defend, while transported, against all naval units except submarines, and against Helicopters. Or would be good to have 3rd value for the field - "Always".
cazfi
Elite
Posts: 3290
Joined: Tue Jan 29, 2013 6:54 pm

Re: New 3.1 unit type field tp_defense

Post by cazfi »

Dino the Dinosore wrote: Mon Mar 03, 2025 4:49 amOr would be good to have 3rd value for the field - "Always".
That's in freeciv-3.2.
Post Reply