URL: <http://gna.org/bugs/?23532>
Summary: AI estimate about trade loss from traderoute cancelling too high Project: Freeciv Submitted by: cazfi Submitted on: Sat 25 Apr 2015 05:15:55 PM EEST Category: ai Severity: 3 - Normal Priority: 5 - Normal Status: Ready For Test Assigned to: None Originator Email: Open/Closed: Open Release: Discussion Lock: Any Operating System: None Planned Release: 2.5.1, 2.6.0, 3.0.0 _______________________________________________________ Details: one_city_trade_benefit() gets *sum* of trade values of all routes being cancelled int oldtrade = city_trade_removable(pcity, would_remove); Later it considers that value to apply *per* city it owns. city_list_iterate(would_remove, losercity) { if (city_owner(losercity) == pplayer) { losttrade += oldtrade Fix attached. This solution also uses trade value from the right end of the route instead of assuming that it's idendical on both ends (not necessarily true in S2_6->) _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Sat 25 Apr 2015 05:15:55 PM EEST Name: CityTradeBenefitLostTrade.patch Size: 704B By: cazfi <http://gna.org/bugs/download.php?file_id=24327> _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?23532> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev