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

                 Summary: Negative tech want for building effect
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Mon 28 Jul 2014 09:19:12 AM 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.4.3, 2.5.0, 2.6.0

    _______________________________________________________

Details:

Negative want for building effect is not meant to be counted against tech
providing the building - having the tech does not force one to build the
building.

There's two errors in the implementation, though.

"MAX(v, -v1)" in case of present=FALSE effect is not at all what it should be
as "v1" is not value of the effect evaluated, but cumulative value of all
effects evaluated so far. "MAX(v, v - (v1 -v))" would be right here.

Only the case where effect has positive value, but requirement is
present=FALSE is being considered. If the effect simply has negative value,
that's counted against tech


Fix attached.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 28 Jul 2014 09:19:12 AM EEST  Name: NegBuildTechEffWant.patch  Size:
1kB   By: cazfi

<http://gna.org/bugs/download.php?file_id=21576>

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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