[Freeciv-tickets] [freeciv] #45938: City-buy allows buying off all shields of an unavailable production target

Zurück zum Archiv-Index
OSDN Ticket System norep****@osdn*****
Fri Oct 21 03:17:24 JST 2022


#45938: City-buy allows buying off all shields of an unavailable production target

  Open Date: 2022-10-21 03:17
Last Update: 2022-10-21 03:17

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/45938
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45938

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2022-10-21 03:17 Updated by: Anonymous
 * New Ticket "City-buy allows buying off all shields of an unavailable production target" created


---------------------------------------------------------------------
Ticket Status:

      Reporter: (Anonymous)
         Owner: (None)
          Type: Bugs
        Status: Open
      Priority: 5 - Medium
     MileStone: (None)
     Component: (None)
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Unavailable production targets DO happen (probably shouldn't), but that's a separate issue.
This bug happens when there is an unavailable target in current city production. It is still possible to buy the target. This facilitated exploits like (rather) tricky worklist manipulations to arrive at illegal targets so that one can buy them at lower shield-gold cost, then switch the target on the next turn from some unit costing 10 or 20 to one cost 30 or 40. 
Adding a check for unavailability in really_handle_city_buy() fixed it for us at FCW:
   /* City with an illegal target! Don't allow illegal-buy exploits: */   if (!can_city_build_direct(pcity, &pcity->production)) {     char prod[256];     universal_name_translation(&pcity->production, prod, sizeof(prod));     notify_player(pplayer, pcity->tile, E_BAD_COMMAND, ftc_server,                   _("[`no`] %s lacks requirements to buy or build %s."),                   city_link(pcity), prod);     return;   }

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/45938
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45938



More information about the Freeciv-tickets mailing list
Zurück zum Archiv-Index