Crossfire Server, Trunk
|
#include <global.h>
#include <ob_methods.h>
#include <ob_types.h>
#include <sounds.h>
#include <sproto.h>
#include <string.h>
#include <stdlib.h>
Go to the source code of this file.
Functions | |
void | init_type_mimic (void) |
static method_ret | mimic_type_apply (object *op, object *applier, int aflags) |
static const char * | object_try_get_value (object *op, const char *key) |
void init_type_mimic | ( | void | ) |
Initializer for MIMIC type.
Definition at line 43 of file mimic.cpp.
References MIMIC, mimic_type_apply(), and register_apply().
Referenced by register_all_ob_types().
|
static |
Implementation of mimics This should be usable for any item masquerading as a container (or other item, for that matter) that activates when you try to pick it up or apply it.
Handles applying a mimic. It just becomes a monster and gains an animation.
op | The object being applied |
applier | The object doing the applying |
aflags | Special flags |
METHOD_UNHANDLED | If a non-player tries to open it. |
METHOD_OK | If a player does the opening. |
Definition at line 61 of file mimic.cpp.
References draw_ext_info(), draw_ext_info_format(), env, FABS, find_animation(), FLAG_ALIVE, FLAG_ANIMATE, FLAG_MONSTER, FREE_AND_COPY, freearr_x, freearr_y, level, MAX_BUF, METHOD_OK, METHOD_UNHANDLED, MIMIC, MONSTER, MSG_TYPE_APPLY, MSG_TYPE_APPLY_FAILURE, MSG_TYPE_APPLY_SUCCESS, give::name, NDI_UNIQUE, object_find_free_spot(), object_insert_in_map_at(), object_insert_in_ob(), object_remove(), object_try_get_value(), give::op, PLAYER, query_name(), SET_FLAG, SIZEOFFREE, object::type, and nlohmann::detail::void().
Referenced by init_type_mimic().
|
inlinestatic |
Definition at line 47 of file mimic.cpp.
References castle_read::key, object_get_value(), and give::op.
Referenced by mimic_type_apply().