VerifyResultclass | verify.t[55] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
It is important to understand that the purpose of verification results is to guess what's in the player's mind, not to reflect the full internal state of the game. We use verification results to figure out what a player means with a command, so if we were to rely on information the player doesn't have, we would not correctly guess the player's intentions. So, in choosing a verification result, only information that ought to be obvious to the player should be consdidered.
For example, suppose we have a closed door; suppose further that the door happens to be locked, but that there's no way for the player to see that just by looking at the door. Now, if the player types "close door," we should return "currently illogical" - common sense tells the player that the door is something that can be opened and closed, so we wouldn't return "always illogical," but the player can plainly see that the door is already closed and thus would know that it makes no sense to close it again. In other words, the player would conclude looking at the door that closing it is currently illogical, so that's the result we should generate.
What if the player types "open door," though? In this case, should we return "currently illogical" as well, because the door is locked? The answer is no. We know that the command won't succeed because we know from looking at the internal game state that the door is locked, but that doesn't matter - it's what the *player* knows that's important, not what the internal game state tells us. So, what should we return here? It might seem strange, but the correct result is "logical" - as far as the player is concerned, the door is something that can be opened and closed, and it is currently closed, so it makes perfect sense to open it.
class
VerifyResult : MessageResult
VerifyResult
MessageResult
object
VerifyResult
DangerousVerifyResult
IllogicalNowVerifyResult
IllogicalAlreadyVerifyResult
IllogicalVerifyResult
IllogicalSelfVerifyResult
InaccessibleVerifyResult
LogicalVerifyResult
NonObviousVerifyResult
allowAction
excludePluralMatches
resultRank
Inherited from MessageResult
:
messageProp_
messageText_
compareTo
identicalTo
isWorseThan
shouldInsertBefore
Inherited from MessageResult
:
construct
resolveMessageText
setMessage
showMessage
allowAction | verify.t[60] |
excludePluralMatches | verify.t[152] |
resultRank | verify.t[144] |
To allow easy insertion of new library extension result types or game-specific result types, we assign widely spaced rankings to the pre-defined results. This is arbitrary; the only thing that matters in comparing two results is the order of the rank values.
compareTo (other) | verify.t[96] |
identicalTo (other) | verify.t[127] |
isWorseThan (other) | verify.t[86] |
shouldInsertBefore (other) | verify.t[108] |