dos33fsprogs/games/peasant/peasant4_actions.s

504 lines
9.2 KiB
ArmAsm
Raw Normal View History

2021-10-21 15:43:20 +00:00
.include "tokens.inc"
;=======================
;=======================
;=======================
2021-10-22 20:46:31 +00:00
; Ned's Cottage
2021-10-21 15:43:20 +00:00
;=======================
;=======================
;=======================
2021-10-22 20:46:31 +00:00
ned_cottage_verb_table:
2021-10-25 02:13:58 +00:00
.byte VERB_BREAK
.word ned_cottage_break-1
2021-10-21 15:43:20 +00:00
.byte VERB_CLIMB
2021-10-22 20:46:31 +00:00
.word ned_cottage_climb-1
.byte VERB_DEPLOY
.word ned_cottage_deploy-1
.byte VERB_DROP
.word ned_cottage_drop-1
2021-10-21 15:43:20 +00:00
.byte VERB_GET
2021-10-22 20:46:31 +00:00
.word ned_cottage_get-1
2021-10-21 15:43:20 +00:00
.byte VERB_JUMP
2021-10-22 20:46:31 +00:00
.word ned_cottage_jump-1
2021-10-25 02:13:58 +00:00
.byte VERB_KICK
.word ned_cottage_kick-1
2021-10-22 20:46:31 +00:00
.byte VERB_KNOCK
.word ned_cottage_knock-1
2021-10-21 15:43:20 +00:00
.byte VERB_LOOK
2021-10-22 20:46:31 +00:00
.word ned_cottage_look-1
.byte VERB_MOVE
.word ned_cottage_move-1
.byte VERB_OPEN
.word ned_cottage_open-1
2021-10-25 02:13:58 +00:00
.byte VERB_PUSH
.word ned_cottage_push-1
.byte VERB_PULL
.word ned_cottage_pull-1
.byte VERB_PUNCH
.word ned_cottage_punch-1
2021-10-22 20:46:31 +00:00
.byte VERB_USE
.word ned_cottage_use-1
2021-10-21 15:43:20 +00:00
.byte 0
;================
2021-10-22 20:46:31 +00:00
; climb/jump
2021-10-21 15:43:20 +00:00
;================
2021-10-22 20:46:31 +00:00
ned_cottage_jump:
ned_cottage_climb:
2021-10-21 15:43:20 +00:00
lda CURRENT_NOUN
2021-10-22 20:46:31 +00:00
cmp #NOUN_FENCE
beq ned_cottage_climb_fence
2021-10-21 15:43:20 +00:00
jmp parse_common_unknown
2021-10-22 20:46:31 +00:00
ned_cottage_climb_fence:
ldx #<ned_cottage_climb_fence_message
ldy #>ned_cottage_climb_fence_message
jmp finish_parse_message
2021-10-21 15:43:20 +00:00
;================
2021-10-22 20:46:31 +00:00
; knock
2021-10-21 15:43:20 +00:00
;================
2021-10-22 20:46:31 +00:00
ned_cottage_knock:
2021-10-21 15:43:20 +00:00
lda CURRENT_NOUN
2021-10-22 20:46:31 +00:00
cmp #NOUN_BLEED
beq ned_cottage_knock_door_bleed
cmp #NOUN_DOOR
beq ned_cottage_knock_door
cmp #NOUN_NONE
beq ned_cottage_knock_door
2021-10-21 15:43:20 +00:00
jmp parse_common_unknown
2021-10-22 20:46:31 +00:00
ned_cottage_knock_door:
ldx #<ned_cottage_knock_door_message
ldy #>ned_cottage_knock_door_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-22 20:46:31 +00:00
ned_cottage_knock_door_bleed:
lda GAME_STATE_2
and #KNUCKLES_BLEED
beq not_bleeding
bleeding:
2021-10-21 15:43:20 +00:00
2021-10-22 20:46:31 +00:00
ldx #<ned_cottage_knock_door_bleed_message2
ldy #>ned_cottage_knock_door_bleed_message2
jmp finish_parse_message
2021-10-21 15:43:20 +00:00
2021-10-22 20:46:31 +00:00
not_bleeding:
lda GAME_STATE_2
ora #KNUCKLES_BLEED
sta GAME_STATE_2
2021-10-21 15:43:20 +00:00
2021-10-22 20:46:31 +00:00
ldx #<ned_cottage_knock_door_bleed_message
ldy #>ned_cottage_knock_door_bleed_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
;================
2021-10-22 20:46:31 +00:00
; open
2021-10-21 15:43:20 +00:00
;================
2021-10-22 20:46:31 +00:00
ned_cottage_open:
2021-10-21 15:43:20 +00:00
lda CURRENT_NOUN
2021-10-22 20:46:31 +00:00
cmp #NOUN_DOOR
beq ned_cottage_open_door
cmp #NOUN_NONE
beq ned_cottage_open_door
2021-10-21 15:43:20 +00:00
2021-10-22 20:46:31 +00:00
jmp parse_common_unknown
2021-10-21 15:43:20 +00:00
2021-10-22 20:46:31 +00:00
ned_cottage_open_door:
ldx #<ned_cottage_open_door_message
ldy #>ned_cottage_open_door_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-22 20:46:31 +00:00
;================
; push/pull
;================
ned_cottage_push:
ned_cottage_pull:
2021-10-21 15:43:20 +00:00
lda CURRENT_NOUN
2021-10-22 20:46:31 +00:00
cmp #NOUN_DOOR
beq ned_cottage_push_door
2021-10-21 15:43:20 +00:00
jmp parse_common_unknown
2021-10-22 20:46:31 +00:00
ned_cottage_push_door:
ldx #<ned_cottage_push_door_message
ldy #>ned_cottage_push_door_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-22 20:46:31 +00:00
;================
; get
;================
ned_cottage_get:
ned_cottage_move:
2021-10-21 15:43:20 +00:00
lda CURRENT_NOUN
2021-10-22 20:46:31 +00:00
cmp #NOUN_ROCK
beq ned_cottage_rock
2021-10-21 15:43:20 +00:00
2021-10-22 20:46:31 +00:00
; else "probably wish" message
2021-10-21 15:43:20 +00:00
2021-10-22 20:46:31 +00:00
jmp parse_common_get
2021-10-21 15:43:20 +00:00
2021-10-22 20:46:31 +00:00
ned_cottage_rock:
ldx #<ned_cottage_get_rock_message
ldy #>ned_cottage_get_rock_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
;================
2021-10-22 20:46:31 +00:00
; deploy/drop/use baby
2021-10-21 15:43:20 +00:00
;================
2021-10-22 20:46:31 +00:00
ned_cottage_deploy:
ned_cottage_drop:
ned_cottage_use:
2021-10-21 15:43:20 +00:00
lda CURRENT_NOUN
2021-10-22 20:46:31 +00:00
cmp #NOUN_BABY
beq ned_cottage_baby
2021-10-21 15:43:20 +00:00
jmp parse_common_unknown
2021-10-22 20:46:31 +00:00
ned_cottage_baby:
ldx #<ned_cottage_baby_before_message
ldy #>ned_cottage_baby_before_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-22 20:46:31 +00:00
;===================
; break/kick/punch
;===================
ned_cottage_break:
ned_cottage_kick:
ned_cottage_punch:
2021-10-21 15:43:20 +00:00
lda CURRENT_NOUN
2021-10-22 20:46:31 +00:00
cmp #NOUN_DOOR
beq kick_cottage
2021-10-21 15:43:20 +00:00
jmp parse_common_unknown
2021-10-22 20:46:31 +00:00
kick_cottage:
ldx #<ned_cottage_break_door_message
ldy #>ned_cottage_break_door_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-22 20:46:31 +00:00
;=================
; look
;=================
ned_cottage_look:
2021-10-21 15:43:20 +00:00
lda CURRENT_NOUN
2021-10-22 20:46:31 +00:00
cmp #NOUN_FENCE
beq ned_cottage_look_at_fence
cmp #NOUN_COTTAGE
beq ned_cottage_look_at_cottage
cmp #NOUN_ROCK
beq ned_cottage_look_at_rock
cmp #NOUN_HOLE
beq ned_cottage_look_at_hole
2021-10-21 15:43:20 +00:00
cmp #NOUN_NONE
2021-10-22 20:46:31 +00:00
beq ned_cottage_look_at
2021-10-21 15:43:20 +00:00
2021-10-22 20:46:31 +00:00
jmp parse_common_look
2021-10-21 15:43:20 +00:00
2021-10-22 20:46:31 +00:00
ned_cottage_look_at:
ldx #<ned_cottage_look_message
ldy #>ned_cottage_look_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-22 20:46:31 +00:00
ned_cottage_look_at_cottage:
ldx #<ned_cottage_look_cottage_message
ldy #>ned_cottage_look_cottage_message
jmp finish_parse_message
2021-10-21 15:43:20 +00:00
2021-10-22 20:46:31 +00:00
ned_cottage_look_at_fence:
ldx #<ned_cottage_look_fence_message
ldy #>ned_cottage_look_fence_message
jmp finish_parse_message
2021-10-21 15:43:20 +00:00
2021-10-22 20:46:31 +00:00
ned_cottage_look_at_rock:
ldx #<ned_cottage_look_rock_message
ldy #>ned_cottage_look_rock_message
jmp finish_parse_message
2021-10-21 15:43:20 +00:00
2021-10-22 20:46:31 +00:00
ned_cottage_look_at_hole:
ldx #<ned_cottage_look_hole_message
ldy #>ned_cottage_look_hole_message
jmp finish_parse_message
2021-10-21 15:43:20 +00:00
;=======================
;=======================
;=======================
2021-10-25 02:13:58 +00:00
; Ned Tree
2021-10-21 15:43:20 +00:00
;=======================
;=======================
;=======================
2021-10-25 02:13:58 +00:00
ned_verb_table:
.byte VERB_CLIMB
.word ned_tree_climb-1
2021-10-21 15:43:20 +00:00
.byte VERB_LOOK
2021-10-25 02:13:58 +00:00
.word ned_tree_look-1
.byte VERB_TALK
.word ned_tree_talk-1
2021-10-21 15:43:20 +00:00
.byte 0
;================
2021-10-25 02:13:58 +00:00
; climb
2021-10-21 15:43:20 +00:00
;================
2021-10-25 02:13:58 +00:00
ned_tree_climb:
2021-10-21 15:43:20 +00:00
lda CURRENT_NOUN
2021-10-25 02:13:58 +00:00
cmp #NOUN_TREE
beq ned_tree_climb_tree
2021-10-21 15:43:20 +00:00
2021-10-25 02:13:58 +00:00
jmp parse_common_unknown
2021-10-21 15:43:20 +00:00
2021-10-25 02:13:58 +00:00
ned_tree_climb_tree:
ldx #<ned_tree_climb_tree_message
ldy #>ned_tree_climb_tree_message
jmp finish_parse_message
2021-10-21 15:43:20 +00:00
2021-10-25 02:13:58 +00:00
;================
; talk
;================
ned_tree_talk:
lda CURRENT_NOUN
2021-10-21 15:43:20 +00:00
2021-10-25 02:13:58 +00:00
cmp #NOUN_TREE
beq ned_tree_talk_tree
jmp parse_common_talk
ned_tree_talk_tree:
ldx #<ned_tree_talk_tree_message
ldy #>ned_tree_talk_tree_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
;=================
; look
;=================
2021-10-25 02:13:58 +00:00
ned_tree_look:
2021-10-21 15:43:20 +00:00
lda CURRENT_NOUN
2021-10-25 02:13:58 +00:00
cmp #NOUN_TREE
beq ned_tree_look_at_tree
2021-10-21 15:43:20 +00:00
cmp #NOUN_NONE
2021-10-25 02:13:58 +00:00
beq ned_tree_look_at
2021-10-21 15:43:20 +00:00
jmp parse_common_look
2021-10-25 02:13:58 +00:00
ned_tree_look_at:
ldx #<ned_tree_look_at_message
ldy #>ned_tree_look_at_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
ned_tree_look_at_tree:
ldx #<ned_tree_look_at_tree_message
ldy #>ned_tree_look_at_tree_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
;=======================
;=======================
;=======================
2021-10-24 01:14:29 +00:00
; Kerrek
2021-10-21 15:43:20 +00:00
;=======================
;=======================
;=======================
2021-10-24 01:14:29 +00:00
.include "kerrek_actions.s"
2021-10-21 15:43:20 +00:00
;=======================
;=======================
;=======================
2021-10-25 02:13:58 +00:00
; Baby Lady Cottage
2021-10-21 15:43:20 +00:00
;=======================
;=======================
;=======================
2021-10-25 02:13:58 +00:00
lady_cottage_verb_table:
.byte VERB_LOOK
.word lady_cottage_look-1
2021-10-21 15:43:20 +00:00
.byte 0
;=================
; look
;=================
2021-10-25 02:13:58 +00:00
lady_cottage_look:
2021-10-21 15:43:20 +00:00
lda CURRENT_NOUN
2021-10-25 02:13:58 +00:00
cmp #NOUN_BERRIES
beq lady_cottage_look_at_berries
cmp #NOUN_BUSH
beq lady_cottage_look_at_bushes
cmp #NOUN_COTTAGE
beq lady_cottage_look_at_cottage
cmp #NOUN_DOOR
beq lady_cottage_look_at_door
2021-10-21 15:43:20 +00:00
cmp #NOUN_NONE
2021-10-25 02:13:58 +00:00
beq lady_cottage_look_at
2021-10-21 15:43:20 +00:00
jmp parse_common_look
2021-10-25 02:13:58 +00:00
lady_cottage_look_at:
ldx #<lady_cottage_look_at_message
ldy #>lady_cottage_look_at_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
lady_cottage_look_at_cottage:
ldx #<lady_cottage_look_at_cottage_message
ldy #>lady_cottage_look_at_cottage_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
lady_cottage_look_at_door:
ldx #<lady_cottage_look_at_door_message
ldy #>lady_cottage_look_at_door_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
lady_cottage_look_at_berries:
ldx #<lady_cottage_look_at_berries_message
ldy #>lady_cottage_look_at_berries_message
jmp finish_parse_message
2021-10-21 15:43:20 +00:00
2021-10-25 02:13:58 +00:00
lady_cottage_look_at_bushes:
ldx #<lady_cottage_look_at_bushes_message
ldy #>lady_cottage_look_at_bushes_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-25 02:13:58 +00:00
2021-10-21 15:43:20 +00:00
;=======================
;=======================
;=======================
2021-10-21 19:35:33 +00:00
; burninated / crooked tree
2021-10-21 15:43:20 +00:00
;=======================
;=======================
;=======================
2021-10-21 19:35:33 +00:00
crooked_tree_verb_table:
.byte VERB_GET
.word crooked_tree_get-1
.byte VERB_LIGHT
.word crooked_tree_light-1
2021-10-21 15:43:20 +00:00
.byte VERB_LOOK
2021-10-21 19:35:33 +00:00
.word crooked_tree_look-1
2021-10-21 15:43:20 +00:00
.byte 0
;================
2021-10-21 19:35:33 +00:00
; get
2021-10-21 15:43:20 +00:00
;================
2021-10-21 19:35:33 +00:00
crooked_tree_get:
2021-10-21 15:43:20 +00:00
lda CURRENT_NOUN
cmp #NOUN_FIRE
2021-10-21 19:35:33 +00:00
beq crooked_get_fire
cmp #NOUN_LANTERN
beq crooked_get_lantern
cmp #NOUN_PLAGUE
beq crooked_get_plague
cmp #NOUN_PLAQUE
beq crooked_get_plaque
2021-10-21 15:43:20 +00:00
2021-10-21 19:35:33 +00:00
jmp parse_common_get
2021-10-21 15:43:20 +00:00
2021-10-21 19:35:33 +00:00
crooked_get_fire:
; only at night
jmp parse_common_get
2021-10-21 15:43:20 +00:00
2021-10-21 19:35:33 +00:00
crooked_get_lantern:
ldx #<crooked_tree_get_lantern_message
ldy #>crooked_tree_get_lantern_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-21 19:35:33 +00:00
crooked_get_plague:
ldx #<crooked_tree_get_plague_message
ldy #>crooked_tree_get_plague_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-21 19:35:33 +00:00
crooked_get_plaque:
ldx #<crooked_tree_get_plaque_message
ldy #>crooked_tree_get_plaque_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
;================
2021-10-21 19:35:33 +00:00
; light
2021-10-21 15:43:20 +00:00
;================
2021-10-21 19:35:33 +00:00
crooked_tree_light:
2021-10-21 15:43:20 +00:00
lda CURRENT_NOUN
2021-10-21 19:35:33 +00:00
cmp #NOUN_LANTERN
beq light_lantern
2021-10-21 15:43:20 +00:00
jmp parse_common_unknown
2021-10-21 19:35:33 +00:00
light_lantern:
ldx #<crooked_tree_light_lantern_message
ldy #>crooked_tree_light_lantern_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
;=================
; look
;=================
2021-10-21 19:35:33 +00:00
crooked_tree_look:
2021-10-21 15:43:20 +00:00
lda CURRENT_NOUN
2021-10-21 19:35:33 +00:00
cmp #NOUN_LANTERN
beq crooked_look_lantern
cmp #NOUN_STUMP
beq crooked_look_stump
cmp #NOUN_TREE
beq crooked_look_tree
2021-10-21 15:43:20 +00:00
cmp #NOUN_NONE
2021-10-21 19:35:33 +00:00
beq crooked_look
2021-10-21 15:43:20 +00:00
jmp parse_common_look
2021-10-21 19:35:33 +00:00
crooked_look:
ldx #<crooked_look_day_message
ldy #>crooked_look_day_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-21 19:35:33 +00:00
crooked_look_lantern:
ldx #<crooked_look_lantern_message
ldy #>crooked_look_lantern_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-21 19:35:33 +00:00
crooked_look_stump:
ldx #<crooked_look_stump_message
ldy #>crooked_look_stump_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-21 19:35:33 +00:00
crooked_look_tree:
ldx #<crooked_look_tree_message
ldy #>crooked_look_tree_message
2021-10-21 15:43:20 +00:00
jmp finish_parse_message
2021-10-21 19:35:33 +00:00
.include "dialog_peasant4.inc"