enigma-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-cvs] enigma/data/levels nat13.lua, NONE, 1.1 nat14.lua, NONE, 1


From: Martin Hawlisch <address@hidden>
Subject: [Enigma-cvs] enigma/data/levels nat13.lua, NONE, 1.1 nat14.lua, NONE, 1.1 nat15.lua, NONE, 1.1 nat16.lua, NONE, 1.1 nat17.lua, NONE, 1.1 nat18.lua, NONE, 1.1 nat19.lua, NONE, 1.1 nat20.lua, NONE, 1.1 nat21.lua, NONE, 1.1 nat22.lua, NONE, 1.1 nat13.png, NONE, 1.1 nat14.png, NONE, 1.1 nat15.png, NONE, 1.1 nat16.png, NONE, 1.1 nat17.png, NONE, 1.1 nat18.png, NONE, 1.1 nat19.png, NONE, 1.1 nat20.png, NONE, 1.1 nat21.png, NONE, 1.1 nat22.png, NONE, 1.1
Date: Thu, 23 Oct 2003 11:48:40 +0000

Update of /cvsroot/enigma/enigma/data/levels
In directory subversions:/tmp/cvs-serv19704

Added Files:
        nat13.lua nat14.lua nat15.lua nat16.lua nat17.lua nat18.lua 
        nat19.lua nat20.lua nat21.lua nat22.lua nat13.png nat14.png 
        nat15.png nat16.png nat17.png nat18.png nat19.png nat20.png 
        nat21.png nat22.png 
Log Message:
Added new levels from Nat Pryce


--- NEW FILE: nat20.lua ---
-- Prison Yard
-- A level for Enigma
--
-- Copyright (c) 2003 Nat Pryce
-- Licensed under the GPL version 2.

enigma.ConserveLevel = FALSE
WALL = "st-rock5"

create_world( 20, 25 )
draw_checkerboard_floor( "fl-rough-blue", "fl-rough-red", 
                         0, 0, level_width, level_height )
draw_border( WALL )
draw_border( WALL, 2, 2, level_width-4, level_height-4 )

set_stone( "st-rotator-left", 3, 2 )
set_stone( "st-rotator-left", level_width-3, 3 )
set_stone( "st-rotator-left", level_width-4, level_height-3 )
set_stone( "st-rotator-left", 2, level_height-4 )

oxyd( 1, 1 )
set_stone( WALL, 1, 2 )
set_stone( "st-scissors", level_width-5, 0 )
set_stone( "st-oneway_white", level_width-5, 2, {orientation=NORTH} )
draw_floor( "fl-gradient", {3,1}, {1,0}, level_width-6, 
            {type=FLAT_FORCE_W} )

oxyd( 1, level_height-2 )
set_stone( WALL, 2, level_height-2 )
set_stone( "st-scissors", 0, 4 )
set_stone( "st-oneway_white", 2, 4, {orientation=WEST} )
draw_floor( "fl-gradient", {1,3}, {0,1}, level_height-6, 
            {type=FLAT_FORCE_S} )

oxyd( level_width-2, level_height-2 )
set_stone( WALL, level_width-2, level_height-3 )
set_stone( "st-scissors", 4, level_height-1 )
set_stone( "st-oneway_white", 4, level_height-3, {orientation=SOUTH} )
draw_floor( "fl-gradient", {3,level_height-2}, {1,0}, level_width-6,
            {type=FLAT_FORCE_E} )

oxyd( level_width-2, 1 )
set_stone( WALL, level_width-3, 1 )
set_stone( "st-scissors", level_width-1, level_height-5 )
set_stone( "st-oneway_white", level_width-3, level_height-5,
           {orientation=EAST} )
draw_floor( "fl-gradient", {level_width-2,3}, {0,1}, level_height-5,
            {type=FLAT_FORCE_N} )


bolder1 = set_stone( "st-bolder", 3, 3, {direction=EAST} )
ball1 = set_actor( "ac-whiteball", 3.5, 5.5, 
                   {player=1,controllers=0} )
if options.Difficulty == 1 then -- easy
    AddRubberBand( ball1, bolder1, 10, 1 )
else
    killer1 = set_actor( "ac-killerball", 3.5, 5 )
    AddRubberBand( killer1, bolder1, 20, 0.5 )
    AddRubberBand( ball1, killer1, 10, 0.5 )
end

bolder2 = set_stone( "st-bolder", level_width-4, 3, {direction=SOUTH} )
ball2 = set_actor( "ac-whiteball", level_width-5.5, 3.5, 
                   {player=1,controllers=0} )
if options.Difficulty == 1 then -- easy
    AddRubberBand( ball2, bolder2, 10, 1 )
else
    killer2 = set_actor( "ac-killerball", level_width-5, 3.5 )
    AddRubberBand( killer2, bolder2, 20, 0.5 )
    AddRubberBand( ball2, killer2, 10, 0.5 )
end

bolder3 = set_stone( "st-bolder", level_width-4, level_height-4, 
{direction=WEST} )
ball3 = set_actor( "ac-whiteball", level_width-3.5, level_height-5.5, 
                   {player=1,controllers=0} )
if options.Difficulty == 1 then -- easy
    AddRubberBand( ball3, bolder3, 10, 1 )
else
    killer3 = set_actor( "ac-killerball", level_width-3.5, level_height-5 )
    AddRubberBand( killer3, bolder3, 20, 0.5 )
    AddRubberBand( ball3, killer3, 10, 0.5 )
end

bolder4 = set_stone( "st-bolder", 3, level_height-4, {direction=NORTH} )
ball4 = set_actor( "ac-whiteball", 5.5, level_height-3.5, 
                   {player=1,controllers=0} )
if options.Difficulty == 1 then -- easy
    AddRubberBand( ball4, bolder4, 10, 1 )
else
    killer4 = set_actor( "ac-killerball", 5, level_height-3.5 )
    AddRubberBand( killer4, bolder4, 20, 0.5 )
    AddRubberBand( ball4, killer4, 10, 0.5 )
end

set_actor( "ac-blackball", level_width/2, 8, 
           {player=0,controllers=1} )


--- NEW FILE: nat19.png ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: nat18.png ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: nat22.png ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: nat20.png ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: nat21.png ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: nat13.png ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: nat16.lua ---
-- Squaring the Circle
-- A level for Enigma
--
-- Copyright (c) 2003 Nat Pryce
-- Licensed under the GPL version 2.

enigma.ConserveLevel = FALSE 

create_world( 20, 13 )
draw_checkerboard_floor( "fl-rough-blue", "fl-rough-red",
                         0, 0, level_width, level_height )
draw_border( "st-wood_001" )

oxyd_default_flavor = "a"
oxyd(3,0)
oxyd(7,0)
oxyd(12,0)
oxyd(16,0)
oxyd(3,12)
oxyd(7,12)
oxyd(12,12)
oxyd(16,12)
oxyd(0,6)
oxyd(19,6)
oxyd_shuffle()

PLAYER_X = 10
PLAYER_Y = 6.5
player1 = set_actor( "ac-blackball", PLAYER_X, PLAYER_Y, {player=0} )

if options.Difficulty == 1 then
    RADIUS = 2.5 -- easy mode
else
    RADIUS = 1.5 -- difficult mode
end
BALL_COUNT = 20
BAND_STRENGTH = 10
BAND_LENGTH = 2*RADIUS*sin(360/(2*BALL_COUNT))

last_ball = nil
first_ball = nil
for theta=0,359,360/BALL_COUNT do
    x = PLAYER_X + RADIUS*cos(theta)
    y = PLAYER_Y + RADIUS*sin(theta)
    
    new_ball = set_actor( "ac-killerball", x, y, 
                          {mouseforce=1, controllers=1} )
    if last_ball then
        AddRubberBand( last_ball, new_ball, BAND_STRENGTH, BAND_LENGTH )
    else
        first_ball = new_ball
    end
    last_ball = new_ball
end
AddRubberBand( last_ball, first_ball, BAND_STRENGTH, BAND_LENGTH )
--- NEW FILE: nat17.png ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: nat16.png ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: nat15.png ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: nat22.lua ---
-- Hexagony
-- A level for Enigma
--
-- Copyright (c) 2003 Nat Pryce
-- Licensed under the GPL version 2.

Require("levels/natmaze.lua")
enigma.ConserveLevel = FALSE

ROTOR_FORCE = -40
BAND_LENGTH = 2
BAND_STRENGTH = 20
ROTOR_COUNT = 6

FLOORS_BY_DIFFICULTY = {"fl-samba","fl-metal"}
BORDERS_BY_DIFFICULTY = {"st-wood_001","st-fakeoxyd"}

FLOOR = FLOORS_BY_DIFFICULTY[options.Difficulty]
BORDER = BORDERS_BY_DIFFICULTY[options.Difficulty]

function black_marble( x, y )
    return set_actor( "ac-blackball", x, y, {player=0} )
end

function white_marble( x, y )
    return set_actor( "ac-whiteball", x, y, {player=1} )
end

function rotor( x, y )
    return set_actor( "ac-rotor", x, y, {force=ROTOR_FORCE,range=BAND_LENGTH} )
end


function set_star( center_actor_constructor, x, y, radius, rubber_band_strength,
                   outer_actor_constructor, outer_actor_count )
    local center = center_actor_constructor(x,y)
    local delta = 360 / outer_actor_count
    local outer_band_length = 2*radius*sin(360/(2*outer_actor_count))

    local first_outer = nil
    local prev_outer = nil
    local angle = 0
    while angle < 360 do
        local outer = place_actor( outer_actor_constructor, x, y, radius, angle 
)
        AddRubberBand( center, outer, rubber_band_strength, radius )
        if prev_outer == nil then
            first_outer = outer
        else
            AddRubberBand( prev_outer, outer, 
                           rubber_band_strength, outer_band_length )
        end
        
        prev_outer = outer
        angle = angle + delta
    end
    AddRubberBand( prev_outer, first_outer, 
                   rubber_band_strength, outer_band_length )
end

function place_actor( actor_constructor, x, y, radius, angle )
    x = x + radius*cos(angle)
    y = y + radius*sin(angle)
    
    return actor_constructor( x, y )
end

function cellx_to_worldx( cellx )
    return 2*cellx + 2
end

function celly_to_worldy( celly )
    return 2*celly + 2
end

function render_cell( maze, cellx, celly )
    local x = cellx_to_worldx(cellx)
    local y = celly_to_worldy(celly)
        
    set_floor( FLOOR, x, y )
    if maze:can_go_east(cellx,celly) then
        set_floor( FLOOR, x+1, y )
    end
    if maze:can_go_south(cellx,celly) then
        set_floor( FLOOR, x, y+1 )
    end
end


create_world( 39, 13 )
fill_floor( "fl-water" )
draw_border( BORDER )
render_maze( new_kruskal_maze(18,5), render_cell )

set_star( black_marble, cellx_to_worldx(3)+0.5, celly_to_worldy(2)+0.5, 
          BAND_LENGTH, BAND_STRENGTH, rotor, ROTOR_COUNT )

oxyd( 0, 6 )
oxyd( 6, 0 )
oxyd( 6, 12 )
oxyd( level_width-1, 6 )
oxyd( level_width-7, 0 )
oxyd( level_width-7, 12 )
oxyd_shuffle()

--- NEW FILE: nat21.lua ---
-- Hail Storm
-- A level for Enigma
--
-- Copyright (c) 2003 Nat Pryce
-- Licensed under the GPL version 2.

function wormhole(n)
    return "wormhole-"..n
end

function fill_floor(name, x0,y0, w,h, attrs)
    if x0 == nil then x0 = 0 end
    if y0 == nil then y0 = 0 end
    if w  == nil then w  = level_width end
    if h  == nil then h  = level_height end
    for y=y0,y0+h-1 do
        for x=x0,x0+w-1 
            do set_floor(name, x, y, attrs) 
        end
    end
end

function random_real( min, max, precision )
    precision = precision or 100
    return random(min*precision,max*precision-1)/precision
end

create_world( 20, 14 )
fill_floor( "fl-ice_001" )

draw_stones( "st-rock5", {0,0}, {0,1}, level_height )
draw_stones( "st-rock5", {level_width-1,0}, {0,1}, level_height )

fill_stones( "st-oneway-s", 1, 0, level_width-2, 2 )
fill_floor( "fl-abyss", 1,level_height-2, level_width-2, 2 )

if options.Difficulty == 1 then -- easy
    MIN_FORCE = 15
    MAX_FORCE = 20
else -- difficult
    MIN_FORCE = 20
    MAX_FORCE = 35
end

for x=1,level_width-2 do
    draw_floor( "fl-gradient", {x,0}, {0,1}, 2,
                {type=FLAT_FORCE_S, 
                 force=random_real(MIN_FORCE,MAX_FORCE)} ) 
    set_actor( "ac-killerball", x+0.5, 0.5 )
    set_item( "it-wormhole", x, level_height-1,
              {name=wormhole(x),
               targetx=x+0.5, targety=0.5, 
               range=0.5,force=1} )
end



for y=level_height-8,level_height-4,2 do
    oxyd( 0, y )
    oxyd( level_width-1, y )
end
oxyd_shuffle()

set_actor( "ac-blackball", level_width/2, 7.5, {player=0,controllers=1} )

--- NEW FILE: nat15.lua ---
-- Caterpillar
-- A level for Enigma
--
-- Copyright (c) 2003 Nat Pryce
-- Licensed under the GPL version 2.

enigma.ConserveLevel = FALSE


-----------------------------------------------------------------------------
-- Snake functions

STRENGTH = 50

snake_end = nil

function snake_attach( actor )
    AddRubberBand( snake_end, actor, STRENGTH, 1 )
    snake_end = actor
end

function start_snake( x, y )
    snake_end = set_actor( "ac-blackball", x, y, {player=0} )
end

-----------------------------------------------------------------------------
-- Scenery constructors

function trigger( x, y, callback )
    set_item( "it-trigger", x, y, {action="callback", target=callback} )
end

function whiteball_start( x, y )
    set_stone( "st-white4", x, y )
    return set_actor( "ac-whiteball", x+0.5, y+0.5,
                      {player=0,controllers=0} )
end

function create_westward_shed( x, y, width, callback_name, door_type )
    fill_floor( "fl-water", x, y-1, width+1, 5 )
    fill_floor( "fl-samba", x, y, width, 3 )
    draw_border( "st-rock1", x, y, width, 3 )
    set_stone( door_type or "st-white4", x, y+1 )
    trigger( x+width-3, y+1, callback_name )
    return whiteball_start( x+width-2, y+1 )
end

function create_eastward_shed( x, y, width, callback_name, door_type )
    fill_floor( "fl-water", x-1, y-1, width+1, 5 )
    fill_floor( "fl-samba", x, y, width, 3 )
    draw_border( "st-rock1", x, y, width, 3 )
    set_stone( door_type or "st-white4", x+width-1, y+1 )
    trigger( x+2, y+1, callback_name )
    return whiteball_start( x+1, y+1 )
end

function create_northward_shed( x, y, height, callback_name, door_type )
    fill_floor( "fl-water", x-1, y, 5, height+1 )
    fill_floor( "fl-samba", x, y, 3, height )
    draw_border( "st-rock1", x, y, 3, height )
    set_stone( door_type or "st-white4", x+1, y )
    trigger( x+1, y+height-3, callback_name )
    return whiteball_start( x+1, y+height-2 )
end

function create_southward_shed( x, y, height, callback_name, door_type )
    fill_floor( "fl-water", x-1, y-1, 5, height+1 )
    fill_floor( "fl-samba", x, y, 3, height )
    draw_border( "st-rock1", x, y, 3, height )
    set_stone( door_type or "st-white4", x+1, y+height-1 )
    trigger( x+1, y+2, callback_name )
    return whiteball_start( x+1, y+1 )
end

function oxyd_chamber( x )
    local y = 27
    
    draw_stones( "st-rock1", {x, y}, {0,1}, 7 )
    set_stone( "st-oneway_white", x+1, y, {orientation=SOUTH} )
    oxyd( x+1, y+2 )
    set_stone( "st-rock1", x+1, y+3 )
    oxyd( x+1, y+4 )
    set_stone( "st-oneway_white", x+1, y+6, {orientation=NORTH} )
    draw_stones( "st-rock1", {x+2, y}, {0,1}, 7 )
end


-----------------------------------------------------------------------------
-- The world
-----------------------------------------------------------------------------

create_world( 39, 37 )

fill_floor( "fl-leaves", 0, 0, 39, 25 )
draw_border( "st-rock1", 0, 0, 39, 25 )

start_snake( 12.5, 21.5 )

ball_1 = create_southward_shed( 32, 15, 4, "attach_ball_1", "st-grate1" )
function attach_ball_1()
    if ball_1 then
        snake_attach(ball_1)
        ball_1 = nil
    end
end

ball_2 = create_southward_shed( 11, 4, 4, "attach_ball_2" )
function attach_ball_2()
    if ball_2 then
        snake_attach(ball_2)
        ball_2 = nil
    end
end

ball_3 = create_northward_shed( 2, 18, 5, "attach_ball_3" )
function attach_ball_3()
    if ball_3 then
        snake_attach(ball_3)
        ball_3 = nil
    end
end

ball_4 = create_westward_shed( 4, 7, 6, "attach_ball_4" )
function attach_ball_4()
    if ball_4 then
        snake_attach(ball_4)
        ball_4 = nil
    end
end

ball_5 = create_southward_shed( 34, 2, 7, "attach_ball_5" )
function attach_ball_5()
    if ball_5 then
        snake_attach(ball_5)
        ball_5 = nil
    end
end

ball_6 = create_westward_shed( 25, 4, 8, "attach_ball_6" )
function attach_ball_6()
    if ball_6 then
        snake_attach(ball_6)
        ball_6 = nil
    end
end

ball_7 = create_westward_shed( 8, 15, 9, "attach_ball_7" )
function attach_ball_7()
    if ball_7 then
        snake_attach(ball_7)
        ball_7 = nil
    end
end

ball_8 = create_eastward_shed( 22, 20, 10, "attach_ball_8" )
function attach_ball_8()
    if ball_8 then
        snake_attach(ball_8)
        ball_8 = nil
    end
end


draw_border( "st-rock1", 0, 24, 39,13 )
fill_floor( "fl-concrete", 0, 24, 39, 13 ) 

set_stone( "st-oneway", 12, 24, {orientation=SOUTH} )

set_stone( "st-scissors", 6, 30 )

set_item( "it-wormhole", 37, 30,
          {targetx=12.5, targety=21.5, range=1} )

oxyd_chamber( 22 )
oxyd_chamber( 26 )
oxyd_chamber( 30 )
oxyd_chamber( 34 )


--- NEW FILE: nat14.png ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: nat13.lua ---
-- Sisyphus
-- A level for Enigma
--
-- Copyright (c) 2003 Nat Pryce
-- Bug fix by Sven Siggelkow
-- Licensed under the GPL version 2.

function fill_gradient( x0, y0, width, height, type )
    for y=y0,y0+height-1 do
        for x=x0,x0+width-1 do 
            gradient( x, y, type )
        end
    end
end

-----------------------------------------------------------------------------
-- Scenery
-----------------------------------------------------------------------------

create_world( 39, 13 )
fill_floor( "fl-water", 0, 0, level_width, level_height )

FLAT_FLOOR = "fl-gray"

-- West end barrier
fill_gradient( 1,2, 1, level_height-4, SLOPE_E )
gradient( 1, 1, SLOPE_LARGE_SE )
gradient( 1, level_height-2, SLOPE_LARGE_NE )

-- West flat area
fill_floor( FLAT_FLOOR, 2,2, 4, level_height-4 )
fill_gradient( 2,1, 4, 1, SLOPE_S )
fill_gradient( 2,level_height-2, 4, 1, SLOPE_N )

-- West slope
fill_gradient( 6,2, 10, level_height-4, SLOPE_W )
fill_gradient( 6,1, 9, 1, SLOPE_S_FORCE_W )
fill_gradient( 6,level_height-2, 9, 1, SLOPE_N_FORCE_W )
gradient( 14, 1, SLOPE_LARGE_SW )
gradient( 14, level_height-2, SLOPE_LARGE_NW )

-- West top barrier
fill_gradient( 15, 2, 1, level_height-4, SLOPE_E )
gradient( 15, 1, SLOPE_LARGE_SE )
gradient( 15, level_height-2, SLOPE_LARGE_NE )

-- Top flat area

fill_floor( FLAT_FLOOR, 16, 2, 7, level_height-4 )
fill_gradient( 16, 1, 7, 1, SLOPE_S )
fill_gradient( 16, level_height-2, 7, 1, SLOPE_N )

-- East top barrier
fill_gradient( 23, 2, 1, level_height-4, SLOPE_W )
gradient( 23, 1, SLOPE_LARGE_SW )
gradient( 23, level_height-2, SLOPE_LARGE_NW )

-- East slope
fill_gradient( 24,2, 10, level_height-4, SLOPE_E )
fill_gradient( 25,1, 9, 1, SLOPE_S_FORCE_E )
fill_gradient( 25,level_height-2, 9, 1, SLOPE_N_FORCE_E )
gradient( 24, 1, SLOPE_LARGE_SE )
gradient( 24, level_height-2, SLOPE_LARGE_NE )

-- East flat area
fill_floor( FLAT_FLOOR, 34, 2, 3, level_height-4 )
fill_gradient( 34,1, 3, 1, SLOPE_S )
fill_gradient( 34,level_height-2, 3, 1, SLOPE_N )

-- East end barrier
fill_gradient( 37, 2, 1, level_height-4, SLOPE_W )
gradient( 37, 1, SLOPE_LARGE_SW )
gradient( 37, level_height-2, SLOPE_LARGE_NW )


-----------------------------------------------------------------------------
-- Oxyds

OXYD_WALL = "st-white4"

function set_oxyd( x, y )
    oxyd( x, y )
    set_stones( OXYD_WALL, {{x-1,y},{x+1,y},{x,y-1},{x,y+1}} )
end

function set_oxyds( xs )
    for i,x in xs do
        set_oxyd( x, 1 )
        set_oxyd( x, level_height-2 )
    end
end

set_oxyds{ 1, level_width/2-3, level_width/2+3, level_width-2 }
oxyd_shuffle()

-----------------------------------------------------------------------------
-- Actors
-----------------------------------------------------------------------------

set_actor( "ac-blackball", 3.5, 5.5, {player=0} )
set_actor( "ac-whiteball", 3.5, 7.5, {player=0,controllers=0} )

--- NEW FILE: nat17.lua ---
-- Electrickery
-- A level for Enigma
--
-- Copyright (c) 2003 Nat Pryce
-- Bug fix by Sven Siggelkow
-- Licensed under the GPL version 2.

WALL = "st-wood_001"

function draw_checkerboard_floor( name1, name2, x, y, w, h, attrs)
    for i=1,h do
        for j=1,w do
            if mod(i,2) == mod(j,2) then
                set_floor( name1, x+j-1, y+i-1, attrs )
            else
                set_floor( name2, x+j-1, y+i-1, attrs )
            end
        end
    end
end

create_world( 20, 13 )
draw_checkerboard_floor( "fl-bluegray", "fl-red",  0, 0, 4,  13 )
draw_checkerboard_floor( "fl-sahara", "fl-tigris", 4, 0, 12, 13 )
draw_checkerboard_floor( "fl-bluegray", "fl-red",  16, 0, 4,  13 )
fill_floor( "fl-water", 8, 4, 4, 5 )

draw_border( WALL )
draw_stones( "st-oneway_white", {4,1}, {0,1}, 5, {orientation=WEST} )
draw_stones( "st-oneway_white", {4,7}, {0,1}, 5, {orientation=EAST} )
draw_stones( "st-oneway_white", {15,1}, {0,1}, 5, {orientation=WEST} )
draw_stones( "st-oneway_white", {15,7}, {0,1}, 5, {orientation=EAST} )
set_stone( WALL, 3, 6 )
set_stone( WALL, 16, 6 )
set_stone( "st-chargeplus", 4, 6 )
set_stone( "st-chargeminus", 15, 6 )

oxyd( 0, 3 )
oxyd( 0, 6 )
oxyd( 0, 9 )
oxyd( 19, 3 )
oxyd( 19, 6 )
oxyd( 19, 9 )
oxyd_shuffle()

set_actor( "ac-blackball", 5.5, 6.5, {player=0} )
set_actor( "ac-whiteball", 14.5, 6.5, {player=0,controllers=0} )

--- NEW FILE: nat14.lua ---
-- Snowball Fight
-- A level for Enigma
--
-- Copyright (c) 2003 Nat Pryce
-- Licensed under the GPL version 2.


create_world( 20, 13 )
fill_floor( "fl-samba" )
fill_floor( "fl-ice_001", 7, 1, level_width-8, level_height-2 )
fill_floor( "fl-samba", 1, 1, 6, level_height-2 )

draw_border( "st-actorimpulse")
draw_stones( "st-white4", {7,1}, {0,1}, level_height-2 )  

oxyd( level_width-1, 1 )
oxyd( level_width-1, 3 )
oxyd( level_width-1, 5 )
oxyd( level_width-1, 7 )
oxyd( level_width-1, 9 )
oxyd( level_width-1, 11 )
oxyd_shuffle()

anchor = set_stone( "st-stone1", 0, 6 ) 
black = set_actor( "ac-blackball", 2.5, 6.5, {player=0} )
white1 = set_actor( "ac-whiteball", 5.5, 3.5 )
white2 = set_actor( "ac-whiteball", 5.5, 9.5 )

AddRubberBand( black, anchor, 10, 2 )

--- NEW FILE: nat18.lua ---
-- A meditation level for Enigma
--
-- Copyright (c) 2003 Nat Pryce
-- Licensed under the GPL version 2.

create_world( 20, 13 )
fill_floor( "fl-leaves" )
draw_border( "st-glass1" )

set_item( "it-hollow", 2, 2 )
set_item( "it-hollow", 2, 4 )
set_item( "it-hollow", 2, 6 )
set_item( "it-hollow", 2, 8 )
set_item( "it-hollow", 2, 10 )
set_item( "it-hollow", 4, 2 )
set_item( "it-hollow", 6, 2 )
set_item( "it-hollow", 8, 2 )
set_item( "it-hollow", 4, 10 )
set_item( "it-hollow", 6, 10 )
set_item( "it-hollow", 8, 10 )
set_item( "it-hollow", 10, 2 )
set_item( "it-hollow", 10, 4 )
set_item( "it-hollow", 10, 6 )
set_item( "it-hollow", 10, 8 )
set_item( "it-hollow", 10, 10 )


CENTER_X = 15
CENTER_Y = 6.5
RADIUS = 2
BALL_COUNT = 16
BAND_STRENGTH = 16
BAND_LENGTH = 2*RADIUS*sin(360/(2*BALL_COUNT))

last_ball = nil
first_ball = nil
for theta=0,359,360/BALL_COUNT do
    x = CENTER_X + RADIUS*cos(theta)
    y = CENTER_Y + RADIUS*sin(theta)
    
    new_ball = set_actor( "ac-whiteball-small", x, y, {player=0} )
    if last_ball then
        AddRubberBand( last_ball, new_ball, BAND_STRENGTH, BAND_LENGTH )
    else
        first_ball = new_ball
    end
    last_ball = new_ball
end
AddRubberBand( last_ball, first_ball, BAND_STRENGTH, BAND_LENGTH )

--- NEW FILE: nat19.lua ---
-- Eccentric Orbits
-- A level for Enigma
--
-- Copyright (c) 2003 Nat Pryce
-- Licensed under the GPL version 2.

create_world( 20, 13 )
fill_floor( "fl-tigris" )
fill_floor( "fl-leaves", 2, 2, level_width-4, level_height-4 )
draw_border( "st-rock5" )
draw_border( "st-white1", 2, 2, level_width-4, level_height-4 )

set_stone( "st-rotator-left", 1, 0 )
set_stone( "st-rotator-left", level_width-1, 1 )
set_stone( "st-rotator-left", level_width-2, level_height-1 )
set_stone( "st-rotator-left", 0, level_height-2 )

bolder1 = set_stone( "st-bolder", 1, 6, {direction=NORTH} )
bolder2 = set_stone( "st-bolder", level_width-2, 6, {direction=SOUTH} )
white = set_actor( "ac-whiteball", level_width/2, level_height/2,
                   {player=0,controllers=0} )
killer1 = set_actor( "ac-killerball", 5.5, level_height/2 )
killer2 = set_actor( "ac-killerball", level_width-5.5, level_height/2 )

AddRubberBand( killer1, bolder1, 10, 4 )
AddRubberBand( killer1, white, 2, 1 )
AddRubberBand( killer2, white, 2, 1 )
AddRubberBand( killer2, bolder2, 10, 4 ) 

oxyd_default_flavor = "d"
oxyd(6,0)
oxyd(13,0)
oxyd(6,12)
oxyd(13,12)
oxyd_shuffle()

set_actor( "ac-blackball", level_width/2, 7.5, {player=0,controllers=1} )






reply via email to

[Prev in Thread] Current Thread [Next in Thread]