URL:
  <http://gna.org/bugs/?24662>

                 Summary: get_discounted_reward(): ACTION_HELP_WONDER when
only ACTION_TRADE_ROUTE available
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Thu 12 May 2016 03:52:13 PM EEST
                Category: ai
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: None
         Planned Release: 
 Contains string changes: None

    _______________________________________________________

Details:

get_discounted_reward() first checks that at least one of the related actions
is possible (or'ring), and then proceeds on the assumption that all of them
are.
For example when ACTION_TRADE_ROUTE is possible but ACTION_HELP_WONDER is not,
it may decide that ACTION_HELP_WONDER is more beneficial than
ACTION_TRADE_ROUTE and sets result->help_wonder.

If not checked if the logic was similarly broken before action enablers in
S2_5 (meaning that despite separate unittype flags, having one of them set
would let function to select either)

One result I've been seeing in a ruleset (variant2 would do) without
ACTION_HELP_WONDER enabler, is that when homecity starts building a wonder,
caravans turn back thinking they can get the benefit of a wonder building by
ACTION_TRADE_ROUTE, and only when they actually try to ACTION_TRADE_ROUTE it
fails due to zero distance between caravan homecity and destination.





    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?24662>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to