Created
October 24, 2015 10:21
-
-
Save ennorehling/83a23af71bb122831cbf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function curse(r) | |
if not r:get_flag("rain") then | |
msg = message.create("rain") | |
msg:set_region("region", r) | |
msg:send_region(r) | |
r:set_flag("rain") | |
end | |
end | |
function rain.update(id) | |
f = get_faction(id) | |
for r in regions() do | |
for u in r.units do | |
if u.faction==f then | |
curse(r) | |
break | |
end | |
end | |
end | |
end | |
function test_rain_message() | |
msg = message.create("rain") | |
msg:set_region("region", r) | |
assert_equal("In " .. r.name .. " setzt sinntflutartgier Regen ein", msg:render("de")) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment