WC: fix abnormal commander mechanic (#7284)

Co-authored-by: Gunter Labes <soliton@wesnoth.org>
This commit is contained in:
Tahsin Jahin Khalid 2023-02-13 00:21:27 +08:00 committed by GitHub
parent 4d092347db
commit 547aab3896
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,8 +19,11 @@ on_event("die", function(cx)
}
commander = commander[1]
if commander then
commander:extract()
commander.id = u.id
commander.canrecruit = true
commander:remove_modifications({ id = "wc2_commander_overlay" })
commander:to_map()
wesnoth.wml_actions.message {
id = commander.id,
message = strings.promotion