In Zork I, there’s supposed to be a mechanic whereby you can give the thief a treasure and temporarily reduce his strength to 2. The thief’s strength is initially 5, so doing this would offer a big advantage in combat. The trouble is, it doesn’t seem to work. I can see the flag getting set, but it always becomes unset again by the time the game accepts the next player input. Has anyone been able to make this game mechanic work as it is evidently intended to?
There’s a global flag at the center of this called THIEF-ENGROSSED. It becomes set in ROBBER-FUNCTION when you give the thief a treasure (an object with P?TVALUE > 0):
<MOVE ,PRSO ,THIEF>
<COND (<G? <GETP ,PRSO ,P?TVALUE> 0>
<SETG THIEF-ENGROSSED T>
<TELL
"The thief is taken aback by your unexpected generosity, but accepts
the " D ,PRSO " and stops to admire its beauty." CR>)
(T
<TELL
"The thief places the " D ,PRSO " in his bag and thanks
you politely." CR>)>
The commentary in The Visible Zorker has this to say:
glob:THIEF-ENGROSSED- Set if you have distracted the thief by giving him a treasure. This reduces his effective strength to 2 (see
VILLAIN-STRENGTH), but only for the next blow.rtn:VILLAIN-STRENGTH- Determine the combat strength of an enemy. This is their
STRENGTHproperty, with a couple of adjustments. The thief and troll are weaker against certain weapons (seeVILLAINS), so their strength is decreased if the current action is...WITH SWORDor...WITH KNIFE. Also you can distract the thief and temporarily reduce his strength by giving him a treasure!
We see the THIEF-ENGROSSED flag taking effect in the VILLAIN-STRENGTH routine:
<COND (<AND <EQUAL? .VILLAIN ,THIEF> ,THIEF-ENGROSSED>
<COND (<G? .OD 2> <SET OD 2>)>
<SETG THIEF-ENGROSSED <>>)>
This says: if the thing being attacked is the thief, and the THIEF-ENGROSSED flag is set, set the effective strength variable OD to be no greater than 2, and unset THIEF-ENGROSSED. It’s not a permanent change to the thief’s strength: it only affects the return value of one call to VILLAIN-STRENGTH (which is called from HERO-BLOW and from VILLAIN-BLOW).
But I cannot get THIEF-ENGROSSED to take effect for even one action. You can see it for yourself in The Visible Zorker. Click on the State button and scroll down to THIEF-ENGROSSED. Copy and paste the below two lines (one at a time, because of input length limits) to fetch the jeweled egg and deliver it to the thief. You may have to restart a few times until you win the troll fight and avoid getting insta-killed by the thief.
n.n.u.get egg.d.s.e.open.w.w.get all.light.tug rug.open it.d.n.hit troll.g.g.g
w.w.w.u.sw.e.s.se.odysseus.u.give egg
At the end, you will see the output associated with THIEF-ENGROSSED getting set,
The thief is taken aback by your unexpected generosity, but accepts the jewel-encrusted egg and stops to admire its beauty.
but by the time the game prompts you for your next turn, the State tab shows THIEF-ENGROSSED:0. I suspect it’s because of the one of the two places in I-FIGHT where THIEF-ENGROSSED is unconditionally cleared.
With the player at strength 2, and the thief at strength 2, attacking with the sword (which gives no advantage against the thief), the combat roll should use the first 9 elements of the DEF2B table, in which it is just possible (1/9 chance) to get an UNCONSCIOUS result. With the player at strength 2, and the thief at strength 5, an UNCONSCIOUS result is impossible.
As far as I can tell, the only real effect of the THIEF-ENGROSSED mechanic is that you won’t be attacked on the turn that you give the thief a treasure. It doesn’t confer a combat advantage on the next turn. But I would love to be wrong about this.