server/scripts/tools/adamantium.lua
Enno Rehling d9457a2488 rewrite of the Lua module system.
At this time, only E2 is working.
Fixing a lot of old code (monster is no longer id 0).
package.paths configured from eressea.ini
install directory configured from eressea.ini
moving building_action into a seaprate module (it's deprecated)
2014-07-26 22:52:25 +02:00

25 lines
611 B
Lua

-- adamant gifts and setup for tunnels
-- use only once to hand out some items to existing factions
function adamant_gifts()
for f in factions() do
local i = math.fmod(test.rng_int(), 2)
if i==0 then
f:add_item("adamantium", 1)
f:add_item("adamantiumplate", 1)
else
f:add_item("adamantium", 3)
f:add_item("adamantiumaxe", 1)
end
end
end
function adamant_seeds()
for r in regions() do
if r:get_key("tnnL") then
print("1 ", r:get_resource("adamantium"), r)
test.adamantium_island(r)
print("2 ", r:get_resource("adamantium"))
end
end
end