peasant: more work hooking up keepers

This commit is contained in:
Vince Weaver 2024-10-15 01:45:29 -04:00
parent 6df8950665
commit 7ab48dfc70
3 changed files with 81 additions and 11 deletions

View File

@ -252,6 +252,9 @@ no_lightning:
cmp #LOCATION_TROGDOR_OUTER
bne no_keeper
lda IN_QUIZ
bne no_keeper
check_keeper1:
lda INVENTORY_2
and #INV2_TROGSHIELD ; only if not have shield
@ -300,14 +303,21 @@ wait_loop:
dec WAIT_LOOP
bne wait_loop
; delay
; lda #200
; jsr wait
lda IN_QUIZ
beq not_in_quiz
lda #0 ; keep from moving
sta PEASANT_XADD
sta PEASANT_YADD
not_in_quiz:
jmp game_loop
oops_new_location:
@ -611,13 +621,31 @@ keeper_talk1:
dont_have_sub:
lda #0
ldx #39
jsr hgr_partial_restore
; now we need to re-draw keeper
; also we're in quiz mode
; so we can't move and can only take quiz or give sub
lda INVENTORY_2
ora #INV2_TROGSHIELD ; get the shield
sta INVENTORY_2
lda #1
sta IN_QUIZ
; custom common verb table the essentially does nothing
jsr setup_quiz_verb_table
; respond only to take quiz and give sub
lda #<keeper1_verb_table
sta INL
lda #>keeper1_verb_table
sta INH
jsr load_custom_verb_table
; lda #0
; ldx #39
; jsr hgr_partial_restore
; lda INVENTORY_2
; ora #INV2_TROGSHIELD ; get the shield
; sta INVENTORY_2
jmp game_loop

View File

@ -235,9 +235,24 @@ cave_outer_hint:
jmp finish_parse_message
cave_outer_take_quiz:
; FIXME
ldx #<cave_outer_climb_message
ldy #>cave_outer_climb_message
jsr random8
cmp #85
bcc keeper1_quiz3
cmp #170
bcc keeper1_quiz2
keeper1_quiz1:
ldx #<cave_outer_quiz1_1
ldy #>cave_outer_quiz1_1
jmp finish_parse_message
keeper1_quiz2:
ldx #<cave_outer_quiz1_2
ldy #>cave_outer_quiz1_2
jmp finish_parse_message
keeper1_quiz3:
ldx #<cave_outer_quiz1_3
ldy #>cave_outer_quiz1_3
jmp finish_parse_message
@ -266,5 +281,27 @@ cave_outer_give_sandwich:
ldy #>cave_outer_give_sub_message
jmp finish_parse_message
parse_quiz_unknown:
ldx #<cave_outer_keeper_wants_message
ldy #>cave_outer_keeper_wants_message
jmp finish_parse_message
verb_table = $BF00
setup_quiz_verb_table:
ldx #0
unknown_loop:
lda #<(parse_quiz_unknown-1)
sta verb_table,X
lda #>(parse_quiz_unknown-1)
sta verb_table+1,X
inx
inx
cpx #(VERB_ALL_DONE*2)
bne unknown_loop
rts
.include "../text/dialog_cliff_heights.inc"

View File

@ -163,6 +163,11 @@ cave_outer_keeper_take_quiz:
.byte "Seriously - this guy should",13
.byte "get a job.",0
; if you say other than A/B/C then...
; Peasant fool! Choose A, B,
; or C!
; followed by repeat of the question
cave_outer_quiz1_1:
.byte "Okay here goes. What did",13
.byte "you win from the Archery",13