Fix for weather change cheat in dark forecast (#5656)

Adjusted the weather change effect from side 3 turns to side 1 turns. Side 1 is never empty so it would bypass the side 3 as empty cheat which impeded weather changed.
This commit is contained in:
Tahsin Jahin Khalid 2021-04-03 05:19:03 +06:00 committed by GitHub
parent 6fcd4ede8d
commit 18b42b0439
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -449,8 +449,11 @@ local function weather_map(name)
wesnoth.redraw {}
end
-- change weather at side 3 turns, TODO: consider the case that side 3 is empty.
on_event("side 3 turn", function()
-- change weather at side 1 turns
-- initially this was set for every side 3 turns which allowed a cheat to be used by players.
-- the cheat was activated by setting side 3 as Empty and picking a faction optimised for the default/basic map for side 4.
-- the result was that the weather change feature never triggered.
on_event("side 1 turn", function()
-- get next weather event
local weather_event = wml.variables["weather_event[0]"]
if weather_event == nil then