Screenshots with F9.
[sdlbotor.git] / objects.lua
blob1d908264df2025585bd1f6a6306ade7de015301f
1 objects = { }
3 objects["acid"] =
5 tile = 0,
6 nuse = "Once",
10 objects["blueman"] =
12 tile = 1,
13 nuse = "Drop",
17 objects["potion"] =
19 tile = 2,
20 nuse = "Once"
23 objects["hihi"] =
25 tile = 1,
26 nuse = "Once",
30 objects["bomb"] =
32 tile = 10,
33 nuse = "Once",
38 --ACID FUNCTIONS
40 function objects.acid.Activation( obj )
41 pos = player.getPosition();
42 map.acid( pos.x, pos.y );
43 end
45 --BLUEMAN FUNCTIONS
47 function objects.blueman.Pickup( obj )
48 player.setImmune( 1 );
49 end
51 function objects.blueman.Drop( obj )
52 player.setImmune( 0 );
53 end
55 -- POTION
57 function objects.potion.Activation( obj )
58 player.addLives( );
59 end
61 --HIHI FUNCTIONS
63 function objects.hihi.Activation( obj )
64 pos = player.getPosition();
65 for i = pos.x+1,pos.x+10,1 do
66 map.CreateObject( "acid", i, pos.y )
67 end
68 end
70 --BOMB
72 function objects.bomb.Activation( obj )
73 pos = player.getPosition();
74 for x = pos.x-1,pos.x+1,1 do
75 for y = pos.y-1,pos.y+1,1 do
76 if not (x == pos.x and y == pos.y) then
77 if map.CheckFree( x, y ) then
78 map.CreateRobot( x, y )
79 end
80 end
81 end
82 end
83 end