data/claims/zork1.yamlZork I (Infocom ZIL source, released under MIT in 2025)
Game: Zork I.
Zork I's ZIL source (a 1983-headed revision) parses a command into one verb and up to two noun clauses, each of which a preposition can lead, and matches the result against the verb's syntaxes, such as PUT OBJECT IN OBJECT. A third noun clause draws “There were too many nouns in that sentence.” A clause can name several objects only where the syntax allows it, as TAKE's does. THEN or a period ends one command, and the parser keeps the rest of the line for the next. zork1/parser
About: Zork I Text parser
Value
{
"nounClauses": 2,
"prepositions": 2
}gparser.zil#L90-L99<CONSTANT P-NC2 8>Zork I source code (Infocom ZIL) · gparser.zil#L326-L333There were too many nouns in that sentence.Zork I source code (Infocom ZIL) · gsyntax.zil#L384<SYNTAX PUT OBJECT (HELD MANY HAVE) IN OBJECT = V-PUT PRE-PUT>Zork I source code (Infocom ZIL) · gsyntax.zil#L469<SYNTAX TAKE OBJECT (FIND TAKEBIT) (ON-GROUND IN-ROOM MANY) = V-TAKE PRE-TAKE>Zork I source code (Infocom ZIL) · gparser.zil#L1294-L1302<TELL "You can't use multiple ">Zork I source code (Infocom ZIL) · gparser.zil#L267-L275<SETG P-CONT <+ .PTR ,P-LEXELEN>>>Checked by claude, 2026-10-22 — read PARSER's word loop (L105-L380): verbs, prepositions and noun clauses fill the P-ITBL slots P-VERB, P-PREP1, P-PREP2, P-NC1, P-NC2; P-NCN counts noun clauses and a third is refused; THEN, a period, or a quote stops the loop and sets P-CONT; MANY-CHECK refuses several objects in a slot without SMANYThe source doesn't say how many letters of a word count: that's set by the story file's dictionary format, which the compiler and the Z-machine define, not the ZIL.
Cited by: Text parser, Zork I
In Zork I's ZIL source the brass lantern's timer starts at 200 and runs only while the lamp is on: turning it on enables the I-LANTERN event and turning it off disables it. The clock counts it down once per parsed command other than the verbs TELL, BRIEF, SUPER-BRIEF, VERBOSE, SAVE, VERSION, QUIT, RESTART, SCORE, SCRIPT, UNSCRIPT, and RESTORE. Each time it runs out, the lamp table sets the next wait, 100, then 70, then 15, and prints “The lamp appears a bit dimmer.”, “The lamp is definitely dimmer now.”, and “The lamp is nearly out.” if the lamp is held or in the room. After the 15 the lamp burns out for good, 385 lit turns in all (computed). zork1/lantern
About: Zork I Light-source timer
Value
{
"start": 200,
"waits": [
100,
70,
15
],
"total": 385
}1dungeon.zil#L2642<QUEUE I-LANTERN 200>Zork I source code (Infocom ZIL) · 1actions.zil#L2238-L2242<ENABLE <INT I-LANTERN>>Zork I source code (Infocom ZIL) · 1actions.zil#L2243-L2248<DISABLE <INT I-LANTERN>>Zork I source code (Infocom ZIL) · gmain.zil#L169-L172(T <SET V <CLOCKER>>)>)>>Zork I source code (Infocom ZIL) · gclock.zil#L52-L58<PUT .C ,C-TICK <- .TICK 1>>Zork I source code (Infocom ZIL) · 1actions.zil#L2220-L2228"The lamp appears a bit dimmer."Zork I source code (Infocom ZIL) · 1actions.zil#L2315-L2319<ENABLE <QUEUE I-LANTERN <SET TICK <GET .TBL 0>>>>Zork I source code (Infocom ZIL) · 1actions.zil#L2328-L2337<FSET .OBJ ,RMUNGBIT>)>Checked by claude, 2026-10-22 — read GO's queue of I-LANTERN (queued, not enabled), LANTERN's on and off branches, MAIN-LOOP's CLOCKER call under P-WON, CLOCKER (an enabled event's tick drops by 1 and the event runs when it was 1), LAMP-TABLE, I-LANTERN (it requeues itself with the table's next wait, then steps 4 bytes), and LIGHT-INT (a wait of 0 clears ONBIT and sets RMUNGBIT); summed 200 + 100 + 70 + 15CLOCKER runs only interrupts when the parse succeeded (P-WON); a failed parse runs demons only, and the lantern's event is not a demon. A burned-out lamp says “A burned-out lamp won't light.” The candles use the same routine with their own table (CANDLE-TABLE).
Cited by: Light-source timer, Zork I
Zork I's ZIL source refuses a TAKE (“Your load is too heavy”) when the object's weight plus the player's would pass the load limit of 100, unless the object is inside something the player carries. A weight is an object's SIZE plus its contents' weights; worn items count 1 toward the player, and the player's own object sets no SIZE, so it takes the default of 5. A separate check makes a TAKE fail, “You're holding too many things already!”, when more than 7 objects not worn are in hand, at a chance of 8% per object held: 63% at 8 and certain from 13 (computed). In a fight, a light wound to the player lowers the limit by 10 and a serious wound by 20 while it's above 50; it recovers 10 every 30 turns and returns to 100 when the wounds heal. zork1/load
About: Zork I Inventory limit
Value
{
"load": 100,
"playerSize": 5,
"fumbleOver": 7,
"fumblePercentPerObject": 8
}gglobals.zil#L92-L94<GLOBAL LOAD-ALLOWED 100>Zork I source code (Infocom ZIL) · gverbs.zil#L1931-L1940<G? <+ <WEIGHT ,PRSO> <WEIGHT ,WINNER>> ,LOAD-ALLOWED>>Zork I source code (Infocom ZIL) · gverbs.zil#L1988-L1997<+ .WT <GETP .OBJ ,P?SIZE>>>Zork I source code (Infocom ZIL) · zork1.zil#L24<PROPDEF SIZE 5>Zork I source code (Infocom ZIL) · gglobals.zil#L267-L272(STRENGTH 0)Zork I source code (Infocom ZIL) · gverbs.zil#L1896-L1898<GLOBAL FUMBLE-PROB 8>Zork I source code (Infocom ZIL) · gverbs.zil#L1941-L1945<PROB <* .CNT ,FUMBLE-PROB>>>Zork I source code (Infocom ZIL) · gverbs.zil#L1979-L1986<COND (<NOT <FSET? .X ,WEARBIT>>Zork I source code (Infocom ZIL) · 1actions.zil#L3457-L3466<SETG LOAD-ALLOWED <- ,LOAD-ALLOWED 20>>)>)Zork I source code (Infocom ZIL) · 1actions.zil#L3593-L3602<SETG LOAD-ALLOWED <+ ,LOAD-ALLOWED 10>>)>Zork I source code (Infocom ZIL) · 1actions.zil#L3325<CONSTANT CURE-WAIT 30>Checked by claude, 2026-10-22 — read ITAKE (L1899-L1971), CCOUNT, WEIGHT, the PROPDEFs, the ADVENTURER object (no SIZE property), VILLAIN-BLOW's wound branches, WINNER-RESULT's queue of I-CURE, and I-CURE; the player is WINNER and ADVENTURER at the start (1dungeon.zil L2656-L2657)PROB n succeeds when RANDOM 100 (1–100) is below n, so n − 1 times in 100; n above 100 always succeeds, so from 13 objects every TAKE fails this way. The too-heavy message adds “especially in light of your condition” while the limit is below 100.
Cited by: Inventory limit, Zork I
Zork I's ZIL source sets the maximum score at 350. An object or room with a VALUE pays it once, when first taken or entered, and the value is then cleared. A treasure's TVALUE counts while it lies in the trophy case: at the end of a turn in the living room in which the player takes anything or puts something in the case, the score is reset to the banked points plus the TVALUEs of what is in the case. Only objects directly in the case count, since the routine looks inside containers but discards what it finds there. Reaching 350 whispers “Look to your treasures for the final secret.” zork1/score
About: Zork I Treasure score
Value: 350 points
CodeZork I source code (Infocom ZIL) ·1dungeon.zil#L7<GLOBAL SCORE-MAX 350>Zork I source code (Infocom ZIL) · gverbs.zil#L1867-L1870<PUTP .OBJ ,P?VALUE 0>)>>Zork I source code (Infocom ZIL) · gverbs.zil#L1959-L1961'<SCORE-OBJ ,PRSO>)Zork I source code (Infocom ZIL) · gverbs.zil#L2122<SCORE-OBJ .RM>Zork I source code (Infocom ZIL) · 1actions.zil#L477-L484<SETG SCORE <+ ,BASE-SCORE <OTVAL-FROB>>>Zork I source code (Infocom ZIL) · 1actions.zil#L496-L502<COND (<FIRST? .F> <OTVAL-FROB .F>)>Zork I source code (Infocom ZIL) · gverbs.zil#L1851-L1862Look to your treasures for the final secret.Checked by claude, 2026-10-22 — read SCORE-OBJ and SCORE-UPD (BASE-SCORE banks VALUE points), its calls in ITAKE and GOTO, LIVING-ROOM-FCN's M-END branch, and OTVAL-FROB, whose recursive call's result is not added to its local SCORESCORE-OBJ is also called from V-PUT (gverbs.zil L1113) and for the emerald (1dungeon.zil L795). The 350 also feeds the player's fighting strength (zork1/fight-strength).
Cited by: Treasure score, Zork I
Zork I's ZIL source sets the player's fighting strength at 2 + score ÷ 70, rounded down (computed from 2 + score ÷ (350 ÷ (7 − 2))), from 2 at no points to 7 at 350, plus a wound modifier that is 0 when unhurt. A villain's strength is its STRENGTH: 2 for the troll and 5 for the thief. Attacked with its bane, the sword for the troll and the nasty knife for the thief, a villain counts 1 less, but no less than 1; a thief engrossed in a treasure counts at most 2. zork1/fight-strength
About: Zork I Hit chance
CodeZork I source code (Infocom ZIL) ·1actions.zil#L3323-L3324<CONSTANT STRENGTH-MAX 7>Zork I source code (Infocom ZIL) · 1actions.zil#L3375-L3381<+ ,STRENGTH-MIN </ ,SCORE </ ,SCORE-MAX <- ,STRENGTH-MAX ,STRENGTH-MIN>>>>>Zork I source code (Infocom ZIL) · 1dungeon.zil#L1036-L1046(STRENGTH 2)>Zork I source code (Infocom ZIL) · 1dungeon.zil#L968-L978(STRENGTH 5)>Zork I source code (Infocom ZIL) · 1actions.zil#L3383-L3397<SET TMP <- .OD <GET .OO ,V-BEST-ADV>>>Zork I source code (Infocom ZIL) · 1actions.zil#L3801-L3803<LTABLE <TABLE TROLL SWORD 1 0 TROLL-MELEE>Checked by claude, 2026-10-22 — read FIGHT-STRENGTH, VILLAIN-STRENGTH, the VILLAINS table (villain, best weapon, its advantage) and its field constants (L3793-L3797), the troll and thief objects, and the KNIFE object (DESC "nasty knife", 1dungeon.zil L508-L512); 350 ÷ 5 = 70The modifier is the player's STRENGTH property, which WINNER-RESULT sets negative after a wound and I-CURE raises by 1 every 30 turns. The cyclops (strength 10,000) has no bane.
Cited by: Zork I
In Zork I's ZIL source each blow, by the player or a villain, reads 9 entries of a result table picked by the defender's strength, and a roll of 1–9 picks one. A defender of strength 1 uses DEF1, starting 0, 1, or 2 entries in for an attacker of strength 1, 2, or 3 and up. A defender of 2 uses DEF2A for an attacker of 1, or DEF2B starting 0, 1, or 2 entries in for 2, 3, or 4 and up. A defender of 3 or more uses the attacker's strength less the defender's, clamped to −2..2: DEF3A starting 0 or 1 entries in for −2 or −1, DEF3B likewise for 0 or 1, and DEF3C for 2. The results are miss, stagger, light wound, serious wound, knockout, and kill; the DEF3 tables hold no knockout or kill, and an unarmed or unconscious villain dies to the player's blow outright. zork1/fight-tables
About: Zork I Hit chance
CodeZork I source code (Infocom ZIL) ·1actions.zil#L3246-L3254<CONSTANT SERIOUS-WOUND 5> ;"defender seriously wounded"Zork I source code (Infocom ZIL) · 1actions.zil#L3258-L3299MISSED STAGGER STAGGER LIGHT-WOUND LIGHT-WOUND LIGHT-WOUND LIGHT-WOUNDZork I source code (Infocom ZIL) · 1actions.zil#L3301-L3317<TABLE DEF3AZork I source code (Infocom ZIL) · 1dungeon.zil#L2644-L2649<PUT ,DEF1-RES 1 <REST ,DEF1 2>>Zork I source code (Infocom ZIL) · 1actions.zil#L3427-L3440<SET RES <GET .TBL <- <RANDOM 9> 1>>>Zork I source code (Infocom ZIL) · 1actions.zil#L3502-L3521 cannot defend himself: He dies." CR>Checked by claude, 2026-10-22 — read the six tables, the three DEF-RES tables and GO's fill of their empty slots (REST by 2 bytes is one entry), VILLAIN-BLOW and HERO-BLOW's matching selection code, and HERO-BLOW's unarmed or unconscious branchA stagger can turn into losing the weapon when the defender holds one (PROB 25), and a staggered fighter skips the next blow; when the defender is out (OUT?), a stagger becomes a hesitation and anything else a sitting-duck kill. These details sit in the same routines (L3441-L3447, L3522-L3526).
Cited by: Zork I
Computed from Zork I's ZIL source: at 0 points the player's strength is 2. Swinging the sword at the unhurt troll (2, less 1 for the sword) reads DEF1 from its second entry, so a blow misses 3 times in 9, staggers 2, knocks out 2, and kills 2. Swinging the nasty knife at the thief when he isn't engrossed (5, less 1) reads DEF3A from its start: 5 misses, 2 staggers, and 2 light wounds, and no kill. zork1/fight-example
About: Zork I Hit chance
CodeZork I source code (Infocom ZIL) ·1actions.zil#L3258-L3263MISSED MISSED MISSED MISSED STAGGER STAGGER UNCONSCIOUS UNCONSCIOUS KILLED KILLED KILLED KILLED KILLED>>Zork I source code (Infocom ZIL) · 1actions.zil#L3280-L3285MISSED MISSED MISSED MISSED MISSED STAGGER STAGGER LIGHT-WOUND LIGHT-WOUND SERIOUS-WOUND SERIOUS-WOUND>>Zork I source code (Infocom ZIL) · 1actions.zil#L3491-L3495<SET ATT <FIGHT-STRENGTH>>Zork I source code (Infocom ZIL) · 1actions.zil#L3510-L3521<SET TBL <GET ,DEF3-RES <+ .ATT 2>>>)>Zork I source code (Infocom ZIL) · 1actions.zil#L3375-L3381<+ ,STRENGTH-MIN </ ,SCORE </ ,SCORE-MAX <- ,STRENGTH-MAX ,STRENGTH-MIN>>>>>Zork I source code (Infocom ZIL) · 1actions.zil#L3383-L3397<SET TMP <- .OD <GET .OO ,V-BEST-ADV>>>Zork I source code (Infocom ZIL) · 1dungeon.zil#L2644-L2645<PUT ,DEF1-RES 1 <REST ,DEF1 2>>Checked by claude, 2026-10-22 — worked HERO-BLOW by hand: troll 2 − 1 = 1, attacker 2 → DEF1-RES slot 1 = DEF1 from entry 1, entries 1–9; thief 5 − 1 = 4, 2 − 4 = −2 → DEF3-RES slot 0 = DEF3A, entries 0–8; RANDOM 9 is 1–9, less 1VILLAIN-RESULT stores the strength the blow was worked against (bane included) back on the villain, so later blows start from it (1actions.zil L3566-L3567).
Cited by: Zork I