Go to the documentation of this file.
19 #define _GNU_SOURCE // strcasestr() is a GNU extension in string.h
49 tmp->level =
op->level;
51 tmp->duration += lvl/5;
58 if (
tmp->duration >= 40)
61 tmp->stats.maxhp =
tmp->count;
62 if (
tmp->stats.maxhp == 0)
81 int recharge(
object *
op,
object *caster,
object *spell_ob) {
87 if (wand == NULL || wand->
type !=
WAND) {
89 "You need to mark the wand you want to recharge.");
95 "The %s vibrates violently, then explodes!",
104 tmp->stats.hp =
tmp->stats.dam/2;
105 if (
tmp->stats.hp < 2)
117 "Your %s is broken.",
127 "The %s glows with power.",
161 int x =
op->x,
y =
op->y, numat = 0, choice, friendly;
190 choice =
rndm(0, numat-1);
258 "The %s glow red, melt and evaporate!",
262 "The %s glows red, melts and evaporates!",
281 int max_value, difficulty, tries = 0, choice, charges =
op->stats.food, numat = 0;
287 max_value =
op->value*2;
288 if (max_value > 2000*(
level/10))
289 max_value = 2000*(
level/10)+(max_value-2000*(
level/10))/3;
308 difficulty =
op->magic*5;
313 choice =
rndm(0, numat-1);
331 }
while (new_ob->
value > max_value && tries < 10);
333 LOG(
llevError,
"polymorph_item: fix_generated_object made %s invisible?!\n", new_ob->
name);
345 if (
op->nrof && new_ob->
nrof) {
348 if (new_ob->
nrof > 2)
356 op->stats.food = charges;
436 int range, mflags, maxrange,
level;
444 for (range = 1; range < maxrange; range++) {
503 int missile_plus = 0, bonus_plus = 0;
504 const char *missile_name;
505 object *
tmp, *missile;
509 missile_name =
tmp != NULL ?
tmp->race :
"arrow";
513 if (!strcmp(missile_name,
"arrows"))
514 missile_name =
"arrow";
515 else if (!strcmp(missile_name,
"crossbow bolts"))
516 missile_name =
"bolt";
519 if ( stringarg && strncmp(stringarg,
"of ",3)==0 ) stringarg +=3;
520 if ( stringarg && strncmp(stringarg,
"bolt",4)==0 ) {
521 missile_name =
"bolt";
523 while ( isalpha(*stringarg) ) ++stringarg;
524 while ( *stringarg==
' ' ) ++stringarg;
526 if ( stringarg && strncmp(stringarg,
"arrow",5)==0 ) {
527 missile_name =
"arrow";
529 while ( isalpha(*stringarg) ) ++stringarg;
530 while ( *stringarg==
' ' ) ++stringarg;
534 LOG(
llevDebug,
"Cast create_missile: could not find archetype %s\n", missile_name);
539 if ( stringarg && strncmp(stringarg,
"of ",3)==0 ) stringarg +=3;
542 if (isalpha(*stringarg)) {
545 for (; al != NULL; al = al->
next)
552 "No such object %ss of %s",
553 missile_name, stringarg);
559 "You are not allowed to create %ss of %s",
560 missile_name, stringarg);
570 }
else if (atoi(stringarg) < missile_plus)
571 missile_plus = atoi(stringarg);
573 if (missile_plus > 4)
575 else if (missile_plus < -4)
579 if (missile->
nrof <= (uint32_t)3 * (missile_plus + bonus_plus)) {
582 "This item is too powerful for you to create!");
585 missile->
nrof -= 3*(missile_plus+bonus_plus);
586 if (missile->
nrof < 1)
589 missile->
magic = missile_plus;
672 "You don't have enough experience to create any food.");
679 new_op->
nrof = food_value;
682 if (new_op->
nrof < 1)
707 int probe(
object *
op,
object *caster,
object *spell_ob,
int dir,
int level) {
708 int r, mflags, maxrange;
716 for (
r = 1;
r < maxrange;
r++) {
727 "Something blocks your magic.");
734 "You detect something.");
742 "You detect nothing.");
814 if (
op->invisible > 1000) {
816 "You can not extend the duration of your invisibility any further");
825 if (
op->invisible > 1000)
826 op->invisible = 1000;
829 if (
op->contr->invis_race)
834 op->contr->tmp_invis = 0;
836 op->contr->tmp_invis = 1;
838 op->contr->hidden = 0;
842 "You can't see your hands!");
845 "You feel more transparent!");
853 if (
tmp->enemy ==
op)
873 int range, i, j, mflags;
882 for (i = -range; i < range; i++)
883 for (j = -range; j < range; j++) {
932 "You feel a force starting to build up inside you.");
939 "Oops, program error!");
940 LOG(
llevError,
"cast_word_of_recall: create_archetype(force) failed!\n");
951 dummy->
speed = 0.002;
966 "You feel a force starting to build up inside you.");
994 LOG(
llevError,
"cast_wonder: Unable to get a spell!\n");
998 LOG(
llevError,
"cast_wonder: spell returned is not a spell (%d, %s)!\n", newspell->
type, newspell->
name);
1003 LOG(
llevError,
"cast_wonder: spell returned is another wonder spell!\n");
1037 "You worship no god");
1043 if (*cp ==
'\0' &&
tmp == NULL)
1045 "You feel very mundane");
1055 "Your %s is depleted by %d",
1063 if (
op->glow_radius > 0)
1065 "You glow in the dark.");
1070 if (immunity == NULL) {
1077 if (
tmp->level > 100)
1079 else if (
tmp->level > 70)
1081 else if (
tmp->level > 20)
1086 if (immunity != NULL) {
1099 if (
tmp->stats.exp == 0) {
1100 snprintf(
buf,
sizeof(
buf),
"Your metabolism isn't focused on anything.");
1128 object *dummy, *
force;
1134 if (dummy == NULL) {
1136 "Oops, program error!");
1137 LOG(
llevError,
"object_new failed (force in cast_create_town_portal for %s!\n",
op->name);
1142 if (
force == NULL) {
1155 "You fix this place in your mind and feel that you "
1156 "can come here from anywhere.");
1169 if (dummy == NULL) {
1171 "Oops, program error!");
1172 LOG(
llevError,
"object_new failed (force) in cast_create_town_portal for %s!\n",
op->name);
1177 if (perm_portal == NULL) {
1179 "Oops, program error!");
1191 int16_t exitx =
EXIT_X(old_force);
1192 int16_t exity =
EXIT_Y(old_force);
1193 LOG(
llevDebug,
"Trying to kill a portal in %s (%d,%d)\n", old_force->
race, exitx, exity);
1204 if (
tmp->name == old_force->
name) {
1216 if (
tmp->name == old_force->
name) {
1260 char portal_name [1024], portal_message [1024];
1271 "You can't cast that here.");
1277 if (
op->contr &&
op->contr->transport) {
1279 "You need to exit the transport to cast that.");
1284 if (
force == NULL) {
1324 if (exitmap == NULL) {
1326 "Something strange happens. You can't remember where to go!?");
1333 "The spell effect has expired.");
1342 snprintf(portal_message, 1024,
"The air moves around you and a huge smell of ammonia surrounds you as you pass through %s's tiny portal. Pouah!",
op->name);
1343 else if (op_level < 30)
1344 snprintf(portal_message, 1024,
"%s's portal smells of ozone. You do a lot of movements and finally pass through the small hole in the air.",
op->name);
1345 else if (op_level < 60)
1346 snprintf(portal_message, 1024,
"A shining door opens in the air in front of you, showing you the path to another place.");
1348 snprintf(portal_message, 1024,
"As you walk through %s's portal, flowers come out from the ground around you. You feel awed.",
op->name);
1355 snprintf(portal_name, 1024,
"%s's portal to %s",
op->name,
force->name);
1357 if (dummy == NULL) {
1359 "Oops, program error!");
1360 LOG(
llevError,
"object_new failed (perm_magic_portal) in cast_create_town_portal for %s!\n",
op->name);
1388 "Oops, program error!");
1389 LOG(
llevError,
"object_new failed (force) in cast_create_town_portal for %s!\n",
op->name);
1404 snprintf(portal_name, 1024,
"%s's portal to %s",
op->name,
op->map->path);
1406 if (dummy == NULL) {
1408 "Oops, program error!");
1409 LOG(
llevError,
"object_new failed (perm_magic_portal) in cast_create_town_portal for %s!\n",
op->name);
1436 "Oops, program error!");
1437 LOG(
llevError,
"object_new failed (force) in cast_create_town_portal for %s!\n",
op->name);
1449 "You see air moving and showing you the way home.");
1475 int i, posblocked, negblocked, maxrange;
1495 "Something is in the way.");
1500 }
else if (spell_ob->
race) {
1503 snprintf(buf1,
sizeof(buf1), spell_ob->
race, dir);
1506 LOG(
llevError,
"summon_wall: Unable to find archetype %s\n", buf1);
1508 "This spell is broken.");
1524 tmp->stats.maxhp =
tmp->stats.hp;
1534 tmp->stats.maxhp =
tmp->stats.hp;
1549 "Something destroys your %s",
1554 if (
tmp->other_arch &&
tmp->other_arch->clone.type ==
SPELL)
1567 for (i = 1; i <= maxrange; i++) {
1570 dir2 = (dir < 4) ? (dir+2) : dir-2;
1627 uint32_t dist, maxdist;
1637 "In what direction?");
1646 if (
op->contr->count) {
1647 if (
op->contr->count > maxdist) {
1649 "You can't dimension door that far!");
1653 for (dist = 0; dist <
op->contr->count; dist++) {
1667 if (dist < op->contr->count) {
1669 "Something blocks the magic of the spell.");
1670 op->contr->count = 0;
1673 op->contr->count = 0;
1687 "You cast your spell, but nothing happens.");
1696 for (dist = 0; dist < maxdist; dist++) {
1713 for (; dist > 0; dist--) {
1722 "Your spell failed!");
1727 if (
op->contr->transport &&
op->contr->transport->type ==
TRANSPORT) {
1729 if (
op->contr->transport) {
1731 "Your spell failed!");
1745 op->speed_left = -
FABS(
op->speed)*5;
1766 int heal = 0, success = 0;
1783 "You are already fully healed.");
1795 "You feel just fine!");
1796 }
else if (heal > 50) {
1798 "Your wounds close!");
1799 }
else if (heal > 25) {
1801 "Your wounds mostly close.");
1802 }
else if (heal > 10) {
1804 "Your wounds start to fade.");
1807 "Your wounds start to close.");
1823 "Your body feels cleansed");
1833 "Your mind feels clearer");
1844 "Your vision begins to return.");
1855 "Magical energies surge through your body!");
1863 "You feel redeemed with you god!");
1872 "You feel your belly fill with food");
1889 "You grow no stronger.",
1890 "You grow no more agile.",
1891 "You don't feel any healthier.",
1893 "You are no easier to look at.",
1919 object *
force = NULL;
1935 if (tmp2->name == spell_ob->
name) {
1938 }
else if (spell_ob->
race && spell_ob->
race == tmp2->name) {
1941 "You can not cast %s while %s is in effect",
1942 spell_ob->
name, tmp2->name_pl);
1947 if (
force == NULL) {
1961 if (duration >
force->duration) {
1962 force->duration = duration;
1964 "You recast the spell while in effect.");
1972 "Recasting the spell had no effect.");
1980 force->speed_left = -1.0;
1985 if (spell_ob->
resist[i]) {
1987 if (
force->resist[i] > 100)
1988 force->resist[i] = 100;
2001 for (k = 0; k < stat; k++)
2027 if (
op->speed > 0.5)
2080 if (tmp2->name == spell_ob->
name) {
2083 }
else if (spell_ob->
race && spell_ob->
race == tmp2->name) {
2085 "You can not cast %s while %s is in effect",
2086 spell_ob->
name, tmp2->name_pl);
2091 if (
force == NULL) {
2105 if (duration >
force->duration) {
2106 force->duration = duration;
2108 "You recast the spell while in effect.");
2111 "Recasting the spell had no effect.");
2117 force->speed_left = -1.0;
2121 "Your blessing seems empty.");
2126 if (god->
resist[i] > 0) {
2148 "You are blessed by %s!",
2190 #define SMALL_NUGGET "smallnugget"
2191 #define LARGE_NUGGET "largenugget"
2207 static void alchemy_object(
float value_adj,
object *
obj,
int *small_nuggets,
int *large_nuggets,
int *weight) {
2209 uint64_t small_value, large_value;
2220 if (small_nugget_arch == NULL) {
2225 if (large_nugget_arch == NULL) {
2240 assert(large_value != 0 && small_value != 0);
2242 *large_nuggets +=
count;
2245 *small_nuggets +=
count;
2252 if (*small_nuggets*small_value >= large_value) {
2253 assert(small_value != 0);
2255 *small_nuggets -= large_value/small_value;
2256 if (*small_nuggets && large_value%small_value)
2260 if (weight != NULL) {
2288 if (
x ==
op->x &&
y ==
op->y &&
op->map ==
m)
2291 if (small_nuggets) {
2293 tmp-> nrof = small_nuggets;
2296 if (large_nuggets) {
2298 tmp-> nrof = large_nuggets;
2318 int x,
y, weight = 0, weight_max, large_nuggets, small_nuggets, mflags;
2339 if (value_adj > 0.40)
2342 for (
y =
op->y-1; y <= op->
y+1;
y++) {
2343 for (
x =
op->x-1; x <= op->
x+1;
x++) {
2375 alchemy_object(value_adj, tmp1, &small_nuggets, &large_nuggets, &weight);
2380 if (weight > weight_max) {
2398 op->contr->socket.look_position = 0;
2418 int success = 0, was_one = 0;
2442 "You feel like some of your items are looser now.");
2446 "You failed to remove the curse.");
2449 "You are not using any cursed items.");
2471 "You need to mark an item first!");
2478 "The spell has no effect");
2485 "Your %s emits a dark light for a few seconds.",
name);
2494 "Your %s glows blue for a few seconds.",
name);
2517 int success = 0, num_ident;
2534 "The item has a story:\n%s",
2554 "On the ground is %s.",
2558 "The item has a story:\n%s",
2572 "You can't reach anything unidentified.");
2592 object *
tmp, *last, *detect;
2594 int done_one, range, mflags, floor,
level;
2595 int16_t
x,
y, nx, ny;
2605 for (
x =
op->x-range; x <= op->
x+range;
x++)
2606 for (
y =
op->y-range; y <= op->
y+range;
y++) {
2676 tmp->stats.Cha /= 4;
2711 int dx = nx, dy = ny;
2714 if (done_one == 2 && detect) {
2724 dx =
HEAD(detect)->x;
2725 dy =
HEAD(detect)->y;
2728 for (part = detect_ob; part != NULL; part = part->
more) {
2733 for (flag = 0; flag < 4; flag++) {
2766 if (!
tmp->invisible) {
2798 if (
victim->stats.maxsp <= 0)
2802 "You feel energy course through you.");
2808 "Your head explodes!");
2816 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.88) {
2818 "You feel like your head is going to explode.");
2819 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.66) {
2821 "You get a splitting headache!");
2822 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.5) {
2824 "Chaos fills your world.");
2826 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.25) {
2828 "You start hearing voices.");
2850 object *plyr = NULL;
2880 "There is no one there.");
2890 }
else if (
op != plyr) {
2898 sucked = (plyr->
stats.
sp*rate)/100;
2902 sucked = (sucked*rate)/100;
2903 op->stats.sp += sucked;
2957 && (
op->level > head->
level)) {
2960 }
else switch (head->
type) {
2962 if ((
op->level > head->
level) && !
op->stats.food && !
op->speed_left) {
2972 if (
rndm(0, 149) == 0) {
3004 "You can't consecrate anything if you don't worship a god!");
3014 "You are not powerful enough to reconsecrate the %s",
3024 letter = strlen(
buf);
3026 for (; letter < strlen(
buf); letter++)
3031 "You fail to consecrate the altar.");
3042 "You consecrated the altar to %s!",
3049 "You are not standing over an altar!");
3077 object *weapon, *
tmp;
3086 "Oops, program error!");
3087 LOG(
llevError,
"animate_weapon failed: spell %s missing other_arch!\n", spell->
name);
3106 "There is something in the way.");
3120 "There is something in the way.");
3129 "You must mark a weapon to use with this spell!");
3134 "The spell fails to transform your weapon.");
3139 "You need to mark a weapon to animate it.");
3144 "You need to pay for the weapon to animate it.");
3152 "You need to unequip %s before using it in this spell",
3157 if (weapon->
nrof > 1) {
3176 op->contr->golem_count =
tmp->count;
3200 tmp->stats.wc =
tmp->stats.wc
3205 if (
tmp->stats.wc < -127)
3206 tmp->stats.wc = -127;
3209 tmp->stats.maxhp =
tmp->stats.maxhp
3214 if (
tmp->stats.maxhp < 0)
3215 tmp->stats.maxhp = 10;
3216 tmp->stats.hp =
tmp->stats.maxhp;
3224 if (
tmp->stats.dam < 0)
3225 tmp->stats.dam = 127;
3228 if (!
tmp->attacktype)
3232 if (
op->materialname != NULL)
3236 tmp->resist[i] = 50-(mt->
save[i]*5);
3263 if (
tmp->speed > 3.33)
3267 snprintf(
buf,
sizeof(
buf),
"animated %s", weapon->
name);
3288 tmp->speed_left = -1;
3289 tmp->direction = dir;
3316 "It can be no brighter here.");
3319 "It can be no darker here.");
3403 "You recast the spell while in effect.");
3428 if (!
msg ||
msg[0] == 0) {
3436 "Trying to cheat are we?");
3437 LOG(
llevInfo,
"write_rune: player %s tried to write bogus rune %s\n",
op->name,
msg);
int SP_level_range_adjust(const object *caster, const object *spob)
#define object_was_destroyed(op, old_tag)
#define MSG_TYPE_SPELL_PERCEIVE_SELF
#define GET_MAP_OB(M, X, Y)
int perceive_self(object *op)
static void alchemy_object(float value_adj, object *obj, int *small_nuggets, int *large_nuggets, int *weight)
mapstruct * ready_map_name(const char *name, int flags)
#define FORCE_CHANGE_ABILITY
#define HAS_RANDOM_ITEMS(op)
void set_spell_skill(object *op, object *caster, object *spob, object *dest)
#define FREE_OBJ_NO_DESTROY_CALLBACK
sstring add_refcount(sstring str)
void object_free(object *ob, int flags)
sstring add_string(const char *str)
void object_remove(object *op)
StringBuffer * stringbuffer_new(void)
void object_set_enemy(object *op, object *enemy)
static bool CAN_PROBE(const object *ob)
void give_artifact_abilities(object *op, const object *artifact)
int create_aura(object *op, object *caster, object *spell)
archetype * find_archetype_by_object_type_name(int type, const char *name)
object * object_find_by_type_and_arch_name(const object *who, int type, const char *name)
void object_update(object *op, int action)
int cast_invisible(object *op, object *caster, object *spell_ob)
#define QUERY_FLAG(xyz, p)
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
void archetypes_for_each(arch_op op)
archetype * get_next_archetype(archetype *current)
void confuse_living(object *op, object *hitter, int dam)
static archetype * food_choice
uint64_t price_base(const object *obj)
object * object_new(void)
int cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
int cast_transfer(object *op, object *caster, object *spell, int dir)
#define FOR_BELOW_PREPARE(op_, it_)
object * arch_present_in_ob(const archetype *at, const object *op)
int cast_polymorph(object *op, object *caster, object *spell_ob, int dir)
#define MSG_TYPE_VICTIM_SPELL
int cast_consecrate(object *op, object *caster, object *spell)
int SP_level_duration_adjust(const object *caster, const object *spob)
object * object_find_by_type_applied(const object *who, int type)
void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action)
int remove_curse(object *op, object *caster, object *spell)
static object * town_portal_find_force(object *op, object *spell)
#define MAP_PLAYER_UNIQUE
int cast_wonder(object *op, object *caster, int dir, object *spell_ob)
struct artifactstruct * items
void remove_friendly_object(object *op)
int cast_item_curse_or_curse(object *op, object *spell_ob)
static int food_value_choice
StringBuffer * describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf)
int apply_manual(object *op, object *tmp, int aflag)
#define FOR_OB_AND_ABOVE_FINISH()
void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries)
const char *const statname[NUM_STATS]
struct treasureliststruct * randomitems
int cast_identify(object *op, object *caster, object *spell)
short freearr_x[SIZEOFFREE]
short freearr_y[SIZEOFFREE]
#define MSG_TYPE_SPELL_TARGET
method_ret ob_apply(object *op, object *applier, int aflags)
#define MSG_TYPE_SPELL_HEAL
#define FOR_BELOW_FINISH()
void esrv_send_item(object *pl, object *op)
#define MSG_TYPE_SPELL_SUCCESS
#define FOR_OB_AND_ABOVE_PREPARE(op_)
void store_spell_expiry(object *spell)
object * identify(object *op)
void free_string(sstring str)
int cast_earth_to_dust(object *op, object *caster, object *spell_ob)
void spell_effect(object *spob, int x, int y, mapstruct *map, object *originator)
static event_registration m
static void polymorph_living(object *op, int level)
materialtype_t * name_to_material(const char *name)
object * object_find_by_type_subtype(const object *who, int type, int subtype)
int change_map_light(mapstruct *m, int change)
const char * determine_god(object *op)
artifactlist * find_artifactlist(int type)
void object_copy(const object *src_ob, object *dest_ob)
void query_name(const object *op, char *buf, size_t size)
#define FLAG_KNOWN_BLESSED
void polymorph(object *op, object *who, int level)
#define FLAG_KNOWN_CURSED
#define EXPLODING_FIREBALL
struct artifactstruct * next
void examine_monster(object *op, object *tmp, int level)
#define FOR_OB_AND_BELOW_FINISH()
static void food_each(archetype *arch)
void stringbuffer_append_string(StringBuffer *sb, const char *str)
void cast_magic_storm(object *op, object *tmp, int lvl)
void query_short_name(const object *op, char *buf, size_t size)
#define FREE_AND_COPY(sv, nv)
void fix_object(object *op)
object * object_create_arch(archetype *at)
char * stringbuffer_finish(StringBuffer *sb)
int is_magical(const object *op)
#define GET_MAP_MOVE_BLOCK(M, X, Y)
struct archt * other_arch
#define INS_BELOW_ORIGINATOR
int caster_level(const object *caster, const object *spell)
int rndm(int min, int max)
static int town_portal_destroy_existing(object *op, object *spell)
static void polymorph_melt(object *who, object *op)
#define FOR_OB_AND_BELOW_PREPARE(op_)
int is_dragon_pl(const object *op)
int write_mark(object *op, object *spell, const char *msg)
int cast_heal(object *op, object *caster, object *spell, int dir)
const Animations * animation
void object_set_owner(object *op, object *owner)
void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags)
object * create_archetype(const char *name)
void monster_check_apply_all(object *monster)
int probe(object *op, object *caster, object *spell_ob, int dir, int level)
int cast_change_ability(object *op, object *caster, object *spell_ob, int dir, int silent)
#define FREE_AND_CLEAR_STR(xyz)
int random_roll(int min, int max, const object *op, int goodbad)
#define FOR_MAP_PREPARE(map_, mx_, my_, it_)
#define FLAG_KNOWN_MAGICAL
char * ob_describe(const object *op, const object *observer, int use_media_tags, char *buf, size_t size)
void object_set_msg(object *op, const char *msg)
const EXTERN char *const change_resist_msg[NROFATTACKS]
static const char *const no_gain_msgs[NUM_STATS]
int SP_level_dam_adjust(const object *caster, const object *spob)
#define MSG_TYPE_SPELL_FAILURE
object * map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at)
#define ARCH_PORTAL_FAILED
#define FLAG_IS_BUILDABLE
void LOG(LogLevel logLevel, const char *format,...)
int did_make_save(const object *op, int level, int bonus)
int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
#define MSG_TYPE_SPELL_ERROR
int cast_create_food(object *op, object *caster, object *spell_ob, int dir, const char *stringarg)
int cast_create_obj(object *op, object *new_op, int dir)
int cast_create_town_portal(object *op, object *caster, object *spell)
void esrv_update_item(int flags, object *pl, object *op)
int cast_create_missile(object *op, object *caster, object *spell, int dir, const char *stringarg)
#define FLAG_NO_FIX_PLAYER
int hit_player(object *op, int dam, object *hitter, uint32_t type, int full_hit)
#define CLEAR_FLAG(xyz, p)
void counterspell(object *op, int dir)
void set_attr_value(living *stats, int attr, int8_t value)
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
static void polymorph_item(object *who, object *op, int level)
object * object_insert_in_ob(object *op, object *where)
int cast_bless(object *op, object *caster, object *spell_ob, int dir)
void update_all_los(const mapstruct *map, int x, int y)
void object_update_speed(object *op)
void map_newmap_cmd(socket_struct *ns)
object * arch_to_object(archetype *at)
int strcasecmp(const char *s1, const char *s2)
object * object_present_in_ob_by_name(int type, const char *str, const object *op)
int recharge(object *op, object *caster, object *spell_ob)
int makes_invisible_to(object *pl, object *mon)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
int8_t get_attr_value(const living *stats, int attr)
int dimension_door(object *op, object *caster, object *spob, int dir)
static void place_alchemy_objects(object *op, mapstruct *m, int small_nuggets, int large_nuggets, int x, int y)
int cure_disease(object *sufferer, object *caster, sstring skill)
archetype * try_find_archetype(const char *name)
void add_friendly_object(object *op)
#define OB_TYPE_MOVE_BLOCK(ob1, type)
object * generate_treasure(treasurelist *t, int difficulty)
#define FREE_OBJ_FREE_INVENTORY
int atnr_is_dragon_enabled(int attacknr)
int alchemy(object *op, object *caster, object *spell_ob)
int cast_word_of_recall(object *op, object *caster, object *spell_ob)
object * find_target_for_friendly_spell(object *op, int dir)
int animate_weapon(object *op, object *caster, object *spell, int dir)
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
void pets_control_golem(object *op, int dir)
int magic_wall(object *op, object *caster, int dir, object *spell_ob)
int change_abil(object *op, object *tmp)
const object * find_god(const char *name)
uint8_t create_home_portals
void pick_up(object *op, object *alt)
int cast_change_map_lightlevel(object *op, object *spell)
int16_t resist[NROFATTACKS]
object * object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
#define MSG_TYPE_ITEM_INFO
object * find_marked_object(object *op)
#define FOR_INV_PREPARE(op_, it_)
static const int32_t MAX_FOOD
int cast_detection(object *op, object *caster, object *spell)
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...)
#define SP_WORD_OF_RECALL
static void charge_mana_effect(object *victim, int caster_level)
int cast_cone(object *op, object *caster, int dir, object *spell)
int is_true_undead(object *op)
void player_update_bg_music(object *player)
object * object_get_owner(object *op)
int is_identified(const object *op)