[Freeciv-Dev] (PR#4260) Re: (PR#4332) get_defender bug
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I just hit another occurence of this bug. As a reminder the anatomy of
the bug is as follows:
A transport of player A carries a unit of player B and player C considers
attacking them. If C-allied-A, then the transport is ignored by
get_defender and it looks as if land unit of B is in the sea on it's own.
I advocated a change to get_defender, since the above situation is not
wrong (or wrong outside jurisdiction of get_defender function).
Why it could be wrong? The only case when the above bug surfaces is when
there is a LLH triangle: A-allied-C, A-allied-B (so that the transport can
carry the unit) and B-war-C. LLH triangle has been recently outlawed by
Per, but not quite: B-war-C apperently includes the situation when
B-no_contact-C. Which is not impossible.
Here are my recommendations:
1. DS_NO_CONTACT should be considered as neutral, because you cannot
attack a no-contact player. As your unit approaches their unit, you
establish contact and the state changes to DS_NEUTRAL (function
make_contact), so the attack is impossible.
2. get_defender should return a defender irrespectfully of alliances (what
if AI wants to consider feasibility of attack on it's now-ally?).
Corresponding changes should be made to handle_unit_move_request, to
prevent actual attack against allies.
Please comment,
G.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#4260) Re: (PR#4332) get_defender bug,
Gregory Berkolaiko <=
|
|