peasant: can now get riches

and also the baby
This commit is contained in:
Vince Weaver 2021-11-27 01:36:40 -05:00
parent 237d2254c5
commit b62f231868
6 changed files with 118 additions and 25 deletions

View File

@ -504,6 +504,7 @@ parse_input.inc: generate_common parse_input
./generate_common -a 0xee00 -s parse_common_load parse_input.lst >> parse_input.inc ./generate_common -a 0xee00 -s parse_common_load parse_input.lst >> parse_input.inc
./generate_common -a 0xee00 -s parse_common_save parse_input.lst >> parse_input.inc ./generate_common -a 0xee00 -s parse_common_save parse_input.lst >> parse_input.inc
./generate_common -a 0xee00 -s get_noun_again parse_input.lst >> parse_input.inc ./generate_common -a 0xee00 -s get_noun_again parse_input.lst >> parse_input.inc
./generate_common -a 0xee00 -s parse_input_smc parse_input.lst >> parse_input.inc
### ###

View File

@ -191,8 +191,9 @@ POINTS IMPLEMENTED: (in order of implementation)
+ 10 (get belt) + 10 (get belt)
+ 5 (kill kerrek) + 5 (kill kerrek)
+ 7 (talk to knight once have belt, robe, and on fire) + 7 (talk to knight once have belt, robe, and on fire)
+ 7 (get riches from jhonka)
====== ======
79 points 86 points
deaths/endings implemented deaths/endings implemented
@ -200,7 +201,8 @@ deaths/endings implemented
+1 Typing "die" +1 Typing "die"
+2 Beating the game +2 Beating the game
+3 Cutting off arms, legs, and head +3 Cutting off arms, legs, and head
+4 kick/punch/kill old gary +4 kick/punch/kill Old Gary
+5 get arrow (while dongolev shooting) +5 get arrow (while Dongolev shooting)
+6 walk on range (while dongolev shooting) +6 walk on range (while Dongolev shooting)
+7 walk too close to Kerrek +7 walk too close to Kerrek
+8 say "yes" when Jhonka asks if you stole riches

View File

@ -41,6 +41,8 @@ done_upcase_loop:
jsr get_noun jsr get_noun
parse_input_smc:
nop
;================================ ;================================
; jump into verb table ; jump into verb table

View File

@ -140,6 +140,30 @@ new_location:
jsr draw_peasant jsr draw_peasant
;=======================
; before game text
lda MAP_LOCATION
cmp #LOCATION_JHONKA_CAVE
bne no_before_game_text
; at jhonka cave
; check to see if in hay
lda GAME_STATE_1
and #IN_HAY_BALE
beq no_before_game_text
ldx #<jhonka_in_hay_message
ldy #>jhonka_in_hay_message
jsr finish_parse_message
no_before_game_text:
game_loop: game_loop:
jsr move_peasant jsr move_peasant

View File

@ -64,7 +64,23 @@ jhonka_get:
; check if alive ; check if alive
lda KERREK_STATE lda KERREK_STATE
and #$f and #$f
beq jhonka_get_kerrek_alive bne jhonka_get_kerrek_dead
jhonka_get_kerrek_alive:
lda CURRENT_NOUN
cmp #NOUN_NOTE
beq jhonka_get_note
; else "probably wish" message
jmp parse_common_get
jhonka_get_note:
ldx #<jhonka_get_note_message
ldy #>jhonka_get_note_message
jmp finish_parse_message
jhonka_get_kerrek_dead: jhonka_get_kerrek_dead:
@ -94,15 +110,72 @@ jhonka_get_riches_no_hay:
jmp finish_parse_message jmp finish_parse_message
jhonka_get_riches_in_hay: jhonka_get_riches_in_hay:
; TODO: see if in hay
ldx #<jhonka_steal_riches_message ldx #<jhonka_steal_riches_message
ldy #>jhonka_steal_riches_message ldy #>jhonka_steal_riches_message
jsr partial_message_step
; TODO: points, etc jhonka_wait_for_answer:
jsr clear_bottom
jsr hgr_input
lda #$60 ; modify parse input to return
sta parse_input_smc ; rather than verb-jump
jsr parse_input
lda CURRENT_VERB
cmp #VERB_NO
beq jhonka_verb_no
cmp #VERB_YES
beq jhonka_verb_yes
ldx #<jhonka_answer_him_message
ldy #>jhonka_answer_him_message
jsr partial_message_step
jmp jhonka_wait_for_answer
jhonka_verb_no:
; restore parse_message
lda #$EA
sta parse_input_smc
; get riches
lda INVENTORY_2
ora #INV2_RICHES
sta INVENTORY_2
; add 7 points
lda #7
jsr score_points
ldx #<jhonka_no_message
ldy #>jhonka_no_message
jmp finish_parse_message jmp finish_parse_message
jhonka_verb_yes:
; restore parse_message
lda #$EA
sta parse_input_smc
; this kills you
lda #LOAD_GAME_OVER
sta WHICH_LOAD
lda #NEW_FROM_DISK
sta LEVEL_OVER
ldx #<jhonka_yes_message
ldy #>jhonka_yes_message
jsr partial_message_step
ldx #<jhonka_yes_message2
ldy #>jhonka_yes_message2
jmp finish_parse_message
jhonka_get_club: jhonka_get_club:
ldx #<jhonka_get_club_message ldx #<jhonka_get_club_message
ldy #>jhonka_get_club_message ldy #>jhonka_get_club_message
@ -110,20 +183,7 @@ jhonka_get_club:
jhonka_get_kerrek_alive:
lda CURRENT_NOUN
cmp #NOUN_NOTE
beq jhonka_get_note
; else "probably wish" message
jmp parse_common_get
jhonka_get_note:
ldx #<jhonka_get_note_message
ldy #>jhonka_get_note_message
jmp finish_parse_message
;================= ;=================

View File

@ -4,8 +4,8 @@ peasant3_dialog_start:
; Jhonka cave ; Jhonka cave
;============= ;=============
; TODO
; + (walk in haystack) ; + (walk in haystack)
jhonka_in_hay_message:
.byte "Hey, nice disguise! The",13 .byte "Hey, nice disguise! The",13
.byte "Jhonka doesn't seem to",13 .byte "Jhonka doesn't seem to",13
.byte "notice you.",0 .byte "notice you.",0
@ -156,30 +156,33 @@ jhonka_steal_riches_message:
.byte "riches?!",34," growls the",13 .byte "riches?!",34," growls the",13
.byte "Jhonka.",0 .byte "Jhonka.",0
; TODO
; + 7 POINTS ; + 7 POINTS
; + no ; + no
jhonka_no_message:
.byte 34,"Okay. Lemme know if you",13 .byte 34,"Okay. Lemme know if you",13
.byte "see riches anywhere,",34," he",13 .byte "see riches anywhere,",34," he",13
.byte "grunts and goes back to his",13 .byte "grunts and goes back to his",13
.byte "hopping. You smooth",13 .byte "hopping. You smooth",13
.byte "talker, you.",0 .byte "talker, you.",0
; TODO
; + yes (to the Jhonka when he asks you about his riches) ; + yes (to the Jhonka when he asks you about his riches)
jhonka_yes_message:
.byte 34,"I KILL YOU!!",34," screams the",13 .byte 34,"I KILL YOU!!",34," screams the",13
.byte "Jhonka.",0 .byte "Jhonka.",0
; {The Jhonka clubs you to death} (Warning: Obviously, you will die.) ; {The Jhonka clubs you to death} (Warning: Obviously, you will die.)
jhonka_yes_message2:
.byte "Club or turkey leg, the",13 .byte "Club or turkey leg, the",13
.byte "Jhonka sure just beat you",13 .byte "Jhonka sure just beat you",13
.byte "senseless with whatever he",13 .byte "senseless with whatever he",13
.byte "was holding. You dead.",13 .byte "was holding. You dead.",13
.byte "Thanks for playing!",0 .byte "Thanks for playing!",0
; 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
; you can't walk while waiting here ; you can't walk while waiting here
jhonka_answer_him_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
@ -241,7 +244,8 @@ jhonka_give_message:
; + talk jhonka (while inside the hay) ; + talk jhonka (while inside the hay)
jhonka_talk_in_hay_message: jhonka_talk_in_hay_message:
.byte "Not now! You'll blow your cover!",0 .byte "Not now! You'll blow your",13
.byte "cover!",0
; + talk ; + talk
; + talk jhonka (jhonka there, not in hay) ; + talk jhonka (jhonka there, not in hay)