Referencing the parent of a part

I have the following code in my IFComp 2020 game:

A costume is a kind of thing. A costume is always wearable.

A costume can be stinky or not stinky. A costume is usually stinky. A costume has some text called the smell. The smell of a costume is usually "like onions".

The aristocrat costume is a costume. The description of the aristocrat costume is "You obtained these cufflinks completely legitimately, however surprising that may be. The rest of the ensemble is not far from your day-to-day dress." Understand "cufflinks" or "cufflink" as the aristocrat costume. The smell of the aristocrat costume is "like mothballs"

I want people to be able to smell costumes, which is easy:

Instead of smelling a costume:
	say "You take a few sniffs. It smells like [the smell of the noun]."

But how can I make the parts of the costume smell like the parent? Is there some kind of code like:

Instead of smelling part of (parent - a costume):
   blah blah blah

Or is this sort of thing not possible? I can do it by hand, but it’ll be less robust to changes.

1 Like
Instead of smelling something which is part of a costume (called C):
	say "You take a few sniffs. It smells like [the smell of C]."
1 Like