Author: sveinung Date: Mon Feb 15 10:57:39 2016 New Revision: 31927 URL: http://svn.gna.org/viewcvs/freeciv?rev=31927&view=rev Log: Document "Upgrade Unit" hard req info leaks.
Hard action requirements in is_action_possible() have a comment that documents their information leak status. I forgot this when "Upgrade Unit" became action enabler controlled. See patch #6955 Modified: trunk/common/actions.c Modified: trunk/common/actions.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.c?rev=31927&r1=31926&r2=31927&view=diff ============================================================================== --- trunk/common/actions.c (original) +++ trunk/common/actions.c Mon Feb 15 10:57:39 2016 @@ -1367,7 +1367,17 @@ if (wanted_action == ACTION_UPGRADE_UNIT) { /* Reason: Keep the old rules. */ - /* Info leak: */ + /* Info leak: The player knows his unit's type. He knows if he can + * build the unit type upgraded to. If the upgrade happens in a foreign + * city that fact may leak. This can be seen as a price for changing + * the rules to allow upgrading in a foreign city. + * The player knows how much gold he has. If the Upgrade_Price_Pct + * effect depends on information he don't have that information may + * leak. The player knows the location of his unit. He knows if the + * tile has a city and if the unit can exist there outside a transport. + * The player knows his unit's cargo. By knowing their number and type + * he can predict if there will be room for them in the unit upgraded + * to as long as he knows what unit type his unit will end up as. */ if (unit_upgrade_test(actor_unit, FALSE) != UU_OK) { return TRI_NO; } _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits