- Passat a mini v1.3.6

This commit is contained in:
2025-10-30 12:39:44 +01:00
parent 5fef769534
commit a5d097aa50
26 changed files with 396 additions and 399 deletions

View File

@@ -11,7 +11,7 @@ function elalien.init()
elalien.scene_intro=false
elalien.scene_object=false
local habs={66,56,59,53}
elalien.hab=habs[1+rnd(4)]
elalien.hab=habs[1+math.random(0,3)]
end
function elalien.draw()
@@ -19,7 +19,7 @@ function elalien.draw()
if elalien.update==elalien.update_stairs then
flip=(((elalien.x>>1)+(elalien.y>>1))%2)==0
end
blit((elalien.frame&7)*16,(elalien.frame>>3)*16,16,16,elalien.x,elalien.y,16,16,flip)
draw.surf((elalien.frame&7)*16,(elalien.frame>>3)*16,16,16,elalien.x,elalien.y,16,16,flip)
end
function elalien.hit()
@@ -56,7 +56,7 @@ function elalien.update_normal()
elalien.x=84
end
elseif check_tile(elalien.hab,elalien.x+inc,elalien.y+6)<tiletype.half then
local r=rnd(2)
local r=math.random(0,1)
if check_tile(elalien.hab,elalien.x+inc,elalien.y+14)==tiletype.block then r=0 end
if r==0 then
elalien.update=elalien.update_jumping
@@ -83,7 +83,7 @@ function elalien.update_normal()
if elalien.stairscooldown==0 and
check_tile(elalien.hab,elalien.x+6,elalien.y+8)==tiletype.stair and
check_tile(elalien.hab,elalien.x+14,elalien.y+8)==tiletype.stair then
if rnd(10)<8 then
if math.random(0,9)<8 then
elalien.update=elalien.update_stairs
if check_tile(elalien.hab,elalien.x+4,elalien.y+16)==tiletype.block then
elalien.goup=true
@@ -101,7 +101,7 @@ function elalien.update_normal()
end
if check_tile(elalien.hab,elalien.x+4,elalien.y+16)==tiletype.void and ((elalien.x+4)&7==0 or check_tile(elalien.hab,elalien.x+12,elalien.y+16)==tiletype.void) then
local option=rnd(2)
local option=math.random(0,1)
if elalien.stairscooldown>0 then option=0 end
if option==0 then
elalien.update=elalien.update_falling
@@ -229,7 +229,7 @@ function elalien.update_stairs()
elalien.y=elalien.y-2
else
elalien.update=elalien.update_normal
if rnd(3)>0 then elalien.flip=not elalien.flip end
if math.random(0,2)>0 then elalien.flip=not elalien.flip end
elalien.stairscooldown=50
end
else
@@ -242,7 +242,7 @@ function elalien.update_stairs()
elalien.y=elalien.y+2
else
elalien.update=elalien.update_normal
if rnd(3)>0 then elalien.flip=not elalien.flip end
if math.random(0,2)>0 then elalien.flip=not elalien.flip end
elalien.stairscooldown=50
end
else