Closed mciul closed 10 years ago
I think you could argue in favor of the brambles dying when everyone is asleep, but you could also argue against it.
I also experienced that, when waking up, it takes an extra turn to be in combat again... I actually had to 'wait' to be able to concentrate...
It seems to me there are two kinds of every turn rules: Rules that happen when time passes, and rules that happen when the state of the game (such as combat) changes. I'm not that familiar with ATTACK's turn system, but maybe the solution could involve separating these two types into separate rulebooks - maybe "when time passes" and "when combat status changes." Combat status changes should include anything that begins or ends combat, and any character dying. Soul absorption should not happen when time passes, it should be checked at least once per "reading a command" activity (or should it be delayed during dreams?).
But maybe I'm doing this backwards. Maybe there are just some errors in which actions take time and which don't. Switching or moving the player should probably take time (and by the way, I've seen some command rejections that do take time... I'll have to check what they are).
We should also search the code for "every turn when the combat status is peace" - maybe there could be "ending combat" and "starting combat" activities instead. I'm not clear on the details of soul absorption, but maybe that should be an activity too.
Another phrase we should search for is "try looking." This is done when a dream ends, and it's problematic because dead bodies haven't been cleaned up yet. This might need to be examined on a case-by-case basis, but there could be a new phrase for moving/changing the player, a "before looking" rule, or a "trigger a new player turn right now" rule... not sure which would work best.
Here are some specific cases that should all behave pretty much the same:
Coming back from the maze Coming back from an Arena Waking up from a dream
I need to take a good look at this. Perhaps there is a need for a new rulebook that runs before the "business as usual rule".
The example you give has to do with our use of the Questions Extension. I'll fix it.
Are you sure that coming back from the maze/arena behaves in the same way?
(That is: I THINK it is due to Questions. I'll be sure once I fix it. ;) )
When you are transported to Arena of the Gods, there is one turn when the combat status is peace (you can't concentrate or attack, even though your opponent is there). When you are transported back, your opponent's dead body shows up in the description of Hall of Gods, although it's already gone by the time your command is read.
OK, I fixed the cases where you would return from a question menu -- i,e, the dreams. I'll take a look at what happens in the arenas next, it might be something different.
The case where you go to the Arena has been fixed as well, because that too was due to having a menu before it.
I think I've solved all of this. Please open a new bug if you see something like this happening again -- it will probably be something new, and worthy of its own issue.
Although the every turn rules now run at the end of a turn when waking from a dream, the beginning of the turn still isn't quite right. Here's an example where I threw a Morphean grenade while fighting Bodmall. This is the turn where I woke up:
Portal Room A huge empty portal dominates the room.
Huge brambles are everywhere.
Bodmall lies on the ground, sleeping.
Exits lead north and east (to the workshop of the blademaster).
The brambles wither and die.
> c You can only concentrate in a combat situation.
Act> c You are now mildly concentrated. The lace of your bodice tightens uncomfortably.
Bodmall sleeps peacefully.