Follow-up Comment #4, bug #16308 (project freeciv):

> Would it be possible to give this defense bonus to every unit placed inside
your national borders?

No. S2_2 has some requirement types that check tiles (like "Special",
"Terrain", "TerrainClass", "Base", "TerrainAlter", "CityTile"), but none of
these can check national borders.

> or to every unit in some of the tiles owned by your cities (workable
tiles)?

No. "CityTile" of S2_2 can only check for city centers ("center"), not for
workable tiles.

> or to every unit in same continent than the Great walls?

Yes, try this:


[effect_great_wall]
name    = "Defend_Bonus"
value   = 200
reqs    =
    { "type", "name", "range"
      "Building", "Great Wall", "Continent"
      "UnitClass", "Land", "Local"
    }

[effect_great_wall_0]
name    = "Defend_Bonus"
value   = 200
reqs    =
    { "type", "name", "range"
      "Building", "Great Wall", "Continent"
      "UnitClass", "Helicopter", "Local"
    }


A comment at common/requirements.c:703 claims, _' At present, "Continent"
effects can affect only cities and units in cities.'_ So there is no way to
give bonus to units who are on continent but not in cities!

>From common/combat.c:442, "Defend_Bonus" only knows three facts:

* the player of the _defending_ unit.
* the _defending_ city.
* the type of the _attacking_ unit.

If there is no city, then the check has no information about the location of
the unit. This is why "Continent" requires a city. "Continent", like
"Player", checks the player. Because of this bug, "Defend_Bonus" checks the
player of the defending unit (not the defending city).

The result is a Great Wall that checks the continent of the defending city
(not the defending unit) and the player of the defending unit (not the
defending city).

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?16308>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to