From 4846cec0d2eee43e734da19b046ea14e678f138b Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sun, 5 Dec 2021 13:52:17 -0500 Subject: [PATCH] peasant: hook up some missing text in peasant4 --- games/peasant/peasant4_actions.s | 72 ++++++++++++++++++++++++++++++++ games/peasant/text/peasant4.inc | 4 ++ games/peasant/zp.inc | 4 ++ 3 files changed, 80 insertions(+) diff --git a/games/peasant/peasant4_actions.s b/games/peasant/peasant4_actions.s index bea2e9c7..c8b3b003 100644 --- a/games/peasant/peasant4_actions.s +++ b/games/peasant/peasant4_actions.s @@ -437,6 +437,17 @@ ned_cottage_look_at_fence: jmp finish_parse_message ned_cottage_look_at_rock: + ; check to see if it has been moved + lda GAME_STATE_2 + and #COTTAGE_ROCK_MOVED + beq ned_cottage_look_at_rock_unmoved + +ned_cottage_look_at_rock_moved: + ldx #ned_cottage_look_rock_moved_message + jmp finish_parse_message + +ned_cottage_look_at_rock_unmoved: ldx #ned_cottage_look_rock_message jmp finish_parse_message @@ -501,6 +512,10 @@ ned_tree_talk: cmp #NOUN_TREE beq ned_tree_talk_tree + cmp #NOUN_NONE + beq ned_tree_talk_at + cmp #NOUN_NED + beq ned_tree_talk_ned jmp parse_common_talk @@ -509,6 +524,41 @@ ned_tree_talk_tree: ldy #>ned_tree_talk_tree_message jmp finish_parse_message +ned_tree_talk_ned: + ; only if he's out + lda NED_STATUS + bmi ned_tree_talk_ned_out + + jmp parse_common_talk + +ned_tree_talk_ned_out: + + ldx #ned_tree_talk_ned_message + jmp finish_parse_message + +ned_tree_talk_at: + ; only if he's out + + lda NED_STATUS + bmi ned_tree_talk_at_out + + jmp parse_common_talk + +ned_tree_talk_at_out: + + ; scare him away + + lda #0 + sta NED_STATUS + + ; FIXME: do we need to re-draw? + + ldx #ned_tree_talk_none_message + jmp finish_parse_message + + ;================= ; look ;================= @@ -521,6 +571,15 @@ ned_tree_look: beq ned_tree_look_at_tree cmp #NOUN_NONE beq ned_tree_look_at + cmp #NOUN_DUDE + beq ned_tree_look_guy + cmp #NOUN_GUY + beq ned_tree_look_guy + cmp #NOUN_MAN + beq ned_tree_look_guy + cmp #NOUN_NED + beq ned_tree_look_guy + jmp parse_common_look @@ -534,6 +593,19 @@ ned_tree_look_at_tree: ldy #>ned_tree_look_at_tree_message jmp finish_parse_message +ned_tree_look_guy: + + ; only if he's visible + lda NED_STATUS + bmi ned_tree_look_ned_out + + jmp parse_common_look + +ned_tree_look_ned_out: + ldx #ned_tree_look_ned_message + jmp finish_parse_message + ;======================= ;======================= diff --git a/games/peasant/text/peasant4.inc b/games/peasant/text/peasant4.inc index b96ba16f..28deaf7c 100644 --- a/games/peasant/text/peasant4.inc +++ b/games/peasant/text/peasant4.inc @@ -95,6 +95,7 @@ ned_cottage_look_rock_message: .byte "the cottage.",0 ; + look rock (after removing it) +ned_cottage_look_rock_moved_message: .byte "Some jerk removed a loose",13 .byte "stone from the back of the",13 .byte "cottage.",0 @@ -207,6 +208,7 @@ ned_tree_look_at_message: ; + look guy ; + look man ; + look ned (when Naked Ned is peeking out) +ned_tree_look_ned_message: .byte "A fairly naked man is",13 .byte "peering out from behind",13 .byte "that tree.",0 @@ -220,11 +222,13 @@ ned_tree_climb_tree_message: .byte "You don't climb wavy trees.",0 ; + talk (with Naked Ned visible) (he disappears until you re-enter) +ned_tree_talk_none_message: .byte "You startled him and he",13 .byte "disappears!",0 ; + talk ned ; + talk Naked Ned (with Naked Ned visible) +ned_tree_talk_ned_message: .byte "'Never speak of this",13 .byte "meeting!' says the nudie",13 .byte "and he disapperars.",0 diff --git a/games/peasant/zp.inc b/games/peasant/zp.inc index 7db455a5..fc07412e 100644 --- a/games/peasant/zp.inc +++ b/games/peasant/zp.inc @@ -153,6 +153,10 @@ GAME_STATE_2 = $99 GREASE_ON_HEAD =$80 NED_STATUS = $9A + ; 0 = hiding + ; 1..127 = countdown to appearing + ; negative = out + BUSH_STATUS = $9B ; status of bush search BUSH_1_SEARCHED = $01 BUSH_2_SEARCHED = $02