Crossfire Server, Branch 1.12
R12190
|
Armour improvement scrolls. More...
#include <global.h>
#include <ob_methods.h>
#include <ob_types.h>
#include <sounds.h>
#include <sproto.h>
Go to the source code of this file.
Functions | |
static method_ret | armour_improver_type_apply (ob_methods *context, object *scroll, object *applier, int aflags) |
Applies a scroll of Enchant Armour. | |
static void | improve_armour (object *op, object *improver, object *armour) |
This code deals with the armour improvment scrolls. | |
void | init_type_armour_improver (void) |
Initializer for the ARMOUR_IMPROVER object type. |
Armour improvement scrolls.
Definition in file armour_improver.c.
static method_ret armour_improver_type_apply | ( | ob_methods * | context, |
object * | scroll, | ||
object * | applier, | ||
int | aflags | ||
) | [static] |
Applies a scroll of Enchant Armour.
context | method context. |
scroll | scroll to apply. |
applier | object attempting to apply the scroll. Should be a player. |
aflags | special flags (always apply/unapply). |
Definition at line 165 of file armour_improver.c.
References ARMOUR, BOOTS, BRACERS, CLOAK, draw_ext_info(), find_marked_object(), FLAG_WIZCAST, get_map_flags(), GLOVES, HELMET, improve_armour(), METHOD_OK, METHOD_UNHANDLED, MSG_TYPE_APPLY, MSG_TYPE_APPLY_ERROR, MSG_TYPE_APPLY_SUCCESS, NDI_UNIQUE, P_NO_MAGIC, PLAYER, QUERY_FLAG, and SHIELD.
Referenced by init_type_armour_improver().
static void improve_armour | ( | object * | op, |
object * | improver, | ||
object * | armour | ||
) | [static] |
This code deals with the armour improvment scrolls.
Change limits on improvement - let players go up to +5 no matter what level, but they are limited by item power. Try to use same improvement code as in the common/treasure.c file, so that if you make a +2 full helm, it will be just the same as one you find in a shop.
op | player improving the armor. |
improver | improvement scroll. |
armour | armour to improve. |
Definition at line 58 of file armour_improver.c.
References AP_UNAPPLY, apply_special(), Settings::armor_max_enchant, Settings::armor_speed_improvement, Settings::armor_speed_linear, Settings::armor_weight_linear, Settings::armor_weight_reduction, ARMOUR_SPEED, decrease_ob, draw_ext_info(), esrv_update_item(), fix_object(), FLAG_APPLIED, get_split_ob(), insert_ob_in_ob(), Settings::item_power_factor, llevInfo, LOG(), MSG_TYPE_APPLY, MSG_TYPE_APPLY_ERROR, NDI_UNIQUE, PLAYER, QUERY_FLAG, settings, UPD_NAME, UPD_NROF, and UPD_WEIGHT.
Referenced by armour_improver_type_apply().
void init_type_armour_improver | ( | void | ) |
Initializer for the ARMOUR_IMPROVER object type.
Definition at line 38 of file armour_improver.c.
References ARMOUR_IMPROVER, armour_improver_type_apply(), and register_apply().
Referenced by register_all_ob_types().