PickACharacter Fix

Our task is to figure out exactly how PickACharacter will function when it fails to find a matching character. When this happens, PickACharacter will return a value of PHANTOM ( = 31). Phantom is a valid character and any references to this character in subsequence S-code calls will yield valid but incorrect results. The incorrectness of this should be of no concern, because the results will be invalidated by later code.

 

OK, so PickACharacter returns a value of PHANTOM. This value will be placed into either DirObject or IndObject of that consequence. Now all I have to do is check DirObject and IndObject of each consequence for the value PHANTOM. If either matches, then we declare that this is an invalid entry and set the weight of this consequence to zero.

 

There remains a failure mode: what if PickACharacter is used to find somebody who then is used as an intermediary for some later result? Example: Tom decides to kick somebody's girlfriend, so he uses PickACharacter to pick a guy, figuring on kicking that guy's girlfriend. But PickACharacter returns PHANTOM, who has no girlfriend. Nahh, this is too far-fetched.

 

I think that we can run with this.