An icosahedral crystal containing a number of userful local verbs.
     
     :third_person(string,verb) => substitute kick and kicks in string
     :weather_daytime(string,object) => substitute it and raining
     :audience(object) => is object with a connected player?
" third_person(, ) substitutes the verb for %v in the string. %vs
is substituted by the third-person form of the verb, with some intelligence.";
s = args[1];
v = args[2];
lv = length(v);
if (v[lv] in {"s", "x", "o", "u", "i"})
vs = v + "es";
elseif ((lv >= 2) && (v[lv - 1..lv] in {"ch", "sh"}))
vs = v + "es";
elseif ((lv >= 2) && (v[lv - 1..lv] in {"ay", "ey", "oy", "uy"}))
vs = v + "s";
elseif (v[lv] == "y")
vs = v[1..lv - 1] + "ies";
elseif (i = v in {"be", "have"})
vs = {"is", "has"}[i];
else
vs = v + "s";
endif
s = strsub(s, "%vs", vs);
return strsub(s, "%v", v);
.
weather_daytime:
" weather_daytime(,
audience:
" audience() indicate if a listening player (not self) is in the room with
the object.";
what = args[1];
if ($object_utils:connected(what.location))
return 1;
else
for c in (what.location.contents)
if ((c != what) && $object_utils:connected(c))
return 1;
endif
endfor
endif
return 0;
.