1 local cabo
= {-15,-15,-15,-15+10}
2 local cabo2
= {-15+1,-15+1,-15+1,-15+10+1}
3 local cano
= {-15,-15+10,-45,-15+10}
4 local cano2
= {-15+1,-15+10+1,-45+1,-15+10+1}
6 math
.randomseed( os
.time() )
8 function randomspread(spread
)
9 return math
.random()*2*spread
-spread
14 righthand
= {-15,-15},
15 lefthand
= {-30,-15+10},
23 whenfire
= function (x
,y
,angle
,w
)
28 angle
= angle
+randomspread(0.2),
43 function addXY(x
,y
,...)
54 function mulXY(x
,y
,...)
66 flamethrower
= Weapon
{
67 name
= "Flamethrower",
68 righthand
= {-20,-13},
72 sprite
= {addXY(-10,0,
73 Line
{-20,-15,-20,-15+10},
74 Line
{-20,-15,-35,-15},
75 Line
{-35,-15,-35,-15+10},
76 Line
{-5,-15,-15,-15+10},
77 Line
{-5-8,-15+8,-5-8,-15},
78 Line
{-15,-15+10,-50,-15+10},
79 Line
{-40,-15+10,-50,-15},
80 Line
{-50,-15,-65,-15},
81 Line
{-65,-15,-65,-10},
82 Line
{-60,-15+6,-60,-15+13},
83 Line
{-50,-15+6,-60,-15+6},
84 Line
{-50,-15+13,-60,-15+13},
85 Line
{-50,-15+6,-50,-15+13}
88 whenfire
= function (x
,y
,angle
,w
)
89 for i
= 1,math
.random(4) do
90 local flametip
= math
.random()*4
91 local flamesprite
= {mulXY(3,4,
104 angle
= angle
+math
.sin(t
)*0.6+randomspread(0.4),
107 duration
= 500+math
.random(500)-250,
109 sprite
= flamesprite
,