- Imp and fireball implemented

This commit is contained in:
2022-10-28 11:14:48 +02:00
parent 5587c3bd72
commit c1367b3c75
5 changed files with 156 additions and 2 deletions

View File

@@ -71,6 +71,7 @@ function abad_advance()
if abad.update~=abad_state_walking then limit=tiletype.half end
if not abad.flip and abad.x==84 then
abad.hab=abad.hab+1
imp.reset()
abad.x=-4
elseif check_tile(abad.hab,abad.x+inc,abad.y+14)<limit then
if abad.flip then
@@ -80,6 +81,7 @@ function abad_advance()
end
if abad.x<-4 then
abad.hab=abad.hab-1
imp.reset()
abad.x=84
end
end
@@ -167,6 +169,7 @@ function abad_state_jumping()
end
else
abad.hab=abad.hab-10
imp.reset()
abad.y=32
end
elseif abad.step>6 then
@@ -197,6 +200,7 @@ function abad_state_falling()
abad.y=abad.y+2
else
abad.hab=abad.hab+10
imp.reset()
abad.y=0
end
end
@@ -222,6 +226,7 @@ function abad_state_stairs()
end
else
abad.hab=abad.hab-10
imp.reset()
abad.y=32
end
elseif btn(KEY_DOWN) then
@@ -231,6 +236,7 @@ function abad_state_stairs()
end
else
abad.hab=abad.hab+10
imp.reset()
abad.y=0
end
end