So, I have this following piece of code:
"argh"
include the inform ATTACK by Victor Gijsbers.
a body part is a kind of thing.
a body part can be intact or severed.
a body part is usually intact.
[a body part is usually singular-named and proper-named.]
a body part has a number called resilience.
resilience of a body part is usually 1.
left arm is a kind of body part.
a humanoid is a kind of person.
a body part (called left arm) are part of every humanoid.
a body part (called right arm) are part of every humanoid.
a body part (called left leg) are part of every humanoid.
a body part (called right leg) are part of every humanoid.
a body part (called torso) are part of every humanoid.
a body part (called groin) are part of every humanoid.
a body part (called head) are part of every humanoid.
understand "aim [who] at [what]" as aiming.
aiming is an action applying to two things.
the aiming action has an body part called what (matched as "at").
check aiming:
take no time.
if the noun is not a humanoid:
say "You can aim only opponents" instead.
[ if the second noun is not a body part,
say "[noun] has no [second noun]" instead.
]
Carry out aiming with second noun as a body part:
take no time.
now what is severed.
now what is in the cave.
report aiming:
say "You sever it!".
The goblin is a humanoid.
the cave is a room. The player is in the cave.
The health of the player is 20.
The player carries a sword.
The goblin is in the cave. The goblin carries a mace.The melee of the goblin is -1. The goblin is hostile.
compiler says:
This is the report produced by Inform 7 (build 6G60) on its most recent run through:
Problem. You wrote 'the aiming action has an body part called what (matched as "at")' , but 'what' already has a meaning, which this would clash with.
Am I missing something, since as I see ‘what’ is not defined anywhere else.