From 52664a0311123e60e9dd58fbbe9fa2fc046d5f4a Mon Sep 17 00:00:00 2001 From: Jeremy Penner Date: Sat, 22 Feb 2020 15:15:00 -0500 Subject: [PATCH] finish lev3, add gord support --- end.jim | Bin 56 -> 60 bytes game.jim | Bin 3937 -> 4198 bytes game.jor | 32 ++++++++++++++++++++++++++++---- lev00003.jim | Bin 2043 -> 2350 bytes lev00003.jor | 47 ++++++++++++++++++++++++++++++----------------- 5 files changed, 58 insertions(+), 21 deletions(-) diff --git a/end.jim b/end.jim index 1745d38b7933df9d823e6efc2ba10ea72dff3a10..7a6019466d90afc5cbd777cc4eea6c8789bb6d18 100755 GIT binary patch literal 60 zcmcE16c5n1`{QrGARf>qaNez)RXrdzFGVjmv4G*Xo(n5Gg9|G+gO9v{<81{ORyH7y L2gq{;@)}tI@5~P! literal 56 zcmcE16!O=%`|hX1AmraA5bIXXs^p)Vm!g-OSitaG&xMtp!G)EZ!AJhKf(t7fkj(>T HH?jf%o&F7& diff --git a/game.jim b/game.jim index a72a91d545613f5013275541d5028b0cb9280dec..f1dae66cb429e96d0efa4fcb3e202c2f4f5b04b6 100755 GIT binary patch literal 4198 zcmZWseQ+Dq5r4Mc^G6ifqGK6Ka4ZK?2#H8i211i2cPHKHTRIg5(kd`Smd>^kSrXF8 zc0@C9?IdM94YPX!tdPEmZ+D_OE7T`O3z$kMk3A8k)p~xj}Nlcwo3m01fh*xMo{ zVE_g$n5OrLtz??KMlP2qiG#_U_=~|-k|55OF9R_E=zwTbp8(F?=Xam~isT>&*#i-* zK-kgjlr--~@q~BCZ+1rW9j!15CbeVAas;>cztMZ))ulELnjE+AzMQX->SDdb7( zaH`L!xT7#1%!9_7jlU{uLy%Rady|Z+Iep5jH z0`ScOf5|&X@!SqrD-!i?geUAkCmXECdjY9rMj_KMI7?S!f*tctIj`G1w#Hz;-U7yZ z?SylfR|3pF41QeOzs6ewtuJ}sU477>2}iUg>)ju&LaNFZgQou#^SF z7r|TH?E<&eXxI^V_t6=^m|$)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V!0f(;CSazD5$=CqM1- z>7tCpEH_k1D6EOBm+MK?C5CjCRb+=;rxTFDLOilj@7}wLsk8#nu|L|nRkl}dTE2tb zr%e0hEp!5UMow;lZcxZ&Gf5@SPvZVvYniGtQ~|(I%nrcZFd9z-{WzS#{JAb;|54cm z8S5|Z>pEwkr(Wg4FUfQ8#!jNLKgi8XN|3XI>!@rm0>Hs|CJEC?Hk0k|hs_zdI`vlU zIN$MW4U+jIEbTARhwG3U0qPX3&{{cXKhW-4{ieUj$cg(1aizbB@X0m-DhBu^IE@|i$OMO;xyE4geQ`{6Bcr^|80u;4o<<1lwIur^Sl*+7i_GN85g2+&aQSinRQ zc?JF>EZvU#5ReN#mHj%fsg?dl-g%|HX#TPP|SC66gk<`?PnKr`m2 zlE+J)%x3e5S;K|%eUpsHRAvsE2=3Y|5`e2j*9T*4Pf&6;$q#*`TEKiO=0 diff --git a/game.jor b/game.jor index 9d8f3a4..6095a50 100755 --- a/game.jor +++ b/game.jor @@ -12,7 +12,8 @@ var player.prevdir 1 const MOVING userword 2 const NOCLIP userword 4 const HASNEUT userword -8 const ISPROG userword +8 const HASGORD userword +16 const ISPROG userword 1 player.state HASNEUT f! @@ -29,6 +30,12 @@ var posessed-rexx isjaye? player.state MOVING f@ and 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.state NOCLIP f@ not if isneut? if NEUTABLE else WALKABLE then mapflag? @@ -36,6 +43,9 @@ var posessed-rexx 14 9 N ' {jaye} defentity Jaye 17 5 N ' {neut} defentity Neut +-10 -10 N ' {gord} defentity Gord + +: gord-present? Gord entity>pos drop 0 >= ; : player isrexx? if posessed-rexx @ else @@ -152,7 +162,8 @@ var q-level ( S T U F F ) : reset-level 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 |; ' neut-touch redefine ; userword @@ -280,7 +291,11 @@ var _dorubber : exitdoor create-linked-object :| dup door-listener entering-door? if - responder entity.user @ queue-level + player.state HASGORD f@ not gord-present? and if + jaye say" I'm not leaving Gord behind." + else + responder entity.user @ queue-level + then then |; listener! ; : switch create-linked-object @@ -325,11 +340,20 @@ var _dorubber : chain-listener ( entity xp -- ) swap dup @ , ! ; immediate : 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 reset-level ' mode-move ' tick 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 :| ' mode-move ' tick redefine hide-footer |; ' all-jobs-complete redefine ; ' onload redefine diff --git a/lev00003.jim b/lev00003.jim index dca63c7dbbd3abbced85058a1d559bf40e0886b2..418ca622a4c5873cc1d5037ac243dbc7ad67d479 100755 GIT binary patch literal 2350 zcmaJ?U5Fc16rMJjF16AvNOuL4dg7~b7 z;#avA_Z&^r7f^g`OZzN$g)7iSs?uHD(sXG1HGtOX#=fWMBNGCAFUGrk9c%)OkdV>U zyAYvFtMmeW4S*#C&J+-6!5h%G=m+!?0F`O(oqc!dC-@Ts-iUNk+*xjuUZ!8t&k?`` zd%(w#$rtoH`V+lQW85oXJvQ>X+H*^}AL%XnH@yue)sp~>M!rr!p+74RsiW#%6*5Gi zmmvjUzdEU=)G0O2Y3w9IS!45w7)LnDy{OKsC)6Qsx#3h+na^$P+oU50&XEj1%)K$* zF_ zUXyt)BaVw837Ow?T)T0+uXAB5ulvyenoD6e9|4%vMA4Aste)s)1t3CS17zgD20pTA z8e}b%e11Clj9-~P+E@7vRQh>Cy@p6+p&$}L&RBRfbx<2mVV-;S`@XV@hUKAnQeT@+ z5Q)^cQnV_2&vly02vMg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%#_+Tetu*^%Wse zNQqn*K*FRm^j*3N%$y*;XlqwNWRbp4Kc*W%6r$)O_g#8LEQMlUJ9q@GqAhxveowy= zgmBm)Ho?kw^cuZEf29hVfoNas$y$vz*%fP(T7My^q-b`cWVS5;O z6hy}&1H#SxEX+boMN^g9JWyut@P3hP7Ci%?VK0mGUz{GSwGaF#CTcqAADhAN7-OcsHU=`oW!4)I+oA|^QkAiChTQ%GTg*B z8Q+u!9&5195RfOsuS*By@eF?;g+pD&0cIw1qL_DxQ?w(I2+{@x_GX4B<&bjUM zc{{`3lb@7-&+tofP{RDGd??~KV#JCkOaku|HS~vpW5!Z+h$P5D!>-r6*=&OoWmNva z;Fc0z5&3^H;*H`sp~WGgTeC^2PV&?BX2~fOA0m}Su^`QSx!lcz%(T5^*8s0H7K#qZ z&s7=@X@dLdl0yoW#YMZ|*z?4xhzK2HDBJ~l&)+SgP!8`kW8lxq8tJ1tNmzuY;q0*y zQKKCHOgSVkn|xOZ$>&V|KnXlDn(j-r@LP-@RQ*0t`)#vZ`@bwv`)$*wir^leSBIq| z{H!`CnS4w2g(}u0iDy%jX;Gs@ny{lrA_-#RG`C))S%cq@1~db<-&)*@hf9B0v`FSE zr-LMEJLHs2;JcKZAjJFtCN7$L&;s<*@T>XLHuMgH9yz04_rIaM48HDI9bY=ukeJU6 zeLB?X5t$>AbVR!+ zM9|M!KC5}Wq6Adzh0u9erp%1L}BCz7w{xZgD_Z{~Q)H9*C` zyyiBKd1(`0&8@k0HsPl37S{3XIO}QRKXYY!X#}3J$fdo 15 sleep ; @@ -51,8 +50,6 @@ DEV not if prog-view neut say" > CAN YOU REACH THE SWITCH\BEHIND YOU?" human-view - gord say" Huh? Oh, there is a\switch there on the wall." - gord say" Never thought about what\it connected to." then 5 sleep b1 EVACT entity>do 15 sleep gord say" > I TURNED IT ON" @@ -80,35 +77,51 @@ Rexx :noname var gord-jaye d2 :noname - dup EVTOUCH = isjaye? and - gord-jaye @ not and - 6 6 WALKABLE mapflag? not and if + dup EVTOUCH = isjaye? and gord-jaye @ not and if 1 gord-jaye ! cancel-ev move-player jaye say" Hey! Gord?\I'm Jaye." - gord say" Jaye, am I glad to see you.\Can you move this desk?" - jaye say" Let me try..." - jaye say" . . . .\!!!!....." - jaye say" !!!!!!!!!!!!!...." - jaye say" No, I don't think I can." - gord say" I keep staring at that\cleaning robot." - gord say" He looks like he could\lift a building." + 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?" + jaye say" Let me try..." + jaye say" . . . .\!!!!....." + jaye say" !!!!!!!!!!!!!...." + jaye say" No, I don't think I can." + gord say" I keep staring at that\cleaning robot." + gord say" He looks like he could\lift a building." + then then chain-listener ; +var gord-up Gord :noname dup EVTOUCH = isrexx? and if gord say" AHHH NOOO\NOT GARBAGE\I AM NOT GARBAGE" 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 reset-level O - :| Gord yield done |; ' entities redefine - s" lev00003.map" load-map 7 11 tile>world Jaye entity.pos! 6 12 tile>world Neut entity.pos! - + 6 7 tile>world Gord entity.pos! ; ' onload redefine