diff --git a/games/peasant/peasant3.s b/games/peasant/peasant3.s index c9a8a151..89e9c783 100644 --- a/games/peasant/peasant3.s +++ b/games/peasant/peasant3.s @@ -46,7 +46,6 @@ peasantry3: jsr update_score - ;============================= ;============================= ; new screen location diff --git a/games/peasant/peasant4.s b/games/peasant/peasant4.s index 9b8fa9ef..86df9169 100644 --- a/games/peasant/peasant4.s +++ b/games/peasant/peasant4.s @@ -2,7 +2,7 @@ ; Peasantry Part 4 (bottom line of map) -; ned cottage, wavy tree, kerrek 2, lady cottage, burninated tree +; ned cottage, wavy tree, kerrek 2, lady cottage, burninated tree WHICH_PEASANTRY = 3 @@ -17,20 +17,27 @@ WHICH_PEASANTRY = 3 .include "inventory.inc" .include "parse_input.inc" -peasant_quest: +peasantry4: + lda #0 sta GAME_OVER - - jsr hgr_make_tables - - jsr hgr2 - - - - - lda #0 sta FRAME + jsr hgr_make_tables ; necessary? + jsr hgr2 ; necessary? + + ; decompress dialog to $D000 + + lda #peasant4_text_lzsa + sta getsrc_smc+2 + + lda #$D0 + + jsr decompress_lzsa2_fast + + ; update map location jsr update_map_location @@ -49,6 +56,22 @@ new_location: lda #0 sta GAME_OVER + ;========================== + ; load updated verb table + + ; we are PEASANT4 so locations 15...19 map to 0...4 + + lda MAP_LOCATION + sec + sbc #15 + tax + + lda verb_tables_low,X + sta INL + lda verb_tables_hi,X + sta INH + jsr load_custom_verb_table + ;===================== ; load bg @@ -225,3 +248,23 @@ map_priority_hi: .byte >crooked_tree_priority_lzsa ; 19 -- crooked tree + +verb_tables_low: + .byte crooked_tree_verb_table ; 15 -- empty hut + .byte >crooked_tree_verb_table ; 16 -- ned + .byte >crooked_tree_verb_table ; 17 -- bottom footprints + .byte >crooked_tree_verb_table ; 18 -- cottage lady + .byte >crooked_tree_verb_table ; 19 -- crooked tree + + +peasant4_text_lzsa: +.incbin "DIALOG_PEASANT4.LZSA" + +.include "peasant4_actions.s" diff --git a/games/peasant/peasant4_actions.s b/games/peasant/peasant4_actions.s index db00e4fd..45fe8507 100644 --- a/games/peasant/peasant4_actions.s +++ b/games/peasant/peasant4_actions.s @@ -1,5 +1,6 @@ .include "tokens.inc" +.if 0 ;======================= ;======================= ;======================= @@ -305,7 +306,6 @@ wear_mask: -.if 0 ;======================= ;======================= ;======================= @@ -688,108 +688,76 @@ river_swim: ldx #river_swim_message jmp finish_parse_message +.endif ;======================= ;======================= ;======================= - ; mountain pass + ; burninated / crooked tree ;======================= ;======================= ;======================= -mountain_pass_verb_table: - .byte VERB_ASK - .word mountain_pass_ask-1 - .byte VERB_ATTACK - .word mountain_pass_attack-1 - .byte VERB_BREAK - .word mountain_pass_break-1 +crooked_tree_verb_table: + .byte VERB_GET + .word crooked_tree_get-1 + .byte VERB_LIGHT + .word crooked_tree_light-1 .byte VERB_LOOK - .word mountain_pass_look-1 - .byte VERB_TALK - .word mountain_pass_talk-1 + .word crooked_tree_look-1 .byte 0 ;================ - ; ask + ; get ;================ -mountain_pass_ask: +crooked_tree_get: lda CURRENT_NOUN cmp #NOUN_FIRE - beq ask_about_fire - cmp #NOUN_JHONKA - beq ask_about_jhonka - cmp #NOUN_KERREK - beq ask_about_kerrek - cmp #NOUN_NED - beq ask_about_ned - cmp #NOUN_ROBE - beq ask_about_robe - cmp #NOUN_SMELL - beq ask_about_smell - cmp #NOUN_TROGDOR - beq ask_about_trogdor + beq crooked_get_fire + cmp #NOUN_LANTERN + beq crooked_get_lantern + cmp #NOUN_PLAGUE + beq crooked_get_plague + cmp #NOUN_PLAQUE + beq crooked_get_plaque - ; else ask about unknown + jmp parse_common_get -ask_about_unknown: - ldx #knight_ask_unknown_message +crooked_get_fire: + ; only at night + jmp parse_common_get + +crooked_get_lantern: + ldx #crooked_tree_get_lantern_message jmp finish_parse_message -ask_about_fire: - ldx #knight_ask_fire_message +crooked_get_plague: + ldx #crooked_tree_get_plague_message jmp finish_parse_message -ask_about_jhonka: - ldx #knight_ask_jhonka_message +crooked_get_plaque: + ldx #crooked_tree_get_plaque_message jmp finish_parse_message -ask_about_kerrek: - ldx #knight_ask_kerrek_message - jmp finish_parse_message - -ask_about_ned: - ldx #knight_ask_ned_message - jmp finish_parse_message - -ask_about_robe: - ldx #knight_ask_robe_message - jmp finish_parse_message - -ask_about_smell: - ldx #knight_ask_smell_message - jmp finish_parse_message - -ask_about_trogdor: - ldx #knight_ask_trogdor_message - jmp finish_parse_message - - ;================ - ; attack + ; light ;================ -mountain_pass_break: -mountain_pass_attack: +crooked_tree_light: lda CURRENT_NOUN - cmp #NOUN_SIGN - beq attack_sign + cmp #NOUN_LANTERN + beq light_lantern jmp parse_common_unknown -attack_sign: - ldx #attack_sign_message +light_lantern: + ldx #crooked_tree_light_lantern_message jmp finish_parse_message @@ -797,120 +765,40 @@ attack_sign: ; look ;================= -mountain_pass_look: +crooked_tree_look: lda CURRENT_NOUN - cmp #NOUN_KNIGHT - beq knight_look - cmp #NOUN_MAN - beq knight_look - cmp #NOUN_DUDE - beq knight_look - cmp #NOUN_GUY - beq knight_look - - cmp #NOUN_SIGN - beq sign_look - cmp #NOUN_TROGDOR - beq trogdor_look + cmp #NOUN_LANTERN + beq crooked_look_lantern + cmp #NOUN_STUMP + beq crooked_look_stump + cmp #NOUN_TREE + beq crooked_look_tree cmp #NOUN_NONE - beq pass_look + beq crooked_look jmp parse_common_look -knight_look: - ldx #knight_look_message +crooked_look: + ldx #crooked_look_day_message jmp finish_parse_message -pass_look: - ldx #pass_look_message +crooked_look_lantern: + ldx #crooked_look_lantern_message jmp finish_parse_message -sign_look: - ldx #sign_look_message +crooked_look_stump: + ldx #crooked_look_stump_message jmp finish_parse_message -trogdor_look: - ldx #trogdor_look_message +crooked_look_tree: + ldx #crooked_look_tree_message jmp finish_parse_message - ;=================== - ; talk - ;=================== - -mountain_pass_talk: - - lda CURRENT_NOUN - cmp #NOUN_KNIGHT - beq talk_to_knight - cmp #NOUN_GUY - beq talk_to_knight - cmp #NOUN_MAN - beq talk_to_knight - cmp #NOUN_DUDE - beq talk_to_knight - - ; else, no one - jmp parse_common_talk - -talk_to_knight: - - lda GAME_STATE_2 - and #TALKED_TO_KNIGHT - bne knight_skip_text - - ; first time only - ldx #talk_knight_first_message - jsr partial_message_step - - ; first time only - ldx #talk_knight_second_message - jsr partial_message_step - -knight_skip_text: - ldx #talk_knight_third_message - jsr partial_message_step - - ldx #talk_knight_stink_message - jsr partial_message_step - - ldx #talk_knight_dress_message - jsr partial_message_step - - ldx #talk_knight_fire_message - jsr partial_message_step - - ldx #talk_knight_fourth_message - - lda GAME_STATE_2 - and #TALKED_TO_KNIGHT - bne knight_skip_text2 - - jsr partial_message_step - - ; first time only - ldx #talk_knight_fifth_message - - lda GAME_STATE_2 - ora #TALKED_TO_KNIGHT - sta GAME_STATE_2 - -knight_skip_text2: - jmp finish_parse_message -.endif - -.include "dialog_peasant1.inc" +.include "dialog_peasant4.inc" diff --git a/games/peasant/text/peasant4.inc b/games/peasant/text/peasant4.inc index e83efd33..3905c800 100644 --- a/games/peasant/text/peasant4.inc +++ b/games/peasant/text/peasant4.inc @@ -264,6 +264,7 @@ ;============================ ; + look +crooked_look_day_message: .byte "A signal lantern of some",13 .byte "kind hangs from a",13 .byte "burninated tree.",0 @@ -272,6 +273,7 @@ .byte "A burning signal lantern hangs from a severely burninated tree. ",0 ; + look lantern (unlit) +crooked_look_lantern_message: .byte "It's unlit at the moment.",13 .byte "That fancy pants royal",13 .byte "knight probably lights it",13 @@ -282,9 +284,11 @@ .byte "It's lit! Musta been a Trogdor sighting tonight.",0 ; + look stump +crooked_look_stump_message: .byte "NOT a good place to sit.",0 ; + look tree +crooked_look_tree_message: .byte "Severely burninated. They",13 .byte "could probably use some",13 .byte "salve.",0 @@ -297,6 +301,7 @@ .byte "Man, screens sure get light fast around here.",0 ; + light lantern (before lit) +crooked_tree_light_lantern_message: .byte "With what? Your red-hot",13 .byte "intellect?",0 @@ -313,20 +318,22 @@ .byte "You're already on fire! What? You want to be MORE on fire?",0 ; + get lantern +crooked_tree_get_lantern_message: .byte "Better not. There's an",13 .byte "engraved plaque on it that",13 .byte "says, ",34,"Do Not Remove Under",13 .byte "Penalty Of 'You Die'.",34,0 ; + get plague +crooked_tree_get_plague_message: .byte "Wrong game, Mispeller",13 .byte "Jones. Try the little",13 .byte "button to the left of the",13 .byte "'W'.",0 -; + get plaque +; + get plaque +crooked_tree_get_plaque_message: .byte "You have enough of that on",13 .byte "your browning, rotten",13 .byte "peasant teeth already.",0 -