peasant: fixing some issues

set PREVIOUS_LOCATION so we can handle leaving baby in well properly
also another issue with kerrek becoming undead
This commit is contained in:
Vince Weaver 2021-11-27 16:06:38 -05:00
parent ae5861e04c
commit 19c11df933
6 changed files with 58 additions and 8 deletions

View File

@ -94,6 +94,9 @@ kerrek_collision:
lda KERREK_STATE
bpl kerrek_no_collision
; next, see if kerrek alive
and #$ff
bne kerrek_no_collision
; first check X

View File

@ -9,6 +9,7 @@ update_map_location:
; we do this because the disk load code will over-write WHICH_LOAD
ldx MAP_LOCATION
stx PREVIOUS_LOCATION
ldy location_to_file,X
sty WHICH_LOAD

View File

@ -131,7 +131,7 @@ new_location:
bne not_kerrek
jsr kerrek_setup
not_kerrek:
@ -164,20 +164,23 @@ game_loop:
bmi oops_new_location
bne game_over
; delay
lda #200
jsr wait
jmp game_loop
;====================
; end of level
oops_new_location:
; special case if leaving with baby in well
lda MAP_LOCATION
; trouble though, by this point MAP_LOCATION is the new one?
lda PREVIOUS_LOCATION
cmp #LOCATION_OLD_WELL
bne skip_level_specific

View File

@ -12,9 +12,8 @@
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_OUTSIDE_LADY ; MAP_LOCATION = $96
.byte TALKED_TO_MENDELEV | HALDO_TO_DONGOLEV | ARROW_BEATEN| GARY_SCARED | TRINKET_GIVEN
.byte TALKED_TO_MENDELEV | HALDO_TO_DONGOLEV | ARROW_BEATEN| GARY_SCARED | TRINKET_GIVEN | LADY_GONE
; BABY_IN_WELL | BUCKET_DOWN_WELL
;LADY_GONE
; GAME_STATE_0 = $97
.byte PUDDLE_WET|RAINING
; FISH_FED | IN_HAY_BALE | NIGHT | POT_ON_HEAD | WEARING_ROBE
@ -30,7 +29,7 @@
.byte $00 ; ARROW_SCORE = $9D
.byte $00 ; SCORE_HUNDREDS= $9E
.byte $20 ; SCORE_TENSONES= $9F
.byte INV1_ARROW | INV1_KERREK_BELT | INV1_BOW | INV1_MONSTER_MASK | INV1_PEBBLES
.byte INV1_ARROW | INV1_BABY | INV1_KERREK_BELT | INV1_BOW | INV1_MONSTER_MASK | INV1_PEBBLES
; INVENTORY_1 = $A0
.byte INV2_RICHES|INV2_TRINKET ; INVENTORY_2 = $A1
.byte INV3_SHIRT|INV3_MAP

View File

@ -0,0 +1,44 @@
; SAVE1 -- ??
.include "zp.inc"
; want to load this to address $90
;
.byte LOAD_PEASANT4 ; WHICH_LOAD = $90
.byte 10 ; PEASANT_X = $91
.byte 100 ; PEASANT_Y = $92
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
.byte 0 ; MAP_X = $94
.byte 1 ; MAP_Y = $95
.byte LOCATION_OUTSIDE_LADY ; MAP_LOCATION = $96
.byte TALKED_TO_MENDELEV | HALDO_TO_DONGOLEV | ARROW_BEATEN| GARY_SCARED | TRINKET_GIVEN | LADY_GONE
; BABY_IN_WELL | BUCKET_DOWN_WELL
; GAME_STATE_0 = $97
.byte PUDDLE_WET|RAINING
; FISH_FED | IN_HAY_BALE | NIGHT | POT_ON_HEAD | WEARING_ROBE
; GAME_STATE_1 = $98
.byte TALKED_TO_KNIGHT
; ON_FIRE | COTTAGE_ROCK_MOVED | KNUCKLES_BLEED
; DRESSER_OPEN | COVERED_IN_MUD | GOT_MUDDY_ALREADY
; GAME_STATE_2 = $99
.byte $00 ; NED_STATUS = $9A
.byte BUSH_1_SEARCHED | BUSH_2_SEARCHED | BUSH_3_SEARCHED | BUSH_4_SEARCHED
; BUSH_STATUS = $9B
.byte KERREK_ROW1 | KERREK_DECOMPOSING ; KERREK_STATE = $9C
.byte $00 ; ARROW_SCORE = $9D
.byte $00 ; SCORE_HUNDREDS= $9E
.byte $20 ; SCORE_TENSONES= $9F
.byte INV1_ARROW | INV1_BABY | INV1_KERREK_BELT | INV1_BOW | INV1_MONSTER_MASK | INV1_PEBBLES
; INVENTORY_1 = $A0
.byte INV2_RICHES|INV2_TRINKET ; INVENTORY_2 = $A1
.byte INV3_SHIRT|INV3_MAP
; INVENTORY_3 = $A2
.byte INV1_ARROW|INV1_PEBBLES
; INVENTORY_1_GONE = $A3
.byte INV2_TRINKET
; INVENTORY_2_GONE_= $A4
.byte $00 ; INVENTORY_3_GONE = $A5
.byte 22 ; KERREK_X = $A6
.byte 76 ; KERREK_Y = $A7

View File

@ -178,7 +178,7 @@ well_leave_baby_in_well_message:
.byte "the bottom of the well, eh?",13
.byte "Thought you'd be able to",13
.byte "just walk away and it's",13
.byte "nothing by mead and",13
.byte "nothing but mead and",13
.byte "wenches from now on, huh?",13
.byte "Well guess what? You dead.",13
.byte "Thanks for playing.",0