peasant: all jhonka actions before kerrek is dead

This commit is contained in:
Vince Weaver 2021-11-26 01:19:28 -05:00
parent 4b3beb6017
commit e27a82f37c
2 changed files with 171 additions and 19 deletions

View File

@ -58,9 +58,9 @@ jhonka_get:
; check if alive ; check if alive
lda KERREK_STATE lda KERREK_STATE
and #$f and #$f
bne jhonka_get_kerrek_dead beq jhonka_get_kerrek_alive
jhonka_get_kerrek_alive: jhonka_get_kerrek_dead:
lda CURRENT_NOUN lda CURRENT_NOUN
@ -70,6 +70,8 @@ jhonka_get_kerrek_alive:
beq jhonka_get_club beq jhonka_get_club
cmp #NOUN_LEG cmp #NOUN_LEG
beq jhonka_get_club beq jhonka_get_club
cmp #NOUN_NOTE
beq jhonka_get_note
; else "probably wish" message ; else "probably wish" message
jmp parse_common_get jmp parse_common_get
@ -91,7 +93,8 @@ jhonka_get_club:
jmp finish_parse_message jmp finish_parse_message
jhonka_get_kerrek_dead:
jhonka_get_kerrek_alive:
lda CURRENT_NOUN lda CURRENT_NOUN
@ -113,6 +116,85 @@ jhonka_get_note:
jhonka_look: jhonka_look:
; check if kerrek alive
lda KERREK_STATE
and #$f
beq jhonka_look_kerrek_alive
jhonka_look_kerrek_dead:
lda CURRENT_NOUN
cmp #NOUN_DOOR
beq jhonka_look_at_door_out
cmp #NOUN_JHONKA
beq jhonka_look_at_jhonka_out
cmp #NOUN_RICHES
beq jhonka_look_at_riches
cmp #NOUN_CLUB
beq jhonka_look_at_club
cmp #NOUN_LEG
beq jhonka_look_at_leg
cmp #NOUN_NONE
beq jhonka_look_at_out
; these are same as kerrek alive
cmp #NOUN_FENCE
beq jhonka_look_at_fence
cmp #NOUN_CAVE
beq jhonka_look_at_cave
jhonka_look_not_there:
jmp parse_common_look
jhonka_look_at_out:
; see if riches still there
lda INVENTORY_2
and #INV2_RICHES
bne jhonka_look_at_no_riches
jhonka_look_at_with_riches:
ldx #<jhonka_look_at_with_riches_message
ldy #>jhonka_look_at_with_riches_message
jmp finish_parse_message
jhonka_look_at_no_riches:
ldx #<jhonka_look_at_no_riches_message
ldy #>jhonka_look_at_no_riches_message
jmp finish_parse_message
jhonka_look_at_riches:
; see if riches still there
lda INVENTORY_2
and #INV2_RICHES
bne jhonka_look_not_there
ldx #<jhonka_look_at_riches_message
ldy #>jhonka_look_at_riches_message
jmp finish_parse_message
jhonka_look_at_club:
jhonka_look_at_leg:
ldx #<jhonka_look_at_club_message
ldy #>jhonka_look_at_club_message
jmp finish_parse_message
jhonka_look_at_door_out:
ldx #<jhonka_look_at_door_out_message
ldy #>jhonka_look_at_door_out_message
jmp finish_parse_message
jhonka_look_at_jhonka_out:
ldx #<jhonka_look_at_jhonka_out_message
ldy #>jhonka_look_at_jhonka_out_message
jmp finish_parse_message
jhonka_look_kerrek_alive:
lda CURRENT_NOUN lda CURRENT_NOUN
cmp #NOUN_FENCE cmp #NOUN_FENCE
@ -121,6 +203,8 @@ jhonka_look:
beq jhonka_look_at_cave beq jhonka_look_at_cave
cmp #NOUN_NOTE cmp #NOUN_NOTE
beq jhonka_read_note beq jhonka_read_note
cmp #NOUN_DOOR
beq jhonka_look_at_door
cmp #NOUN_NONE cmp #NOUN_NONE
beq jhonka_look_at beq jhonka_look_at
@ -137,6 +221,11 @@ jhonka_look_at_cave:
ldy #>jhonka_look_at_cave_message ldy #>jhonka_look_at_cave_message
jmp finish_parse_message jmp finish_parse_message
jhonka_look_at_door:
ldx #<jhonka_look_at_door_message
ldy #>jhonka_look_at_door_message
jmp finish_parse_message
jhonka_look_at_fence: jhonka_look_at_fence:
ldx #<jhonka_look_at_fence_message ldx #<jhonka_look_at_fence_message
ldy #>jhonka_look_at_fence_message ldy #>jhonka_look_at_fence_message
@ -147,11 +236,18 @@ jhonka_look_at_fence:
; read ; read
;================ ;================
jhonka_read: jhonka_read:
; check if kerrek alive
lda KERREK_STATE
and #$f
bne jhonka_cant_read_note
lda CURRENT_NOUN lda CURRENT_NOUN
cmp #NOUN_NOTE cmp #NOUN_NOTE
beq jhonka_read_note beq jhonka_read_note
jhonka_cant_read_note:
jmp parse_common_unknown jmp parse_common_unknown
jhonka_read_note: jhonka_read_note:
@ -164,6 +260,11 @@ jhonka_read_note:
; open ; open
;================ ;================
jhonka_open: jhonka_open:
; check if kerrek alive
lda KERREK_STATE
and #$f
bne jhonka_cant_open_door
lda CURRENT_NOUN lda CURRENT_NOUN
cmp #NOUN_DOOR cmp #NOUN_DOOR
@ -171,6 +272,7 @@ jhonka_open:
cmp #NOUN_NONE cmp #NOUN_NONE
beq jhonka_open_door beq jhonka_open_door
jhonka_cant_open_door:
jmp parse_common_unknown jmp parse_common_unknown
jhonka_open_door: jhonka_open_door:
@ -183,6 +285,11 @@ jhonka_open_door:
; knock ; knock
;================ ;================
jhonka_knock: jhonka_knock:
; check if kerrek alive
lda KERREK_STATE
and #$f
bne jhonka_cant_knock_door
lda CURRENT_NOUN lda CURRENT_NOUN
cmp #NOUN_DOOR cmp #NOUN_DOOR
@ -190,13 +297,52 @@ jhonka_knock:
cmp #NOUN_NONE cmp #NOUN_NONE
beq jhonka_knock_door beq jhonka_knock_door
jhonka_cant_knock_door:
jmp parse_common_unknown jmp parse_common_unknown
jhonka_knock_door: jhonka_knock_door:
jsr random16
and #$7
beq jhonka_knock5
cmp #$1
beq jhonka_knock4
cmp #$2
beq jhonka_knock3
cmp #$3
beq jhonka_knock2
cmp #$4
beq jhonka_knock5
cmp #$5
beq jhonka_knock4
jhonka_knock1:
ldx #<jhonka_knock_message1 ldx #<jhonka_knock_message1
ldy #>jhonka_knock_message1 ldy #>jhonka_knock_message1
jmp finish_parse_message jmp finish_parse_message
jhonka_knock2:
ldx #<jhonka_knock_message2
ldy #>jhonka_knock_message2
jmp finish_parse_message
jhonka_knock3:
ldx #<jhonka_knock_message3
ldy #>jhonka_knock_message3
jmp finish_parse_message
jhonka_knock4:
ldx #<jhonka_knock_message4
ldy #>jhonka_knock_message4
jmp finish_parse_message
jhonka_knock5:
ldx #<jhonka_knock_message5
ldy #>jhonka_knock_message5
jmp finish_parse_message
;================ ;================

View File

@ -13,13 +13,14 @@ peasant3_dialog_start:
; kerrek alive ; kerrek alive
; + look ; + look (kerrek alive)
jhonka_look_at_message: jhonka_look_at_message:
.byte "There's a little cave with",13 .byte "There's a little cave with",13
.byte "a little door with a little",13 .byte "a little door with a little",13
.byte "note on it.",0 .byte "note on it.",0
; + look door (before kerrek) ; not in WIKI ; + look door (kerrek alive) ; not in WIKI
jhonka_look_at_door_message:
.byte "There's a little note on it.",0 .byte "There's a little note on it.",0
; + look cave ; + look cave
@ -28,7 +29,6 @@ jhonka_look_at_cave_message:
.byte "down.",0 .byte "down.",0
; + look fence ; + look fence
; same as alive
jhonka_look_at_fence_message: jhonka_look_at_fence_message:
.byte "A standard peasant fence.",13 .byte "A standard peasant fence.",13
.byte "Trogdor makes milk's meat",13 .byte "Trogdor makes milk's meat",13
@ -39,29 +39,32 @@ jhonka_read_note_message:
.byte "It says ",34,"scared of kerrek.",13 .byte "It says ",34,"scared of kerrek.",13
.byte "go way. -j",34,0 .byte "go way. -j",34,0
; + open door [ will walk you there] {before jhonka out} ; + open door [ will walk you there] {before jhonka out, if jhonka out nothing)
; ??????
jhonka_open_door_message: jhonka_open_door_message:
.byte "It's locked. With one o'",13 .byte "It's locked. With one o'",13
.byte "them SCHLAGE deadbolts,",13 .byte "them SCHLAGE deadbolts,",13
.byte "too. Those things are hard",13 .byte "too. Those things are hard",13
.byte "core.",0 .byte "core.",0
; TODO
; + knock (while he's inside) [ will walk over] ; + knock (while he's inside) [ will walk over]
jhonka_knock_message1: jhonka_knock_message1:
.byte "A gravelly voice inside",13 .byte "A gravelly voice inside",13
.byte "yells, 'JUST US CHICKENS'",0 .byte "yells, 'JUST US CHICKENS'",0
; or
jhonka_knock_message2:
.byte "A gravelly voice inside",13 .byte "A gravelly voice inside",13
.byte "yells, 'NO FOR RENT'",0 .byte "yells, 'NO FOR RENT'",0
; or
jhonka_knock_message3:
.byte "A gravelly voice inside",13 .byte "A gravelly voice inside",13
.byte "yells, 'I GIVE LAST YEAR!'",0 .byte "yells, 'I GIVE LAST YEAR!'",0
; or
jhonka_knock_message4:
.byte "A gravelly voice inside",13 .byte "A gravelly voice inside",13
.byte "yells, 'GAVE AT OFFICE'",0 .byte "yells, 'GAVE AT OFFICE'",0
; or:
jhonka_knock_message5:
.byte "A gravelly voice inside",13 .byte "A gravelly voice inside",13
.byte "yells, 'GO WAY!'",0 .byte "yells, 'GO WAY!'",0
@ -81,7 +84,6 @@ jhonka_climb_fence_message:
;================================ ;================================
; kerrek dead ; kerrek dead
; TODO ; TODO
; + Type any command other than "yes" or "no" ; + Type any command other than "yes" or "no"
; after the Jhonka asks if you stole the riches ; after the Jhonka asks if you stole the riches
@ -89,34 +91,37 @@ jhonka_climb_fence_message:
.byte "Just answer him, yes or no,",13 .byte "Just answer him, yes or no,",13
.byte "you fool!",0 .byte "you fool!",0
; TODO
; + look (kerrek dead, before riches) ; + look (kerrek dead, before riches)
jhonka_look_at_with_riches_message:
.byte "There's a disgusting",13 .byte "There's a disgusting",13
.byte "little Jhonka hopping",13 .byte "little Jhonka hopping",13
.byte "around outside a little",13 .byte "around outside a little",13
.byte "cave.A fat pile of riches",13 .byte "cave.A fat pile of riches",13
.byte "lies next to him.",0 .byte "lies next to him.",0
; TODO
; + look (after kerrek dead, after take riches) ; + look (after kerrek dead, after take riches)
jhonka_look_at_no_riches_message:
.byte "There's a disgusting",13 .byte "There's a disgusting",13
.byte "little Jhonka hopping",13 .byte "little Jhonka hopping",13
.byte "around outside a small",13 ; WIKI wrong .byte "around outside a small",13 ; WIKI wrong
.byte "cave.",0 .byte "cave.",0
; TODO
; + look club/turkey leg (when he's outside) ; + look club/turkey leg (when he's outside)
jhonka_look_at_club_message:
.byte "Turkey leg or no, it looks",13 .byte "Turkey leg or no, it looks",13
.byte "like the Jhonka's been",13 .byte "like the Jhonka's been",13
.byte "gnawing on it.",0 .byte "gnawing on it.",0
; + look cave ; + look cave
; same as alive? ; same as alive
; + look door (after kerrek?) ; not in WIKI ; + look door (after kerrek?) ; not in WIKI
jhonka_look_at_door_out_message:
.byte "Just a door, nothing more.",0 .byte "Just a door, nothing more.",0
; + look riches ; + look riches
jhonka_look_at_riches_message:
.byte "That's one fat pile of",13 .byte "That's one fat pile of",13
.byte "riches alright.",0 .byte "riches alright.",0
@ -124,6 +129,7 @@ jhonka_climb_fence_message:
; same as alive ; same as alive
; + look jhonka (when he's outside) ; + look jhonka (when he's outside)
jhonka_look_at_jhonka_out_message:
.byte "The Jhonka is gray and",13 .byte "The Jhonka is gray and",13
.byte "grody. He's got a cromagnon",13 .byte "grody. He's got a cromagnon",13
.byte "forehead and jaw with a",13 .byte "forehead and jaw with a",13