-- Come To Me -- the Enigma Level -- (c) 2003 Petr Machata/ant_39 -- Licensed under GPL v2.0 or above -- 2003-01-24 dofile(enigma.FindDataFile("levels/ant.lua")) -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- num = 0 function switchcell(tgt, x, y) num = num +1 local funcn = "switch_"..num func0 = "function() ".. " enigma.KillStone("..x..", "..y..") ".. " local obj = {set_stone('st-death', "..x..", "..y..", {})} ".. " add_rubber_bands(actors, obj, 16) " if (tgt) then func0 = func0 .. "send_group_message("..tgt..", 'open', nil)" end func0 = func0 .. "end " dostring(funcn.." = "..func0) set_stone("st-switch", x, y, {action="callback", target=funcn}) end -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- cells={} cells["_"]=cell{floor={face="fl-normal"}} cells[" "]=cell{floor={face="fl-sand"}}--ice_001"}} cells["#"]=cell{parent=cells[" "], stone={face="st-rock2"}} cells["V"]=cell{floor={face="fl-gradient", attr={type=1}}} cells["^"]=cell{floor={face="fl-gradient", attr={type=2}}} cells[">"]=cell{floor={face="fl-gradient", attr={type=3}}} cells["<"]=cell{floor={face="fl-gradient", attr={type=4}}} cells["T"]=cell{floor={face="fl-gradient", attr={type=5}}} cells["L"]=cell{floor={face="fl-gradient", attr={type=7}}} cells["R"]=cell{floor={face="fl-gradient", attr={type=6}}} cells["/"]=cell{floor={face="fl-gradient", attr={type=8}}} cells["t"]=cell{floor={face="fl-gradient", attr={type=12}}} cells["l"]=cell{floor={face="fl-gradient", attr={type=11}}} cells["r"]=cell{floor={face="fl-gradient", attr={type=10}}} cells["*"]=cell{floor={face="fl-gradient", attr={type=9}}} cells["D"]=cell{parent=cells[" "],stone={face="st-death"}} doors = {}; cells["b"]=cell{parent={cells["_"],{add_multiitem, {"st-door_b", doors, {type="v"}}}}} cells["B"]=cell{parent={cells["_"],{switchcell, "doors"}}} cells["0"]=cell{parent=cells[" "],stone={face="st-oxyd", attr={flavor="b", color="0"}}} cells["1"]=cell{parent=cells[" "],stone={face="st-oxyd", attr={flavor="b", color="1"}}} cells["2"]=cell{parent=cells[" "],stone={face="st-oxyd", attr={flavor="b", color="2"}}} cells["3"]=cell{parent=cells[" "],stone={face="st-oxyd", attr={flavor="b", color="3"}}} actors = {} cells["O"]=cell{parent={cells[" "],{add_multiactor,{"ac-blackball", actors, {player=0}}}}} level = { "#0################3#", "0bTVVVVVVVVVVVVVVRb3", "#T* lR#", "#> O <#", "#> _____ <#", "#> _TVR_ <#", "#> _>B<_ <#", "#> _L^/_ <#", "#> _____ <#", "#> <#", "#Lr t/#", "1bL^^^^^^^^^^^^^^/b2", "#1################2#" } -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- randomseed(enigma.GetTicks()) create_world_by_map(level) oxyd_shuffle()