diff --git a/games/peasant/peasant3_actions.s b/games/peasant/peasant3_actions.s index 5b7c30a9..9d1f5cf1 100644 --- a/games/peasant/peasant3_actions.s +++ b/games/peasant/peasant3_actions.s @@ -58,9 +58,9 @@ jhonka_get: ; check if alive lda KERREK_STATE and #$f - bne jhonka_get_kerrek_dead + beq jhonka_get_kerrek_alive -jhonka_get_kerrek_alive: +jhonka_get_kerrek_dead: lda CURRENT_NOUN @@ -70,6 +70,8 @@ jhonka_get_kerrek_alive: beq jhonka_get_club cmp #NOUN_LEG beq jhonka_get_club + cmp #NOUN_NOTE + beq jhonka_get_note ; else "probably wish" message jmp parse_common_get @@ -91,7 +93,8 @@ jhonka_get_club: jmp finish_parse_message -jhonka_get_kerrek_dead: + +jhonka_get_kerrek_alive: lda CURRENT_NOUN @@ -113,6 +116,85 @@ jhonka_get_note: jhonka_look: + ; check if kerrek alive + lda KERREK_STATE + and #$f + beq jhonka_look_kerrek_alive + + +jhonka_look_kerrek_dead: + lda CURRENT_NOUN + + cmp #NOUN_DOOR + beq jhonka_look_at_door_out + cmp #NOUN_JHONKA + beq jhonka_look_at_jhonka_out + cmp #NOUN_RICHES + beq jhonka_look_at_riches + cmp #NOUN_CLUB + beq jhonka_look_at_club + cmp #NOUN_LEG + beq jhonka_look_at_leg + + cmp #NOUN_NONE + beq jhonka_look_at_out + + ; these are same as kerrek alive + cmp #NOUN_FENCE + beq jhonka_look_at_fence + cmp #NOUN_CAVE + beq jhonka_look_at_cave + +jhonka_look_not_there: + jmp parse_common_look + +jhonka_look_at_out: + ; see if riches still there + + lda INVENTORY_2 + and #INV2_RICHES + bne jhonka_look_at_no_riches + +jhonka_look_at_with_riches: + ldx #jhonka_look_at_with_riches_message + jmp finish_parse_message + +jhonka_look_at_no_riches: + ldx #jhonka_look_at_no_riches_message + jmp finish_parse_message + + +jhonka_look_at_riches: + ; see if riches still there + + lda INVENTORY_2 + and #INV2_RICHES + bne jhonka_look_not_there + + ldx #jhonka_look_at_riches_message + jmp finish_parse_message + +jhonka_look_at_club: +jhonka_look_at_leg: + ldx #jhonka_look_at_club_message + jmp finish_parse_message + +jhonka_look_at_door_out: + ldx #jhonka_look_at_door_out_message + jmp finish_parse_message + +jhonka_look_at_jhonka_out: + ldx #jhonka_look_at_jhonka_out_message + jmp finish_parse_message + + +jhonka_look_kerrek_alive: lda CURRENT_NOUN cmp #NOUN_FENCE @@ -121,6 +203,8 @@ jhonka_look: beq jhonka_look_at_cave cmp #NOUN_NOTE beq jhonka_read_note + cmp #NOUN_DOOR + beq jhonka_look_at_door cmp #NOUN_NONE beq jhonka_look_at @@ -137,6 +221,11 @@ jhonka_look_at_cave: ldy #>jhonka_look_at_cave_message jmp finish_parse_message +jhonka_look_at_door: + ldx #jhonka_look_at_door_message + jmp finish_parse_message + jhonka_look_at_fence: ldx #jhonka_look_at_fence_message @@ -147,11 +236,18 @@ jhonka_look_at_fence: ; read ;================ jhonka_read: + + ; check if kerrek alive + lda KERREK_STATE + and #$f + bne jhonka_cant_read_note + lda CURRENT_NOUN cmp #NOUN_NOTE beq jhonka_read_note +jhonka_cant_read_note: jmp parse_common_unknown jhonka_read_note: @@ -164,6 +260,11 @@ jhonka_read_note: ; open ;================ jhonka_open: + ; check if kerrek alive + lda KERREK_STATE + and #$f + bne jhonka_cant_open_door + lda CURRENT_NOUN cmp #NOUN_DOOR @@ -171,6 +272,7 @@ jhonka_open: cmp #NOUN_NONE beq jhonka_open_door +jhonka_cant_open_door: jmp parse_common_unknown jhonka_open_door: @@ -183,6 +285,11 @@ jhonka_open_door: ; knock ;================ jhonka_knock: + ; check if kerrek alive + lda KERREK_STATE + and #$f + bne jhonka_cant_knock_door + lda CURRENT_NOUN cmp #NOUN_DOOR @@ -190,13 +297,52 @@ jhonka_knock: cmp #NOUN_NONE beq jhonka_knock_door +jhonka_cant_knock_door: jmp parse_common_unknown jhonka_knock_door: + jsr random16 + and #$7 + + beq jhonka_knock5 + cmp #$1 + beq jhonka_knock4 + cmp #$2 + beq jhonka_knock3 + cmp #$3 + beq jhonka_knock2 + + cmp #$4 + beq jhonka_knock5 + cmp #$5 + beq jhonka_knock4 + +jhonka_knock1: ldx #jhonka_knock_message1 jmp finish_parse_message +jhonka_knock2: + ldx #jhonka_knock_message2 + jmp finish_parse_message + +jhonka_knock3: + ldx #jhonka_knock_message3 + jmp finish_parse_message + +jhonka_knock4: + ldx #jhonka_knock_message4 + jmp finish_parse_message + +jhonka_knock5: + ldx #jhonka_knock_message5 + jmp finish_parse_message + + ;================ diff --git a/games/peasant/text/peasant3.inc b/games/peasant/text/peasant3.inc index 531c0400..7a3d1064 100644 --- a/games/peasant/text/peasant3.inc +++ b/games/peasant/text/peasant3.inc @@ -13,13 +13,14 @@ peasant3_dialog_start: ; kerrek alive -; + look +; + look (kerrek alive) jhonka_look_at_message: .byte "There's a little cave with",13 .byte "a little door with a little",13 .byte "note on it.",0 -; + look door (before kerrek) ; not in WIKI +; + look door (kerrek alive) ; not in WIKI +jhonka_look_at_door_message: .byte "There's a little note on it.",0 ; + look cave @@ -28,7 +29,6 @@ jhonka_look_at_cave_message: .byte "down.",0 ; + look fence -; same as alive jhonka_look_at_fence_message: .byte "A standard peasant fence.",13 .byte "Trogdor makes milk's meat",13 @@ -39,29 +39,32 @@ jhonka_read_note_message: .byte "It says ",34,"scared of kerrek.",13 .byte "go way. -j",34,0 -; + open door [ will walk you there] {before jhonka out} -; ?????? +; + open door [ will walk you there] {before jhonka out, if jhonka out nothing) jhonka_open_door_message: .byte "It's locked. With one o'",13 .byte "them SCHLAGE deadbolts,",13 .byte "too. Those things are hard",13 .byte "core.",0 -; TODO + ; + knock (while he's inside) [ will walk over] jhonka_knock_message1: .byte "A gravelly voice inside",13 -.byte "yells, 'JUST US CHICKENS'",0 -; or +.byte "yells, 'JUST US CHICKENS'",0 + +jhonka_knock_message2: .byte "A gravelly voice inside",13 .byte "yells, 'NO FOR RENT'",0 -; or + +jhonka_knock_message3: .byte "A gravelly voice inside",13 .byte "yells, 'I GIVE LAST YEAR!'",0 -; or + +jhonka_knock_message4: .byte "A gravelly voice inside",13 .byte "yells, 'GAVE AT OFFICE'",0 -; or: + +jhonka_knock_message5: .byte "A gravelly voice inside",13 .byte "yells, 'GO WAY!'",0 @@ -81,7 +84,6 @@ jhonka_climb_fence_message: ;================================ ; kerrek dead - ; TODO ; + Type any command other than "yes" or "no" ; after the Jhonka asks if you stole the riches @@ -89,34 +91,37 @@ jhonka_climb_fence_message: .byte "Just answer him, yes or no,",13 .byte "you fool!",0 -; TODO ; + look (kerrek dead, before riches) +jhonka_look_at_with_riches_message: .byte "There's a disgusting",13 .byte "little Jhonka hopping",13 .byte "around outside a little",13 .byte "cave.A fat pile of riches",13 .byte "lies next to him.",0 -; TODO ; + look (after kerrek dead, after take riches) +jhonka_look_at_no_riches_message: .byte "There's a disgusting",13 .byte "little Jhonka hopping",13 .byte "around outside a small",13 ; WIKI wrong .byte "cave.",0 -; TODO + ; + look club/turkey leg (when he's outside) +jhonka_look_at_club_message: .byte "Turkey leg or no, it looks",13 .byte "like the Jhonka's been",13 .byte "gnawing on it.",0 ; + look cave -; same as alive? +; same as alive ; + look door (after kerrek?) ; not in WIKI +jhonka_look_at_door_out_message: .byte "Just a door, nothing more.",0 ; + look riches +jhonka_look_at_riches_message: .byte "That's one fat pile of",13 .byte "riches alright.",0 @@ -124,6 +129,7 @@ jhonka_climb_fence_message: ; same as alive ; + look jhonka (when he's outside) +jhonka_look_at_jhonka_out_message: .byte "The Jhonka is gray and",13 .byte "grody. He's got a cromagnon",13 .byte "forehead and jaw with a",13