Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2004:
[Freeciv-Dev] (PR#11673) unit_can_help_build_wonder allows adjacent unit
Home

[Freeciv-Dev] (PR#11673) unit_can_help_build_wonder allows adjacent unit

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#11673) unit_can_help_build_wonder allows adjacent units?
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Dec 2004 17:33:09 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11673 >

In unit.c:

bool unit_can_help_build_wonder(const struct unit *punit,
                                const struct city *pcity)
{
   if (!is_tiles_adjacent(punit->tile, pcity->tile)
       && !same_pos(punit->tile, pcity->tile)) {
     return FALSE;
   }

   return (unit_flag(punit, F_HELP_WONDER)
          && punit->owner == pcity->owner
          && !pcity->is_building_unit
          && is_wonder(pcity->currently_building)
          && (pcity->shield_stock
              < impr_build_shield_cost(pcity->currently_building)));
}

this indicates that an adjacent unit can help build a wonder in the 
city.  This is no doubt an attempt to handle the auto-popup when a 
caravan moves into the city.  But I think it's a bug that could allow 
cheating.

-jason





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#11673) unit_can_help_build_wonder allows adjacent units?, Jason Short <=