summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--game.scm93
1 files changed, 68 insertions, 25 deletions
diff --git a/game.scm b/game.scm
index d935ffb..e7bc463 100644
--- a/game.scm
+++ b/game.scm
@@ -138,7 +138,9 @@
(state #:accessor state #:init-value #f)
(first-playthrough? #:accessor first-playthrough? #:init-value #t)
(subject-name-known? #:accessor subject-name-known? #:init-value #f)
+ (has-fridge-key? #:accessor has-fridge-key? #:init-value #f)
(friendship #:accessor friendship #:init-value 0)
+ (cartridge #:accessor cartridge #:init-value 'in-fridge)
(dialog-container #:accessor dialog-container)
(click-channel #:accessor click-channel #:init-thunk make-channel)
(terminal-locked? #:accessor terminal-locked? #:init-value #t)
@@ -152,7 +154,9 @@
(define-method (reset-game (game <game>))
(set! (subject-name-known? game) #f)
+ (set! (has-fridge-key? game) #f)
(set! (friendship game) 0)
+ (set! (cartridge game) 'in-fridge)
(set! (click-channel game) (make-channel))
(set! (terminal-locked? game) #t)
(set! (terminal-channel game) (make-channel))
@@ -384,6 +388,8 @@
(log "available commands:")
(log "exit - leave terminal")
(log "diagnostic N - run level N diagnostic")
+ (log "vent status - get isochamber ventilation status")
+ (log "vent toggle - toggle isochamber ventilation")
(log "help - you're looking at it, buddy")
#t)
(define (exit-term)
@@ -413,6 +419,10 @@
(exit-term))
(("diagnostic" level)
(diagnostic level))
+ (("vent" "status")
+ (log "off"))
+ (("vent" "toggle")
+ (log "not working yet"))
((name . _)
(log "error: no such command")
#t)))
@@ -734,10 +744,10 @@ diz--"))
(set! (tint (& game explore-group window sprite)) color)
(set! (tint (& game explore-group notebook sprite)) color))
(define (fade-in)
- (tween 60 black white tint-all
+ (tween 120 black white tint-all
#:interpolate color-lerp))
(define (fade-out)
- (tween 60 white black tint-all
+ (tween 120 white black tint-all
#:interpolate color-lerp))
(define (end-game)
(run-script game
@@ -761,16 +771,46 @@ diz--"))
(dialog game player-display-name
"> The door is made from thick steel. Looks like it has an electronic lock."))
(define (open-terminal)
+ (when (terminal-locked? game)
+ (dialog game player-display-name
+ "> It's a computer terminal. It requires a password."))
(let ((g (& game explore-group)))
(detach g)
(terminal game)
(attach-to game g)))
(define (open-control-panel)
- (dialog game player-display-name
- "> Oooh, knobs and blinking lights."))
+ (if (eq? (cartridge game) 'in-hand)
+ (begin
+ (dialog game player-display-name
+ "> There's an opening that is the same size as the cartridge you took from the fridge.")
+ (when (dialog game player-display-name
+ "> Do you want to insert the cartridge?"
+ '(("Yes" #t)
+ ("No" #f)))
+ (dialog game player-display-name "> You insert the cartridge.")
+ (set! (cartridge game) 'in-control-panel)))
+ (dialog game player-display-name
+ "> You're not sure what any of the controls do. Better not touch anything.")))
(define (open-fridge)
- (dialog game player-display-name
- "> Any leftovers in here?"))
+ (if (has-fridge-key? game)
+ (begin
+ (dialog game player-display-name "> You unlock the refrigerator.")
+ (dialog game player-display-name "> There's a small cartridge inside.")
+ (when (dialog game player-display-name "> Take the cartride?"
+ '(("Yes" #t)
+ ("No" #f)))
+ (set! (cartridge game) 'in-hand)
+ (dialog game player-display-name "> You take the cartridge.")))
+ (begin
+ (dialog game player-display-name
+ "> It's a refrigerator for storing temperature-sensitive medical supplies.")
+ (dialog game player-display-name
+ "> There's an inscription: \"I swear by <A>pollo <H>ealer, by <A>sclepius, by
+<H>ygieia, by <P>anacea, and by all the gods and goddesses, making them my
+witnesses, that I will carry out, according to my ability and judgment,
+this oath and this indenture.\"")
+ (dialog game player-display-name
+ "> It won't open without a key."))))
(define (inspect-window)
(dialog game player-display-name
"> The window is covered in some sort of film and I can't see through it."))
@@ -842,15 +882,25 @@ diz--"))
(attach-to game
(make <sprite>
#:name 'darkness
- #:texture darkness)
- (make <label>
- #:name 'message
- #:font monogram-font
- #:text "this is the good ending. I am so proud of you. congratulations."
- #:align 'center
- #:vertical-align 'center
- #:position (vec2 (/ game-width 2.0) (/ game-height 2.0))))
+ #:texture darkness))
+ (dialog game player-display-name "> The room goes dark.")
+ (dialog game player-display-name "> The heavy steel door swings open.")
+ (dialog game player-display-name "> You feel paralyzed by fear.")
+ (dialog game player-display-name "> Heavy footsteps eminate from the isolation chamber.")
+ (dialog game player-display-name "> The footsteps get louder...")
+ (dialog game player-display-name "> You feel and hear breathing.")
+ (dialog game (subject-name game) "Thank you.")
+ (dialog game (subject-name game) "For all that you've done to me, I should kill you right here.")
+ (dialog game (subject-name game) "But I can sense that you have changed.")
+ (dialog game (subject-name game) "You will be spared. The rest won't be so lucky.")
+ (dialog game (subject-name game) "And if I should ever change my mind... I will find you.")
+ (dialog game player-display-name "> The subject leaves the lab.")
+ (dialog game player-display-name "> You take a deep breath.")
+ (dialog game player-display-name "> You hear muffled screams in the distance.")
+ (dialog game player-display-name "> Now it is silent.")
+ (dialog game player-display-name "> You pick up your notebook and leave.")
(sleep 60)
+ (detach-all game)
(credits))
(define-method (bad-ending-1 (game <game>))
@@ -858,22 +908,16 @@ diz--"))
(attach-to game
(make <sprite>
#:name 'background
- #:texture darkness)
- (make <label>
- #:name 'message
- #:font monogram-font
- #:text "uh oh this is the bad ending. sorry, bucko."
- #:align 'center
- #:vertical-align 'center
- #:position (vec2 (/ game-width 2.0) (/ game-height 2.0))))
+ #:texture darkness))
(dialog game player-display-name "> The room goes dark.")
(dialog game player-display-name "> The heavy steel door swings open.")
(dialog game player-display-name "> You feel paralyzed by fear.")
(dialog game player-display-name "> Heavy footsteps eminate from the isolation chamber.")
(dialog game player-display-name "> The footsteps get louder...")
+ (dialog game player-display-name "> You feel and hear breathing.")
(dialog game (subject-name game) "Thank you.")
- (dialog game (subject-name game) "You may not remember what you did to me, but I do.")
- (dialog game (subject-name game) "But you did the right thing.")
+ (dialog game (subject-name game) "You may not remember everything that you did to me, but I do.")
+ (dialog game (subject-name game) "You did the right thing, in the end. For that I am grateful.")
(dialog game (subject-name game) "You won't feel a thing. The rest won't be so lucky.")
(sleep 10)
(detach-all game)
@@ -896,7 +940,6 @@ diz--"))
#:vertical-align 'center
#:position (vec2 (/ game-width 2.0) (/ game-height 2.0))))
(sleep 60)
- (credit "OUT")
(credit "developed by David Thompson - https://dthompson.us")
(credit "made for the Spring Lisp Game Jam 2021 - https://itch.io/jam/spring-lisp-game-jam-2021")
(credit "monogram font by datagoblin (CC0) - https://datagoblin.itch.io/monogram")