WC: fix #7921 Random training per scenario

a free random training on easier difficulties should only be given in the first scenario. (Otherwise they'll accumulate to 5 free trainings at scenario 5.)
This commit is contained in:
gfgtdf 2023-10-16 23:25:13 +02:00 committed by GitHub
parent b13406c63e
commit 8bbaba898d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,14 +70,14 @@ on_event("wc2_start", function(cx)
side = side_num
}
end
end
if wml.variables.wc2_difficulty.extra_training then
for side_num = 1, wml.variables.wc2_player_count do
wesnoth.wml_actions.wc2_give_random_training {
among="2,3,4,5,6",
side = side_num,
}
if wml.variables.wc2_difficulty.extra_training then
for side_num = 1, wml.variables.wc2_player_count do
wesnoth.wml_actions.wc2_give_random_training {
among="2,3,4,5,6",
side = side_num,
}
end
end
end