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
         Discussion Lock: Any
        Operating System: None
         Planned Release: 2.4.3, 2.5.0, 2.6.0



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

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



Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to