[Freeciv-Dev] [bug #19874] Effects affecting cities can't depend on city tile properties

2013-09-09 Thread Marko Lindqvist
Update of bug #19874 (project freeciv):

  Status:  Ready For Test => Fixed  
 Assigned to:None => cazfi  
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

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


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


[Freeciv-Dev] [bug #19874] Effects affecting cities can't depend on city tile properties

2013-09-07 Thread Marko Lindqvist
Update of bug #19874 (project freeciv):

Category:None => general
  Status:None => Ready For Test 
 Planned Release: => 2.5.0, 2.6.0   

___

Follow-up Comment #2:

Untested patches

(file #18905, file #18906)
___

Additional Item Attachment:

File name: CityBonusTile.patchSize:0 KB
File name: CityBonusTile-S2_5.patch   Size:0 KB


___

Reply to this item at:

  

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


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


[Freeciv-Dev] [bug #19874] Effects affecting cities can't depend on city tile properties

2012-06-30 Thread Marko Lindqvist
Follow-up Comment #1, bug #19874 (project freeciv):

> 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?

It seems that these get_xxx_bonus() functions were originally written so that
just the effects in our own rulesets would work, as opposed to make them more
generic. I've considered such failures to pass obvious parameters as bugs in
the past (fix for this one should certainly go to TRUNK and S2_4, I'm a bit
undecided about S2_3: it would create incentive for ruleset authors to create
rulesets that do not work in earlier 2.3.x releases)

> 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.

That's one reason why Max_Trade_Routes is defined never to cause removal of
existing traderoutes. I would just document the restrictions in the first
phase. Passing the tile would anyway make it work *better* (in my view that
failing to do so is a bug, not missing feature)

___

Reply to this item at:

  

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


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


[Freeciv-Dev] [bug #19874] Effects affecting cities can't depend on city tile properties

2012-06-30 Thread Jacob Nevins
URL:
  

 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:

  

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


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