dos33fsprogs/games/peasant/peasant3_actions.s

892 lines
15 KiB
ArmAsm
Raw Normal View History

2021-10-21 22:30:24 +00:00
.include "tokens.inc"
2021-10-25 02:13:58 +00:00
2021-10-21 22:30:24 +00:00
;=======================
;=======================
;=======================
2021-10-25 02:13:58 +00:00
; Jhonka Cave
2021-10-21 22:30:24 +00:00
;=======================
;=======================
;=======================
2021-10-25 02:13:58 +00:00
jhonka_cave_verb_table:
2021-10-21 22:30:24 +00:00
.byte VERB_CLIMB
2021-10-25 02:13:58 +00:00
.word jhonka_climb-1
2021-10-21 22:30:24 +00:00
.byte VERB_GET
2021-10-25 02:13:58 +00:00
.word jhonka_get-1
2021-10-21 22:30:24 +00:00
.byte VERB_JUMP
2021-10-25 02:13:58 +00:00
.word jhonka_jump-1
2021-10-21 22:30:24 +00:00
.byte VERB_LOOK
2021-10-25 02:13:58 +00:00
.word jhonka_look-1
.byte VERB_OPEN
.word jhonka_open-1
.byte VERB_READ
.word jhonka_read-1
.byte VERB_KNOCK
.word jhonka_knock-1
2021-10-21 22:30:24 +00:00
.byte 0
;================
; climb
;================
2021-10-25 02:13:58 +00:00
jhonka_jump:
jhonka_climb:
2021-10-21 22:30:24 +00:00
lda CURRENT_NOUN
cmp #NOUN_FENCE
2021-10-25 02:13:58 +00:00
beq jhonka_climb_fence
2021-10-21 22:30:24 +00:00
jmp parse_common_unknown
2021-10-25 02:13:58 +00:00
jhonka_climb_fence:
ldx #<jhonka_climb_fence_message
ldy #>jhonka_climb_fence_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
;================
; get
;================
2021-10-25 02:13:58 +00:00
jhonka_get:
2021-10-21 22:30:24 +00:00
lda CURRENT_NOUN
2021-10-25 02:13:58 +00:00
cmp #NOUN_NOTE
beq jhonka_get_note
2021-10-21 22:30:24 +00:00
; else "probably wish" message
jmp parse_common_get
2021-10-25 02:13:58 +00:00
jhonka_get_note:
ldx #<jhonka_get_note_message
ldy #>jhonka_get_note_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
;=================
; look
;=================
2021-10-25 02:13:58 +00:00
jhonka_look:
2021-10-21 22:30:24 +00:00
lda CURRENT_NOUN
cmp #NOUN_FENCE
2021-10-25 02:13:58 +00:00
beq jhonka_look_at_fence
cmp #NOUN_CAVE
beq jhonka_look_at_cave
cmp #NOUN_NOTE
beq jhonka_read_note
2021-10-21 22:30:24 +00:00
cmp #NOUN_NONE
2021-10-25 02:13:58 +00:00
beq jhonka_look_at
2021-10-21 22:30:24 +00:00
jmp parse_common_look
2021-10-25 02:13:58 +00:00
jhonka_look_at:
ldx #<jhonka_look_at_message
ldy #>jhonka_look_at_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
jhonka_look_at_cave:
ldx #<jhonka_look_at_cave_message
ldy #>jhonka_look_at_cave_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
jhonka_look_at_fence:
ldx #<jhonka_look_at_fence_message
ldy #>jhonka_look_at_fence_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
;================
2021-10-25 02:13:58 +00:00
; read
2021-10-21 22:30:24 +00:00
;================
2021-10-25 02:13:58 +00:00
jhonka_read:
2021-10-21 22:30:24 +00:00
lda CURRENT_NOUN
2021-10-25 02:13:58 +00:00
cmp #NOUN_NOTE
beq jhonka_read_note
2021-10-21 22:30:24 +00:00
jmp parse_common_unknown
2021-10-25 02:13:58 +00:00
jhonka_read_note:
ldx #<jhonka_read_note_message
ldy #>jhonka_read_note_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
;================
2021-10-25 02:13:58 +00:00
; open
2021-10-21 22:30:24 +00:00
;================
2021-10-25 02:13:58 +00:00
jhonka_open:
2021-10-21 22:30:24 +00:00
lda CURRENT_NOUN
2021-10-25 02:13:58 +00:00
cmp #NOUN_DOOR
beq jhonka_open_door
cmp #NOUN_NONE
beq jhonka_open_door
2021-10-21 22:30:24 +00:00
jmp parse_common_unknown
2021-10-25 02:13:58 +00:00
jhonka_open_door:
ldx #<jhonka_open_door_message
ldy #>jhonka_open_door_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
;================
2021-10-25 02:13:58 +00:00
; knock
2021-10-21 22:30:24 +00:00
;================
2021-10-25 02:13:58 +00:00
jhonka_knock:
2021-10-21 22:30:24 +00:00
lda CURRENT_NOUN
2021-10-25 02:13:58 +00:00
cmp #NOUN_DOOR
beq jhonka_knock_door
2021-10-21 22:30:24 +00:00
cmp #NOUN_NONE
2021-10-25 02:13:58 +00:00
beq jhonka_knock_door
2021-10-21 22:30:24 +00:00
2021-10-25 02:13:58 +00:00
jmp parse_common_unknown
2021-10-21 22:30:24 +00:00
2021-10-25 02:13:58 +00:00
jhonka_knock_door:
ldx #<jhonka_knock_message1
ldy #>jhonka_knock_message1
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
;=======================
;=======================
;=======================
2021-10-25 02:13:58 +00:00
; Cottage
2021-10-21 22:30:24 +00:00
;=======================
;=======================
;=======================
2021-10-25 02:13:58 +00:00
cottage_verb_table:
2021-10-21 22:30:24 +00:00
.byte VERB_GET
2021-10-25 02:13:58 +00:00
.word cottage_get-1
2021-10-21 22:30:24 +00:00
.byte VERB_TAKE
2021-10-25 02:13:58 +00:00
.word cottage_take-1
2021-10-21 22:30:24 +00:00
.byte VERB_STEAL
2021-10-25 02:13:58 +00:00
.word cottage_steal-1
2021-10-21 22:30:24 +00:00
.byte VERB_LOOK
2021-10-25 02:13:58 +00:00
.word cottage_look-1
2021-10-21 22:30:24 +00:00
.byte 0
;================
; get
;================
2021-10-25 02:13:58 +00:00
cottage_get:
cottage_steal:
cottage_take:
2021-10-21 22:30:24 +00:00
lda CURRENT_NOUN
2021-10-25 02:13:58 +00:00
cmp #NOUN_MAP
beq cottage_get_map
cmp #NOUN_PAPER
beq cottage_get_map
2021-10-21 22:30:24 +00:00
; else "probably wish" message
jmp parse_common_get
2021-10-25 02:13:58 +00:00
cottage_get_map:
lda INVENTORY_3
and #INV3_MAP
beq actually_get_map
already_have_map:
ldx #<cottage_get_map_already_message
ldy #>cottage_get_map_already_message
jmp finish_parse_message
actually_get_map:
; actually get map
lda INVENTORY_3
ora #INV3_MAP
sta INVENTORY_3
2021-10-25 02:13:58 +00:00
ldx #<cottage_get_map_message
ldy #>cottage_get_map_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
;=================
; look
;=================
2021-10-25 02:13:58 +00:00
cottage_look:
2021-10-21 22:30:24 +00:00
lda CURRENT_NOUN
2021-10-25 02:13:58 +00:00
cmp #NOUN_PAPER
beq cottage_look_at_ground
cmp #NOUN_GROUND
beq cottage_look_at_ground
cmp #NOUN_COTTAGE
beq cottage_look_at_cottage
2021-10-21 22:30:24 +00:00
cmp #NOUN_NONE
2021-10-25 02:13:58 +00:00
beq cottage_look_at
2021-10-21 22:30:24 +00:00
jmp parse_common_look
2021-10-25 02:13:58 +00:00
cottage_look_at:
ldx #<cottage_look_at_message
ldy #>cottage_look_at_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
cottage_look_at_cottage:
ldx #<cottage_look_at_cottage_message
ldy #>cottage_look_at_cottage_message
jsr partial_message_step
lda INVENTORY_3
and #INV3_MAP
beq cottage_look_map_still_there
rts
cottage_look_map_still_there:
2021-10-25 02:13:58 +00:00
ldx #<cottage_look_at_cottage_message_map
ldy #>cottage_look_at_cottage_message_map
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
cottage_look_at_ground:
cottage_look_at_paper:
ldx #<cottage_look_at_map_message
ldy #>cottage_look_at_map_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
;=======================
;=======================
;=======================
2021-10-25 02:13:58 +00:00
; Pebble Lake West
2021-10-21 22:30:24 +00:00
;=======================
;=======================
;=======================
2021-10-25 02:13:58 +00:00
lake_west_verb_table:
2021-10-21 22:30:24 +00:00
.byte VERB_GET
2021-10-25 02:13:58 +00:00
.word lake_west_get-1
2021-10-21 22:30:24 +00:00
.byte VERB_STEAL
2021-10-25 02:13:58 +00:00
.word lake_west_steal-1
.byte VERB_SKIP
.word lake_west_skip-1
2021-10-21 22:30:24 +00:00
.byte VERB_TAKE
2021-10-25 02:13:58 +00:00
.word lake_west_take-1
.byte VERB_LOOK
.word lake_west_look-1
.byte VERB_SWIM
.word lake_west_swim-1
.byte VERB_THROW
.word lake_west_throw-1
2021-10-21 22:30:24 +00:00
.byte 0
;================
; get
;================
2021-10-25 02:13:58 +00:00
lake_west_get:
lake_west_steal:
lake_west_take:
2021-10-21 22:30:24 +00:00
lda CURRENT_NOUN
2021-10-25 02:13:58 +00:00
cmp #NOUN_BERRIES
beq lake_west_get_berries
cmp #NOUN_STONE
beq lake_west_get_pebbles
cmp #NOUN_PEBBLES
beq lake_west_get_pebbles
2021-10-21 22:30:24 +00:00
; else "probably wish" message
jmp parse_common_get
2021-10-25 02:13:58 +00:00
lake_west_get_berries:
ldx #<lake_west_get_berries_message
ldy #>lake_west_get_berries_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
lake_west_get_pebbles:
2021-10-25 04:44:57 +00:00
lda INVENTORY_1
and #INV1_PEBBLES
bne lake_west_yes_pebbles
lake_west_no_pebbles:
; TODO: only if standing on them
2021-10-25 04:44:57 +00:00
; pick up pebbles
lda INVENTORY_1
ora #INV1_PEBBLES
sta INVENTORY_1
; add score
lda #1
jsr score_points
; print message
2021-10-25 02:13:58 +00:00
ldx #<lake_west_get_pebbles_message
ldy #>lake_west_get_pebbles_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
2021-10-25 04:44:57 +00:00
lake_west_yes_pebbles:
jmp parse_common_get
2021-10-21 22:30:24 +00:00
;=================
; look
;=================
2021-10-25 02:13:58 +00:00
lake_west_look:
2021-10-21 22:30:24 +00:00
lda CURRENT_NOUN
2021-10-25 02:13:58 +00:00
cmp #NOUN_LAKE
beq lake_west_look_at_lake
cmp #NOUN_SAND
beq lake_west_look_at_sand
cmp #NOUN_WATER
beq lake_west_look_at_lake
cmp #NOUN_BUSH
beq lake_west_look_at_bush
cmp #NOUN_BERRIES
beq lake_west_look_at_berries
2021-10-21 22:30:24 +00:00
cmp #NOUN_NONE
2021-10-25 02:13:58 +00:00
beq lake_west_look_at
2021-10-21 22:30:24 +00:00
jmp parse_common_look
2021-10-25 02:13:58 +00:00
lake_west_look_at:
ldx #<lake_west_look_at_message
ldy #>lake_west_look_at_message
jmp finish_parse_message
lake_west_look_at_lake:
ldx #<lake_west_look_at_lake_message
ldy #>lake_west_look_at_lake_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
lake_west_look_at_sand:
lda INVENTORY_1
and #INV1_PEBBLES
bne look_sand_pebbles_gone
lda INVENTORY_1_GONE
and #INV1_PEBBLES
bne look_sand_pebbles_gone
look_sand_pebbles_there:
2021-10-25 02:13:58 +00:00
ldx #<lake_west_look_at_sand_message
ldy #>lake_west_look_at_sand_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
look_sand_pebbles_gone:
ldx #<lake_west_look_at_sand_after_message
ldy #>lake_west_look_at_sand_after_message
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
lake_west_look_at_bush:
ldx #<lake_west_look_at_bush_message
ldy #>lake_west_look_at_bush_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
lake_west_look_at_berries:
ldx #<lake_west_look_at_berries_message
ldy #>lake_west_look_at_berries_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
;================
2021-10-25 02:13:58 +00:00
; skip
2021-10-21 22:30:24 +00:00
;================
2021-10-25 02:13:58 +00:00
lake_west_skip:
2021-10-21 22:30:24 +00:00
lda CURRENT_NOUN
2021-10-25 02:13:58 +00:00
cmp #NOUN_STONE
beq lake_west_skip_stones
cmp #NOUN_PEBBLES
beq lake_west_skip_stones
2021-10-21 22:30:24 +00:00
jmp parse_common_unknown
2021-10-25 02:13:58 +00:00
lake_west_skip_stones:
ldx #<lake_west_skip_stones_message
ldy #>lake_west_skip_stones_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
2021-10-21 22:30:24 +00:00
;================
2021-10-25 02:13:58 +00:00
; swim
2021-10-21 22:30:24 +00:00
;================
2021-10-25 02:13:58 +00:00
lake_west_swim:
2021-10-21 22:30:24 +00:00
lda CURRENT_NOUN
2021-10-25 02:13:58 +00:00
cmp #NOUN_LAKE
beq lake_west_swim_lake
cmp #NOUN_WATER
beq lake_west_swim_lake
cmp #NOUN_NONE
beq lake_west_swim_lake
2021-10-21 22:30:24 +00:00
jmp parse_common_unknown
2021-10-25 02:13:58 +00:00
lake_west_swim_lake:
ldx #<lake_west_swim_message
ldy #>lake_west_swim_message
jmp finish_parse_message
2021-10-21 22:30:24 +00:00
2021-10-25 02:13:58 +00:00
;================
; throw
;================
lake_west_throw:
lda CURRENT_NOUN
2021-10-21 22:30:24 +00:00
2021-10-25 02:13:58 +00:00
cmp #NOUN_BABY
beq lake_west_throw_baby
jmp parse_common_unknown
2021-10-21 22:30:24 +00:00
2021-10-25 02:13:58 +00:00
lake_west_throw_baby:
ldx #<lake_west_throw_baby_message
ldy #>lake_west_throw_baby_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
2021-10-21 22:30:24 +00:00
;=======================
;=======================
;=======================
2021-10-25 02:13:58 +00:00
; Pebble Lake East
2021-10-21 22:30:24 +00:00
;=======================
;=======================
;=======================
2021-10-25 02:13:58 +00:00
lake_east_verb_table:
2021-10-21 22:30:24 +00:00
.byte VERB_LOOK
2021-10-25 02:13:58 +00:00
.word lake_east_look-1
.byte VERB_TALK
.word lake_east_talk-1
.byte VERB_THROW
.word lake_east_throw-1
2021-10-21 22:30:24 +00:00
.byte 0
2021-10-25 02:13:58 +00:00
;=================
; look
;=================
lake_east_look:
2021-10-21 22:30:24 +00:00
lda CURRENT_NOUN
2021-10-25 02:13:58 +00:00
cmp #NOUN_BOAT
beq lake_east_look_at_boat
cmp #NOUN_DINGHY
beq lake_east_look_at_boat
cmp #NOUN_DUDE
beq lake_east_look_at_man
cmp #NOUN_GUY
beq lake_east_look_at_man
cmp #NOUN_LAKE
beq lake_east_look_at_lake
cmp #NOUN_MAN
beq lake_east_look_at_man
cmp #NOUN_NONE
beq lake_east_look_at_lake
cmp #NOUN_SAND
beq lake_east_look_at_sand
cmp #NOUN_PEASANT
beq lake_east_look_at_man
2021-10-21 22:30:24 +00:00
2021-10-25 02:13:58 +00:00
jmp parse_common_look
2021-10-21 22:30:24 +00:00
2021-10-25 02:13:58 +00:00
lake_east_look_at_lake:
lda GAME_STATE_1
and #FISH_FED
beq look_at_lake_man_there
ldx #<lake_east_look_at_lake_message_man_gone
ldy #>lake_east_look_at_lake_message_man_gone
jmp finish_parse_message
look_at_lake_man_there:
2021-10-25 02:13:58 +00:00
ldx #<lake_east_look_at_lake_message
ldy #>lake_east_look_at_lake_message
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
lake_east_look_at_man:
lda GAME_STATE_1
and #FISH_FED
beq look_at_man_hes_there
; not there, so can't see him
jmp parse_common_look
look_at_man_hes_there:
2021-10-25 02:13:58 +00:00
ldx #<lake_east_look_at_man_message
ldy #>lake_east_look_at_man_message
jmp finish_parse_message
2021-10-21 22:30:24 +00:00
2021-10-25 02:13:58 +00:00
lake_east_look_at_sand:
ldx #<lake_east_look_at_sand_message
ldy #>lake_east_look_at_sand_message
jsr partial_message_step
ldx #<lake_east_look_at_sand_message2
ldy #>lake_east_look_at_sand_message2
jmp finish_parse_message
lake_east_look_at_boat:
lda GAME_STATE_1
and #FISH_FED
beq look_at_boat_hes_there
2021-10-25 02:13:58 +00:00
; not there, so can't see him
2021-10-25 02:13:58 +00:00
ldx #<lake_east_look_at_boat_gone_message
ldy #>lake_east_look_at_boat_gone_message
jmp finish_parse_message
look_at_boat_hes_there:
2021-10-25 02:13:58 +00:00
ldx #<lake_east_look_at_boat_message
ldy #>lake_east_look_at_boat_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
2021-10-21 22:30:24 +00:00
;=================
2021-10-25 02:13:58 +00:00
; talk
2021-10-21 22:30:24 +00:00
;=================
2021-10-25 02:13:58 +00:00
lake_east_talk:
2021-10-21 22:30:24 +00:00
lda CURRENT_NOUN
2021-10-25 02:13:58 +00:00
cmp #NOUN_DUDE
beq lake_east_talk_to_man
cmp #NOUN_GUY
beq lake_east_talk_to_man
cmp #NOUN_MAN
beq lake_east_talk_to_man
cmp #NOUN_PEASANT
beq lake_east_talk_to_man
2021-10-21 22:30:24 +00:00
2021-10-25 02:13:58 +00:00
jmp parse_common_talk
2021-10-21 22:30:24 +00:00
2021-10-25 02:13:58 +00:00
lake_east_talk_to_man:
lda GAME_STATE_1
and #FISH_FED
beq talk_hes_there
ldx #<lake_east_talk_man_after_message
ldy #>lake_east_talk_man_after_message
jmp finish_parse_message
talk_hes_there:
2021-10-25 02:13:58 +00:00
ldx #<lake_east_talk_man_message
ldy #>lake_east_talk_man_message
2021-10-21 22:30:24 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
;=================
; throw
;=================
2021-10-21 22:30:24 +00:00
2021-10-25 02:13:58 +00:00
lake_east_throw:
2021-10-21 22:30:24 +00:00
2021-10-25 02:13:58 +00:00
lda CURRENT_NOUN
2021-10-21 22:30:24 +00:00
2021-10-25 02:13:58 +00:00
cmp #NOUN_FEED
beq lake_east_throw_feed
2021-10-21 22:30:24 +00:00
2021-10-25 02:13:58 +00:00
bne lake_east_throw_default
2021-10-21 22:30:24 +00:00
2021-10-25 02:13:58 +00:00
lake_east_throw_feed:
; check if have feed
lda INVENTORY_1
and #INV1_CHICKEN_FEED
bne do_have_feed
dont_have_feed:
ldx #<lake_east_throw_feed_none_message
ldy #>lake_east_throw_feed_none_message
jmp finish_parse_message
do_have_feed:
; check if too far south
lda PEASANT_Y
cmp #$80
bcs throw_feed_too_south ; bge
; check if man still there
lda GAME_STATE_1
and #FISH_FED
beq throw_feed_hes_there
; he's not there
ldx #<lake_east_throw_feed_already_message
ldy #>lake_east_throw_feed_already_message
jmp finish_parse_message
throw_feed_hes_there:
; actually throw feed
2021-10-25 02:13:58 +00:00
ldx #<lake_east_throw_feed_message
ldy #>lake_east_throw_feed_message
jsr partial_message_step
; feed fish
lda GAME_STATE_1
ora #FISH_FED
sta GAME_STATE_1
; no longer have feed
lda INVENTORY_1_GONE
ora #INV1_CHICKEN_FEED
sta INVENTORY_1_GONE
; add 2 points to score
lda #2
jsr score_points
ldx #<lake_east_throw_feed2_message
ldy #>lake_east_throw_feed2_message
jmp finish_parse_message
throw_feed_too_south:
ldx #<lake_east_throw_feed_too_south_message
ldy #>lake_east_throw_feed_too_south_message
2021-10-25 02:13:58 +00:00
jmp finish_parse_message
2021-10-21 22:30:24 +00:00
; throw anything but feed
2021-10-25 02:13:58 +00:00
lake_east_throw_default:
lda GAME_STATE_1
and #FISH_FED
beq lake_east_throw_feed_man_default
; not there
ldx #<lake_east_throw_default_gone_message
ldy #>lake_east_throw_default_gone_message
jmp finish_parse_message
lake_east_throw_feed_man_default:
2021-10-25 02:13:58 +00:00
ldx #<lake_east_throw_default_message
ldy #>lake_east_throw_default_message
jmp finish_parse_message
2021-10-21 22:30:24 +00:00
2021-10-21 22:30:24 +00:00
;=======================
;=======================
;=======================
; outside Inn
;=======================
;=======================
;=======================
inn_verb_table:
.byte VERB_GET
.word outside_inn_get-1
.byte VERB_KNOCK
.word outside_inn_knock-1
.byte VERB_LOOK
.word outside_inn_look-1
.byte VERB_OPEN
.word outside_inn_open-1
.byte VERB_READ
.word outside_inn_read-1
.byte 0
;================
; get
;================
outside_inn_get:
lda CURRENT_NOUN
cmp #NOUN_NOTE
beq inn_note_get
jmp parse_common_get
inn_note_get:
lda GAME_STATE_1
and #FISH_FED
bne inn_get_note_no_note
2021-10-21 22:30:24 +00:00
ldx #<outside_inn_note_get_message
ldy #>outside_inn_note_get_message
jmp finish_parse_message
inn_get_note_no_note:
jmp inn_note_no_note
2021-10-21 22:30:24 +00:00
;================
; knock
;================
outside_inn_knock:
lda CURRENT_NOUN
cmp #NOUN_DOOR
beq inn_door_knock
cmp #NOUN_NONE
beq inn_door_knock
jmp parse_common_unknown
inn_door_knock:
lda GAME_STATE_1
and #FISH_FED
beq inn_knock_locked
ldx #<outside_inn_door_knock_message
ldy #>outside_inn_door_knock_message
jmp finish_parse_message
inn_knock_locked:
2021-10-21 22:30:24 +00:00
ldx #<outside_inn_door_knock_locked_message
ldy #>outside_inn_door_knock_locked_message
jmp finish_parse_message
;================
; open
;================
outside_inn_open:
lda CURRENT_NOUN
cmp #NOUN_DOOR
beq inn_door_open
cmp #NOUN_NONE
beq inn_door_open
jmp parse_common_unknown
inn_door_open:
lda GAME_STATE_1
and #FISH_FED
beq inn_open_locked
lda #LOCATION_INSIDE_INN
jsr update_map_location
ldx #<outside_inn_door_open_message
ldy #>outside_inn_door_open_message
jmp finish_parse_message
inn_open_locked:
2021-10-21 22:30:24 +00:00
ldx #<outside_inn_door_open_locked_message
ldy #>outside_inn_door_open_locked_message
jmp finish_parse_message
;================
; read
;================
outside_inn_read:
lda CURRENT_NOUN
cmp #NOUN_NOTE
beq inn_note_look
jmp parse_common_unknown
;=================
; look
;=================
outside_inn_look:
lda CURRENT_NOUN
cmp #NOUN_DOOR
beq inn_door_look
cmp #NOUN_INN
beq inn_inn_look
cmp #NOUN_SIGN
beq inn_sign_look
cmp #NOUN_WINDOW
beq inn_window_look
cmp #NOUN_NOTE
beq inn_note_look
cmp #NOUN_NONE
beq inn_look
jmp parse_common_look
inn_inn_look:
ldx #<outside_inn_inn_look_message
ldy #>outside_inn_inn_look_message
jmp finish_parse_message
inn_look:
ldx #<outside_inn_look_message
ldy #>outside_inn_look_message
jmp finish_parse_message
inn_door_look:
lda GAME_STATE_1
and #FISH_FED
bne inn_door_no_note
ldx #<outside_inn_door_look_note_message
ldy #>outside_inn_door_look_note_message
jmp finish_parse_message
inn_door_no_note:
2021-10-21 22:30:24 +00:00
ldx #<outside_inn_door_look_message
ldy #>outside_inn_door_look_message
jmp finish_parse_message
inn_sign_look:
ldx #<outside_inn_sign_look_message
ldy #>outside_inn_sign_look_message
jmp finish_parse_message
inn_window_look:
ldx #<outside_inn_window_look_message
ldy #>outside_inn_window_look_message
jmp finish_parse_message
inn_note_look:
lda GAME_STATE_1
and #FISH_FED
bne inn_note_no_note
2021-10-21 22:30:24 +00:00
ldx #<outside_inn_note_look_message
ldy #>outside_inn_note_look_message
jmp finish_parse_message
inn_note_no_note:
ldx #<outside_inn_note_look_gone_message
ldy #>outside_inn_note_look_gone_message
jmp finish_parse_message
2021-10-21 22:30:24 +00:00
.include "dialog_peasant3.inc"