URL:
  <http://gna.org/bugs/?19874>

                 Summary: Effects affecting cities can't depend on city tile
properties
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Sat Jun 30 11:33:47 2012
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: Any
         Planned Release: 

    _______________________________________________________

Details:

In bug #16308 (comment 5), David Fernandez complains:

'When I use the requeriment "Special", "River", "Adjacent" in my rulesets, it
seems to return always false, even when the city is placed near or over a
river.

'This code from effects.ruleset never works (it is supposed to give aqueduct
bonus in cities near rivers):'


[effect_aqueduct_river]
name    = "Size_Adj"
value   = 4
reqs    =
    { "type", "name", "range"
      "Special", "River", "Adjacent"
    }
nreqs   =
    { "type", "name", "range"
      "Building", "Aqueduct", "City"
    }


I've confimed this. The reason seems simple: get_city_bonus() passes the tile
argument of get_target_bonus_effects() as NULL.

It seems to me that it could easily pass city_tile(pcity) and thus enable
effects such as the above. Is there any reason not to do so?

I believe this affects the following effects:
* Capital_City, Gov_Center
* Size_Adj, Size_Unlimit
* Growth_Food
* Rapture_Grow
* City_Radius_Sq, City_Vision_Radius_Sq
* Health_Pct
* Migration_Pct
* Trade_Revenue_Bonus, Max_Trade_Routes
* Pollu_Prod_Pct
* City_Build_Slots
* Airlift
* Happiness_To_Gold
* Make_Content_Mil_Per, Make_Content_Mil
* Martial_Law_Each, Martial_Law_Max
* Make_Happy, No_Unhappy, Make_Content, Force_Content
* Unhappy_Factor
* Defend_Bonus
* Visible_Walls, City_Image
* Unit_No_Lose_Pop
* Nuke_Proof
* Incite_Cost_Pct, No_Incite, Spy_Resistant
* HP_Regen

(As usual with effects, the tricky part is edge conditions -- whenever tile
properties change, knock-on effects on all the above need to be reviewed.
Perhaps that will mostly Just Work, but I guess it needs an audit.)




    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to