Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: (PR#2293) Paratroopers jumping into an empty city
Home

[Freeciv-Dev] Re: (PR#2293) Paratroopers jumping into an empty city

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ue80@xxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2293) Paratroopers jumping into an empty city
From: "Davide Pagnin via RT" <rt@xxxxxxxxxxxxxx>
Date: Sun, 17 Nov 2002 10:01:56 -0800
Reply-to: rt@xxxxxxxxxxxxxx

> SPECIAL NOTE:
> The patch uses pplayer_non_attack() function that consider
> non_attackable diplomatic status as: neutral, cease-fire, peace.
> 
> This implies that a paradrop in a tile where an empty city owned by a
> player to whom you are in no_contact status, is allowed (at the moment).
> We should decide who to rule this out.
> pplayer_non_attack, reads in the comment, that "you can attack" such a
> player, thus there are no reason for not letting the paradrop being
> successful...

Ok, I found that allowing this is wrong.

If you paradrop in an empty city of someone you are not in contact to,
the paratrooper is successful but the city isn't conquered.

This will crash the server, at the end of turn, because of sanity
checks, and moreover it should not be allowed to have not-allied unit
inside a city.

Which should be the correct fix for this problem?

The root of all evil came from pplayers_war() function, that returns
true, even if players are indeed in a NO_CONTACT diplomatic status.
(and its twin brother pplayers_non_attack() that exclude NO_CONTACT).

Some consideration:

1) We can let people declare war automatically if they paradrop in a
not_known no_contact empty city (fixing the problem that the paratrooper
enter a city to which we are not in *real* WAR).
I have to say that this should be the correct answer if we agree that
the pplayer_at_war() function do return TRUE if we are in NO_CONTACT...

2) We can instead kill the paratrooper if he paradrop in a not_known
no_contact empty city (as we do for neutral, peace or cease-fire).
This is perhaps easy, but then we need to make_contact() happen before
the paradrop.

3) What should happen if we paradrop on a stack of unit that contain
units of a nation we are in no_contact status, should we need to
make_contact()?

Let me know your thoughts, this fix (partial or complete) need to find
its way before 1.14.0.

        Ciao,Davide




[Prev in Thread] Current Thread [Next in Thread]