Summary: Great Wall protects wrong units
                 Project: Freeciv
            Submitted by: kernigh
            Submitted on: Tuesday 07/27/2010 at 01:10
                Category: rulesets
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 2.2.1+ r17591
         Discussion Lock: Any
        Operating System: *BSD
         Planned Release: 



Let player C have the Great Wall. Help text says, "Works as a City Wall in
all your cities." I would expect the Great Wall to protect all units in
cities, where the _cities_ belong to player C. The bug is that the Great Wall
protects all units in cities, where the _units_ belong to player C. (I have
r17591 of S2_2, which has the fix from bug #16080 that actually requires
units to be in cities.)

If player C has alliance with player K, then Great Wall protects whom? Units
of K in cities of C, or units of C in cities of K? I attach
x-great-wall-test.sav.bz2 which shows exactly this problem. (I made this game
with the editing-mode.)

Load x-great-wall-test.sav.bz2 and take player S (Scottish), who is attacking
player C (Chinese) and player K (Korean). Cities marked [C] have three Chinese
defenders; cities marked [K] have three Korean defenders. All units are green

* Guangzhou [C] and Shanghai [K] are Chinese cities.
* Wanggomsong [C] and Jolbon [K] are Korean cities with no walls.
* Ungjin [C] and Wandu [K] are Korean cities with City Walls.

Kill all defenders, but never conquer cities. (They might be homecities of
other defenders.) Shanghai [K] and Jolbon[K] are easy to kill; the four other
cities are difficult to kill.

* Guangzhou [C] is a Chinese city with Chinese defenders. Difficult to kill.
Chinese Great Wall protects defenders. No bug.
* Shanghai [K] is a Chinese city with Korean defenders. Easy to kill! Chinese
Great Wall fails to protect Korean defenders in a Chinese city! This is bug.
* Wanggomsong [C] is a Korean city with Chinese defenders. Difficult to kill!
Chinese Great Wall protects Chinese units in a Korean city! This is bug.
* Jolbon [K] is a Korean city with Korean defenders. Easy to kill. No bug.
* Ungjin [C] and Wandu [K] have City Walls. Difficult to kill. No bug.

Chinese Great Wall prevents loss of population in Shanghai [K], but not in
Wanggomsong [C]. This is correct.

I thought that Chinese Great Wall and Korean City Walls might combine to add
protection to Ungjin [C], but this seems not to happen.

These are the current rules in effects.c:

name    = "Defend_Bonus"
value   = 200
reqs    =
    { "type", "name", "range"
      "Building", "Great Wall", "Player"
      "UnitClass", "Land", "Local"
      "CityTile", "Center", "Local"

name    = "Defend_Bonus"
value   = 200
reqs    =
    { "type", "name", "range"
      "Building", "Great Wall", "Player"
      "UnitClass", "Helicopter", "Local"
      "CityTile", "Center", "Local"

This says to protect all Chinese units in any city (if the attacker is land
or helicopter unit). I would change this to say to protect any unit in all
Chinese cities, if I knew a way.


File Attachments:

Date: Tuesday 07/27/2010 at 01:10  Name: x-great-wall-test.sav.bz2  Size:
10kB   By: kernigh
play as Scottish; attack Chinese and Korean cities


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to