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

                 Summary: Poor weapon selection when attacking berserk units
                 Project: Battle for Wesnoth
            Submitted by: silene
            Submitted on: jeudi 06.08.2009 à 09:13
                Category: Bug
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Artificial Intelligence
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.7
        Operating System: any

    _______________________________________________________

Details:

The selected weapon is the one that maximizes
  chance_to_kill - (1 - aggression) * (chance_to_be_killed)

This formula works well usually, except when the defender has berserk on one
of its weapons. Indeed, the chance to kill is no longer related to the damage
done in this case, which can skew the selection badly.

For instance, consider a dark sorcerer attacking an ulfserker at dawn on
plains. The ranged attack of the sorcerer deals massive damage for free, but
it has no chance to kill the ulfserker. The bare-handed attack is suicidal,
but since it triggers berserk, it has a small chance (37%) of killing the
ulfserker. Due to the formula above, as soon as the aggression is 0.5 or
bigger, the dark sorcerer (lvl 2) will suicide itself!

(By the way, 0.5 is the aggression value of the user interface and 85% of the
mainline campaigns have an even bigger aggression.)

To summarize, when attacking a berserker, if the safe attack can't kill, the
berserk-triggering weapon will be selected:
- at aggression 0.0, if the chance of suicide is less than 50%,
- at aggression 0.5, if the chance of suicide is less than 63%,
- at aggression 1.0, if the chance of suicide is less than 99%.





    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message posté via/par Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to