Open eriktorbjorn opened 5 years ago
On second thought, this may be the kind of change that should either just be documented, or in a separate branch, since it changes the behavior of the original game. (Even if it is to restore a feature from the original original game.)
This isn't a bug, but...
The game still contains all the messages for fighting with the cyclops, even though you can't fight him. (I believe you could in the MDL version). Should this be re-enabled?
One reason why you can't fight him is because of how it iterates through the
VILLAIN
table, i.e. this one:It's an
LTABLE
so element 0 contains the number of elements (3), and elements 1-3 contain the data for the troll, thief and cyclops respectively.It iterates through the table in
DO-FIGHT
,HERO-BLOW
andI-FIGHT
, and they all use the same general pattern:Where
LEN
has previously been set to<GET ,VILLAINS 0>
andCNT
to 0.That means it will look at element 1 (the troll) and 2 (the thief), but when it gets to 3 (the cyclops) it will terminate without doing anything with it. (This actually caused a bug in the older version of Mini-Zork I. The entry for the cyclops had been removed, so you couldn't attack the thief.)
So at the very least, to enable cyclops fighting you'd have to go through the routines mentioned above and change
<EQUAL? .CNT .LEN>
to<G? .CNT .LEN>
.That's not enough, though. The cyclops is unarmed, so attacking him kills him instantly. So you'd have to change the
<OR <NOT .DWEAPON> <L? .DEF 0>>
check inHERO-BLOW
, I guess.And you'd have to remove the
ATTACK
case fromCYCLOPS-FCN
, of course.I don't know if that's enough, but it wasn't obviously broken at a quick test... Except for some reason, I got "The cyclops doesn't take kindly to being grabbed." whenever I picked up my sword again after he disarmed me. Weird.