Smell restrictions (JACL example)

From IFWiki

#!../bin/jacl

constant 	GAME_VERSION	1

string		GAME_TITLE		"Smell Restrictions"

location street : street
   has		OUTDOORS
   short	the "street"
   down		sewer

{look
write "You are in the street. The sewer is below you.^"
}

object flowers : flowers
   has		PLURAL
   short	some "flowers"
   long		"There are some flowers here."
   mass		2

{smell
if here = sewer
   print:
      The disgusting reek of the sewage overwhelms your nose.
      You can't smell anything else.^
   .
   return true
endif
write "They smell wonderful.^"
}

object spacesuit : spacesuit space suit 
   has		WEARABLE
   short	a "spacesuit"
   long		"A spacesuit rests nearby."
   mass		5

location sewer : sewer
   short	the "sewer"
   up		street

{look
write "You are in the sewer. The street is above you.^"
}

object sewage : sewage
   short	some "sewage"
   long		"Sewage flows through here."
   mass		heavy
 
{smell
write "It reeks.^"
}

{+before_smell
if noun1 = spacesuit : noun1 = kryten
   write "You smell nothing unsual about " noun1{the} ".^"
   return true
endif
if spacesuit has WORN
   write "You can't smell anything while wearing the spacesuit.^"
   return true
endif
return false   
}

{+intro
clear
write ^^ GAME_TITLE ^^
look
}

object kryten: myself self me
 has		ANIMATE
 short		name "yourself"
 quantity	42
 parent		street
 player

#include "verbs.library"