This might be a newbie question, as I’m only starting to learn Inform for my first game based on Jack and the Beanstalk. I’d like to make “dig”, “dig hole”, and “dig a hole” attempt to do precisely that, giving a special message in a certain location. It just so happens that one of my locations already has “a hole” as a separate thing. Here’s the relevant code:
[code]Digging is an action applying to nothing. Understand “dig”, “dig hole”, “dig a hole”, “dig a”, “dig in ground”, “dig a hole in the ground”, “dig hole in ground”, “dig a hole in ground”, and “dig hole in the ground” as digging.
Instead of digging:
if the location is Outside the Castle:
say “Any hole you dig in the clouds immediately fills itself in, though I’m proud of you for trying.”;
say “Even if you find suitable place to dig a hole, there really isn’t any point.”
Digging in is an action applying to one thing. Understand “dig [something]” and “dig in [something]” as digging in.
A thing can be diggable or undiggable. A thing is usually undiggable.
Sanity-check digging in an undiggable thing:
if the noun is distant:
instead say “[The noun] [is-are] too far away to even attempt.”;
instead say “You can’t dig into [the noun].”
A storm cloud is scenery in Outside the Castle. Understand “clouds”, “nimbus”, and “cumulonimbus” as the storm cloud. The description is “A tranquil, white and fluffy expanse. There’s no evidence of the raging storm below.” The scent of the storm cloud is “a rainy day, with a hint of car exhaust”. The storm cloud is diggable.
Instead of digging in the storm cloud, say “Any hole you dig in the clouds immediately fills itself in, though I’m proud of you for trying.”
A peephole is scenery in Outside the Castle. Understand “hole”, “watch hole”, “aperture”, and “opening” as the peephole. The description is “I’d guess it to be a peephole in the door to spot salespeople and proselytizers, as even a castle in the sky won’t protect you. This one looks large enough for a person to fit through.” The peephole is distant.[/code]
Interestingly enough, “dig hole” is recognized as “digging”, but “dig a hole” is recognized as “digging in (the peephole)”. For some reason, including the indefinite article won’t allow the understands of digging to override the digging in (I’m really struggling for a better way to phrase the problem, haha). Any help is greatly appreciated!