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

                 Summary: $this_unit doesn't work in unit-specific recall
filters
                 Project: Battle for Wesnoth
            Submitted by: anonymissimus
            Submitted on: Fri 27 May 2011 07:42:26 PM GMT
                Category: Bug
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group:  None of the others
                  Status: None
                 Privacy: Public
             Assigned to: fendrin
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: trunk r49661
        Operating System: Linux

    _______________________________________________________

Details:

I've constructed a testcase to illustrate the issue I explained. It reveals
the problem of using a config object to describe the passed SUF.
The [heal_unit] call works only for the Troll since it's level equals its
hitpoints; but the Troll from the second code is able to recall the Whelp too.
Note that if filter = {}, heal_unit heals both the Troll and the Whelp, so
$this_unit works correctly there.

++
                local filter = { level = "$this_unit.hitpoints" }
                wesnoth.wml_actions.unit({ type = "Troll", hitpoints = 2, x = 
41, y = 3})
                wesnoth.wml_actions.unit({ type = "Troll Whelp", x = 42, y = 3, 
hitpoints =
2 })
                wesnoth.wml_actions.heal_unit({ amount = 5, {"filter", filter 
}, animate =
true })
                wesnoth.wml_actions.kill({})

                wesnoth.wml_actions.unit({ type = "Troll", hitpoints = 2 })
                wesnoth.wml_actions.unit({ type = "Troll Whelp", hitpoints = 2 
})
                wesnoth.wml_actions.unit({ type = "Troll", canrecruit = true, x 
= 41, y =
4, {"recall_filter", filter } })
--




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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