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: Sat, 16 Nov 2002 12:33:47 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Tue, 2002-11-12 at 23:52, Per I. Mathisen via RT wrote:
> On Sun, 10 Nov 2002, Thomas Strub via RT wrote:
> > when jumping with a Paratrooper into an empty city of people with status
> > neutral, the Paratrooper is in the enemy city.
> 
> Patch attached.
>  
> If you aren't in war, and know the city is there, you
> won't be allowed to drop. 

I think you should know and see that the city is there. (fog_of_war...)

> If you aren't in war and you don't know, you die
> on the drop but get to see stuff around the city.

This behavior is questionable, but I decided not to object to this, for
the moment, thus letting a proper fix have its way to beta and cvs.

Can I say that do_paradrop() is badly flawed?!?

Now, About the patch:

> +  if (map_get_player_tile(dest_x, dest_y, pplayer)->city) {
> +    notify_player_ex(pplayer, dest_x, dest_y, E_NOEVENT,
> +                  _("Game: You are not at war with %s."), pplayer->name);
> +    return FALSE;    
> +  }

This is completely wrong.
If can easily test what happen if:

- you try to paradrop in one of your (or your ally) known cities
- you try to paradrop in one empty city of a player to which you are in
war.

Moreover, if you try to paradrop into a city that is the known but not
seen (fog_of_war on), you are prompted to first declare war.
This may be correct, but what you think of the case in which the city
has been destroyed or disbanded and you don't know?

My choice: if the tile is known but not seen (thus fogged) you're
allowed to paradrop, but you'll take the risk (your paratroop can be
killed)

Last, but not least, I think that you should check if you're trying to
paradrop on a stack of units belonging to player to whom you're not in
(peace, cease-fire, neutral).

(I have also changed the notify test, but that was a minor issue)
 
> -  if (is_non_allied_unit_tile
> -      (map_get_tile(dest_x, dest_y), unit_owner(punit))) {
> +  if (is_non_allied_unit_tile(ptile, pplayer)
> +      || (ptile->city && !pplayers_at_war(pplayer, 
> city_owner(ptile->city)))) {

Also this is wrong, for the same reason outlined above, and for another
good reason!

What happen if you paradrop in a city, belonging to one of your allies,
and that you don't know?...

I will shortly submit a new patch

P.S.
Last famous words:
Per: "You need 2 days for reviewing Paratroop patch?!?"




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