 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
111 object *tool = NULL, *wannabe_tool =
find_marked_object(applier), *unused_tool = NULL;
112 int current_weapon_is_cursed = 0;
114 if (wannabe_tool && ((wannabe_tool->attacktype &
AT_FIRE) || wannabe_tool->type ==
LIGHTER)) {
130 if (tmp->stats.food > 0)
144 if (tmp->attacktype &
AT_FIRE) {
152 current_weapon_is_cursed = 1;
177 if (applier->
type ==
PLAYER && current_weapon_is_cursed) {
190 if (old_marked == lightable) {
@ SK_FIRE_MAGIC
Fire magic, unused.
#define QUERY_FLAG(xyz, p)
uint32_t mark_count
Count of marked object.
void register_apply(int ob_type, apply_func method)
Registers the apply method for the given type.
float speed
Frequency of object 'moves' relative to server tick rate.
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
@ SKILL
Also see SKILL_TOOL (74) below.
tag_t count
Unique object number for this object.
static method_ret lightable_type_apply(object *lightable, object *applier, int aflags)
Attempt to find a lighter, wielded fire weapon, or fire spell to light with.
int apply_manual(object *op, object *tmp, int aflag)
Main apply handler.
struct player * contr
Pointer to the player which control this object.
uint8_t subtype
Subtype of object.
uint8_t type
PLAYER, BULLET, etc.
#define FLAG_DAMNED
The object is very cursed.
#define FOR_INV_FINISH()
Finishes FOR_INV_PREPARE().
object * current_weapon
Pointer to the weapon currently used.
@ SK_FLAME_TOUCH
Flame-touch.
object * mark
Marked object.
char method_ret
Define some standard return values for callbacks which don't need to return any other results.
void do_light(object *item, const char *lighter_name, object *applier)
Common code for both lighting an item for applying the lighter and for lighting the lightable object.
#define NDI_UNIQUE
Print immediately, don't buffer.
sstring name
The name of the object, obviously...
@ SKILL_TOOL
Allows the use of a skill.
static uint8_t is_better_lighter(object *current, object *old)
Method to clean up priority calculations.
void init_type_lightable(void)
Initializer for the LIGHTABLE object type.
#define MSG_TYPE_APPLY_FAILURE
Apply OK, but no/bad result.
living stats
Str, Con, Dex, etc.
#define MSG_TYPE_APPLY
Applying objects.
uint32_t attacktype
Bitmask of attacks this object does.
#define FLAG_CURSED
The object is cursed.
object * find_marked_object(object *op)
Return the object the player has marked with the 'mark' command below.
#define FOR_INV_PREPARE(op_, it_)
Constructs a loop iterating over the inventory of an object.