HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...
Limit attack from transport to only some transport types
There are transports that can't disembark units in the open that though can attack from the transports. There are already rulesets for 2.x that use it. But we don't want marines to strike from transport planes. We can use the req "UnitState", "Transported" to prohibit the attack but the marines should be able to attack from boats (that are also unreachable i some rulesets, btw). There should be some solution on it.
I propose adding "TransporterClass" and "TransporterFlag" local requirements (probably acting recursive up the transport stack?). Alternative solution would be redesign of the "Unreachable" system, maybe with putting units on terrain levels, and control of the levelof attacker and target.
#1 Updated by Alexandro Ignatiev about 1 year ago
Actually, an alternative solution would be some initial version of elevation system described here http://forum.freeciv.org/f/viewtopic.php?f=13&t=91253&p=101665Just introduce an effect that assigns a value to each non-transported unit and by cascade to all its cargo. The effect is fired any time when:
- the unit is created
- the unit changes its tile
- a city is built or destroyed at the unit's tile
- the unit's tile changes terrain or extra set (at least, ones native to the unit)
- maybe when the unit starts and finishes an action (calculated towards the target tile) but that needs better thinking and is not needed for this particular task.
The current value for each unit (got by the effect or from its transport) is accessible from a requirement that may be used in action enablers. But per point (7) from the forum post we must be sure that the unit will find its way (well, any action enablers are not tied to pathfinder yet, afaik), and at least explain the AI that certain attacks are not posdible (see osdn#42575 https://osdn.net/projects/freeciv/ticket/42575 )