neuttower/lev00005.jor

35 lines
833 B
Plaintext
Raw Normal View History

( L E V 0 0 0 0 5 )
objects: O
16 7 defrexx Rexx
:noname 0 MAXTILE for i tileflags + b@ RUBBLE & if i b, then next ;
array rubbletiles execute
here rubbletiles - 1 - const MAXRUBBLE
: randomrubble ticks MAXRUBBLE % rubbletiles + b@ ;
: rexx-pos ( -- x y ) Rexx entity>pos world>tile ;
: rexx-dest ( -- x y ) rexx-pos Rexx entity.dir @ dir>pos +pos ;
: can-drop-rubble? ( -- b ) rexx-pos tile b@ CARPET = ;
: not-picking-up? ( -- b ) rexx-dest RUBBLE mapflag? not ;
: touch ( x y -- b )
drop drop
not-picking-up? can-drop-rubble? and isrexx? and if
randomrubble rexx-pos tile b! invalidate-map
then 0 ;
:noname O
' touch ' touch-override redefine
s" lev00005.map" load-map
18 4 tile>world Jaye entity.pos!
19 5 tile>world Neut entity.pos!
with-gord
; ' onload redefine