Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2001:
[Freeciv-Dev] Re: Wrong sequence of defending units (PR#796)
Home

[Freeciv-Dev] Re: Wrong sequence of defending units (PR#796)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Thue <thue@xxxxxxx>
Cc: Christian Knoke <ChrisK@xxxxxxxx>, Freeciv Developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Wrong sequence of defending units (PR#796)
From: Tony Stuckey <stuckey@xxxxxxxxxxxxxxxxx>
Date: Tue, 5 Jun 2001 10:44:28 -0500

On Tue, Jun 05, 2001 at 01:39:08AM +0200, Thue wrote:
> In the case in point you may want to not choose the ironclad, as it has a 
> penalty being in port. A wise choice would be to save it so it could use it's 
> full force later.

        This is not true.  Ships defending cities have their firepower
reduced to 1, but Ironclads already have a firepower of 1.  There is no
specific penalty that the Ironclad falls under.
        However, the attack/defense values posted do seem to point to
another bug, which may or may not be the same as a "pearl harbor" bug
previously discussed.  The attacker firepower is reduced to 1 versus the
land units, but not versus the sea unit.  I think that should happen for all
units.

server/unittools.c:unit_versus_unit():
  /* pearl harbour */
  if (is_sailing_unit(defender) && map_get_city(defender->x, defender->y))
    defense_firepower = 1;

  /* In land bombardment both units have their firepower reduced to 1 */
  if (is_sailing_unit(attacker)
      && map_get_terrain(defender->x, defender->y) != T_OCEAN
      && is_ground_unit(defender)) {
    attack_firepower = 1;
    defense_firepower = 1;
  }

        Basically, I'm not sure why the is_ground_unit(defender) is in the
second code clause.
-- 
Anthony J. Stuckey                              stuckey@xxxxxxxxxxxxxxxxx
"And they said work hard, and die suddenly, because it's fun."
        -Robyn Hitchcock.


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