peasant4: hook up burninated tree

This commit is contained in:
Vince Weaver 2021-10-21 15:35:33 -04:00
parent be464038f7
commit 8be9f637fc
4 changed files with 123 additions and 186 deletions

View File

@ -46,7 +46,6 @@ peasantry3:
jsr update_score jsr update_score
;============================= ;=============================
;============================= ;=============================
; new screen location ; new screen location

View File

@ -2,7 +2,7 @@
; Peasantry Part 4 (bottom line of map) ; 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 WHICH_PEASANTRY = 3
@ -17,20 +17,27 @@ WHICH_PEASANTRY = 3
.include "inventory.inc" .include "inventory.inc"
.include "parse_input.inc" .include "parse_input.inc"
peasant_quest: peasantry4:
lda #0 lda #0
sta GAME_OVER sta GAME_OVER
jsr hgr_make_tables
jsr hgr2
lda #0
sta FRAME sta FRAME
jsr hgr_make_tables ; necessary?
jsr hgr2 ; necessary?
; decompress dialog to $D000
lda #<peasant4_text_lzsa
sta getsrc_smc+1
lda #>peasant4_text_lzsa
sta getsrc_smc+2
lda #$D0
jsr decompress_lzsa2_fast
; update map location ; update map location
jsr update_map_location jsr update_map_location
@ -49,6 +56,22 @@ new_location:
lda #0 lda #0
sta GAME_OVER 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 ; load bg
@ -225,3 +248,23 @@ map_priority_hi:
.byte >crooked_tree_priority_lzsa ; 19 -- crooked tree .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
verb_tables_hi:
.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"

View File

@ -1,5 +1,6 @@
.include "tokens.inc" .include "tokens.inc"
.if 0
;======================= ;=======================
;======================= ;=======================
;======================= ;=======================
@ -305,7 +306,6 @@ wear_mask:
.if 0
;======================= ;=======================
;======================= ;=======================
;======================= ;=======================
@ -688,108 +688,76 @@ river_swim:
ldx #<river_swim_message ldx #<river_swim_message
ldy #>river_swim_message ldy #>river_swim_message
jmp finish_parse_message jmp finish_parse_message
.endif
;======================= ;=======================
;======================= ;=======================
;======================= ;=======================
; mountain pass ; burninated / crooked tree
;======================= ;=======================
;======================= ;=======================
;======================= ;=======================
mountain_pass_verb_table: crooked_tree_verb_table:
.byte VERB_ASK .byte VERB_GET
.word mountain_pass_ask-1 .word crooked_tree_get-1
.byte VERB_ATTACK .byte VERB_LIGHT
.word mountain_pass_attack-1 .word crooked_tree_light-1
.byte VERB_BREAK
.word mountain_pass_break-1
.byte VERB_LOOK .byte VERB_LOOK
.word mountain_pass_look-1 .word crooked_tree_look-1
.byte VERB_TALK
.word mountain_pass_talk-1
.byte 0 .byte 0
;================ ;================
; ask ; get
;================ ;================
mountain_pass_ask: crooked_tree_get:
lda CURRENT_NOUN lda CURRENT_NOUN
cmp #NOUN_FIRE cmp #NOUN_FIRE
beq ask_about_fire beq crooked_get_fire
cmp #NOUN_JHONKA cmp #NOUN_LANTERN
beq ask_about_jhonka beq crooked_get_lantern
cmp #NOUN_KERREK cmp #NOUN_PLAGUE
beq ask_about_kerrek beq crooked_get_plague
cmp #NOUN_NED cmp #NOUN_PLAQUE
beq ask_about_ned beq crooked_get_plaque
cmp #NOUN_ROBE
beq ask_about_robe
cmp #NOUN_SMELL
beq ask_about_smell
cmp #NOUN_TROGDOR
beq ask_about_trogdor
; else ask about unknown jmp parse_common_get
ask_about_unknown: crooked_get_fire:
ldx #<knight_ask_unknown_message ; only at night
ldy #>knight_ask_unknown_message jmp parse_common_get
crooked_get_lantern:
ldx #<crooked_tree_get_lantern_message
ldy #>crooked_tree_get_lantern_message
jmp finish_parse_message jmp finish_parse_message
ask_about_fire: crooked_get_plague:
ldx #<knight_ask_fire_message ldx #<crooked_tree_get_plague_message
ldy #>knight_ask_fire_message ldy #>crooked_tree_get_plague_message
jmp finish_parse_message jmp finish_parse_message
ask_about_jhonka: crooked_get_plaque:
ldx #<knight_ask_jhonka_message ldx #<crooked_tree_get_plaque_message
ldy #>knight_ask_jhonka_message ldy #>crooked_tree_get_plaque_message
jmp finish_parse_message jmp finish_parse_message
ask_about_kerrek:
ldx #<knight_ask_kerrek_message
ldy #>knight_ask_kerrek_message
jmp finish_parse_message
ask_about_ned:
ldx #<knight_ask_ned_message
ldy #>knight_ask_ned_message
jmp finish_parse_message
ask_about_robe:
ldx #<knight_ask_robe_message
ldy #>knight_ask_robe_message
jmp finish_parse_message
ask_about_smell:
ldx #<knight_ask_smell_message
ldy #>knight_ask_smell_message
jmp finish_parse_message
ask_about_trogdor:
ldx #<knight_ask_trogdor_message
ldy #>knight_ask_trogdor_message
jmp finish_parse_message
;================ ;================
; attack ; light
;================ ;================
mountain_pass_break: crooked_tree_light:
mountain_pass_attack:
lda CURRENT_NOUN lda CURRENT_NOUN
cmp #NOUN_SIGN cmp #NOUN_LANTERN
beq attack_sign beq light_lantern
jmp parse_common_unknown jmp parse_common_unknown
attack_sign: light_lantern:
ldx #<attack_sign_message ldx #<crooked_tree_light_lantern_message
ldy #>attack_sign_message ldy #>crooked_tree_light_lantern_message
jmp finish_parse_message jmp finish_parse_message
@ -797,120 +765,40 @@ attack_sign:
; look ; look
;================= ;=================
mountain_pass_look: crooked_tree_look:
lda CURRENT_NOUN lda CURRENT_NOUN
cmp #NOUN_KNIGHT cmp #NOUN_LANTERN
beq knight_look beq crooked_look_lantern
cmp #NOUN_MAN cmp #NOUN_STUMP
beq knight_look beq crooked_look_stump
cmp #NOUN_DUDE cmp #NOUN_TREE
beq knight_look beq crooked_look_tree
cmp #NOUN_GUY
beq knight_look
cmp #NOUN_SIGN
beq sign_look
cmp #NOUN_TROGDOR
beq trogdor_look
cmp #NOUN_NONE cmp #NOUN_NONE
beq pass_look beq crooked_look
jmp parse_common_look jmp parse_common_look
knight_look: crooked_look:
ldx #<knight_look_message ldx #<crooked_look_day_message
ldy #>knight_look_message ldy #>crooked_look_day_message
jmp finish_parse_message jmp finish_parse_message
pass_look: crooked_look_lantern:
ldx #<pass_look_message ldx #<crooked_look_lantern_message
ldy #>pass_look_message ldy #>crooked_look_lantern_message
jmp finish_parse_message jmp finish_parse_message
sign_look: crooked_look_stump:
ldx #<sign_look_message ldx #<crooked_look_stump_message
ldy #>sign_look_message ldy #>crooked_look_stump_message
jmp finish_parse_message jmp finish_parse_message
trogdor_look: crooked_look_tree:
ldx #<trogdor_look_message ldx #<crooked_look_tree_message
ldy #>trogdor_look_message ldy #>crooked_look_tree_message
jmp finish_parse_message jmp finish_parse_message
;=================== .include "dialog_peasant4.inc"
; 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
ldy #>talk_knight_first_message
jsr partial_message_step
; first time only
ldx #<talk_knight_second_message
ldy #>talk_knight_second_message
jsr partial_message_step
knight_skip_text:
ldx #<talk_knight_third_message
ldy #>talk_knight_third_message
jsr partial_message_step
ldx #<talk_knight_stink_message
ldy #>talk_knight_stink_message
jsr partial_message_step
ldx #<talk_knight_dress_message
ldy #>talk_knight_dress_message
jsr partial_message_step
ldx #<talk_knight_fire_message
ldy #>talk_knight_fire_message
jsr partial_message_step
ldx #<talk_knight_fourth_message
ldy #>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
ldy #>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"

View File

@ -264,6 +264,7 @@
;============================ ;============================
; + look ; + look
crooked_look_day_message:
.byte "A signal lantern of some",13 .byte "A signal lantern of some",13
.byte "kind hangs from a",13 .byte "kind hangs from a",13
.byte "burninated tree.",0 .byte "burninated tree.",0
@ -272,6 +273,7 @@
.byte "A burning signal lantern hangs from a severely burninated tree. ",0 .byte "A burning signal lantern hangs from a severely burninated tree. ",0
; + look lantern (unlit) ; + look lantern (unlit)
crooked_look_lantern_message:
.byte "It's unlit at the moment.",13 .byte "It's unlit at the moment.",13
.byte "That fancy pants royal",13 .byte "That fancy pants royal",13
.byte "knight probably lights it",13 .byte "knight probably lights it",13
@ -282,9 +284,11 @@
.byte "It's lit! Musta been a Trogdor sighting tonight.",0 .byte "It's lit! Musta been a Trogdor sighting tonight.",0
; + look stump ; + look stump
crooked_look_stump_message:
.byte "NOT a good place to sit.",0 .byte "NOT a good place to sit.",0
; + look tree ; + look tree
crooked_look_tree_message:
.byte "Severely burninated. They",13 .byte "Severely burninated. They",13
.byte "could probably use some",13 .byte "could probably use some",13
.byte "salve.",0 .byte "salve.",0
@ -297,6 +301,7 @@
.byte "Man, screens sure get light fast around here.",0 .byte "Man, screens sure get light fast around here.",0
; + light lantern (before lit) ; + light lantern (before lit)
crooked_tree_light_lantern_message:
.byte "With what? Your red-hot",13 .byte "With what? Your red-hot",13
.byte "intellect?",0 .byte "intellect?",0
@ -313,20 +318,22 @@
.byte "You're already on fire! What? You want to be MORE on fire?",0 .byte "You're already on fire! What? You want to be MORE on fire?",0
; + get lantern ; + get lantern
crooked_tree_get_lantern_message:
.byte "Better not. There's an",13 .byte "Better not. There's an",13
.byte "engraved plaque on it that",13 .byte "engraved plaque on it that",13
.byte "says, ",34,"Do Not Remove Under",13 .byte "says, ",34,"Do Not Remove Under",13
.byte "Penalty Of 'You Die'.",34,0 .byte "Penalty Of 'You Die'.",34,0
; + get plague ; + get plague
crooked_tree_get_plague_message:
.byte "Wrong game, Mispeller",13 .byte "Wrong game, Mispeller",13
.byte "Jones. Try the little",13 .byte "Jones. Try the little",13
.byte "button to the left of the",13 .byte "button to the left of the",13
.byte "'W'.",0 .byte "'W'.",0
; + get plaque ; + get plaque
crooked_tree_get_plaque_message:
.byte "You have enough of that on",13 .byte "You have enough of that on",13
.byte "your browning, rotten",13 .byte "your browning, rotten",13
.byte "peasant teeth already.",0 .byte "peasant teeth already.",0