Report doing anything rule

(A J Mako) #1

The deal is this:

The vault is a room. "The vault is locked. [We] can't get out."

The panic button is a thing in the vault. The description is "Push me if you're stuck."

Pushing the panic button triggers a routine that prints a message after any action the player takes. So…

[code]>PUSH BUTTON
You push the panic button.

An ear splitting klaxon echoes through the vault.

X DOOR
You see nothing special about the door.

An ear splitting klaxon echoes through the vault. It’s getting warm in here.

OPEN DOOR
The door is locked.

An ear splitting klaxon echoes through the vault. It’s getting hot in here. You can’t breathe too good.
[/code]
The trouble is, you can’t seem to write a “report doing something” or “report doing anything” rule. I can write it as an “after doing anything” rule, but that puts the text before the action report, which I don’t want.

I have searched the documentation and can’t find anything that helps.

Any ideas?

(matt w) #2

Would an “Every Turn” rule work?

#3

“Every turn when…” is how I handled this is a couple of games.

Here’s some example code:

The vault is a room. "The vault is locked. [We] can't get out."

The panic button is a thing in the vault. The description is "Push me if you're stuck."

A person can be endangered or safe. A person is usually safe.

The danger level is a number that varies.

Instead of pushing the panic button:
	Now the player is endangered;
	say "You push the panic button.".

Every turn when the player is endangered and the player is in the vault:
	Increment the danger level;
	say "[One of]An ear splitting klaxon echoes through the vault.[or]An ear splitting klaxon echoes through the vault. It's getting warm in here.[or]An ear splitting klaxon echoes through the vault. It's getting hot in here. You can't breathe too good.[stopping]";
	if the danger level is greater than 3:
		end the story saying "You die.".

And example output:

vault
The vault is locked. You can't get out.

You can see a panic button here.

>push the button
You push the panic button.

An ear splitting klaxon echoes through the vault.

>look
vault
The vault is locked. You can't get out.

You can see a panic button here.

An ear splitting klaxon echoes through the vault. It's getting warm in here.

>look
vault
The vault is locked. You can't get out.

You can see a panic button here.

An ear splitting klaxon echoes through the vault. It's getting hot in here. You can't breathe too good.

>wait
Time passes.

An ear splitting klaxon echoes through the vault. It's getting hot in here. You can't breathe too good.



    *** You die. ***
(A J Mako) #4

This is what I came up with about an hour after I posted the question.