diff --git a/games/peasant/NOTES b/games/peasant/NOTES index 5d49d307..58ad4dc5 100644 --- a/games/peasant/NOTES +++ b/games/peasant/NOTES @@ -197,8 +197,9 @@ POINTS IMPLEMENTED: (in order of implementation) + 1 (close drawer) + 10 (get robe) + 3 (wear robe) ++ 2 (get grease) ====== - 110 points + 112 points deaths/endings implemented diff --git a/games/peasant/inn_actions.s b/games/peasant/inn_actions.s index 42e56587..0c94869e 100644 --- a/games/peasant/inn_actions.s +++ b/games/peasant/inn_actions.s @@ -27,6 +27,8 @@ inside_inn_verb_table: .word inside_inn_sleep-1 .byte VERB_OPEN .word inside_inn_open-1 + .byte VERB_LIGHT + .word inside_inn_light-1 .byte 0 ;================= @@ -34,7 +36,13 @@ inside_inn_verb_table: ;================= inside_inn_look: + lda GAME_STATE_1 + and #NIGHT + beq inside_inn_look_day + jmp inside_inn_look_night + +inside_inn_look_day: lda CURRENT_NOUN cmp #NOUN_PILLOW @@ -67,6 +75,8 @@ inside_inn_look: beq inn_look_at_bell cmp #NOUN_DESK beq inn_look_at_desk + cmp #NOUN_DOOR + beq inn_look_at_door cmp #NOUN_NONE beq inn_look_at @@ -123,6 +133,79 @@ inn_look_at_desk: ldy #>inside_inn_look_desk_message jmp finish_parse_message +inn_look_at_door: + ldx #inside_inn_open_door_message + jmp finish_parse_message + + +inside_inn_look_night: + lda CURRENT_NOUN + + cmp #NOUN_PILLOW + beq inn_look_at_pillow + cmp #NOUN_NOTE + beq inn_look_at_paper + cmp #NOUN_PAPER + beq inn_look_at_paper + cmp #NOUN_PAINTING + beq inn_look_at_painting + cmp #NOUN_DUDE + beq inn_look_at_man_night + cmp #NOUN_GUY + beq inn_look_at_man_night + cmp #NOUN_MAN + beq inn_look_at_man_night + cmp #NOUN_WINDOW + beq inn_look_at_window + cmp #NOUN_PILLOW + beq inn_look_at_pillow + cmp #NOUN_RUG + beq inn_look_at_rug + cmp #NOUN_CARPET + beq inn_look_at_rug + cmp #NOUN_BED + beq inn_look_at_bed + cmp #NOUN_MATTRESS + beq inn_look_at_bed + cmp #NOUN_BELL + beq inn_look_at_bell + cmp #NOUN_DESK + beq inn_look_at_desk + cmp #NOUN_POT + beq inn_look_at_pot_night + + cmp #NOUN_NONE + beq inn_look_at_night + + jmp parse_common_look + +inn_look_at_night: + ldx #inside_inn_look_night_message + jmp finish_parse_message + +inn_look_at_man_night: + ldx #inside_inn_look_man_night_message + jmp finish_parse_message + +inn_look_at_pot_night: + ldx #inside_inn_look_pot_night_message + jmp finish_parse_message + +inn_look_at_desk_night: + ldx #inside_inn_look_desk_night_message + jmp finish_parse_message + +inn_look_at_candle_night: + ldx #inside_inn_look_candle_night_message + jmp finish_parse_message + + ;================= ; talk @@ -130,6 +213,12 @@ inn_look_at_desk: inside_inn_talk: + ; no talking at night + + lda GAME_STATE_1 + and #NIGHT + bne inn_talk_no_one + lda CURRENT_NOUN cmp #NOUN_NONE @@ -140,7 +229,7 @@ inside_inn_talk: beq inn_talk_man cmp #NOUN_DUDE beq inn_talk_man - +inn_talk_no_one: jmp parse_common_talk inn_talk_man: @@ -154,11 +243,17 @@ inn_talk_man: inside_inn_give: + ; no giving at night + + lda GAME_STATE_1 + and #NIGHT + bne inn_give_no_one + lda CURRENT_NOUN cmp #NOUN_BABY beq inn_give_baby - +inn_give_no_one: jmp parse_common_give inn_give_baby: @@ -210,8 +305,6 @@ inside_inn_get: lda CURRENT_NOUN - cmp #NOUN_ROOM - beq inn_get_room cmp #NOUN_PAPER beq inn_get_paper cmp #NOUN_NOTE @@ -232,37 +325,20 @@ inside_inn_get: beq inn_get_bell cmp #NOUN_BED beq inn_get_bed + cmp #NOUN_POT + beq inn_get_pot + cmp #NOUN_GREASE + beq inn_get_grease + cmp #NOUN_CANDLE + beq inn_get_candle + cmp #NOUN_RUB + beq inn_get_rub + + cmp #NOUN_ROOM + beq inn_get_room jmp parse_common_get -inn_get_room: - lda GAME_STATE_1 - and #WEARING_ROBE ; check if wearing robe - bne inn_get_room_have_robe - -inn_get_room_no_robe: - ldx #inside_inn_get_room_no_robe_message - jmp finish_parse_message - -inn_get_room_have_robe: - ldx #inside_inn_get_room_message - jsr partial_message_step - - ; add 3 points to score - - lda #3 - jsr score_points - - ldx #inside_inn_get_room2_message - jsr partial_message_step - - ldx #inside_inn_get_room3_message - jmp finish_parse_message - inn_get_paper: ldx #inside_inn_get_paper_message @@ -298,6 +374,112 @@ inn_get_bed: ldy #>inside_inn_get_bed_message jmp finish_parse_message +inn_get_pot: +inn_get_grease: + lda GAME_STATE_1 + and #NIGHT + bne inn_do_get_grease + jmp parse_common_get + +inn_do_get_grease: + lda GAME_STATE_2 + and #GREASE_ON_HEAD + beq inn_finally_get_grease + +inn_grease_already: + ldx #inside_inn_grease_already_message + jmp finish_parse_message + +inn_finally_get_grease: + ldx #inside_inn_get_grease_message + jsr partial_message_step + + lda #2 + jsr score_points + + lda GAME_STATE_2 + ora #GREASE_ON_HEAD + sta GAME_STATE_2 + + lda GAME_STATE_1 + ora #POT_ON_HEAD + sta GAME_STATE_1 + + ldx #inside_inn_get_grease_message2 + jmp finish_parse_message + +inn_get_candle: + ldx #inside_inn_get_candle_message + jmp finish_parse_message + +inn_get_rub: + ldx #inside_inn_get_rub_message + jmp finish_parse_message + + + + +inn_get_room: + lda GAME_STATE_1 + and #WEARING_ROBE ; check if wearing robe + bne inn_get_room_have_robe + +inn_get_room_no_robe: + ldx #inside_inn_get_room_no_robe_message + jmp finish_parse_message + +inn_get_room_on_fire: + ldx #inside_inn_get_room_no_robe_message + jmp finish_parse_message + +inn_get_room_have_robe: + lda GAME_STATE_1 + and #NIGHT + beq inn_get_room_have_room_day + + jmp parse_common_get + +inn_get_room_have_room_day: + lda GAME_STATE_2 + and #ON_FIRE ; check if on fire + bne inn_get_room_on_fire + + ldx #inside_inn_get_room_message + jsr partial_message_step + + ; add 3 points to score + ; only do this once though + + lda GAME_STATE_1 + and #ALREADY_GOT_ROOM + bne inn_get_room_skip_points + + lda #3 + jsr score_points +inn_get_room_skip_points: + + ; Make it night + lda GAME_STATE_1 + ora #(NIGHT|ALREADY_GOT_ROOM) + sta GAME_STATE_1 + + ldx #inside_inn_get_room2_message + jsr partial_message_step + + ldx #inside_inn_get_room3_message + jmp finish_parse_message + + ;================= ; ask about @@ -305,6 +487,14 @@ inn_get_bed: inside_inn_ask: + lda GAME_STATE_1 + and #NIGHT + beq inn_ask_day + + jmp parse_common_ask + +inn_ask_day: + lda CURRENT_NOUN cmp #NOUN_FIRE @@ -373,6 +563,10 @@ inn_ring_bell: inside_inn_sleep: + lda GAME_STATE_1 + and #NIGHT + bne inn_sleep_no_one + lda CURRENT_NOUN cmp #NOUN_BED @@ -380,6 +574,7 @@ inside_inn_sleep: cmp #NOUN_NONE beq inn_sleep_bed +inn_sleep_no_one: jmp parse_common_unknown inn_sleep_bed: @@ -405,6 +600,29 @@ inn_open_door: ldy #>inside_inn_open_door_message jmp finish_parse_message + ;================= + ; light + ;================= + +inside_inn_light: + + lda GAME_STATE_1 + and #NIGHT + beq inn_light_day + + lda CURRENT_NOUN + + cmp #NOUN_CANDLE + beq inn_light_candle +inn_light_day: + jmp parse_common_unknown + +inn_light_candle: + ldx #inside_inn_get_candle_message + jmp finish_parse_message + + diff --git a/games/peasant/parse_input.s b/games/peasant/parse_input.s index 574450d8..9021034e 100644 --- a/games/peasant/parse_input.s +++ b/games/peasant/parse_input.s @@ -977,6 +977,7 @@ noun_lookup_again: .byte "GAME",NOUN_GAME|$80 .byte "GARY",NOUN_GARY|$80 .byte "GOLD",NOUN_GOLD|$80 +.byte "GREASE",NOUN_GREASE|$80 .byte "GREEN",NOUN_GREEN|$80 .byte "GROUND",NOUN_GROUND|$80 .byte "GUY",NOUN_GUY|$80 diff --git a/games/peasant/text/inn.inc b/games/peasant/text/inn.inc index 37947bdf..18f08713 100644 --- a/games/peasant/text/inn.inc +++ b/games/peasant/text/inn.inc @@ -28,6 +28,7 @@ inside_inn_look_message: .byte "that's closed.",0 ; + look (night) +inside_inn_look_night_message: .byte "It's still dark out. The",13 .byte "grimey old Innkeeper is",13 .byte "gone and he left the",13 @@ -46,6 +47,7 @@ inside_inn_look_man_message: .byte "are nose hairs. Grody.",0 ; + look man (night) not in wiki? +inside_inn_look_man_night_message: .byte "He gone.",0 ; + look painting (day/night) @@ -66,6 +68,7 @@ inside_inn_look_pillow_message: .byte "head on that nasty pillow.",0 ; + look pot (night) +inside_inn_look_pot_night_message: .byte "It's full of horse grease.",13 .byte "I guess that sounds useful.",0 @@ -93,14 +96,21 @@ inside_inn_look_desk_message: .byte "guy behind it.",0 ; + look desk (night) +inside_inn_look_desk_night_message: .byte "There's a broken bell and",13 .byte "a piece of parchment on",13 .byte "there.",0 ; + look candle (night) +inside_inn_look_candle_night_message: .byte "That candle's not at all on",13 .byte "fire.",0 +; + look/open door (day) +inside_inn_open_door_message: +.byte 34,"That's the pantry,",34," says",13 +.byte "the Innkeeper. ",34,"Employees",13 +.byte "only.",34,0 ;========== ; talk @@ -156,7 +166,7 @@ inside_inn_get_room_no_robe_message: ; + get room (with robe) (day) (at night gives default) inside_inn_get_room_message: .byte 34,"Okay, youngster,",34," says",13 -.byte "the decrepit old person.", +.byte "the decrepit old person.",13 .byte 34,"Just bed on down for the",13 .byte "night and I'm sure I'll",13 .byte "remember to collect the fee",13 @@ -225,13 +235,15 @@ inside_inn_get_bell_message: .byte "the desk.",0 ; +2 POINTS -; + get/take/steal pot/grease +; + get/take/steal pot/grease (night) +inside_inn_get_grease_message: .byte "You reach way up to the top",13 .byte "shelf.",0 ; points actually happen here ; falls on your head +inside_inn_get_grease_message2: .byte "Oh great! Now you can't see",13 .byte "a thing and your head is",13 .byte "covered in highly",13 @@ -240,17 +252,20 @@ inside_inn_get_bell_message: .byte "before that disgusting old",13 .byte "man comes back.",0 -; + get pot/greaste (at night, already have it) +; + get pot/grease (at night, already have it) +inside_inn_grease_already_message: .byte "You already have a nice",13 .byte "greasy swab of it on the",13 .byte "corner of your hood.",0 ; + get/light candle (night) +inside_inn_get_candle_message: .byte "It seems like you should be",13 .byte "able to do that, doesn't",13 .byte "it? Sorry. No dice.",0 ; + get old man rub (day/night) (after getting pills?) +inside_inn_get_rub_message: .byte "You disgust me.",0 @@ -314,11 +329,7 @@ inside_inn_ring_bell_message: .byte "dinging, it just goes",13 .byte "'DUNG.'",0 -; + open door (day) -inside_inn_open_door_message: -.byte 34,"That's the pantry,",34," says",13 -.byte "the Innkeeper. ",34,"Employees",13 -.byte "only.",34,0 + inn_dialog_end: diff --git a/games/peasant/tokens.inc b/games/peasant/tokens.inc index 87a523a0..45a4c8da 100644 --- a/games/peasant/tokens.inc +++ b/games/peasant/tokens.inc @@ -117,81 +117,82 @@ NOUN_FOOD = 34 NOUN_FOOTPRINTS = 35 NOUN_GAME = 36 NOUN_GARY = 37 -NOUN_GREEN = 38 -NOUN_GROUND = 39 -NOUN_GUY = 40 -NOUN_HAY = 41 -NOUN_HOLE = 42 -NOUN_HORSE = 43 -NOUN_INN = 44 -NOUN_JHONKA = 45 -NOUN_KERREK = 46 -NOUN_KNIGHT = 47 -NOUN_LADY = 48 -NOUN_LAKE = 49 -NOUN_LANTERN = 50 -NOUN_LEG = 51 -NOUN_LIGHTNING = 52 -NOUN_MAN = 53 -NOUN_MAP = 54 -NOUN_MASK = 55 -NOUN_MUD = 56 -NOUN_NED = 57 -NOUN_NOTE = 58 -NOUN_OPENINGS = 59 -NOUN_PAINTING = 60 -NOUN_PAPER = 61 -NOUN_PEASANT = 62 -NOUN_PEBBLES = 63 -NOUN_PILLOW = 64 -NOUN_PILLS = 65 -NOUN_PLAGUE = 66 -NOUN_PLAQUE = 67 -NOUN_POT = 68 -NOUN_RICHES = 69 -NOUN_ROBE = 70 -NOUN_ROCK = 71 -NOUN_ROOM = 72 -NOUN_RUB = 73 -NOUN_RUG = 74 -NOUN_SAND = 75 -NOUN_SANDWICH = 76 -NOUN_SHELF = 77 -NOUN_SIGN = 78 -NOUN_SKELETON = 79 -NOUN_SKULL = 80 -NOUN_SMELL = 81 -NOUN_SODA = 82 -NOUN_STUFF = 83 -NOUN_STUMP = 84 -NOUN_SUB = 85 -NOUN_TARGET = 86 -NOUN_TRACKS = 87 -NOUN_TREE = 88 -NOUN_TRINKET = 89 -NOUN_TROGDOR = 90 -NOUN_WATER = 91 -NOUN_WATERFALL = 92 -NOUN_WELL = 93 -NOUN_WINDOW = 94 -NOUN_WOMAN = 95 -NOUN_RIVER = 96 -NOUN_STONE = 97 -NOUN_IN_HAY = 98 -NOUN_PUDDLE = 99 -NOUN_MENDELEV = 100 -NOUN_BLEED = 101 -NOUN_IN_WELL = 102 -NOUN_BUCKET = 103 -NOUN_WISH = 104 -NOUN_ARMS = 105 -NOUN_GOLD = 106 -NOUN_MONEY = 107 -NOUN_CARPET = 108 -NOUN_BED = 109 -NOUN_MATTRESS = 110 -NOUN_PARCHMENT = 111 -NOUN_DONGOLEV = 112 -NOUN_HALDO = 113 +NOUN_GREASE = 38 +NOUN_GREEN = 39 +NOUN_GROUND = 40 +NOUN_GUY = 41 +NOUN_HAY = 42 +NOUN_HOLE = 43 +NOUN_HORSE = 44 +NOUN_INN = 45 +NOUN_JHONKA = 46 +NOUN_KERREK = 47 +NOUN_KNIGHT = 48 +NOUN_LADY = 49 +NOUN_LAKE = 50 +NOUN_LANTERN = 51 +NOUN_LEG = 52 +NOUN_LIGHTNING = 53 +NOUN_MAN = 54 +NOUN_MAP = 55 +NOUN_MASK = 56 +NOUN_MUD = 57 +NOUN_NED = 58 +NOUN_NOTE = 59 +NOUN_OPENINGS = 60 +NOUN_PAINTING = 61 +NOUN_PAPER = 62 +NOUN_PEASANT = 63 +NOUN_PEBBLES = 64 +NOUN_PILLOW = 65 +NOUN_PILLS = 66 +NOUN_PLAGUE = 67 +NOUN_PLAQUE = 68 +NOUN_POT = 69 +NOUN_RICHES = 70 +NOUN_ROBE = 71 +NOUN_ROCK = 72 +NOUN_ROOM = 73 +NOUN_RUB = 74 +NOUN_RUG = 75 +NOUN_SAND = 76 +NOUN_SANDWICH = 77 +NOUN_SHELF = 78 +NOUN_SIGN = 79 +NOUN_SKELETON = 80 +NOUN_SKULL = 81 +NOUN_SMELL = 82 +NOUN_SODA = 83 +NOUN_STUFF = 84 +NOUN_STUMP = 85 +NOUN_SUB = 86 +NOUN_TARGET = 87 +NOUN_TRACKS = 88 +NOUN_TREE = 89 +NOUN_TRINKET = 90 +NOUN_TROGDOR = 91 +NOUN_WATER = 92 +NOUN_WATERFALL = 93 +NOUN_WELL = 94 +NOUN_WINDOW = 95 +NOUN_WOMAN = 96 +NOUN_RIVER = 97 +NOUN_STONE = 98 +NOUN_IN_HAY = 99 +NOUN_PUDDLE = 100 +NOUN_MENDELEV = 101 +NOUN_BLEED = 102 +NOUN_IN_WELL = 103 +NOUN_BUCKET = 104 +NOUN_WISH = 105 +NOUN_ARMS = 106 +NOUN_GOLD = 107 +NOUN_MONEY = 108 +NOUN_CARPET = 109 +NOUN_BED = 110 +NOUN_MATTRESS = 111 +NOUN_PARCHMENT = 112 +NOUN_DONGOLEV = 113 +NOUN_HALDO = 114 ; -NOUN_UNKNOWN = 114 +NOUN_UNKNOWN = 115 diff --git a/games/peasant/zp.inc b/games/peasant/zp.inc index 6ec791ae..7db455a5 100644 --- a/games/peasant/zp.inc +++ b/games/peasant/zp.inc @@ -137,7 +137,7 @@ GAME_STATE_1 = $98 FISH_FED=$01 ; also implies man gone and inn open PUDDLE_WET=$02 IN_HAY_BALE=$04 -; JHONKA_OUT=$08 ; implied by KERREK_STATE & $0f !=0 + ALREADY_GOT_ROOM=$08 RAINING=$10 NIGHT=$20 POT_ON_HEAD=$40 @@ -150,6 +150,7 @@ GAME_STATE_2 = $99 TALKED_TO_KNIGHT = $10 COVERED_IN_MUD = $20 GOT_MUDDY_ALREADY = $40 + GREASE_ON_HEAD =$80 NED_STATUS = $9A BUSH_STATUS = $9B ; status of bush search