T: create a new unit object if player chooses Li'sar, so she has correct attacks and animations

This commit is contained in:
Charles Dang 2015-03-29 00:50:55 +11:00
parent 9382393f74
commit d595c97fc0

View file

@ -89,12 +89,17 @@ function wml_actions.select_character()
local unit = wesnoth.get_variable("student_store")
if character == 2 then
unit.type = "Fighteress"
unit.name = "Lisar"
unit.gender = "female"
unit.profile = "portraits/lisar.png"
wesnoth.put_unit(unit.x, unit.y, {
type = "Fighteress",
id = unit.id,
name = _"Lisar",
profile = "portraits/lisar.png",
canrecruit = true,
facing = unit.facing,
})
else
wesnoth.put_unit(unit)
end
wesnoth.put_unit(unit)
wesnoth.redraw {}
end