72 if (creator->
inv != NULL) {
77 ob_to_copy = creator->
inv;
80 if (
rndm(0, i) == 0) {
90 LOG(
llevError,
"move_creator: Creator doesn't have other arch set: %s (%s, %d, %d)\n", creator->
name ? creator->
name :
"(null)", creator->
map->
path, creator->
x, creator->
y);
104 if (creator->
level != 0)
#define INS_BELOW_ORIGINATOR
Insert new object immediately below originator.
struct archetype * arch
Pointer to archetype.
static void move_creator(object *creator)
Move function for creator objects.
void object_unset_flag_inv(object *op, int flag)
Desactivate recursively a flag on an object inventory.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
int rndm(int min, int max)
Returns a number between min and max.
#define FLAG_IS_FLOOR
Can't see what's underneath this object.
sstring slaying
Which race to do double damage to.
int16_t y
Position in the map for this object.
Do minimal adjustments, don't make artifacts, and so on.
Global type definitions and header inclusions.
void register_process(int ob_type, process_func method)
Registers the process method for the given type.
object * object_create_clone(object *asrc)
Create clone from object to another.
char method_ret
Define some standard return values for callbacks which don't need to return any other results...
int16_t level
Level of creature or object.
char path[HUGE_BUF]
Filename of the map.
#define QUERY_FLAG(xyz, p)
void init_type_creator(void)
Initializer for the creator object type.
void object_free_drop_inventory(object *ob)
Frees everything allocated by an object, removes it from the list of used objects, and puts it on the list of free objects.
int ob_blocked(const object *ob, mapstruct *m, int16_t x, int16_t y)
Returns true if the given object can't fit in the given spot.
#define FLAG_IS_A_TEMPLATE
Object has no ingame life until instantiated.
static method_ret creator_type_process(object *op)
Processes a creator.
#define FREE_AND_CLEAR_STR(xyz)
Release the shared string, and set it to NULL.
living stats
Str, Con, Dex, etc.
struct mapstruct * map
Pointer to the map in which this object is present.
static const flag_definition flags[]
Flag mapping.
object * object_create_arch(archetype *at)
Create a full object using the given archetype.
void register_trigger(int ob_type, trigger_func method)
Registers the trigger method for the given type.
struct archetype * other_arch
Pointer used for various things - mostly used for what this objects turns into or what this object cr...
#define FREE_AND_COPY(sv, nv)
Release the shared string if not NULL, and make it a reference to nv.
void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags)
fix_generated_item(): This is called after an item is generated, in order to set it up right...
sstring name
The name of the object, obviously...
sstring title
Of foo, etc.
#define CLEAR_FLAG(xyz, p)
#define FLAG_LIFESAVE
Saves a players' life once, then destr.
object * inv
Pointer to the first object in the inventory.
archetype * more
Next part of a linked object.
static method_ret creator_type_trigger(object *op, object *cause, int state)
A creator is triggered.
#define FOR_BELOW_PREPARE(op_, it_)
Constructs a loop iterating over all objects below an object.
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
Same as object_insert_in_map() except it handle separate coordinates and do a clean job preparing mul...
Object type functions and variables.
#define FOR_BELOW_FINISH()
Finishes FOR_BELOW_PREPARE().
#define FLAG_FREED
Object is in the list of free objects.