From 75001b09a3b8906abf2e30944f078c16a241de10 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Wed, 20 Oct 2021 13:34:59 -0400 Subject: [PATCH] peasant: hook up mud puddle dialog --- games/peasant/TODO | 42 ++++++++++++++-- games/peasant/parse_input.s | 1 + games/peasant/peasant2.s | 4 +- games/peasant/peasant2_actions.s | 82 +++++++++++++++++++++++++++++++- games/peasant/text/peasant2.inc | 8 ++++ games/peasant/tokens.inc | 3 +- 6 files changed, 133 insertions(+), 7 deletions(-) diff --git a/games/peasant/TODO b/games/peasant/TODO index 3090151d..013abad1 100644 --- a/games/peasant/TODO +++ b/games/peasant/TODO @@ -52,6 +52,44 @@ Map: - implement map Peasantry: +- Gary +- Kerrek 1 +- Well +- Yellow Tree +- Waterfall + + Waterfall animation + +- Haystack + + Hook up dialog for mud + + Hook up sprites for walking hay +- Puddle + + Hook up responses when mud is wet +- Archery + + Archer animations +- River/Rock + + River animation +- Mountain Pass + + Knight animations + + hook up/fix dialog when you have various items + + be sure to fix the "talk knight" dialog for robe/fire etc + + Block path unless you have all three items + +- Jhonka +- Cottage +- West Lake + + Water animations +- East Lake + + Boat animations + + Water animations +- Inn + +- Ned Cottage +- Ned +- Kerrek2 + + See Kerrek1 +- Lady Cottage +- Burnt trees + - animation for the boat - animation of River - animation of waterfall @@ -71,6 +109,4 @@ Ending: Modify sprite routine to auto-shift colors so we can have more of an arc on baby trajectory? -Pass: -- hook up/fix dialog when you have various items -- be sure to fix the "talk knight" dialog for robe/fire etc + diff --git a/games/peasant/parse_input.s b/games/peasant/parse_input.s index 615da6cf..718a2995 100644 --- a/games/peasant/parse_input.s +++ b/games/peasant/parse_input.s @@ -898,6 +898,7 @@ noun_lookup: .byte "RIVER",NOUN_RIVER|$80 .byte "STONE",NOUN_STONE|$80 .byte "IN HAY",NOUN_IN_HAY|$80 +.byte "PUDDLE",NOUN_PUDDLE|$80 .byte $00 diff --git a/games/peasant/peasant2.s b/games/peasant/peasant2.s index 4f74b7d5..0492e387 100644 --- a/games/peasant/peasant2.s +++ b/games/peasant/peasant2.s @@ -263,14 +263,14 @@ map_priority_hi: verb_tables_low: .byte hay_bale_verb_table ; 5 -- haystack - .byte >river_stone_verb_table ; 6 -- puddle + .byte >puddle_verb_table ; 6 -- puddle .byte >river_stone_verb_table ; 7 -- archery .byte >river_stone_verb_table ; 8 -- river .byte >mountain_pass_verb_table ; 9 -- knight diff --git a/games/peasant/peasant2_actions.s b/games/peasant/peasant2_actions.s index 3aeef709..a486e972 100644 --- a/games/peasant/peasant2_actions.s +++ b/games/peasant/peasant2_actions.s @@ -3,7 +3,7 @@ ;======================= ;======================= ;======================= - ; Thay Hay Bale + ; That Hay Bale ;======================= ;======================= ;======================= @@ -137,6 +137,86 @@ hug_tree: + ;======================= + ;======================= + ;======================= + ; Puddle + ;======================= + ;======================= + ;======================= + +puddle_verb_table: + .byte VERB_GET + .word puddle_get-1 + .byte VERB_TAKE + .word puddle_take-1 + .byte VERB_STEAL + .word puddle_steal-1 + .byte VERB_LOOK + .word puddle_look-1 + .byte 0 + + + ;================ + ; get + ;================ +puddle_get: +puddle_steal: +puddle_take: + lda CURRENT_NOUN + + cmp #NOUN_ROCK + beq puddle_get_rock + cmp #NOUN_STONE + beq puddle_get_rock + + + ; else "probably wish" message + + jmp parse_common_get + +puddle_get_rock: + ldx #puddle_get_rock_message + jmp finish_parse_message + + ;================= + ; look + ;================= + +puddle_look: + + lda CURRENT_NOUN + + cmp #NOUN_ROCK + beq puddle_look_at_rock + cmp #NOUN_STONE + beq puddle_look_at_rock + cmp #NOUN_MUD + beq puddle_look_at_mud + cmp #NOUN_PUDDLE + beq puddle_look_at_mud + cmp #NOUN_NONE + beq puddle_look_at + + jmp parse_common_look + +puddle_look_at: + ldx #puddle_look_at_message + jmp finish_parse_message + +puddle_look_at_mud: + ldx #puddle_look_mud_message + jmp finish_parse_message + +puddle_look_at_rock: + ldx #puddle_get_rock_message + jmp finish_parse_message + + ;======================= ;======================= ;======================= diff --git a/games/peasant/text/peasant2.inc b/games/peasant/text/peasant2.inc index 06c6324f..68a41b7a 100644 --- a/games/peasant/text/peasant2.inc +++ b/games/peasant/text/peasant2.inc @@ -71,6 +71,7 @@ hay_get_hay_message: .byte "Now you've done it! You're covered in sticky, albeit fine smelling, mud. Your ",34,"Scalding Lake",34," T-shirt is all soiled, too. You just washed it last harvest!",0 ; + look (dry) +puddle_look_at_message: .byte "There's a dried out mud",13 .byte "puddle. It's all caked and",13 .byte "cracked like the kind",13 @@ -80,7 +81,14 @@ hay_get_hay_message: ; + look (wet) .byte "Not much to see. 'Sides that big mud puddle.",0 +; + look mud / puddle ; NOT IN WIKI? +puddle_look_mud_message: +.byte "The bone-dry mud puddle is",13 +.byte "cracked and caked.",0 + + ; + get / look rock +puddle_get_rock_message: .byte "That rock's not doin' a",13 .byte "whole lot for me.",0 diff --git a/games/peasant/tokens.inc b/games/peasant/tokens.inc index f5f627e1..71c0edb7 100644 --- a/games/peasant/tokens.inc +++ b/games/peasant/tokens.inc @@ -174,5 +174,6 @@ NOUN_WOMAN = 95 NOUN_RIVER = 96 NOUN_STONE = 97 NOUN_IN_HAY = 98 +NOUN_PUDDLE = 99 ; -NOUN_UNKNOWN = 99 +NOUN_UNKNOWN = 100