peasant: hook up rest of mud puddle

This commit is contained in:
Vince Weaver 2021-11-02 00:58:20 -04:00
parent 1017568769
commit 0a5385934d
5 changed files with 141 additions and 13 deletions

View File

@ -181,8 +181,9 @@ POINTS IMPLEMENTED: (in order of implementation)
+ 2 (get arrow)
+ 3 (say haldo to dongolev)
+ 3 (jump in hay)
+ 2 (fall in mud puddle)
======
48 points
50 points
deaths implemented

View File

@ -154,11 +154,74 @@ game_loop:
jsr check_keyboard
;=====================
; level specific
;=====================
lda MAP_LOCATION
cmp #LOCATION_MUD_PUDDLE
beq at_mud_puddle
bne skip_level_specific
at_mud_puddle:
; see if falling in
; see if puddle wet
lda GAME_STATE_1
and #PUDDLE_WET
beq skip_level_specific
; see if clean
lda GAME_STATE_2
and #COVERED_IN_MUD
bne skip_level_specific
; see if X in range
lda PEASANT_X
cmp #$B
bcc skip_level_specific
cmp #$1B
bcs skip_level_specific
; see if Y in range
lda PEASANT_Y
cmp #$64
bcc skip_level_specific
cmp #$80
bcs skip_level_specific
; in range!
ldx #<puddle_walk_in_message
ldy #>puddle_walk_in_message
jsr partial_message_step
; make muddy
lda GAME_STATE_2
ora #COVERED_IN_MUD
sta GAME_STATE_2
; do animation?
; points if we haven't already
lda GAME_STATE_2
and #GOT_MUDDY_ALREADY
bne skip_level_specific
; add 2 points to score
lda #2
jsr score_points
lda GAME_STATE_2
ora #GOT_MUDDY_ALREADY
sta GAME_STATE_2
skip_level_specific:
lda LEVEL_OVER
bmi oops_new_location
bne level_over
; delay
lda #200

View File

@ -205,6 +205,10 @@ puddle_take:
beq puddle_get_rock
cmp #NOUN_STONE
beq puddle_get_rock
cmp #NOUN_MUD
beq puddle_get_mud
cmp #NOUN_PUDDLE
beq puddle_get_mud
; else "probably wish" message
@ -216,6 +220,28 @@ puddle_get_rock:
ldy #>puddle_get_rock_message
jmp finish_parse_message
puddle_get_mud:
lda GAME_STATE_1
and #PUDDLE_WET
bne puddle_get_mud_wet
jmp parse_common_get
puddle_get_mud_wet:
lda GAME_STATE_2
and #COVERED_IN_MUD
bne puddle_get_mud_wet_dirty
puddle_get_mud_wet_clean:
ldx #<puddle_get_mud_wet_clean_message
ldy #>puddle_get_mud_wet_clean_message
jmp finish_parse_message
puddle_get_mud_wet_dirty:
ldx #<puddle_get_mud_wet_dirty_message
ldy #>puddle_get_mud_wet_dirty_message
jmp finish_parse_message
;=================
; look
;=================
@ -238,13 +264,32 @@ puddle_look:
jmp parse_common_look
puddle_look_at:
ldx #<puddle_look_at_message
ldy #>puddle_look_at_message
lda GAME_STATE_1
and #PUDDLE_WET
bne puddle_look_at_wet
puddle_look_at_dry:
ldx #<puddle_look_at_dry_message
ldy #>puddle_look_at_dry_message
jmp finish_parse_message
puddle_look_at_wet:
ldx #<puddle_look_at_wet_message
ldy #>puddle_look_at_wet_message
jmp finish_parse_message
puddle_look_at_mud:
ldx #<puddle_look_mud_message
ldy #>puddle_look_mud_message
lda GAME_STATE_1
and #PUDDLE_WET
bne puddle_look_at_mud_wet
puddle_look_at_mud_dry:
ldx #<puddle_look_mud_dry_message
ldy #>puddle_look_mud_dry_message
jmp finish_parse_message
puddle_look_at_mud_wet:
ldx #<puddle_look_mud_wet_message
ldy #>puddle_look_mud_wet_message
jmp finish_parse_message
puddle_look_at_rock:

View File

@ -90,10 +90,16 @@ hay_get_hay_message:
; +2 POINTS
; + (walk into puddle when raining)
.byte "Now you've done it! You're covered in sticky, albeit fine smelling, mud. Your ",34,"Scalding Lake",34," T-shirt is all soiled, too. You just washed it last harvest!",0
puddle_walk_in_message:
.byte "Now you've done it! You're",13
.byte "covered in sticky, albeit",13
.byte "fine smelling, mud. Your",13
.byte 34,"Scalding Lake",34," T-shirt is",13
.byte "all soiled, too. You just",13
.byte "washed it last harvest!",0
; + look (dry)
puddle_look_at_message:
puddle_look_at_dry_message:
.byte "There's a dried out mud",13
.byte "puddle. It's all caked and",13
.byte "cracked like the kind",13
@ -101,13 +107,19 @@ puddle_look_at_message:
.byte "standing on.",0
; + look (wet)
.byte "Not much to see. 'Sides that big mud puddle.",0
puddle_look_at_wet_message:
.byte "Not much to see. 'Sides",13
.byte "that big mud puddle.",0
; + look mud / puddle ; NOT IN WIKI?
puddle_look_mud_message:
; + look mud / puddle (dry) ; NOT IN WIKI?
puddle_look_mud_dry_message:
.byte "The bone-dry mud puddle is",13
.byte "cracked and caked.",0
; + look mud / puddle (wet) ; NOT IN WIKI?
puddle_look_mud_wet_message:
.byte "It's that sticky mud.",13
.byte "Y'know, the kind pigs like.",0
; + get / look rock
puddle_get_rock_message:
@ -115,10 +127,16 @@ puddle_get_rock_message:
.byte "whole lot for me.",0
; + get mud (when it's wet, before you fall in)
.byte "You can't get the mud so much. More like the mud'll get you.",0
puddle_get_mud_wet_clean_message:
.byte "You can't get the mud so",13
.byte "much. More like the mud'll",13
.byte "get you.",0
; + get mud (when it's wet, after you fall in)
.byte "You've already gotten an heapin' helpin' all up on yo'self.",0
puddle_get_mud_wet_dirty_message:
.byte "You've already gotten an",13
.byte "heapin' helpin' all up on",13
.byte "yo'self.",0
;===============

View File

@ -142,6 +142,7 @@ GAME_STATE_2 = $99
DRESSER_OPEN=$08
TALKED_TO_KNIGHT = $10
COVERED_IN_MUD = $20
GOT_MUDDY_ALREADY = $40
NED_STATUS = $9A
BUSH_STATUS = $9B ; status of bush search