neuttower/lev00005.jor

129 lines
3.2 KiB
Plaintext
Executable file

( L E V 0 0 0 0 5 )
202 12 128 192 17 244 0 46 9 241 18 0 instrument glitch-inst
202 10 48 0 83 245 0 10 0 221 6 3 instrument drop-inst
: sfx-glitch glitch-inst 1 loadsfx %F ;
: sfx-dropgarbage :| drop-inst 3 loadsfx %A rest 1 octave ! %A |; SFX send ;
objects: O
lazy 60 over 19 9 timedswitch ts
16 7 defrexx Rexx
9 3 defrexx Rexx2
13 6 door d1
10 9 door d2
5 6 door d3 >lazy!
10 2 door d4
6 5 12 exitdoor dx
lazy dup 11 3 computer c1
' c1 7 11 computer c2 >lazy!
lazy dup 7 5 computer c3
' c3 2 11 computer c4 >lazy!
' d2 10 10 scanner s1
' dx 4 12 scanner sx
' d4 7 1 switch b1
' d1 19 3 switch b2
:noname 0 MAXTILE for i tileflags + b@ RUBBLE & if i b, then next ;
array rubbletiles execute
here rubbletiles - 1 - const MAXRUBBLE
: randomrubble rand 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 =
rexx-dest tile b@ CARPET = and ;
: not-picking-up? ( -- b ) rexx-dest RUBBLE mapflag? not ;
: touch ( x y -- b )
drop 13 <= isrexx? and posessed-rexx @ Rexx = and if
3 glitchlevel !
sfx-glitch
rexx say" PaRiTy ErrRor!!"
noteoff
0 glitchlevel !
1
else
not-picking-up? can-drop-rubble? and isrexx? and if
randomrubble rexx-pos tile b! invalidate-map
sfx-dropgarbage
then 0
then ;
var first-rexx-touch
Rexx :noname
' sick-rexxinst ' rexxinst redefine
dup EVTOUCH = isneut? and first-rexx-touch @ not and if
1 first-rexx-touch !
rexx say" bOSssS..."
rexx say" i doN'T fEEl so\gooOO00dddDdDd..."
then chain-listener ;
var first-rexx2-touch
Rexx2 :noname
' norm-rexxinst ' rexxinst redefine
dup EVTOUCH = isneut? and first-rexx2-touch @ not and if
1 first-rexx2-touch !
neut say" REXX UNIT\PERFORM FULL DIAGNOSTIC SCAN"
rexx say" I'm in tip-top shape, boss!"
neut say" ACTIVATING RELIEF SUBROUTINE"
then chain-listener ;
: mr ( dir -- ) Rexx entity.dir ! Rexx move-entity ;
d2 :noname
dup entering-door?
isjaye? and
gord-follow? not and
Rexx entity>pos drop 0 > and
if
move-player
W mr
1 glitchlevel !
:| sick-rexxinst 2 loadsfx 5 sleep
%G 10 sleep %E 10 sleep %C 10 sleep 1 octave ! %G |; SFX send
rexx say" daaAiisSyyy, daAAIIsYY..." hide-footer
2 glitchlevel !
W mr
W mr
:| sick-rexxinst 2 loadsfx
%A rest rest %B rest rest %C rest rest %A rest rest %C rest rest %G |;
SFX send
rexx say" gIVe mE YOur AnSwerR\doOO0OO0o0oooOO..." hide-footer
N mr
N mr
4 glitchlevel !
1 quaking !
sfx-glitch
rexx say" uh oh" hide-footer
Rexx entity>pos world>tile -1 -1 +pos
dup 3 + for dup over 3 + i >rot for i over ( x y )
tile randomrubble swap b! invalidate-map sfx-splode 1 sleep
next drop next drop
-100 -100 Rexx entity.pos!
0 glitchlevel !
5 sleep
0 quaking !
drop EVNOP
then chain-listener ;
:noname O
' touch ' touch-override redefine
18 4 tile>world Jaye entity.pos!
19 5 tile>world Neut entity.pos!
with-gord
; ' onload redefine