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: "Raimar Falke via RT" <rt@xxxxxxxxxxxxxx>
Date: Sun, 17 Nov 2002 14:25:47 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Sun, Nov 17, 2002 at 10:01:56AM -0800, Davide Pagnin via RT wrote:
> 
> > 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).

Problem here is that the function name "pplayers_at_war" suggestes
something other that the comment "returns true iff players can attack
each other" and the code says. So I'm for creating a "proper"
pplayers_at_war and for renaming the existing pplayers_at_war to
pplayers_can_attack which is just a "return pplayers_at_war() ||
DS_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()?

What if we avoid this problem by not letting the unit paradrop to such
map positions? A message like "You first have to flight over the area"
or "Please use your ground troops to examine the terrain before" would
be given. The player than can try againe a tile left or right or just
3 tiles north. This can't be exploited since the density of such tiles
should a low. Related to this is the idea to just choose a random save
position and paradrop to this.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "> WHY?! Isn't it better to put $(shell cat cscope.files) on the list of
  I only have a yellow belt in makefile kungfu.  These fancy gnu make things
  are relatively new to some of us..."
    -- Mark Frazer to Vassilii Khachaturov in linux-kernel



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