 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
54 LOG(
llevError,
"peacemaker_type_process: peacemaker object %s has no owner\n", op->
name);
75 if (
rndm(0, atk_lev-1) > def_lev) {
87 "%s no longer feels like fighting.",
object * object_get_owner(object *op)
Returns the object which this object marks as being the owner.
#define FOR_MAP_FINISH()
Finishes FOR_MAP_PREPARE().
static method_ret peacemaker_type_process(object *op)
Handle ob_process for all peacemaker objects.
@ llevError
Error, serious thing.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
#define QUERY_FLAG(xyz, p)
uint16_t attack_movement
What kind of attack movement.
void init_type_peacemaker(void)
Initializer for the peacemaker object type.
struct mapstruct * map
Pointer to the map in which this object is present.
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
int rndm(int min, int max)
Returns a number between min and max.
void register_process(int ob_type, process_func method)
Registers the process method for the given type.
int16_t level
Level of creature or object.
#define MSG_TYPE_SPELL_SUCCESS
Spell succeeded messages.
int16_t y
Position in the map for this object.
#define FLAG_RUN_AWAY
Object runs away from nearest player \ but can still attack at a distance.
#define HEAD(op)
Returns the head part of an object.
@ PEACEMAKER
Object owned by a player which can convert a monster into a peaceful being incapable of attack.
void object_free(object *ob, int flags)
Frees everything allocated by an object, removes it from the list of used objects,...
void change_exp(object *op, int64_t exp, const char *skill_name, int flag)
Changes experience to a player/monster.
#define FLAG_UNAGGRESSIVE
Monster doesn't attack players.
#define MSG_TYPE_SPELL
Spell related info.
#define FLAG_MONSTER
Will attack players.
#define FLAG_RANDOM_MOVE
NPC will move randomly.
#define FOR_MAP_PREPARE(map_, mx_, my_, it_)
Constructs a loop iterating over all objects of a map tile.
char method_ret
Define some standard return values for callbacks which don't need to return any other results.
#define NDI_UNIQUE
Print immediately, don't buffer.
sstring name
The name of the object, obviously...
sstring skill
Name of the skill this object uses/grants.
#define CLEAR_FLAG(xyz, p)
void object_remove(object *op)
This function removes the object op from the linked list of objects which it is currently tied to.
living stats
Str, Con, Dex, etc.
#define RANDO2
Constantly move in a different random direction.