peasant: can now catch on fire

This commit is contained in:
Vince Weaver 2021-12-05 14:44:09 -05:00
parent 4846cec0d2
commit dc7a1f2473
6 changed files with 168 additions and 23 deletions

View File

@ -198,8 +198,9 @@ POINTS IMPLEMENTED: (in order of implementation)
+ 10 (get robe)
+ 3 (wear robe)
+ 2 (get grease)
+ 10 (catch on fire)
======
112 points
122 points
deaths/endings implemented

View File

@ -141,6 +141,11 @@ jhonka_verb_no:
lda #$EA
sta parse_input_smc
; dry up the mud
lda GAME_STATE_1
and #<(~PUDDLE_WET)
sta GAME_STATE_1
; get riches
lda INVENTORY_2

View File

@ -196,10 +196,65 @@ game_loop:
jsr check_keyboard
;==========================
; check if kerrek collision
;==========================
jsr kerrek_collision
; check if can enter ned cottage
;==========================
; check if lighting on fire
;==========================
lda MAP_LOCATION
cmp #LOCATION_BURN_TREES
bne not_burn_trees
; see if already on fire
lda GAME_STATE_2
and #ON_FIRE
bne not_burn_trees
; see if have grease on head
lda GAME_STATE_2
and #GREASE_ON_HEAD
beq not_burn_trees
; check if X in range
lda PEASANT_X
cmp #$A ; blt
bcc not_burn_trees
cmp #$D
bcs not_burn_trees ; bge
; check if Y in range
lda PEASANT_Y
cmp #$85
bcs not_burn_trees
cmp #$65
bcc not_burn_trees
; finally set on fire
lda GAME_STATE_2
ora #ON_FIRE
sta GAME_STATE_2
; increment score
lda #$10 ; bcd
jsr score_points
ldx #<crooked_catch_fire_message
ldy #>crooked_catch_fire_message
jsr partial_message_step
not_burn_trees:
;===============================
; check if can enter ned cottage
;===============================
lda MAP_LOCATION
cmp #LOCATION_OUTSIDE_NN
bne not_ned_cottage

View File

@ -533,6 +533,12 @@ ned_tree_talk_ned:
ned_tree_talk_ned_out:
; scare him away
lda #0
sta NED_STATUS
; FIXME: do we need to re-draw?
ldx #<ned_tree_talk_ned_message
ldy #>ned_tree_talk_ned_message
jmp finish_parse_message
@ -551,7 +557,6 @@ ned_tree_talk_at_out:
lda #0
sta NED_STATUS
; FIXME: do we need to re-draw?
ldx #<ned_tree_talk_none_message
@ -946,8 +951,43 @@ crooked_tree_get:
crooked_get_fire:
; only at night
lda GAME_STATE_1
and #NIGHT
bne crooked_get_fire_night
jmp parse_common_get
crooked_get_fire_night:
; first check if already on fire
lda GAME_STATE_2
and #ON_FIRE
bne crooked_get_fire_already_alight
; next check if have grease or not
lda GAME_STATE_2
and #GREASE_ON_HEAD
beq crooked_get_fire_not_greased
crooked_get_fire_greased:
ldx #<crooked_tree_get_fire_greased_message
ldy #>crooked_tree_get_fire_greased_message
jmp finish_parse_message
crooked_get_fire_not_greased:
ldx #<crooked_tree_get_fire_not_greased_message
ldy #>crooked_tree_get_fire_not_greased_message
jmp finish_parse_message
crooked_get_fire_already_alight:
ldx #<crooked_tree_get_fire_already_message
ldy #>crooked_tree_get_fire_already_message
jmp finish_parse_message
crooked_get_lantern:
ldx #<crooked_tree_get_lantern_message
ldy #>crooked_tree_get_lantern_message
@ -975,8 +1015,19 @@ crooked_tree_light:
jmp parse_common_unknown
light_lantern:
ldx #<crooked_tree_light_lantern_message
ldy #>crooked_tree_light_lantern_message
lda GAME_STATE_1
and #NIGHT
bne light_lantern_night
light_lantern_day:
ldx #<crooked_tree_light_lantern_day_message
ldy #>crooked_tree_light_lantern_day_message
jmp finish_parse_message
light_lantern_night:
ldx #<crooked_tree_light_lantern_night_message
ldy #>crooked_tree_light_lantern_night_message
jmp finish_parse_message
@ -1000,13 +1051,35 @@ crooked_tree_look:
jmp parse_common_look
crooked_look:
lda GAME_STATE_1
and #NIGHT
beq crooked_look_day
crooked_look_night:
ldx #<crooked_look_night_message
ldy #>crooked_look_night_message
jmp finish_parse_message
crooked_look_day:
ldx #<crooked_look_day_message
ldy #>crooked_look_day_message
jmp finish_parse_message
crooked_look_lantern:
ldx #<crooked_look_lantern_message
ldy #>crooked_look_lantern_message
lda GAME_STATE_1
and #NIGHT
beq crooked_look_lantern_day
crooked_look_lantern_night:
ldx #<crooked_look_lantern_night_message
ldy #>crooked_look_lantern_night_message
jmp finish_parse_message
crooked_look_lantern_day:
ldx #<crooked_look_lantern_day_message
ldy #>crooked_look_lantern_day_message
jmp finish_parse_message
crooked_look_stump:

View File

@ -89,6 +89,9 @@ hay_get_hay_message:
; Mud Puddle
;=============
; note, puddle goes dry after you get riches?
; +2 POINTS
; + (walk into puddle when raining)
puddle_walk_in_message:

View File

@ -226,7 +226,7 @@ ned_tree_talk_none_message:
.byte "You startled him and he",13
.byte "disappears!",0
; + talk ned
; + talk ned (he disappears)
; + talk Naked Ned (with Naked Ned visible)
ned_tree_talk_ned_message:
.byte "'Never speak of this",13
@ -359,6 +359,12 @@ lady_cottage_open_door_message:
; Burninated Trees / Lantern
;============================
; after you've walked through (???) screens?
; unclear how this works
.byte "Man, screens sure get light",13
.byte "fast around here.",0
; + look
crooked_look_day_message:
.byte "A signal lantern of some",13
@ -366,19 +372,21 @@ crooked_look_day_message:
.byte "burninated tree.",0
; + look (night)
crooked_look_night_message:
.byte "A burning signal lantern",13
.byte "hangs from a severely",13
.byte "burninated tree. ",0
; + look lantern (unlit)
crooked_look_lantern_message:
; + look lantern (day)
crooked_look_lantern_day_message:
.byte "It's unlit at the moment.",13
.byte "That fancy pants royal",13
.byte "knight probably lights it",13
.byte "on nights when Troggie's on",13
.byte "the prowl.",0
; + look lantern (lit)
; + look lantern (night)
crooked_look_lantern_night_message:
.byte "It's lit! Musta been a",13
.byte "Trogdor sighting tonight.",0
@ -394,33 +402,33 @@ crooked_look_tree_message:
; +10 POINTS
; + (walking under candle in burninated trees)
crooked_catch_fire_message:
.byte "Whoa! The horse grease on",13
.byte "your robe caught fire!",13
.byte "You're a for-real peasant",13
.byte "now.",0
; + (exiting on fire)
.byte "Man, screens sure get light",13
.byte "fast around here.",0
; + light lantern (before lit)
crooked_tree_light_lantern_message:
; + light lantern (day)
crooked_tree_light_lantern_day_message:
.byte "With what? Your red-hot",13
.byte "intellect?",0
; + light lantern (already lit)
; + light lantern (night)
crooked_tree_light_lantern_night_message:
.byte "Already lit, moron.",0
; + get fire (at night, before grease)
.byte "You're just not",13 ; guess, not measured
.byte "flammable enough.",0
crooked_tree_get_fire_not_greased_message:
.byte "You're just not flammable",13
.byte "enough.",0
; + get fire (at night, after grease)
.byte "You don't need to get",13 ; guess, not measured
.byte "IT. Just let IT get",13
.byte "YOU.",0
crooked_tree_get_fire_greased_message:
.byte "You don't need to get IT.",13
.byte "Just let IT get YOU.",0
; + get fire (at night, after getting on fire)
crooked_tree_get_fire_already_message:
.byte "You're already on fire!",13
.byte "What? You want to be MORE",13
.byte "on fire?",0