37 #define CONV_FROM(xyz) xyz->slaying
38 #define CONV_TO(xyz) xyz->other_arch
39 #define CONV_NR(xyz) (unsigned char)xyz->stats.sp
40 #define CONV_NEED(xyz) (unsigned long)xyz->stats.food
42 static int convert_item(
object *item,
object *converter);
70 if (!strcmp(
CONV_FROM(converter),
"money")) {
86 price_in = cost*item->
value;
108 price_in = item->
value;
114 if (converter->
inv != NULL) {
120 ob_to_copy = converter->
inv;
121 for (ob = converter->
inv->
below, i = 1; ob != NULL; ob = ob->
below, i++) {
130 LOG(
llevError,
"move_creator: Converter doesn't have other arch set: %s (%s, %d, %d)\n", converter->
name ? converter->
name :
"(null)", converter->
map->
path, converter->
x, converter->
y);
144 LOG(
llevError,
"Broken converter %s at %s (%d, %d) in value %d, out value %d for %s\n", converter->
name, converter->
map->
path, converter->
x, converter->
y, price_in, item->
nrof*item->
value, item->
name);
169 "The %s seems to be broken!",
"The %s seems to be broken!",
int is_in_shop(object *ob)
method_ret common_pre_ob_move_on(object *trap, object *victim, object *originator)
#define MSG_TYPE_APPLY_FAILURE
void unflag_inv(object *op, int flag)
object * insert_ob_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
int allow_broken_converters
void draw_ext_info_format(int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char *new_format, const char *old_format,...)
struct archt * other_arch
int rndm(int min, int max)
void remove_ob(object *op)
void init_type_converter(void)
object * create_archetype(const char *name)
void register_move_on(int ob_type, move_on_func method)
static method_ret converter_type_move_on(ob_methods *context, object *trap, object *victim, object *originator)
static int convert_item(object *item, object *converter)
#define FLAG_IS_A_TEMPLATE
object * object_create_clone(object *asrc)
#define QUERY_FLAG(xyz, p)
#define CLEAR_FLAG(xyz, p)
void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags)
object * object_create_arch(archetype *at)
object * insert_ob_in_map(object *op, mapstruct *m, object *originator, int flag)
void common_post_ob_move_on(object *trap, object *victim, object *originator)
object * decrease_ob_nr(object *op, uint32 i)
void LOG(LogLevel logLevel, const char *format,...)
void query_name(const object *op, char *buf, size_t size)
void free_object(object *ob)