mojozork icon indicating copy to clipboard operation
mojozork copied to clipboard

`again` command reruns the last input, regardless of player.

Open icculus opened this issue 4 years ago • 1 comments

It's not uncommon to do kill troll with sword and then keep typing the shorter again until the fight is done.

But again is rerunning whatever the last input was, whether it came from the current player or not. Figure out where it stores this and track it per-player (or maybe handle it in inpfn_ingame?).

icculus avatar Aug 08 '21 19:08 icculus

I put in a hack for this for now, which is enough to not disrupt things, but I'm leaving this issue open for now because it would be better to actually track the Z-Machine bits that handle this, because, for example:

>kill troll
(with the sword)
The troll is confused and can't fight back.
The troll slowly regains his feet.

>again 
(with the sword)
Your sword misses the troll by an inch.
The troll's axe barely misses your ear.

When letting Zork parse again directly, it knows not to say (with the sword) on this second attempt.

icculus avatar Aug 08 '21 23:08 icculus