Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

again command reruns the last input, regardless of player. #12

Open
icculus opened this issue Aug 8, 2021 · 1 comment
Open

again command reruns the last input, regardless of player. #12

icculus opened this issue Aug 8, 2021 · 1 comment

Comments

@icculus
Copy link
Owner

icculus commented Aug 8, 2021

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 added a commit that referenced this issue Aug 8, 2021
@icculus
Copy link
Owner Author

icculus commented Aug 8, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant