peasant: hook up gary glen

This commit is contained in:
Vince Weaver 2021-10-31 20:18:57 -04:00
parent a7f0280aae
commit 9f245c317e
7 changed files with 253 additions and 89 deletions

View File

@ -177,12 +177,13 @@ POINTS IMPLEMENTED: (in order of implementation)
+ 2 (put pebbles in bucket)
+ 3 (put baby in bucket)
+ 2 (turn crank [baby in bucket])
+ 2 (scare gary)
======
38 points
40 points
deaths implemented
==================
+1 Typing "die"
+2 Cutting off arms, legs, and head
+3 kick/punch/kill old gary

View File

@ -1,5 +1,7 @@
TODO:
can get stuck on top of targets at archery range
is the letter K broken?
map: fills in as you visit the areas

View File

@ -54,7 +54,7 @@ gary_break:
jmp parse_common_unknown
gary_sit_stump:
jmp gary_look_at_stump
jmp gary_kick_stump
;================
; climb
@ -69,6 +69,18 @@ gary_climb:
jmp parse_common_unknown
gary_climb_fence:
lda GAME_STATE_0
and #GARY_SCARED
beq gary_climb_fence_there
gary_climb_fence_gone:
ldx #<gary_climb_fence_gone_message
ldy #>gary_climb_fence_gone_message
jmp finish_parse_message
gary_climb_fence_there:
ldx #<gary_climb_fence_message
ldy #>gary_climb_fence_message
jmp finish_parse_message
@ -88,6 +100,12 @@ gary_feed:
jmp parse_common_unknown
gary_feed_horse:
lda GAME_STATE_0
and #GARY_SCARED
beq gary_feed_horse_there
jmp parse_common_unknown
gary_feed_horse_there:
ldx #<gary_feed_horse_message
ldy #>gary_feed_horse_message
jmp finish_parse_message
@ -107,6 +125,11 @@ gary_get:
jmp parse_common_get
gary_get_flies:
lda GAME_STATE_0
and #GARY_SCARED
beq get_flies_there
jmp parse_common_get
get_flies_there:
ldx #<gary_get_flies_message
ldy #>gary_get_flies_message
jmp finish_parse_message
@ -130,26 +153,44 @@ gary_punch:
beq kick_flies
cmp #NOUN_STUMP
beq kick_stump
beq gary_kick_stump
jmp parse_common_unknown
kick_gary:
; TODO: this kills you
lda GAME_STATE_0
and #GARY_SCARED
beq kick_gary_there
jmp gary_scare_horse_gone
kick_gary_there:
ldx #<gary_kick_horse_message
ldy #>gary_kick_horse_message
jsr partial_message_step
; this kills you
lda #LOAD_GAME_OVER
sta WHICH_LOAD
lda #NEW_FROM_DISK
sta LEVEL_OVER
ldx #<gary_kick_horse_message2
ldy #>gary_kick_horse_message2
jmp finish_parse_message
kick_flies:
lda GAME_STATE_0
and #GARY_SCARED
beq kick_flies_there
jmp parse_common_unknown
kick_flies_there:
ldx #<gary_kick_flies_message
ldy #>gary_kick_flies_message
jmp finish_parse_message
kick_stump:
gary_kick_stump:
ldx #<gary_kick_stump_message
ldy #>gary_kick_stump_message
jmp finish_parse_message
@ -160,6 +201,30 @@ kick_stump:
gary_look:
lda GAME_STATE_0
and #GARY_SCARED
beq gary_look_pre_scare
gary_look_post_scare:
lda CURRENT_NOUN
cmp #NOUN_FENCE
beq gary_look_at_fence_post
cmp #NOUN_STUMP
beq gary_look_at_stump
cmp #NOUN_NONE ; same
beq gary_look_at
jmp parse_common_look
gary_look_at_fence_post:
ldx #<gary_look_fence_after_scare_message
ldy #>gary_look_fence_after_scare_message
jmp finish_parse_message
;=================
; pre scare
gary_look_pre_scare:
lda CURRENT_NOUN
cmp #NOUN_FENCE
@ -178,11 +243,13 @@ gary_look:
jmp parse_common_look
; look at
gary_look_at:
ldx #<gary_look_message
ldy #>gary_look_message
jmp finish_parse_message
; look at fence
gary_look_at_fence:
ldx #<gary_look_fence_message
ldy #>gary_look_fence_message
@ -204,6 +271,107 @@ gary_look_at_stump:
ldy #>gary_look_stump_message
jmp finish_parse_message
;===================
; wear mask
;===================
gary_wear:
lda CURRENT_NOUN
cmp #NOUN_MASK
beq wear_mask
jmp parse_common_unknown
wear_mask:
; if no have mask, unknown
; otherwise, same as if we did "scare gary"
lda INVENTORY_1
and #INV1_MONSTER_MASK
bne gary_scare_horse
jmp parse_common_unknown
;================
; scare
;================
gary_scare:
lda CURRENT_NOUN
cmp #NOUN_GARY
beq gary_scare_horse
cmp #NOUN_HORSE
beq gary_scare_horse
jmp parse_common_unknown
gary_scare_horse:
lda GAME_STATE_0
and #GARY_SCARED
bne gary_scare_horse_gone
lda INVENTORY_1
and #INV1_MONSTER_MASK
beq gary_scare_horse_nomask
gary_scare_horse_mask:
ldx #<gary_scare_message
ldy #>gary_scare_message
jsr partial_message_step
; get points
lda #2
jsr score_points
lda GAME_STATE_0
ora #GARY_SCARED
sta GAME_STATE_0
; TODO: break fence
ldx #<gary_scare_message2
ldy #>gary_scare_message2
jmp finish_parse_message
gary_scare_horse_nomask:
jsr random16
and #$3 ; 0..4
beq gary_scare_try2
cmp #$1
beq gary_scare_try3
gary_scare_try1:
ldx #<gary_scare_horse_message1
ldy #>gary_scare_horse_message1
jmp finish_parse_message
gary_scare_try2:
ldx #<gary_scare_horse_message2
ldy #>gary_scare_horse_message2
jmp finish_parse_message
gary_scare_try3:
ldx #<gary_scare_horse_message3
ldy #>gary_scare_horse_message3
jmp finish_parse_message
gary_scare_horse_gone:
ldx #<gary_gone_message
ldy #>gary_gone_message
jsr partial_message_step
ldx #<gary_gone_message2
ldy #>gary_gone_message2
jmp finish_parse_message
;================
; pet
;================
@ -218,6 +386,11 @@ gary_pet:
jmp parse_common_unknown
gary_pet_horse:
lda GAME_STATE_0
and #GARY_SCARED
beq pet_horse_there
jmp parse_common_unknown
pet_horse_there:
ldx #<gary_pet_horse_message
ldy #>gary_pet_horse_message
jmp finish_parse_message
@ -237,27 +410,14 @@ gary_ride:
jmp parse_common_unknown
gary_ride_horse:
ldx #<gary_ride_horse_message
ldy #>gary_ride_horse_message
jmp finish_parse_message
;================
; scare
;================
gary_scare:
lda CURRENT_NOUN
cmp #NOUN_GARY
beq gary_scare_horse
cmp #NOUN_HORSE
beq gary_scare_horse
lda GAME_STATE_0
and #GARY_SCARED
beq ride_horse_there
jmp parse_common_unknown
; FIXME: randomly pick from 3 choices
gary_scare_horse:
ldx #<gary_scare_horse_message1
ldy #>gary_scare_horse_message1
ride_horse_there:
ldx #<gary_ride_horse_message
ldy #>gary_ride_horse_message
jmp finish_parse_message
@ -273,33 +433,24 @@ gary_talk:
cmp #NOUN_HORSE
beq gary_talk_horse
cmp #NOUN_STUMP
beq gary_look_at_stump
beq gary_talk_stump
cmp #NOUN_NONE
beq gary_talk_horse
jmp parse_common_talk
gary_talk_horse:
lda GAME_STATE_0
and #GARY_SCARED
beq gary_talk_there
jmp parse_common_talk
gary_talk_there:
ldx #<gary_talk_message
ldy #>gary_talk_message
jmp finish_parse_message
;===================
; wear mask
;===================
gary_wear:
lda CURRENT_NOUN
cmp #NOUN_MASK
beq wear_mask
jmp parse_common_unknown
wear_mask:
jmp parse_common_unknown
gary_talk_stump:
jmp gary_kick_stump

View File

@ -23,12 +23,13 @@ invert_smc1 =$0f61
disp_put_string_cursor =$1696
hgr_put_char_cursor =$0f15
vgi_simple_rectangle =$12ec
peasant_text =$1d0f
peasant_text =$1d44
save_menu =$17b0
load_menu =$17a5
location_names_l =$1adc
location_names_h =$1af9
wait_until_keypress =$1d06
random16 =$1d0f
hposn_high = $BA00
hposn_low = $BB00
driveoff = $A22

View File

@ -12,7 +12,7 @@
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_HAY_BALE ; MAP_LOCATION = $96
.byte $ff ; GAME_STATE_0 = $97
.byte $00 ; GAME_STATE_0 = $97
.byte $00 ; GAME_STATE_1 = $98
.byte $00 ; GAME_STATE_2 = $99
.byte $00 ; NED_STATUS = $9A
@ -21,9 +21,9 @@
.byte $00 ; ARROW_SCORE = $9D
.byte $01 ; SCORE_HUNDREDS= $9E
.byte $09 ; SCORE_TENSONES= $9F
.byte $FF ; INVENTORY_1 = $A0
.byte $FF ; INVENTORY_2 = $A1
.byte $FF ; INVENTORY_3 = $A2
.byte $00 ; INVENTORY_1 = $A0
.byte $00 ; INVENTORY_2 = $A1
.byte $00 ; INVENTORY_3 = $A2
.byte $00 ; INVENTORY_1_GONE = $A3
.byte $00 ; INVENTORY_2_GONE_= $A4
.byte $00 ; INVENTORY_3_GONE = $A5

View File

@ -15,6 +15,7 @@ gary_look_fence_message:
.byte "as toothpicks.",0
; + look fence (after scaring him)
gary_look_fence_after_scare_message:
.byte "It's got a big ol' hole in",13
.byte "it. For walking through.",0
@ -37,48 +38,7 @@ gary_look_stump_message:
.byte "what to do next, and stare",13
.byte "at the stump.",0
; +2 POINTS
; + wear mask / scare horse
.byte "You slip on the hideous",13
.byte "monster maskus.",0
; TODO: mask on face, gary turns and runs through fence
.byte "You scared the crap outta",13
.byte "Poor Gary! He broke on",13
.byte "through to the other side!",0
; + wear mask (after scaring him)
; + kick/kill/punch poor gary (after scaring)
.byte "Gary's gone now. Let go.",13
.byte "Just let go.",0
.byte "Let go!",0
; + break/kick stump / sit on stump
gary_kick_stump_message:
.byte "Are you THAT bored? Do some",13
.byte "questing already!",0
; + feed horse (before he's gone)
gary_feed_horse_message:
.byte "There's a good chance that",13
.byte "horse has NEVER eaten. I",13
.byte "doubt he'll start now.",0
; + ride horse/poor gary (before he's gone)
gary_ride_horse_message:
.byte "Naw, snapping horse spines",13
.byte "just doesn't seem as cool",13
.byte "as it did in high school.",0
; + pet horse/poor gary (before he's gone)
gary_pet_horse_message:
.byte "Aww, that's sweet. Poor",13
.byte "Gary tries in vain to bite",13
.byte "your arm off.",0
; + scare horse (before getting the mask)
; + scare gary/horse (before getting the mask)
gary_scare_horse_message1:
.byte "You tell Gary the THE",13
.byte "CALLS ARE COMING FROM",13
@ -101,6 +61,45 @@ gary_scare_horse_message3:
.byte "these baby spiders come",13
.byte "out. It doesn't phase him.",0
; +2 POINTS
; + wear mask / scare horse
gary_scare_message:
.byte "You slip on the hideous",13
.byte "monster maskus.",0
; TODO: mask on face, gary turns and runs through fence
gary_scare_message2:
.byte "You scared the crap outta",13
.byte "Poor Gary! He broke on",13
.byte "through to the other side!",0
; + wear mask (after scaring him)
; + kick/kill/punch poor gary (after scaring)
gary_gone_message:
.byte "Gary's gone now. Let go.",13
.byte "Just let go.",0
gary_gone_message2:
.byte "Let go!",0
; + feed horse (before he's gone)
gary_feed_horse_message:
.byte "There's a good chance that",13
.byte "horse has NEVER eaten. I",13
.byte "doubt he'll start now.",0
; + ride horse/poor gary (before he's gone)
gary_ride_horse_message:
.byte "Naw, snapping horse spines",13
.byte "just doesn't seem as cool",13
.byte "as it did in high school.",0
; + pet horse/poor gary (before he's gone)
gary_pet_horse_message:
.byte "Aww, that's sweet. Poor",13
.byte "Gary tries in vain to bite",13
.byte "your arm off.",0
; + kick/kill/punch poor gary (before scaring)
; (Warning: Needless to say, this kills you.)
gary_kick_horse_message:
@ -132,10 +131,18 @@ gary_climb_fence_message:
.byte "Peasantry.",0
; + climb/jump fence after scaring)
gary_climb_fence_gone_message:
.byte "More like you should walk",13
.byte "through that gaping hole in",13
.byte "it. Just an idea.",0
; + break/kick stump
; + sit stump
; + talk stump
gary_kick_stump_message:
.byte "Are you THAT bored? Do some",13
.byte "questing already!",0
; + get flies (before scaring him)
gary_get_flies_message:
.byte "You nasty. Besides, they",13

View File

@ -42,6 +42,8 @@ MASK = $2E
MASK_COUNTDOWN = $2F
PEASANT_PRIORITY = $30
SEEDL = $4E
SEEDH = $4F
INVENTORY_MASK = $60