musicmud-2.1.6/data/
musicmud-2.1.6/data/help/
musicmud-2.1.6/data/policy/
musicmud-2.1.6/data/wild/
musicmud-2.1.6/data/world/
musicmud-2.1.6/doc/
musicmud-2.1.6/src/ident/
musicmud-2.1.6/src/lua/
musicmud-2.1.6/src/lua/include/
musicmud-2.1.6/src/lua/src/lib/
musicmud-2.1.6/src/lua/src/lua/
musicmud-2.1.6/src/lua/src/luac/
#ifndef EQ_H
#define EQ_H

#include "teleob.h"
#include "match.h"

//! if /who/ has a wornfrom property or implicitly wornfroms something, return what
MudObject *wornfrom(const MudObject *who);

//! return the weapon /who/ is wielding
MudObject *weapon(MudObject *who);

//! return the abilities of the object /o/
string abilities(MudObject *o);

//! returns true if object is worn
bool is_worn(MudObject *o);

//! c is a 'wornon' value. format this into english.
const char *looknice(const char *c, NewWorld *blah=0);

//! o is an clothing article. call looknice() on its wornon
const char *looknice(MudObject *o, NewWorld *blah=0);

//! obtain a list of clothes worn by /who/, either directly or via a wornfrom
TeleWorld clothes(MudObject *who);

//! if there are any clothes /who/ can't wear, unwear them. if /what/ is given, all stuff that gets removed as a result, gets added to this.
void fixup_lapels(MudObject *who, NewWorld *what);

//! can /what/ swim?
int canswim(MudObject *what);

//! can /what/ walk on dry land?
int canwalk(MudObject *what);

//! return the thing /who/ is riding on?
MudObject *mount(MudObject *who);

//! is /who/ naked?
int is_naked(MudObject *who);

//! replace who's comatose body with /who/, and restore their stuff
void restore_stuff(MudObject *who);

//! returns a clone of /what/ that /who/ is holding
MudObject *holds_clone_of(MudObject *who, MudObject *what);

//! return an object that /who/ is wearing that has /flag/ set (will return /who/ if it has it itself)
MudObject *player_wears_with(MudObject *who, Flag flag);

//! returns how many objects /who/ is carrying with flag /flag/ set. includes self
int holds_flagged_object(MudObject *who, Flag flag);

//! return the number of free inventory slots that /player/ has.
int freehands(MudObject *player);

//! return an object that /who/ is carrying and has /flag/ set.
MudObject *get_flagged_object(MudObject *who, Flag flag);

//! return an object that /by/ is wearing on /what/, with wornlevel>=/wol/
MudObject *worn_on(MudObject *by, const char *what, int wol);

//! return where /what/ is or would be if it isn't, worn.
const char *wornon(MudObject *what);

//! return the archetype of /who/
MudObject *archetype(const MudObject *who);

//! return the intrinsic armour of /which/
int parmour( MudObject * which );

//! return true if /who/ is wearing /what/
bool iswornby(const MudObject *what, const MudObject *who);

//! return true if /who/ is wielding /what/
bool iswieldedby(MudObject *what, MudObject *who);

//! return the sum of all armour /who/ is wearing and has intrinsically
int player_armour(MudObject *who);

//! is this object itself edible?
bool real_is_edible(MudObject *);

//! is this object or its contents if its a container, edible?
bool is_edible(MudObject *);

bool wf_wears_clone_of(MudObject *who, MudObject *c);
MudObject *wf_wears_with_flag(MudObject *who, Flag f);
NewWorld wf_allwearsflag(MudObject *who, Flag f);

#endif