finish lev3, add gord support
This commit is contained in:
parent
0fd412510c
commit
52664a0311
30
game.jor
30
game.jor
|
@ -12,7 +12,8 @@ var player.prevdir
|
||||||
1 const MOVING userword
|
1 const MOVING userword
|
||||||
2 const NOCLIP userword
|
2 const NOCLIP userword
|
||||||
4 const HASNEUT userword
|
4 const HASNEUT userword
|
||||||
8 const ISPROG userword
|
8 const HASGORD userword
|
||||||
|
16 const ISPROG userword
|
||||||
|
|
||||||
1 player.state HASNEUT f!
|
1 player.state HASNEUT f!
|
||||||
|
|
||||||
|
@ -29,6 +30,12 @@ var posessed-rexx
|
||||||
isjaye? player.state MOVING f@ and
|
isjaye? player.state MOVING f@ and
|
||||||
if {jaye-walk} else {jaye-stand} then ;
|
if {jaye-walk} else {jaye-stand} then ;
|
||||||
|
|
||||||
|
: {gord}
|
||||||
|
player.state HASGORD f@ if
|
||||||
|
isjaye? player.state MOVING f@ and
|
||||||
|
if {gord-walk} else {gord-stand} then
|
||||||
|
else {gord-sit} then ;
|
||||||
|
|
||||||
: player.canmove? ( x y -- )
|
: player.canmove? ( x y -- )
|
||||||
player.state NOCLIP f@ not if
|
player.state NOCLIP f@ not if
|
||||||
isneut? if NEUTABLE else WALKABLE then mapflag?
|
isneut? if NEUTABLE else WALKABLE then mapflag?
|
||||||
|
@ -36,6 +43,9 @@ var posessed-rexx
|
||||||
|
|
||||||
14 9 N ' {jaye} defentity Jaye
|
14 9 N ' {jaye} defentity Jaye
|
||||||
17 5 N ' {neut} defentity Neut
|
17 5 N ' {neut} defentity Neut
|
||||||
|
-10 -10 N ' {gord} defentity Gord
|
||||||
|
|
||||||
|
: gord-present? Gord entity>pos drop 0 >= ;
|
||||||
|
|
||||||
: player
|
: player
|
||||||
isrexx? if posessed-rexx @ else
|
isrexx? if posessed-rexx @ else
|
||||||
|
@ -152,7 +162,8 @@ var q-level
|
||||||
( S T U F F )
|
( S T U F F )
|
||||||
: reset-level
|
: reset-level
|
||||||
0 objects !
|
0 objects !
|
||||||
:| done |; ' entities redefine
|
:| player.state HASGORD f@ not gord-present? and if Gord yield then
|
||||||
|
done |; ' entities redefine
|
||||||
:| drop drop 0 |; ' jaye-touch redefine
|
:| drop drop 0 |; ' jaye-touch redefine
|
||||||
:| drop drop 0 |; ' neut-touch redefine ; userword
|
:| drop drop 0 |; ' neut-touch redefine ; userword
|
||||||
|
|
||||||
|
@ -280,7 +291,11 @@ var _dorubber
|
||||||
|
|
||||||
: exitdoor create-linked-object
|
: exitdoor create-linked-object
|
||||||
:| dup door-listener entering-door? if
|
:| dup door-listener entering-door? if
|
||||||
|
player.state HASGORD f@ not gord-present? and if
|
||||||
|
jaye say" I'm not leaving Gord behind."
|
||||||
|
else
|
||||||
responder entity.user @ queue-level
|
responder entity.user @ queue-level
|
||||||
|
then
|
||||||
then |; listener! ;
|
then |; listener! ;
|
||||||
|
|
||||||
: switch create-linked-object
|
: switch create-linked-object
|
||||||
|
@ -325,11 +340,20 @@ var _dorubber
|
||||||
: chain-listener ( entity xp -- ) swap dup @ , ! ; immediate
|
: chain-listener ( entity xp -- ) swap dup @ , ! ; immediate
|
||||||
: cancel-ev ( ev -- EVNOP ) drop EVNOP ;
|
: cancel-ev ( ev -- EVNOP ) drop EVNOP ;
|
||||||
|
|
||||||
|
Gord :noname
|
||||||
|
dup EVTOUCH = isjaye? and player.state HASGORD f@ not and if
|
||||||
|
move-player
|
||||||
|
1 player.state HASGORD f!
|
||||||
|
Gord follow
|
||||||
|
then chain-listener ;
|
||||||
|
|
||||||
:noname
|
:noname
|
||||||
reset-level
|
reset-level
|
||||||
' mode-move ' tick redefine
|
' mode-move ' tick redefine
|
||||||
' full-draw ' draw redefine
|
' full-draw ' draw redefine
|
||||||
:| Jaye yield done |; ' party redefine
|
:| Jaye yield
|
||||||
|
player.state HASGORD f@ if Gord yield then
|
||||||
|
done |; ' party redefine
|
||||||
:| ' tick-debounce ' tick redefine |; ' any-job-started redefine
|
:| ' tick-debounce ' tick redefine |; ' any-job-started redefine
|
||||||
:| ' mode-move ' tick redefine hide-footer |; ' all-jobs-complete redefine
|
:| ' mode-move ' tick redefine hide-footer |; ' all-jobs-complete redefine
|
||||||
; ' onload redefine
|
; ' onload redefine
|
||||||
|
|
BIN
lev00003.jim
BIN
lev00003.jim
Binary file not shown.
33
lev00003.jor
33
lev00003.jor
|
@ -20,7 +20,6 @@ defer c1 ' c1 8 3 computer c3
|
||||||
end.jor 0 4 exitdoor dx
|
end.jor 0 4 exitdoor dx
|
||||||
' dx 0 5 scanner sx
|
' dx 0 5 scanner sx
|
||||||
|
|
||||||
6 7 N ' {gord-sit} defentity Gord
|
|
||||||
5 2 defrexx Rexx
|
5 2 defrexx Rexx
|
||||||
|
|
||||||
: flicker c1 EVTOG entity>do 15 sleep ;
|
: flicker c1 EVTOG entity>do 15 sleep ;
|
||||||
|
@ -51,8 +50,6 @@ DEV not if
|
||||||
prog-view
|
prog-view
|
||||||
neut say" > CAN YOU REACH THE SWITCH\BEHIND YOU?"
|
neut say" > CAN YOU REACH THE SWITCH\BEHIND YOU?"
|
||||||
human-view
|
human-view
|
||||||
gord say" Huh? Oh, there is a\switch there on the wall."
|
|
||||||
gord say" Never thought about what\it connected to."
|
|
||||||
then
|
then
|
||||||
5 sleep b1 EVACT entity>do 15 sleep
|
5 sleep b1 EVACT entity>do 15 sleep
|
||||||
gord say" > I TURNED IT ON"
|
gord say" > I TURNED IT ON"
|
||||||
|
@ -80,13 +77,14 @@ Rexx :noname
|
||||||
|
|
||||||
var gord-jaye
|
var gord-jaye
|
||||||
d2 :noname
|
d2 :noname
|
||||||
dup EVTOUCH = isjaye? and
|
dup EVTOUCH = isjaye? and gord-jaye @ not and if
|
||||||
gord-jaye @ not and
|
|
||||||
6 6 WALKABLE mapflag? not and if
|
|
||||||
1 gord-jaye !
|
1 gord-jaye !
|
||||||
cancel-ev
|
cancel-ev
|
||||||
move-player
|
move-player
|
||||||
jaye say" Hey! Gord?\I'm Jaye."
|
jaye say" Hey! Gord?\I'm Jaye."
|
||||||
|
6 6 WALKABLE mapflag? if
|
||||||
|
gord say" Jaye, am I glad to see you."
|
||||||
|
else
|
||||||
gord say" Jaye, am I glad to see you.\Can you move this desk?"
|
gord say" Jaye, am I glad to see you.\Can you move this desk?"
|
||||||
jaye say" Let me try..."
|
jaye say" Let me try..."
|
||||||
jaye say" . . . .\!!!!....."
|
jaye say" . . . .\!!!!....."
|
||||||
|
@ -94,21 +92,36 @@ d2 :noname
|
||||||
jaye say" No, I don't think I can."
|
jaye say" No, I don't think I can."
|
||||||
gord say" I keep staring at that\cleaning robot."
|
gord say" I keep staring at that\cleaning robot."
|
||||||
gord say" He looks like he could\lift a building."
|
gord say" He looks like he could\lift a building."
|
||||||
|
then
|
||||||
then chain-listener ;
|
then chain-listener ;
|
||||||
|
|
||||||
|
var gord-up
|
||||||
Gord :noname
|
Gord :noname
|
||||||
dup EVTOUCH = isrexx? and if
|
dup EVTOUCH = isrexx? and if
|
||||||
gord say" AHHH NOOO\NOT GARBAGE\I AM NOT GARBAGE"
|
gord say" AHHH NOOO\NOT GARBAGE\I AM NOT GARBAGE"
|
||||||
rexx say" Whatever you say, boss!"
|
rexx say" Whatever you say, boss!"
|
||||||
then chain-listener ;
|
then
|
||||||
|
dup EVTOUCH = isjaye? and gord-up @ not and if
|
||||||
|
jaye say" Are you hurt?"
|
||||||
|
gord say" My leg was pinned.\I don't think I can put\any weight on it."
|
||||||
|
jaye say" Here, let me help you up."
|
||||||
|
hide-footer
|
||||||
|
then
|
||||||
|
dup chain-listener
|
||||||
|
EVTOUCH = isjaye? and gord-up @ not and if
|
||||||
|
1 gord-up !
|
||||||
|
gord say" Thanks."
|
||||||
|
jaye say" Don't mention it."
|
||||||
|
jaye say" I can help you get around if\you help me navigate this\maze of a security system."
|
||||||
|
gord say" I'm just as eager to get\out of here as you."
|
||||||
|
gord say" Let's go."
|
||||||
|
then ;
|
||||||
|
|
||||||
:noname
|
:noname
|
||||||
reset-level O
|
reset-level O
|
||||||
|
|
||||||
:| Gord yield done |; ' entities redefine
|
|
||||||
|
|
||||||
s" lev00003.map" load-map
|
s" lev00003.map" load-map
|
||||||
7 11 tile>world Jaye entity.pos!
|
7 11 tile>world Jaye entity.pos!
|
||||||
6 12 tile>world Neut entity.pos!
|
6 12 tile>world Neut entity.pos!
|
||||||
|
6 7 tile>world Gord entity.pos!
|
||||||
; ' onload redefine
|
; ' onload redefine
|
||||||
|
|
Loading…
Reference in a new issue