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

                 Summary: Weapon selection for ai.attack() in Lua AI does not
work in trunk
                 Project: Battle for Wesnoth
            Submitted by: mattsc
            Submitted on: Tue 08 May 2012 09:26:57 PM GMT
                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.11.0-svn
        Operating System: OS X

    _______________________________________________________

Details:

ai.attack() in Lua AI should let you choose the weapon by using

ai.attack(attacker, defender, weapon_number)

This does not work in trunk (it did in 1.10).  No matter which weapon number
is given, it always uses the "best" weapon.  This can also be seen when using
this

ai.attack(attacker, defender, 2)

on a unit with no attacks left, which produces this error message:

Error #1007 (attack_result::E_NO_ATTACKS_LEFT) in attack by side 1 from
location 21,11 to location 20,11 using weapon -1 with aggression 2

showing that the weapon number is assigned to aggression.  Using a 4th
argument does not work either.

This was likely broken in r53758.




    _______________________________________________________

Reply to this item at:

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

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


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

Reply via email to