61 int oldmagic = armour->
magic;
65 "This armour can not be enchanted any further.");
76 "This armour will not accept further enchantment.");
90 "You can't enchant this armour without unapplying it because it would consume your soul!");
111 if (armour->
weight <= 0) {
112 LOG(
llevInfo,
"Warning: enchanted armours can have negative weight\n.");
154 "Something blocks the magic of the scroll.");
160 "You need to mark an armor object.");
171 "Your marked item is not armour!");
176 "Applying armour enchantment.");
#define AP_UNAPPLY
Item is to be remvoed.
int apply_special(object *who, object *op, int aflags)
Apply an object.
int8_t item_power
Power rating of the object.
object * object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
object_split(ob,nr) splits up ob into two parts.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
static method_ret armour_improver_type_apply(object *lighter, object *applier, int aflags)
Applies a scroll of Enchant Armour.
#define P_NO_MAGIC
Spells (some) can't pass this object.
void fix_object(object *op)
Updates all abilities given by applied objects in the inventory of the given object.
static void improve_armour(object *op, object *improver, object *armour)
This code deals with the armour improvment scrolls.
void esrv_update_item(int flags, object *pl, object *op)
Updates object *op for player *pl.
int armor_max_enchant
Maximum number of times an armor can be enchanted.
int16_t y
Position in the map for this object.
int8_t magic
Any magical bonuses to this item.
Global type definitions and header inclusions.
struct player * contr
Pointer to the player which control this object.
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
Sends message to player(s).
#define MSG_TYPE_APPLY
Applying objects.
int32_t weight
Attributes of the object.
char method_ret
Define some standard return values for callbacks which don't need to return any other results...
void init_type_armour_improver(void)
Initializer for the ARMOUR_IMPROVER object type.
int16_t level
Level of creature or object.
#define QUERY_FLAG(xyz, p)
#define MSG_TYPE_APPLY_ERROR
void set_abs_magic(object *op, int magic)
Sets magical bonus in an object, and recalculates the effect on the armour variable, and the effect on speed of armour.
struct Settings settings
Global settings.
object * find_marked_object(object *op)
Return the object the player has marked with the 'mark' command below.
struct mapstruct * map
Pointer to the map in which this object is present.
#define object_decrease_nrof_by_one(xyz)
#define FLAG_WIZCAST
The wizard can cast spells in no-magic area.
sstring title
Of foo, etc.
uint32_t nrof
Number of objects.
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
This rolls up wall, blocks_magic, blocks_view, etc, all into one function that just returns a P_...
uint8_t type
PLAYER, BULLET, etc.
#define FLAG_APPLIED
Object is ready for use by living.
#define MSG_TYPE_APPLY_SUCCESS
Was able to apply object.
#define NDI_UNIQUE
Print immediately, don't buffer.
int16_t item_power
Total item power of objects equipped.
object * object_insert_in_ob(object *op, object *where)
This function inserts the object op in the linked list inside the object environment.
Object type functions and variables.
float item_power_factor
See note in setings file.
void register_apply(int ob_type, apply_func method)
Registers the apply method for the given type.