URL:
<http://gna.org/bugs/?19324>
Summary: Units can unstore with non-positive hit points
Project: Battle for Wesnoth
Submitted by: jamit
Submitted on: Mon 23 Jan 2012 03:17:07 PM EST
Category: Bug
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: WML
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 1.9.14
Operating System: Windows
_______________________________________________________
Details:
If [unstore_unit] is given a unit with negative (or zero) hit points, that
unit is returned to the board with negative (or zero) hit points, rather than
being boosted to 1 hit point. (Going up to 1 hit point would match the
documentation -- at least for the negative case -- and avoid some
bizarre-looking stuff when/if the unit heals or fights.)
By request, some WML code that can be used to see this in action:
[event]
name=moveto
[store_unit]
[filter]
side=1
canrecruit=yes
[/filter]
variable=ZapEm
[/store_unit]
[set_variable]
name=ZapEm.hitpoints
value=-9
[/set_variable]
[unstore_unit]
variable=ZapEm
[/unstore_unit]
[/event]
After each move, the leader of side 1 gets set to -9 hit points. (I've done
this with non-leaders as well; leaders are just easy to pick out of a crowd,
and doing this to all units would add a loop.)
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?19324>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs