Conditional/Complex Understanding?

I’m looking for a way to make an understand statement which is more complex than Inform usually allows–to be able to understand things only in the context of varying properties and circumstances.

This may not be the best example, as there might be entirely other ways to tackle this problem, but let’s say I wanted to make an “improvised weapons” feature. For this, I might want to do something like:

A thing can be dangerous.
Understand "weapon" as a dangerous thing held by a person.

Now, there would be a ton more to it than that to make an improvised weapon system, of course… let’s not focus on the improvised weapon bit, that’s way too advanced for me, and it’s just a conceit to have some code that “means something” for an example so people know what the heck I’m talking about in my question. Instead, let’s focus on the assumption here such that a dangerous thing shouldn’t be understood as a weapon unless it’s being held at the time, and other things that are held shouldn’t be considered weapons if they are not dangerous.

Inform doesn’t seem to be able to do this natively, as it can only understand kinds without properties or conditions, but perhaps there is an extension to solve for it or some other more round about way to trick it into doing it?

This one’s not too bad; you can just load all your conditions into clauses of the form “when the item described is…” Like this:

Understand "weapon" as a thing when the item described is dangerous and the item described is held by a person.

Working example:

[code]Arena is a room.

A thing can be dangerous. Understand “weapon” as a thing when the item described is dangerous and the item described is held by a person.

Gladiator is a man in Arena. A rock is in the arena. The rock is dangerous. A scythe is in the Arena. The scythe is dangerous. A pillow is in the Arena. The pillow is not dangerous.

Persuasion rule: persuasion succeeds.

Test me with “x weapon/gladiator, get rock/x weapon/gladiator, get pillow/x weapon/gladiator, drop rock/x weapon/gladiator, take all/x weapon”.[/code]

Nevermind, I think… I think it’s this:

A thing can be dangerous.
Understand "weapon" as a thing when the item described is dangerous and the item described is held by a person.

That darn “the item described” idiom… :slight_smile:

I was ninja’d and a noob…