the-infocom-files / sorcerer

Sorcerer
3 stars 3 forks source link

"FWEEP", "VEZZA" and "GASPAR" work, but "CAST FWEEP", "CAST VEZZA" and "CAST GASPAR" don't #42

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>GASPAR
A sense of peace of mind passes over you.

>CAST GASPAR
You might as well be casting it away as not cast it on something.

This is because V-CAST assumes that all spells require a PRSI. But VEZZA, GASPAR and FWEEP don't.

eriktorbjorn commented 4 years ago

Spellbreaker fixes this with a special case in V-CAST:

        <SET VRB <SPELL-TO-VERB>>
        <COND (<AND <NOT ,PRSI>
                <NOT <EQUAL? .VRB
                     ,V?JINDAK ,V?GIRGOL ,V?LESOCH>>
                <NOT <EQUAL? .VRB ,V?$XEROX>>>
               <TELL
"You must cast that on something." CR>)
              (T
               <PERFORM .VRB ,PRSI>)>

For comparison, this is what Sorcerer does:

        <COND (<NOT ,PRSI>
               <TELL
"You might as well be casting it away as not cast it on something." CR>)
              (T
               <PERFORM .VRB ,PRSI>)>