From 51efed8436799eeb34fd795a5a907ba7a4e1129b Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 6 Dec 2021 00:39:07 -0500 Subject: [PATCH] peasant: properly hook up "climb cliff" message --- games/peasant/parse_input.s | 18 +++++++++--------- games/peasant/peasant1_actions.s | 21 +++++++++++++++++++++ games/peasant/peasant4_actions.s | 18 ++++++++++++++++++ games/peasant/text/common.inc | 7 ------- games/peasant/text/peasant1.inc | 7 +++++++ games/peasant/text/peasant4.inc | 7 +++++++ 6 files changed, 62 insertions(+), 16 deletions(-) diff --git a/games/peasant/parse_input.s b/games/peasant/parse_input.s index 25976025..6d7e0dd1 100644 --- a/games/peasant/parse_input.s +++ b/games/peasant/parse_input.s @@ -133,8 +133,6 @@ parse_common_cheat: parse_common_climb: lda CURRENT_NOUN - cmp #NOUN_CLIFF - beq climb_cliff cmp #NOUN_TREE beq climb_tree @@ -155,13 +153,6 @@ climb_tree_day: ldy #>climb_tree_message jmp finish_parse_message -climb_cliff: - ; FIXME: only on certain locations - ldx #climb_cliff_message - jmp finish_parse_message - - ;================= ; copy ;================= @@ -219,6 +210,11 @@ ditch_baby: and #INV1_BABY beq no_baby + lda INVENTORY_1_GONE + and #INV1_BABY + bne no_baby + + ldx #ditch_baby_message jmp finish_parse_message @@ -258,6 +254,10 @@ throw_baby: and #INV1_BABY beq throw_baby_no_baby + lda INVENTORY_1_GONE + and #INV1_BABY + bne throw_baby_no_baby + throw_baby_yes_baby: ldx #throw_baby_yes_message diff --git a/games/peasant/peasant1_actions.s b/games/peasant/peasant1_actions.s index 35fedc53..d1dc329f 100644 --- a/games/peasant/peasant1_actions.s +++ b/games/peasant/peasant1_actions.s @@ -1142,12 +1142,33 @@ yellow_tree_look_tree: ;======================= waterfall_verb_table: + .byte VERB_CLIMB + .word waterfall_climb-1 .byte VERB_LOOK .word waterfall_look-1 .byte VERB_SWIM .word waterfall_swim-1 .byte 0 + ;================= + ; climb + ;================= + +waterfall_climb: + + lda CURRENT_NOUN + + cmp #NOUN_CLIFF + beq waterfall_climb_cliff + + jmp parse_common_unknown + +waterfall_climb_cliff: + ldx #waterfall_climb_cliff_message + jmp finish_parse_message + + ;================= ; look ;================= diff --git a/games/peasant/peasant4_actions.s b/games/peasant/peasant4_actions.s index 9af47a96..2930aa0a 100644 --- a/games/peasant/peasant4_actions.s +++ b/games/peasant/peasant4_actions.s @@ -923,6 +923,8 @@ bush_count_lookup: ;======================= crooked_tree_verb_table: + .byte VERB_CLIMB + .word crooked_tree_climb-1 .byte VERB_GET .word crooked_tree_get-1 .byte VERB_LIGHT @@ -931,6 +933,22 @@ crooked_tree_verb_table: .word crooked_tree_look-1 .byte 0 + ;================ + ; climb + ;================ +crooked_tree_climb: + lda CURRENT_NOUN + + cmp #NOUN_CLIFF + beq crooked_climb_cliff + + jmp parse_common_unknown + +crooked_climb_cliff: + ldx #crooked_tree_climb_cliff_message + jmp finish_parse_message + ;================ ; get diff --git a/games/peasant/text/common.inc b/games/peasant/text/common.inc index f551a153..d00f37a4 100644 --- a/games/peasant/text/common.inc +++ b/games/peasant/text/common.inc @@ -177,13 +177,6 @@ no_baby_message: .byte "You don't even have two",13 .byte "babies to rub together.",0 -; + climb cliff (screens where cliff is there [pass doesn't count?]) -climb_cliff_message: -.byte "There aren't enough",13 -.byte "footholds and you don't",13 -.byte "have any carabeaners on",13 -.byte "you.",0 - ; + climb tree (day) climb_tree_message: .byte "But then your hands would",13 diff --git a/games/peasant/text/peasant1.inc b/games/peasant/text/peasant1.inc index 72ab7e95..54c03c7d 100644 --- a/games/peasant/text/peasant1.inc +++ b/games/peasant/text/peasant1.inc @@ -527,6 +527,13 @@ waterfall_swim_message: .byte "of those weight-gain",13 .byte "protein smoothies.",0 +; + climb cliff +waterfall_climb_cliff_message: +.byte "There aren't enough",13 +.byte "footholds and you don't",13 +.byte "have any carabeaners on",13 +.byte "you.",0 + peasant1_dialog_end: .assert (>peasant1_dialog_end - >peasant1_dialog_start) < $1E , error, "peasant1 dialog too big" diff --git a/games/peasant/text/peasant4.inc b/games/peasant/text/peasant4.inc index 84d2ebc5..d89598b7 100644 --- a/games/peasant/text/peasant4.inc +++ b/games/peasant/text/peasant4.inc @@ -447,6 +447,13 @@ crooked_tree_get_plaque_message: .byte "your browning, rotten",13 .byte "peasant teeth already.",0 +; + climb cliff +crooked_tree_climb_cliff_message: +.byte "There aren't enough",13 +.byte "footholds and you don't",13 +.byte "have any carabeaners on",13 +.byte "you.",0 + peasant4_dialog_end: .assert (>peasant4_dialog_end - >peasant4_dialog_start) < $1E , error, "peasant4 dialog too big"