-- Dancers -- the Enigma Level -- (c) 2003 Petr Machata/ant_39 -- Licensed under GPL v2.0 or above -- 2003-01-11 dofile(enigma.FindDataFile("levels/ant.lua")) -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- function revert_bolders() --open/close all doors in map send_group_message(doors, "openclose", nil) --on every odd triggger invert bolder dir if (not(count_revert)) then for _,bolder in bolders do local dir = enigma.GetAttrib(bolder, "direction") dir = dir - 2 while (dir<0) do dir = dir +4 end enigma.SetAttrib(bolder, "direction", dir) end end count_revert = not(count_revert) end -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- cells={} cells[" "]=cell{floor={face="fl-marble"}} cells["."]=cell{floor={face="fl-water"}} cells["#"]=cell{parent=cells["."],stone={face="st-marble"}} cells["V"]=cell{parent=cells[" "],stone={face="st-laser", attr={on=TRUE, dir=enigma.SOUTH}}} cells["^"]=cell{parent=cells[" "],stone={face="st-laser", attr={on=TRUE, dir=enigma.NORTH}}} cells["+"]=cell{parent=cells[" "],item={face="it-trigger", attr={action="callback", target="revert_bolders"}}} bolders = {} doors = {} cells[">"]=cell{parent={cells[" "], {add_multiitem, {"st-bolder", bolders, {direction=enigma.EAST}}}}} cells["="]=cell{parent={cells["."], {add_multiitem, {"st-door_a", doors, {type="h"}}}}} cells["0"]=cell{parent=cells[" "],stone={face="st-oxyd", attr={flavor="c", color="0"}}} cells["1"]=cell{parent=cells[" "],stone={face="st-oxyd", attr={flavor="c", color="1"}}} cells["2"]=cell{parent=cells[" "],stone={face="st-oxyd", attr={flavor="c", color="2"}}} cells["3"]=cell{parent=cells[" "],stone={face="st-oxyd", attr={flavor="c", color="3"}}} cells["O"]=cell{parent=cells[" "],item={face="ac-blackball", attr={player=0}, actor=1}} level = { "#########V##########", "#.......#=#........#", "#..0............0..#", "#+.> > ..#", "#......... ........#", "#..2...... .....3..#", "#..> O > ..#", "#..2..... ......3..#", "#........ .........#", "#..> > .+#", "#..1............1..#", "#........#=#.......#", "##########^#########" } -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- randomseed(enigma.GetTicks()) create_world_by_map(level) oxyd_shuffle()