Go to the documentation of this file.
52 assert(
map->map != NULL);
164 if (!PyArg_Parse(
value,
"s", &val))
197 if (!PyArg_ParseTuple(
args,
"ii", &
x, &
y))
214 if (!PyArg_ParseTuple(
args,
"sii", &txt, &
x, &
y))
236 if (!PyArg_ParseTuple(
args,
"s(ii)", &what, &
x, &
y))
292 if (!PyArg_ParseTuple(
args,
"i", &change))
330 if (!
map->map->buttons) {
332 PyErr_SetString(PyExc_ReferenceError,
"No objects connected to that ID on this map.");
335 for (olp =
map->map->buttons; olp; olp = olp->
next) {
344 PyErr_SetString(PyExc_ReferenceError,
"No objects with that connection ID on this map.");
357 return left->
map < right->
map ? -1 : (left->
map == right->
map ? 0 : 1);
366 Py_INCREF(Py_NotImplemented);
367 return Py_NotImplemented;
371 if (
result == -1 && PyErr_Occurred())
394 return PyBool_FromLong(
result);
415 return (PyObject *)
self;
423 if (self->map && self->valid) {
426 Py_TYPE(
self)->tp_free(
obj);
447 if (wrapper != NULL) {
456 return (PyObject *)wrapper;
477 { NULL, NULL, NULL, NULL, NULL }
481 {
"Print", (PyCFunction)
Map_Message, METH_VARARGS, NULL },
484 {
"Check", (PyCFunction)
Map_Check, METH_VARARGS, NULL },
485 {
"Next", (PyCFunction)
Map_Next, METH_NOARGS, NULL },
486 {
"Insert", (PyCFunction)
Map_Insert, METH_VARARGS, NULL },
490 { NULL, NULL, 0, NULL }
499 PyObject_HashNotImplemented,
500 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
static void add_map_assoc(mapstruct *key, Crossfire_Map *value)
region * cf_map_get_region_property(mapstruct *map, int propcode)
#define MAPEXISTCHECK_INT(map)
void cf_log(LogLevel logLevel, const char *format,...)
int cf_map_get_height(mapstruct *map)
static PyObject * Map_GetDifficulty(Crossfire_Map *whoptr, void *closure)
sstring cf_map_get_sstring_property(mapstruct *map, int propcode)
#define CFAPI_MAP_PROP_TMPNAME
static void free_map_assoc(mapstruct *key)
int cf_map_get_int_property(mapstruct *map, int property)
int cf_map_get_players(mapstruct *map)
static int Map_SetPath(Crossfire_Map *whoptr, PyObject *value, void *closure)
static PyObject * Map_Insert(Crossfire_Map *map, PyObject *args)
#define CFAPI_MAP_PROP_NEXT
static PyObject * Map_GetHeight(Crossfire_Map *whoptr, void *closure)
object * cf_create_object_by_name(const char *name)
int cf_map_get_reset_time(mapstruct *map)
static PyObject * Map_ChangeLight(Crossfire_Map *map, PyObject *args)
object * cf_map_insert_object_around(mapstruct *where, object *op, int x, int y)
static PyGetSetDef Map_getseters[]
#define MAP_PLAYER_UNIQUE
object * cf_map_insert_object(mapstruct *where, object *op, int x, int y)
CF_PYTHON_OBJECT(Map, Crossfire_Map_dealloc, &MapConvert, PyObject_HashNotImplemented, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, "Crossfire maps",(richcmpfunc) Crossfire_Map_RichCompare, MapMethods, Map_getseters, NULL, Crossfire_Map_new)
#define CFAPI_MAP_PROP_UNIQUE
void Handle_Map_Unload_Hook(Crossfire_Map *map)
static PyObject * Map_GetEnterY(Crossfire_Map *whoptr, void *closure)
PyObject * Crossfire_Object_wrap(object *what)
static PyObject * Map_GetTempName(Crossfire_Map *whoptr, void *closure)
#define MAPEXISTCHECK(map)
#define CFAPI_MAP_PROP_REGION
static PyObject * Map_GetPath(Crossfire_Map *whoptr, void *closure)
static PyObject * Crossfire_Map_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
object * cf_map_get_object_at(mapstruct *m, int x, int y)
static PyObject * Map_Message(Crossfire_Map *map, PyObject *args)
#define CFAPI_MAP_PROP_MESSAGE
PyObject_HEAD mapstruct * map
int cf_map_get_enter_y(mapstruct *map)
static PyObject * Map_GetUnique(Crossfire_Map *whoptr, void *closure)
static std::map< mapstruct *, Crossfire_Map * > map_assoc_table
TIPS on SURVIVING Crossfire is populated with a wealth of different monsters These monsters can have varying immunities and attack types In some of them can be quite a bit smarter than others It will be important for new players to learn the abilities of different monsters and learn just how much it will take to kill them This section discusses how monsters can interact with players Most monsters in the game are out to mindlessly kill and destroy the players These monsters will help boost a player s after he kills them When fighting a large amount of monsters in a single attempt to find a narrower hallway so that you are not being attacked from all sides Charging into a room full of Beholders for instance would not be open the door and fight them one at a time For there are several maps designed for them Find these areas and clear them out All throughout these a player can find signs and books which they can read by stepping onto them and hitting A to apply the book sign These messages will help the player to learn the system One more always keep an eye on your food If your food drops to your character will soon so BE CAREFUL ! NPCs Non Player Character are special monsters which have intelligence Players may be able to interact with these monsters to help solve puzzles and find items of interest To speak with a monster you suspect to be a simply move to an adjacent square to them and push the double ie Enter your message
#define CFAPI_MAP_PROP_PATH
void cf_map_message(mapstruct *m, const char *msg, int color)
int cf_map_get_reset_timeout(mapstruct *map)
PyObject * Crossfire_Region_wrap(region *what)
int cf_map_get_enter_x(mapstruct *map)
mapstruct * cf_map_get_map_property(mapstruct *map, int propcode)
int cf_map_get_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
#define CFAPI_MAP_PROP_NAME
void cf_map_set_string_property(mapstruct *map, int propcode, const char *value)
static PyObject * Crossfire_Map_Long(PyObject *obj)
static PyObject * Map_GetResetTimeout(Crossfire_Map *whoptr, void *closure)
void cf_map_trigger_connected(objectlink *ol, object *cause, int state)
static PyObject * Map_TriggerConnected(Crossfire_Map *map, PyObject *args)
static PyObject * Map_GetPlayers(Crossfire_Map *whoptr, void *closure)
static Crossfire_Map * find_assoc_pymap(mapstruct *key)
static PyObject * Map_GetFirstObjectAt(Crossfire_Map *map, PyObject *args)
static PyObject * Map_GetResetTime(Crossfire_Map *whoptr, void *closure)
static PyObject * Map_GetRegion(Crossfire_Map *whoptr, void *closure)
static PyMethodDef MapMethods[]
static PyObject * Map_GetDarkness(Crossfire_Map *whoptr, void *closure)
static void ensure_map_in_memory(Crossfire_Map *map)
static void Crossfire_Map_dealloc(PyObject *obj)
static PyObject * Map_Check(Crossfire_Map *map, PyObject *args)
int cf_map_get_difficulty(mapstruct *map)
static PyObject * Map_GetName(Crossfire_Map *whoptr, void *closure)
int cf_map_get_darkness(mapstruct *map)
mapstruct * cf_map_get_map(const char *name, int flags)
static int Map_InternalCompare(Crossfire_Map *left, Crossfire_Map *right)
PyObject_HEAD object * obj
static PyObject * Map_GetMessage(Crossfire_Map *whoptr, void *closure)
PyObject * Crossfire_Map_wrap(mapstruct *what)
static PyObject * Map_GetWidth(Crossfire_Map *whoptr, void *closure)
PyTypeObject Crossfire_ObjectType
object * cf_map_find_by_archetype_name(const char *str, mapstruct *map, int nx, int ny)
static PyObject * Map_GetEnterX(Crossfire_Map *whoptr, void *closure)
int cf_map_get_width(mapstruct *map)
int cf_map_change_light(mapstruct *m, int change)
static PyObject * Map_Next(Crossfire_Map *map, PyObject *args)
static PyObject * Map_CreateObject(Crossfire_Map *map, PyObject *args)
static PyObject * Crossfire_Map_RichCompare(Crossfire_Map *left, Crossfire_Map *right, int op)
static PyObject * Map_InsertAround(Crossfire_Map *map, PyObject *args)
CF_PYTHON_NUMBER_METHODS(Map, Crossfire_Map_Long)
PyTypeObject Crossfire_MapType