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

Back to archive index
OSDN Ticket System norep****@osdn*****
Fri Oct 21 17:25:22 JST 2022


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

  Open Date: 2022-10-20 21:17
Last Update: 2022-10-21 11:25

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 11:25 Updated by: cazfi
 * Milestone Update from (None) to S3_2 d3f
 * Component Update from (None) to General

Comment:

Reply To cazfi
In the development branch we could give rulesets power to decide, but not in d3f branches.
For d3f branches, it's probably best just to keep status quo.
For 3.2, boolean game.ruleset setting?

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

      Reporter: (Anonymous)
         Owner: (None)
          Type: Bugs
        Status: Open
      Priority: 5 - Medium
     MileStone: S3_2 d3f
     Component: General
      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
Back to archive index