peasant: more hooking up of mountain pass

This commit is contained in:
Vince Weaver 2021-10-19 16:59:46 -04:00
parent 80cef5d3b7
commit c122842bf3
6 changed files with 201 additions and 34 deletions

View File

@ -70,3 +70,7 @@ Ending:
- Smoother baby animation? Use page-flipping?
Modify sprite routine to auto-shift colors so we can have more
of an arc on baby trajectory?
Pass:
- hook up/fix dialog when you have various items
- be sure to fix the "talk knight" dialog for robe/fire etc

View File

@ -109,7 +109,16 @@ start_new_game:
; lda #$00
sta INVENTORY_3_GONE
; setup game state
lda #0
sta GAME_STATE_0
sta GAME_STATE_1
sta GAME_STATE_2
sta NED_STATUS
sta BUSH_STATUS
sta KERREK_STATE
sta ARROW_SCORE
rts

View File

@ -55,6 +55,71 @@ done_upcase_loop:
;================
; ask
;================
parse_ask:
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
; else ask about unknown
ask_about_unknown:
ldx #<knight_ask_unknown_message
ldy #>knight_ask_unknown_message
jmp finish_parse_message
ask_about_fire:
ldx #<knight_ask_fire_message
ldy #>knight_ask_fire_message
jmp finish_parse_message
ask_about_jhonka:
ldx #<knight_ask_jhonka_message
ldy #>knight_ask_jhonka_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
;================
@ -256,14 +321,8 @@ parse_die:
parse_drink:
ldx #<drink_message
stx OUTL
ldy #>drink_message
sty OUTH
jsr print_text_message
jsr wait_until_keypress
jsr hgr_partial_restore
jsr partial_message_step
ldx #<drink_message2
ldy #>drink_message2
@ -358,10 +417,75 @@ irrelevant_look:
parse_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
talk_noone:
ldx #<talk_noone_message
ldy #>talk_noone_message
jmp finish_parse_message
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
;===================
; save
;===================
@ -430,7 +554,6 @@ where_done:
;==================
; unknown
;=================
parse_ask:
parse_buy:
parse_close:
parse_deploy:
@ -926,6 +1049,19 @@ last_bg_l: .byte $00
last_bg_h: .byte $00
;======================
;======================
; partial message step
;======================
;======================
partial_message_step:
stx OUTL
sty OUTH
jsr print_text_message
jsr wait_until_keypress
jsr hgr_partial_restore
rts
verb_table:
.word parse_unknown-1 ; VERB_UNKNOWN = 0

View File

@ -26,6 +26,8 @@ Mini-games?
Text
HGR drawing lib (no built in on 2)
How to fit? Lookup for common word distribution?
Using high-bit terminated strings rather than nul in some cases
Ram-map

View File

@ -248,7 +248,8 @@ attack_sign_message:
.byte "Smarty-short-pants. No",13
.byte "sign attacking for you.",0
; + talk knight (beginning, first try)
; + talk knight (beginning, first time only)
talk_knight_first_message:
.byte "You explain your situation",13
.byte "to the knight. That Trogdor",13
.byte "burninated your cottage",13
@ -259,6 +260,8 @@ attack_sign_message:
.byte "(Press RETURN to advance",13
.byte "through conversations)",0
; (first time only)
talk_knight_second_message:
.byte 34,"Hang on there,",13
.byte "Trogdorkilla,",34," says the",13
.byte "knight. ",34,"I can only allow",13
@ -268,22 +271,28 @@ attack_sign_message:
.byte "are not one.",34,0
; + talk (again) picks up here
talk_knight_third_message:
.byte 34,"Look, Dragonheart...",34,0
.byte 34,"You don't STINK like a",0
.byte " peasant.",34,0
talk_knight_stink_message:
.byte 34,"You don't STINK like a",13
.byte "peasant.",34,0
talk_knight_dress_message:
.byte 34,"You don't DRESS like a",13
.byte "peasant.",34,0
talk_knight_fire_message:
.byte 34,"And you're definitely not",13
.byte "ON FIRE like a peasant.",34,0
talk_knight_fourth_message:
.byte "Once you're those 3",13
.byte "things, come back and maybe",13
.byte "we can talk.",34,0
; only first time through
; first time only
talk_knight_fifth_message:
.byte "Be sure to LOOK around",13
.byte "lots. TALK to everyone you",13
.byte "see and ASK ABOUT stuff.",13
@ -309,6 +318,7 @@ attack_sign_message:
.byte "Disk read error. Please insert floppy disk 2 into Drive B and press enter.",0
; + ask about fire
knight_ask_fire_message:
.byte 34,"Well, whenever I see",13
.byte "peasants, they tend to be",13
.byte "on fire. So get yourself on",13
@ -317,6 +327,7 @@ attack_sign_message:
.byte "burn.",34,0
; + ask about Jhonka
knight_ask_jhonka_message:
.byte 34,"Since the Kerrek showed",13
.byte "up, we don't see the Jhonka",13
.byte "so much anymore. He lives",13
@ -324,6 +335,7 @@ attack_sign_message:
.byte "west Peasantry.",34,0
; + ask about Kerrek
knight_ask_kerrek_message:
.byte 34,"I call him Big Stinky.",13
.byte "He's slow and stupid, but",13
.byte "he'll pound you into milks",13
@ -331,6 +343,7 @@ attack_sign_message:
.byte "thought.",34,0
; + ask about naked ned
knight_ask_ned_message:
.byte 34,"That weirdo used to live",13
.byte "over in west Peasantry but",13
.byte "now I guess he just prances",13
@ -338,12 +351,14 @@ attack_sign_message:
.byte "birthday suit.",34,0
; + ask about robe
knight_ask_robe_message:
.byte 34,"Peasants wear those brown",13
.byte "robes. You know, with the",13
.byte "rope around the waist. Get",13
.byte "yourself one of those.",34,0
; + ask about smell
knight_ask_smell_message:
.byte 34,"I never met a peasant that",13
.byte "didn't stink. If you wanna",13
.byte "smell bad, get the Kerrek",13
@ -351,6 +366,7 @@ attack_sign_message:
.byte "reeks!",34,0
; + ask about trogdor
knight_ask_trogdor_message:
.byte 34,"If I had a gold coin for",13
.byte "every whining peasant's",13
.byte "cottage that freaking",13
@ -358,7 +374,6 @@ attack_sign_message:
.byte "rich as a jhonka.",0
; + ask about (unknown)
knight_ask_unknown_message:
.byte 34,"I don't know anything",13
.byte "about that, short pants.",34,0

View File

@ -116,28 +116,29 @@ MAP_Y = $95
MAP_LOCATION = $96
GAME_STATE_0 = $97
BABY_IN_WELL=$00
TURN_WELL_CRANK=$00
TALK_TO_MENDELEV=$00
HALDO_TO_DONGELEV=$00
ARROW_BEATEN=$00
GARY_SCARED=$00
LADY_GONE=$00
TRINKET_GIVEN=$00
BABY_IN_WELL=$01
TURN_WELL_CRANK=$02
TALK_TO_MENDELEV=$04
HALDO_TO_DONGELEV=$08
ARROW_BEATEN=$10
GARY_SCARED=$20
LADY_GONE=$40
TRINKET_GIVEN=$80
GAME_STATE_1 = $98
FISH_FED=$00 ; also implies man gone and inn open
PUDDLE_WET=$00
HAY_BALE=$00
JHONKA_OUT=$00
RAINING=$00
NIGHT=$00
POT_ON_HEAD=$00
WEARING_ROBE=$00
FISH_FED=$01 ; also implies man gone and inn open
PUDDLE_WET=$02
HAY_BALE=$04
JHONKA_OUT=$08
RAINING=$10
NIGHT=$20
POT_ON_HEAD=$40
WEARING_ROBE=$80
GAME_STATE_2 = $99
ON_FIRE = $00
COTTAGE_ROCK_MOVED=$00
KNUCKLES_BLEED=$00
DRESSER_OPEN=$00
ON_FIRE = $01
COTTAGE_ROCK_MOVED=$02
KNUCKLES_BLEED=$04
DRESSER_OPEN=$08
TALKED_TO_KNIGHT = $10
NED_STATUS = $9A
BUSH_STATUS = $9B ; status of bush search