From a59a079d099071e3b76b17e682d1e26051bdc3d7 Mon Sep 17 00:00:00 2001 From: Jeremy Penner Date: Mon, 25 Jan 2021 22:26:19 -0500 Subject: [PATCH] better hacking messages --- game/entity.fnl | 18 +++++++++++++++--- game/level6.fnl | 22 ++++++++++++++++++---- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/game/entity.fnl b/game/entity.fnl index e851236..2bf2328 100644 --- a/game/entity.fnl +++ b/game/entity.fnl @@ -138,7 +138,12 @@ (vm:case [ev.touch ev.act :handle-scan :libb-on-responder (vm:when controlstate.libb :controlstate :bset 0xffff :move-player-to controlstate.neut :controlstate :bset) :move-to-responder] [ev.untouch :libb-on-responder :not (vm:when ev.deact :handle-scan)] - [ev.hack ev.act :handle-scan controlstate.libb :controlstate :bset :move-to-responder controlstate.neut :controlstate :bset] + [ev.hack vm.true :hack-handled :set + ev.act :handle-scan + controlstate.libb :controlstate :bset + :move-to-responder + controlstate.neut :controlstate :bset + (say :neut "NO SWEAT.")] [:else]) ] [:drop])) @@ -180,15 +185,22 @@ [(say :pady "OH HI AGAIN! I MISSED YOU TOO!")])) :is-neut? (vm:when :move-to-responder)) :rdrop - :dup ev.hack := (vm:when :drop ev.act) + :dup :evhack? (vm:when :drop ev.act) :dup (itile :t-keyoff) (itile :t-keyon) :handle-onoff (itile :t-keyon) :activate-link) +(vm:var :hack-handled vm.false) +(vm:word :evhack? ; e -- f + ev.hack := (vm:if [vm.true :hack-handled :set vm.true] [vm.false])) + (vm:word :trigger-sidekick (vm:if-and [[:is-jaye?] [:gord-sitting :get]] [:gord-yx :get ev.touch :entity-around>do] [(vm:if-and [[:is-neut?] [:libb-present :get] [:libb-hidden?]] - [:neut-yx :get ev.hack :entity-at>do :drop])])) + [vm.false :hack-handled :set + :neut-yx :get ev.hack :entity-at>do :drop + :hack-handled :get :not (vm:when + (say :libb "DON'T THINK I CAN HACK THAT."))])])) (fn append-from-map [map entity-org prefix] (entity-org:append [:align 0x100]) diff --git a/game/level6.fnl b/game/level6.fnl index 328fe5e..a50c783 100644 --- a/game/level6.fnl +++ b/game/level6.fnl @@ -20,7 +20,7 @@ (say :neut "PEOPLE ARE IN DANGER" "PLEASE OPEN THE DOOR") (say :pady "WELL THAT'S TERRIBLE!" "BUT I JUST CAN'T OPEN" "WITHOUT THE PROPER CODE.") :libb-present :get (vm:when (say :libb "OH JEEZ, LET ME AT HER, NEUT."))]) - (vm:if-and [[:dup ev.hack :=] [:responder-itile (itile :t-keyoff) :=]] + (vm:if-and [[:responder-itile (itile :t-keyoff) :=] [:over :evhack?]] [(say :pady "ANOTHER STRANGE PROGRAM!" "MY, I'M POPULAR TODAY!") (say :libb "OH PUKE. PLEASE SHUT UP.") (say-runon :pady "HOW RUD") @@ -35,7 +35,11 @@ (vm:word :keypad4 0x7777 :first-keypad) (vm:word :term-message? :dup :term ev.touch := :is-jaye? :&) -(vm:word :c1 :term-message? (vm:when +(vm:word :c1 + :dup :evhack? (vm:when + (say :libb "JUST A BUNCH OF BORING" "SOURCE CODE.") + (say :libb "BILL DIDN'T LEAVE ANYTHING" "REALLY JUICY HERE WHERE" "OTHER PEOPLE COULD GET AT IT.")) + :term-message? (vm:when (say :term ".:: WELCOME TO FARQUAAD ::." "OS: PRODOS 2.6" "RAM: 8 FREAKIN MEGABYTES D00D" "SYSADMIN: BILL") (say :term "S3CR3T C0D3Z: GET OUT LAMER" "BOSS KEY: CTRL-B TO ACTIVATE" "OPEN POD BAY DOORS:" " I CAN'T DO THAT DAVE") (say :term "GOOD RIDDANCE"))) @@ -52,6 +56,8 @@ (say :term "SUBJECT: RE: RE: SERVER'S DOWN" "UHHHH THE FIREWALL IS BLOCKING" "THE PASSCODE?") (say :term "SUBJECT: RE: RE: SERVER'S DOWN" "AUGH FINE! I REBOOTED IT."))) (vm:word :c4 + :dup :evhack? (vm:when + (say :libb "I BROUGHT EVERYTHING GOOD" "ALONG WITH ME, DON'T WORRY.")) (vm:if-and [[:dup ev.touch :=] [:is-neut?] [:libb-present :get :not]] [(say :libb "WELL, WELL, WELL." "WHAT HAVE WE HERE?") (say :libb "]/VERSION") @@ -85,11 +91,16 @@ (say :gord "A WEIRD LOOKING SPREADSHEET...") (say :gord "OH WAIT, I PRESSED A KEY AND" "IT DISAPPEARED. SOMEONE USING" "THE BOSS KEY TO HIDE" "THAT THEY'RE READING THE ENTIRE") (say :gord "ARCHIVE OF USER FRIENDLY" "COMIC STRIPS."))) -(vm:word :c6 :term-message? (vm:when +(vm:word :c6 + :dup :evhack? (vm:when + (say :libb "HEHEHE, THAT WAS A FUN ONE.")) + :term-message? (vm:when (say :term "SUBJECT: CARD SCANNERS?" "LOOKS LIKE THE SCANNERS ARE" "ON THE FRITZ AGAIN..." "I SCANNED MY KEYCARD TO GET") (say :term "INTO THE OFFICE AND THE DOOR" "WOULDN'T CLOSE!" "SOMEONE'S GOTTA FIX THAT ASAP," "IT'S A SERIOUS SECURITY PROBLEM!") (say :term "SUBJECT: RE: CARD SCANNERS?" "I CAN TAKE A QUICK LOOK, I" "MIGHT HAVE AN IDEA AS TO" "WHAT'S GOING ON. -- BILL"))) (vm:word :c7 + :dup :evhack? (vm:when + (say :libb "YOU KNOW THE SWITCH IS RIGHT" "THERE ON THE WALL, RIGHT?")) (vm:if-and [[:dup ev.touch :=] [:is-jaye?]] [:responder-itile (itile :termon) := (vm:if [(say :term "WORKSECURE (TM) V2.0" "AUTHORIZED PERSONNEL ONLY") @@ -101,7 +112,10 @@ (say :term "WE PAY SIGNIFICANT LICENSE FEES" "FOR ENCRYPTED PASSWORD" "MANAGERS FOR ALL EMPLOYEES!") (say :term "USE IT TO GENERATE AND STORE" "SECURE PASSWORDS!") (say :jaye "THERE'S A STICKY NOTE ATTACHED" "TO THE MONITOR THAT SAYS" "'7777'."))) -(vm:word :c9 :term-message? (vm:when +(vm:word :c9 + :dup :evhack? (vm:when + (say :libb "HE'S JUST BEING DRAMATIC.")) + :term-message? (vm:when (say :term "SUBJECT: EXPERIMENT" "HEY FOLKS, CAN YOU ALL DO ME A" "HUGE FAVOUR?" "THERE WAS A SMALL BUG IN MY") (say :term "CODE (YES, IT HAPPENS!) AND A" "PROGRAM I WAS WORKING ON" "MADE A FEW TOO MANY COPIES OF" "ITSELF. CAN EVERYONE CHECK TO") (say :term "SEE IF YOU HAVE A PROCESS" "CALLED 'LIBB' RUNNING ON YOUR" "TERMINAL?")