From 02b89b7d503d301859482c52dfcf136d184ab79a Mon Sep 17 00:00:00 2001 From: Enno Date: Sun, 12 Sep 2010 04:12:04 +0200 Subject: [PATCH] feature was meant for e3a, not eressea --- scripts/e3a/frost.lua | 6 ++++-- scripts/e3a/main.lua | 2 ++ scripts/eressea/main.lua | 2 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/e3a/frost.lua b/scripts/e3a/frost.lua index 7cd788de9..1b653c161 100644 --- a/scripts/e3a/frost.lua +++ b/scripts/e3a/frost.lua @@ -9,6 +9,7 @@ local function freeze(r) for i, rn in ipairs(r.adj) do -- each region has a chance to freeze if rn.terrain=="ocean" and math.mod(rng_int(), 100)<20 then + print("terraforming .. " .. tostring(rn)) rn.terrain = "iceberg_sleep" end end @@ -21,16 +22,17 @@ end function update() local turn = get_turn() if is_winter(turn) then + print "it is winter" for r in regions() do if r.terrain=="glacier" then freeze(r) end end - else if is_winter(turn-1) then + elseif is_winter(turn-1) then for r in regions() do if r.terrain=="iceberg_sleep" then thaw(r) end end end -end \ No newline at end of file +end diff --git a/scripts/e3a/main.lua b/scripts/e3a/main.lua index 0548ce513..3d4c7c2ca 100644 --- a/scripts/e3a/main.lua +++ b/scripts/e3a/main.lua @@ -1,4 +1,5 @@ require "multis" +require "e3a.frost" function process(orders) local confirmed_multis = { } @@ -45,6 +46,7 @@ function process(orders) -- post-turn updates: update_guards() update_scores() + frost.update() local localechange = { de = { "ii" } } change_locales(localechange) diff --git a/scripts/eressea/main.lua b/scripts/eressea/main.lua index 4eed4d057..060fdbf8c 100644 --- a/scripts/eressea/main.lua +++ b/scripts/eressea/main.lua @@ -1,5 +1,4 @@ require "multis" -require "e3a.frost" function apply_fixes() local turn = get_turn() @@ -49,7 +48,6 @@ function process(orders) update_embassies() update_guards() update_scores() - frost.update() local localechange = { de = { "ii" } } change_locales(localechange)