bugFreeciv - Bugs: bug #19499, Some buildings costing upkeep...

 
 
Show feedback again

bug #19499: Some buildings costing upkeep money not considered for forced selling

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Sat 25 Feb 2012 01:29:38 PM UTC  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Assigned to: NoneOpen/Closed: Open
Release: Operating System: None
Planned Release: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 25 Feb 2012 05:49:34 PM UTC, comment #1:

> City has already sold building this turn.


Turns out that this is not limitation in list construction phase either. can_city_sell_building() used returns whether city can ever sell building, it does not consider if city has already sold this turn.
So at least this part of bug is invalid. It makes sense to discard rule about selling just one building / city when selling is automatically forced for lack of upkeep.

My claim that no money is given for forced selling (but only upkeep money restored) turned out bogus too. This uses do_sell_building() which takes care of paying the seller.

I wonder if we actually should force the sell only one building / city / turn here in such a way that player is payed for max one building. Others are lost due to lack of upkeep, so only money that would have been spent on upkeep should be returned.

From the reproducible bug my investigation started from it's obvious that such an rare case can happen. Since selling first building for sensible sum of money wasn't enough, it was trying to sell more of them (but failed to do so as it tried with same one due to bug #19494)

So, this bug is down to question how we should handle wonders with upkeep. Their existence can lead to negative balance, but they are not sold to get money back. If player has no normal buildings left to sell...

Marko Lindqvist <cazfi>
Project Administrator
Sat 25 Feb 2012 01:29:38 PM UTC, original submission:

Reserving bug #19494 for single bug of constructing cityimpr list with identical entries, I open separate tickets for other problems I've noticed in forced sell code.

While list of potential buildings to sell is constructed, can_city_sell_building() check is used, yet we assume that selling all the buildings in that list alone always brings treasury to at least zero. What if there are unsellable buildings with upkeep. They took many, but that cannot be restored by forced selling them. I can think two cases:
- Wonder with upkeep. Do we support that in the first place, or should we sanity check rulesets against it?
- City has already sold building this turn. Note that limitation of selling only one building / turn applies only in construction of the list. If all the buildings in the city end to the list (city had not sold anything), later loop to sell buildings is happy to sell them all, not just one / city.

Marko Lindqvist <cazfi>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 25 Feb 2012 05:49:34 PM UTCcazfiSummaryBuildings costing upkeep money not considered for forced selling=>Some buildings costing upkeep money not considered for forced selling
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup