Go to the documentation of this file.
20 #define _GNU_SOURCE // strcasestr() is a GNU extension in string.h
51 tmp->level =
op->level;
53 tmp->duration += lvl/5;
60 if (
tmp->duration >= 40)
63 tmp->stats.maxhp =
tmp->count;
64 if (
tmp->stats.maxhp == 0)
83 int recharge(
object *
op,
object *caster,
object *spell_ob) {
89 if (wand == NULL || wand->
type !=
WAND) {
91 "You need to mark the wand you want to recharge.");
97 "The %s vibrates violently, then explodes!",
106 tmp->stats.hp =
tmp->stats.dam/2;
107 if (
tmp->stats.hp < 2)
119 "Your %s is broken.",
129 "The %s glows with power.",
163 int x =
op->x,
y =
op->y, numat = 0, choice, friendly, pos;
165 object *owner, *replacing;
192 choice =
rndm(0, numat-1);
261 "The %s glow red, melt and evaporate!",
265 "The %s glows red, melts and evaporates!",
284 int max_value, difficulty, tries = 0, choice, charges =
op->stats.food, numat = 0;
290 max_value =
op->value*2;
291 if (max_value > 2000*(
level/10))
292 max_value = 2000*(
level/10)+(max_value-2000*(
level/10))/3;
311 difficulty =
op->magic*5;
316 choice =
rndm(0, numat-1);
334 }
while (new_ob->
value > max_value && tries < 10);
336 LOG(
llevError,
"polymorph_item: fix_generated_object made %s invisible?!\n", new_ob->
name);
348 if (
op->nrof && new_ob->
nrof) {
351 if (new_ob->
nrof > 2)
359 op->stats.food = charges;
439 int range, mflags, maxrange,
level;
447 for (range = 1; range < maxrange; range++) {
506 int missile_plus = 0, bonus_plus = 0;
507 const char *missile_name;
508 object *
tmp, *missile;
512 missile_name =
tmp != NULL ?
tmp->race :
"arrow";
516 if (!strcmp(missile_name,
"arrows"))
517 missile_name =
"arrow";
518 else if (!strcmp(missile_name,
"crossbow bolts"))
519 missile_name =
"bolt";
522 if ( stringarg && strncmp(stringarg,
"of ",3)==0 ) stringarg +=3;
523 if ( stringarg && strncmp(stringarg,
"bolt",4)==0 ) {
524 missile_name =
"bolt";
526 while ( isalpha(*stringarg) ) ++stringarg;
527 while ( *stringarg==
' ' ) ++stringarg;
529 if ( stringarg && strncmp(stringarg,
"arrow",5)==0 ) {
530 missile_name =
"arrow";
532 while ( isalpha(*stringarg) ) ++stringarg;
533 while ( *stringarg==
' ' ) ++stringarg;
537 LOG(
llevDebug,
"Cast create_missile: could not find archetype %s\n", missile_name);
542 if ( stringarg && strncmp(stringarg,
"of ",3)==0 ) stringarg +=3;
545 if (isalpha(*stringarg)) {
548 for (; al != NULL; al = al->
next)
555 "No such object %ss of %s",
556 missile_name, stringarg);
562 "You are not allowed to create %ss of %s",
563 missile_name, stringarg);
573 }
else if (atoi(stringarg) < missile_plus)
574 missile_plus = atoi(stringarg);
576 if (missile_plus > 4)
578 else if (missile_plus < -4)
582 if (missile->
nrof <= (uint32_t)3 * (missile_plus + bonus_plus)) {
585 "This item is too powerful for you to create!");
588 missile->
nrof -= 3*(missile_plus+bonus_plus);
589 if (missile->
nrof < 1)
592 missile->
magic = missile_plus;
675 "You don't have enough experience to create any food.");
682 new_op->
nrof = food_value;
685 if (new_op->
nrof < 1)
710 int probe(
object *
op,
object *caster,
object *spell_ob,
int dir,
int level) {
711 int r, mflags, maxrange;
719 for (
r = 1;
r < maxrange;
r++) {
730 "Something blocks your magic.");
737 "You detect something.");
745 "You detect nothing.");
815 if (
op->invisible > 1000) {
817 "You can not extend the duration of your invisibility any further");
826 if (
op->invisible > 1000)
827 op->invisible = 1000;
830 if (
op->contr->invis_race)
835 op->contr->tmp_invis = 0;
837 op->contr->tmp_invis = 1;
839 op->contr->hidden = 0;
843 "You can't see your hands!");
846 "You feel more transparent!");
867 int range, i, j, mflags;
876 for (i = -range; i < range; i++)
877 for (j = -range; j < range; j++) {
926 "You feel a force starting to build up inside you.");
933 "Oops, program error!");
934 LOG(
llevError,
"cast_word_of_recall: create_archetype(force) failed!\n");
945 dummy->
speed = 0.002;
960 "You feel a force starting to build up inside you.");
988 LOG(
llevError,
"cast_wonder: Unable to get a spell!\n");
992 LOG(
llevError,
"cast_wonder: spell returned is not a spell (%d, %s)!\n", newspell->
type, newspell->
name);
997 LOG(
llevError,
"cast_wonder: spell returned is another wonder spell!\n");
1031 "You worship no god");
1037 if (*cp ==
'\0' &&
tmp == NULL)
1039 "You feel very mundane");
1049 "Your %s is depleted by %d",
1057 if (
op->glow_radius > 0)
1059 "You glow in the dark.");
1064 if (immunity == NULL) {
1071 if (
tmp->level > 100)
1073 else if (
tmp->level > 70)
1075 else if (
tmp->level > 20)
1080 if (immunity != NULL) {
1093 if (
tmp->stats.exp == 0) {
1094 snprintf(
buf,
sizeof(
buf),
"Your metabolism isn't focused on anything.");
1122 object *dummy, *
force;
1128 if (dummy == NULL) {
1130 "Oops, program error!");
1131 LOG(
llevError,
"object_new failed (force in cast_create_town_portal for %s!\n",
op->name);
1136 if (
force == NULL) {
1149 "You fix this place in your mind and feel that you "
1150 "can come here from anywhere.");
1163 if (dummy == NULL) {
1165 "Oops, program error!");
1166 LOG(
llevError,
"object_new failed (force) in cast_create_town_portal for %s!\n",
op->name);
1171 if (perm_portal == NULL) {
1173 "Oops, program error!");
1185 int16_t exitx =
EXIT_X(old_force);
1186 int16_t exity =
EXIT_Y(old_force);
1187 LOG(
llevDebug,
"Trying to kill a portal in %s (%d,%d)\n", old_force->
race, exitx, exity);
1198 if (
tmp->name == old_force->
name) {
1210 if (
tmp->name == old_force->
name) {
1254 char portal_name [1024], portal_message [1024];
1265 "You can't cast that here.");
1271 if (
op->contr &&
op->contr->transport) {
1273 "You need to exit the transport to cast that.");
1278 if (
force == NULL) {
1318 if (exitmap == NULL) {
1320 "Something strange happens. You can't remember where to go!?");
1327 "The spell effect has expired.");
1336 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);
1337 else if (op_level < 30)
1338 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);
1339 else if (op_level < 60)
1340 snprintf(portal_message, 1024,
"A shining door opens in the air in front of you, showing you the path to another place.");
1342 snprintf(portal_message, 1024,
"As you walk through %s's portal, flowers come out from the ground around you. You feel awed.",
op->name);
1349 snprintf(portal_name, 1024,
"%s's portal to %s",
op->name,
force->name);
1351 if (dummy == NULL) {
1353 "Oops, program error!");
1354 LOG(
llevError,
"object_new failed (perm_magic_portal) in cast_create_town_portal for %s!\n",
op->name);
1382 "Oops, program error!");
1383 LOG(
llevError,
"object_new failed (force) in cast_create_town_portal for %s!\n",
op->name);
1398 snprintf(portal_name, 1024,
"%s's portal to %s",
op->name,
op->map->path);
1400 if (dummy == NULL) {
1402 "Oops, program error!");
1403 LOG(
llevError,
"object_new failed (perm_magic_portal) in cast_create_town_portal for %s!\n",
op->name);
1430 "Oops, program error!");
1431 LOG(
llevError,
"object_new failed (force) in cast_create_town_portal for %s!\n",
op->name);
1443 "You see air moving and showing you the way home.");
1469 int i, posblocked, negblocked, maxrange;
1489 "Something is in the way.");
1494 }
else if (spell_ob->
race) {
1497 snprintf(buf1,
sizeof(buf1), spell_ob->
race, dir);
1500 LOG(
llevError,
"summon_wall: Unable to find archetype %s\n", buf1);
1502 "This spell is broken.");
1518 tmp->stats.maxhp =
tmp->stats.hp;
1528 tmp->stats.maxhp =
tmp->stats.hp;
1543 "Something destroys your %s",
1548 if (
tmp->other_arch &&
tmp->other_arch->clone.type ==
SPELL)
1561 for (i = 1; i <= maxrange; i++) {
1564 dir2 = (dir < 4) ? (dir+2) : dir-2;
1621 uint32_t dist, maxdist;
1631 "In what direction?");
1640 if (
op->contr->count) {
1641 if (
op->contr->count > maxdist) {
1643 "You can't dimension door that far!");
1647 for (dist = 0; dist <
op->contr->count; dist++) {
1661 if (dist < op->contr->count) {
1663 "Something blocks the magic of the spell.");
1664 op->contr->count = 0;
1667 op->contr->count = 0;
1681 "You cast your spell, but nothing happens.");
1690 for (dist = 0; dist < maxdist; dist++) {
1707 for (; dist > 0; dist--) {
1716 "Your spell failed!");
1721 if (
op->contr->transport &&
op->contr->transport->type ==
TRANSPORT) {
1723 if (
op->contr->transport) {
1725 "Your spell failed!");
1739 op->speed_left = -
FABS(
op->speed)*5;
1760 int heal = 0, success = 0;
1777 "You are already fully healed.");
1789 "You feel just fine!");
1790 }
else if (heal > 50) {
1792 "Your wounds close!");
1793 }
else if (heal > 25) {
1795 "Your wounds mostly close.");
1796 }
else if (heal > 10) {
1798 "Your wounds start to fade.");
1801 "Your wounds start to close.");
1817 "Your body feels cleansed");
1827 "Your mind feels clearer");
1838 "Your vision begins to return.");
1849 "Magical energies surge through your body!");
1857 "You feel redeemed with you god!");
1866 "You feel your belly fill with food");
1883 "You grow no stronger.",
1884 "You grow no more agile.",
1885 "You don't feel any healthier.",
1887 "You are no easier to look at.",
1913 object *
force = NULL;
1929 if (tmp2->name == spell_ob->
name) {
1932 }
else if (spell_ob->
race && spell_ob->
race == tmp2->name) {
1935 "You can not cast %s while %s is in effect",
1936 spell_ob->
name, tmp2->name_pl);
1941 if (
force == NULL) {
1955 if (duration >
force->duration) {
1956 force->duration = duration;
1958 "You recast the spell while in effect.");
1966 "Recasting the spell had no effect.");
1974 force->speed_left = -1.0;
1979 if (spell_ob->
resist[i]) {
1981 if (
force->resist[i] > 100)
1982 force->resist[i] = 100;
1995 for (k = 0; k < stat; k++)
2021 if (
op->speed > 0.5)
2074 if (tmp2->name == spell_ob->
name) {
2077 }
else if (spell_ob->
race && spell_ob->
race == tmp2->name) {
2079 "You can not cast %s while %s is in effect",
2080 spell_ob->
name, tmp2->name_pl);
2085 if (
force == NULL) {
2099 if (duration >
force->duration) {
2100 force->duration = duration;
2102 "You recast the spell while in effect.");
2105 "Recasting the spell had no effect.");
2111 force->speed_left = -1.0;
2115 "Your blessing seems empty.");
2120 if (god->
resist[i] > 0) {
2142 "You are blessed by %s!",
2184 #define SMALL_NUGGET "smallnugget"
2185 #define LARGE_NUGGET "largenugget"
2201 static void alchemy_object(
float value_adj,
object *
obj,
int *small_nuggets,
int *large_nuggets,
int *weight) {
2203 uint64_t small_value, large_value;
2214 if (small_nugget_arch == NULL) {
2219 if (large_nugget_arch == NULL) {
2234 assert(large_value != 0 && small_value != 0);
2236 *large_nuggets +=
count;
2239 *small_nuggets +=
count;
2246 if (*small_nuggets*small_value >= large_value) {
2247 assert(small_value != 0);
2249 *small_nuggets -= large_value/small_value;
2250 if (*small_nuggets && large_value%small_value)
2254 if (weight != NULL) {
2282 if (
x ==
op->x &&
y ==
op->y &&
op->map ==
m)
2285 if (small_nuggets) {
2287 tmp-> nrof = small_nuggets;
2290 if (large_nuggets) {
2292 tmp-> nrof = large_nuggets;
2312 int x,
y, weight = 0, weight_max, large_nuggets, small_nuggets, mflags;
2333 if (value_adj > 0.40)
2336 for (
y =
op->y-1; y <= op->
y+1;
y++) {
2337 for (
x =
op->x-1; x <= op->
x+1;
x++) {
2369 alchemy_object(value_adj, tmp1, &small_nuggets, &large_nuggets, &weight);
2374 if (weight > weight_max) {
2392 op->contr->socket->look_position = 0;
2412 int success = 0, was_one = 0;
2436 "You feel like some of your items are looser now.");
2440 "You failed to remove the curse.");
2443 "You are not using any cursed items.");
2465 "You need to mark an item first!");
2472 "The spell has no effect");
2479 "Your %s emits a dark light for a few seconds.",
name);
2488 "Your %s glows blue for a few seconds.",
name);
2511 int success = 0, num_ident;
2528 "The item has a story:\n%s",
2548 "On the ground is %s.",
2552 "The item has a story:\n%s",
2566 "You can't reach anything unidentified.");
2586 object *
tmp, *last, *detect;
2588 int done_one, range, mflags, floor,
level;
2589 int16_t
x,
y, nx, ny;
2599 for (
x =
op->x-range; x <= op->
x+range;
x++)
2600 for (
y =
op->y-range; y <= op->
y+range;
y++) {
2670 tmp->stats.Cha /= 4;
2705 int dx = nx, dy = ny;
2708 if (done_one == 2 && detect) {
2718 dx =
HEAD(detect)->x;
2719 dy =
HEAD(detect)->y;
2722 for (part = detect_ob; part != NULL; part = part->
more) {
2727 for (flag = 0; flag < 4; flag++) {
2760 if (!
tmp->invisible) {
2792 if (
victim->stats.maxsp <= 0)
2796 "You feel energy course through you.");
2802 "Your head explodes!");
2810 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.88) {
2812 "You feel like your head is going to explode.");
2813 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.66) {
2815 "You get a splitting headache!");
2816 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.5) {
2818 "Chaos fills your world.");
2820 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.25) {
2822 "You start hearing voices.");
2844 object *plyr = NULL;
2874 "There is no one there.");
2884 }
else if (
op != plyr) {
2892 sucked = (plyr->
stats.
sp*rate)/100;
2896 sucked = (sucked*rate)/100;
2897 op->stats.sp += sucked;
2951 && (
op->level > head->
level)) {
2954 }
else switch (head->
type) {
2956 if ((
op->level > head->
level) && !
op->stats.food && !
op->speed_left) {
2966 if (
rndm(0, 149) == 0) {
2998 "You can't consecrate anything if you don't worship a god!");
3008 "You are not powerful enough to reconsecrate the %s",
3018 letter = strlen(
buf);
3020 for (; letter < strlen(
buf); letter++)
3025 "You fail to consecrate the altar.");
3036 "You consecrated the altar to %s!",
3043 "You are not standing over an altar!");
3071 object *weapon, *
tmp;
3080 "Oops, program error!");
3081 LOG(
llevError,
"animate_weapon failed: spell %s missing other_arch!\n", spell->
name);
3100 "There is something in the way.");
3114 "There is something in the way.");
3123 "You must mark a weapon to use with this spell!");
3128 "The spell fails to transform your weapon.");
3133 "You need to mark a weapon to animate it.");
3138 "You need to pay for the weapon to animate it.");
3146 "You need to unequip %s before using it in this spell",
3151 if (weapon->
nrof > 1) {
3170 op->contr->golem_count =
tmp->count;
3194 tmp->stats.wc =
tmp->stats.wc
3199 if (
tmp->stats.wc < -127)
3200 tmp->stats.wc = -127;
3203 tmp->stats.maxhp =
tmp->stats.maxhp
3208 if (
tmp->stats.maxhp < 0)
3209 tmp->stats.maxhp = 10;
3210 tmp->stats.hp =
tmp->stats.maxhp;
3218 if (
tmp->stats.dam < 0)
3219 tmp->stats.dam = 127;
3222 if (!
tmp->attacktype)
3226 if (
op->materialname != NULL)
3230 tmp->resist[i] = 50-(mt->
save[i]*5);
3257 if (
tmp->speed > 3.33)
3261 snprintf(
buf,
sizeof(
buf),
"animated %s", weapon->
name);
3282 tmp->speed_left = -1;
3283 tmp->direction = dir;
3310 "It can be no brighter here.");
3313 "It can be no darker here.");
3397 "You recast the spell while in effect.");
3422 if (!
msg ||
msg[0] == 0) {
3430 "Trying to cheat are we?");
3431 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)
#define FORCE_CHANGE_ABILITY
#define HAS_RANDOM_ITEMS(op)
int write_mark(object *op, object *spell, const char *msg)
object * object_get_owner(object *op)
void set_spell_skill(object *op, object *caster, object *spob, object *dest)
#define FREE_OBJ_NO_DESTROY_CALLBACK
object * object_find_by_type_subtype(const object *who, int type, int subtype)
int cast_polymorph(object *op, object *caster, object *spell_ob, int dir)
static void place_alchemy_objects(object *op, mapstruct *m, int small_nuggets, int large_nuggets, int x, int y)
void remove_friendly_object(object *op)
int cast_change_ability(object *op, object *caster, object *spell_ob, int dir, int silent)
int remove_curse(object *op, object *caster, object *spell)
object * object_find_by_type_applied(const object *who, int type)
static bool CAN_PROBE(const object *ob)
void LOG(LogLevel logLevel, const char *format,...)
archetype * find_archetype_by_object_type_name(int type, const char *name)
int perceive_self(object *op)
mapstruct * ready_map_name(const char *name, int flags)
#define QUERY_FLAG(xyz, p)
int makes_invisible_to(object *pl, object *mon)
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
void archetypes_for_each(arch_op op)
archetype * get_next_archetype(archetype *current)
int magic_wall(object *op, object *caster, int dir, object *spell_ob)
int cast_change_map_lightlevel(object *op, object *spell)
int cast_item_curse_or_curse(object *op, object *spell_ob)
object * map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at)
void confuse_living(object *op, object *hitter, int dam)
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
uint64_t price_base(const object *obj)
int cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
StringBuffer * stringbuffer_new(void)
int cast_wonder(object *op, object *caster, int dir, object *spell_ob)
#define FOR_BELOW_PREPARE(op_, it_)
static int food_value_choice
void give_artifact_abilities(object *op, const object *artifact)
int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
object * arch_present_in_ob(const archetype *at, const object *op)
void object_set_owner(object *op, object *owner)
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags)
int cast_consecrate(object *op, object *caster, object *spell)
#define MSG_TYPE_VICTIM_SPELL
int SP_level_duration_adjust(const object *caster, const object *spob)
void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action)
int dimension_door(object *op, object *caster, object *spob, int dir)
void object_copy(const object *src_ob, object *dest_ob)
#define MAP_PLAYER_UNIQUE
struct artifactstruct * items
void fix_object(object *op)
static void polymorph_melt(object *who, object *op)
static archetype * food_choice
int rndm(int min, int max)
int apply_manual(object *op, object *tmp, int aflag)
#define FOR_OB_AND_ABOVE_FINISH()
static const char *const no_gain_msgs[NUM_STATS]
void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries)
int probe(object *op, object *caster, object *spell_ob, int dir, int level)
struct treasureliststruct * randomitems
materialtype_t * name_to_material(const char *name)
object * object_insert_in_ob(object *op, object *where)
#define MSG_TYPE_SPELL_TARGET
#define MSG_TYPE_SPELL_HEAL
const object * find_god(const char *name)
#define FOR_BELOW_FINISH()
void esrv_send_item(object *pl, object *op)
static void food_each(archetype *arch)
#define MSG_TYPE_SPELL_SUCCESS
#define FOR_OB_AND_ABOVE_PREPARE(op_)
void store_spell_expiry(object *spell)
void spell_effect(object *spob, int x, int y, mapstruct *map, object *originator)
static event_registration m
void polymorph(object *op, object *who, int level)
char * stringbuffer_finish(StringBuffer *sb)
void object_update(object *op, int action)
int cast_invisible(object *op, object *caster, object *spell_ob)
static void charge_mana_effect(object *victim, int caster_level)
sstring add_refcount(sstring str)
const char * determine_god(object *op)
short freearr_y[SIZEOFFREE]
object * object_present_in_ob_by_name(int type, const char *str, const object *op)
static void alchemy_object(float value_adj, object *obj, int *small_nuggets, int *large_nuggets, int *weight)
void query_name(const object *op, char *buf, size_t size)
int cast_word_of_recall(object *op, object *caster, object *spell_ob)
#define FLAG_KNOWN_BLESSED
#define FLAG_KNOWN_CURSED
#define EXPLODING_FIREBALL
struct artifactstruct * next
void examine_monster(object *op, object *tmp, int level)
sstring add_string(const char *str)
#define FOR_OB_AND_BELOW_FINISH()
int change_map_light(mapstruct *m, int change)
void query_short_name(const object *op, char *buf, size_t size)
void set_attr_value(living *stats, int attr, int8_t value)
const char *const change_resist_msg[NROFATTACKS]
int is_identified(const object *op)
char * ob_describe(const object *op, const object *observer, int use_media_tags, char *buf, size_t size)
void object_update_speed(object *op)
#define FREE_AND_COPY(sv, nv)
static void polymorph_living(object *op, int level)
int animate_weapon(object *op, object *caster, object *spell, int dir)
object * object_create_arch(archetype *at)
void object_free(object *ob, int flags)
#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 cast_detection(object *op, object *caster, object *spell)
int cast_create_town_portal(object *op, object *caster, object *spell)
const char *const statname[NUM_STATS]
void stringbuffer_append_string(StringBuffer *sb, const char *str)
#define FOR_OB_AND_BELOW_PREPARE(op_)
int random_roll(int min, int max, const object *op, int goodbad)
const Animations * animation
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
object * object_new(void)
StringBuffer * describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf)
object * create_archetype(const char *name)
void free_string(sstring str)
void monster_check_apply_all(object *monster)
void cast_magic_storm(object *op, object *tmp, int lvl)
#define FREE_AND_CLEAR_STR(xyz)
int cast_transfer(object *op, object *caster, object *spell, int dir)
#define FOR_MAP_PREPARE(map_, mx_, my_, it_)
#define FLAG_KNOWN_MAGICAL
int change_abil(object *op, object *tmp)
static object * town_portal_find_force(object *op, object *spell)
int SP_level_dam_adjust(const object *caster, const object *spob)
static void polymorph_item(object *who, object *op, int level)
#define MSG_TYPE_SPELL_FAILURE
int is_dragon_pl(const object *op)
void add_friendly_object(object *op)
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
#define ARCH_PORTAL_FAILED
#define FLAG_IS_BUILDABLE
int is_magical(const object *op)
void counterspell(object *op, int dir)
int cast_heal(object *op, object *caster, object *spell, int dir)
#define MSG_TYPE_SPELL_ERROR
object * object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
int cast_bless(object *op, object *caster, object *spell_ob, int dir)
int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
int cast_create_obj(object *op, object *new_op, int dir)
void object_set_msg(object *op, const char *msg)
void esrv_update_item(int flags, object *pl, object *op)
int did_make_save(const object *op, int level, int bonus)
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)
method_ret ob_apply(object *op, object *applier, int aflags)
static int town_portal_destroy_existing(object *op, object *spell)
int cast_create_food(object *op, object *caster, object *spell_ob, int dir, const char *stringarg)
int atnr_is_dragon_enabled(int attacknr)
object * object_find_by_type_and_arch_name(const object *who, int type, const char *name)
void map_newmap_cmd(socket_struct *ns)
object * arch_to_object(archetype *at)
int strcasecmp(const char *s1, const char *s2)
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
void object_remove(object *op)
int cure_disease(object *sufferer, object *caster, sstring skill)
archetype * try_find_archetype(const char *name)
#define OB_TYPE_MOVE_BLOCK(ob1, type)
object * generate_treasure(treasurelist *t, int difficulty)
#define FREE_OBJ_FREE_INVENTORY
void update_all_los(const mapstruct *map, int x, int y)
int8_t get_attr_value(const living *stats, int attr)
object * find_target_for_friendly_spell(object *op, int dir)
int cast_identify(object *op, object *caster, object *spell)
short freearr_x[SIZEOFFREE]
void pets_control_golem(object *op, int dir)
int recharge(object *op, object *caster, object *spell_ob)
uint8_t create_home_portals
void pick_up(object *op, object *alt)
int16_t resist[NROFATTACKS]
artifactlist * find_artifactlist(int type)
int cast_earth_to_dust(object *op, object *caster, object *spell_ob)
#define MSG_TYPE_ITEM_INFO
object * find_marked_object(object *op)
#define FOR_INV_PREPARE(op_, it_)
static const int32_t MAX_FOOD
int alchemy(object *op, object *caster, object *spell_ob)
int create_aura(object *op, object *caster, object *spell)
#define SP_WORD_OF_RECALL
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 * identify(object *op)