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, pos;
163 object *owner, *replacing;
190 choice =
rndm(0, numat-1);
259 "The %s glow red, melt and evaporate!",
263 "The %s glows red, melts and evaporates!",
282 int max_value, difficulty, tries = 0, choice, charges =
op->stats.food, numat = 0;
288 max_value =
op->value*2;
289 if (max_value > 2000*(
level/10))
290 max_value = 2000*(
level/10)+(max_value-2000*(
level/10))/3;
309 difficulty =
op->magic*5;
314 choice =
rndm(0, numat-1);
332 }
while (new_ob->
value > max_value && tries < 10);
334 LOG(
llevError,
"polymorph_item: fix_generated_object made %s invisible?!\n", new_ob->
name);
346 if (
op->nrof && new_ob->
nrof) {
349 if (new_ob->
nrof > 2)
357 op->stats.food = charges;
437 int range, mflags, maxrange,
level;
445 for (range = 1; range < maxrange; range++) {
504 int missile_plus = 0, bonus_plus = 0;
505 const char *missile_name;
506 object *
tmp, *missile;
510 missile_name =
tmp != NULL ?
tmp->race :
"arrow";
514 if (!strcmp(missile_name,
"arrows"))
515 missile_name =
"arrow";
516 else if (!strcmp(missile_name,
"crossbow bolts"))
517 missile_name =
"bolt";
520 if ( stringarg && strncmp(stringarg,
"of ",3)==0 ) stringarg +=3;
521 if ( stringarg && strncmp(stringarg,
"bolt",4)==0 ) {
522 missile_name =
"bolt";
524 while ( isalpha(*stringarg) ) ++stringarg;
525 while ( *stringarg==
' ' ) ++stringarg;
527 if ( stringarg && strncmp(stringarg,
"arrow",5)==0 ) {
528 missile_name =
"arrow";
530 while ( isalpha(*stringarg) ) ++stringarg;
531 while ( *stringarg==
' ' ) ++stringarg;
535 LOG(
llevDebug,
"Cast create_missile: could not find archetype %s\n", missile_name);
540 if ( stringarg && strncmp(stringarg,
"of ",3)==0 ) stringarg +=3;
543 if (isalpha(*stringarg)) {
546 for (; al != NULL; al = al->
next)
553 "No such object %ss of %s",
554 missile_name, stringarg);
560 "You are not allowed to create %ss of %s",
561 missile_name, stringarg);
571 }
else if (atoi(stringarg) < missile_plus)
572 missile_plus = atoi(stringarg);
574 if (missile_plus > 4)
576 else if (missile_plus < -4)
580 if (missile->
nrof <= (uint32_t)3 * (missile_plus + bonus_plus)) {
583 "This item is too powerful for you to create!");
586 missile->
nrof -= 3*(missile_plus+bonus_plus);
587 if (missile->
nrof < 1)
590 missile->
magic = missile_plus;
673 "You don't have enough experience to create any food.");
680 new_op->
nrof = food_value;
683 if (new_op->
nrof < 1)
708 int probe(
object *
op,
object *caster,
object *spell_ob,
int dir,
int level) {
709 int r, mflags, maxrange;
717 for (
r = 1;
r < maxrange;
r++) {
728 "Something blocks your magic.");
735 "You detect something.");
743 "You detect nothing.");
813 if (
op->invisible > 1000) {
815 "You can not extend the duration of your invisibility any further");
824 if (
op->invisible > 1000)
825 op->invisible = 1000;
828 if (
op->contr->invis_race)
833 op->contr->tmp_invis = 0;
835 op->contr->tmp_invis = 1;
837 op->contr->hidden = 0;
841 "You can't see your hands!");
844 "You feel more transparent!");
865 int range, i, j, mflags;
874 for (i = -range; i < range; i++)
875 for (j = -range; j < range; j++) {
924 "You feel a force starting to build up inside you.");
931 "Oops, program error!");
932 LOG(
llevError,
"cast_word_of_recall: create_archetype(force) failed!\n");
943 dummy->
speed = 0.002;
958 "You feel a force starting to build up inside you.");
986 LOG(
llevError,
"cast_wonder: Unable to get a spell!\n");
990 LOG(
llevError,
"cast_wonder: spell returned is not a spell (%d, %s)!\n", newspell->
type, newspell->
name);
995 LOG(
llevError,
"cast_wonder: spell returned is another wonder spell!\n");
1029 "You worship no god");
1035 if (*cp ==
'\0' &&
tmp == NULL)
1037 "You feel very mundane");
1047 "Your %s is depleted by %d",
1055 if (
op->glow_radius > 0)
1057 "You glow in the dark.");
1062 if (immunity == NULL) {
1069 if (
tmp->level > 100)
1071 else if (
tmp->level > 70)
1073 else if (
tmp->level > 20)
1078 if (immunity != NULL) {
1091 if (
tmp->stats.exp == 0) {
1092 snprintf(
buf,
sizeof(
buf),
"Your metabolism isn't focused on anything.");
1120 object *dummy, *
force;
1126 if (dummy == NULL) {
1128 "Oops, program error!");
1129 LOG(
llevError,
"object_new failed (force in cast_create_town_portal for %s!\n",
op->name);
1134 if (
force == NULL) {
1147 "You fix this place in your mind and feel that you "
1148 "can come here from anywhere.");
1161 if (dummy == NULL) {
1163 "Oops, program error!");
1164 LOG(
llevError,
"object_new failed (force) in cast_create_town_portal for %s!\n",
op->name);
1169 if (perm_portal == NULL) {
1171 "Oops, program error!");
1183 int16_t exitx =
EXIT_X(old_force);
1184 int16_t exity =
EXIT_Y(old_force);
1185 LOG(
llevDebug,
"Trying to kill a portal in %s (%d,%d)\n", old_force->
race, exitx, exity);
1196 if (
tmp->name == old_force->
name) {
1208 if (
tmp->name == old_force->
name) {
1252 char portal_name [1024], portal_message [1024];
1263 "You can't cast that here.");
1269 if (
op->contr &&
op->contr->transport) {
1271 "You need to exit the transport to cast that.");
1276 if (
force == NULL) {
1316 if (exitmap == NULL) {
1318 "Something strange happens. You can't remember where to go!?");
1325 "The spell effect has expired.");
1334 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);
1335 else if (op_level < 30)
1336 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);
1337 else if (op_level < 60)
1338 snprintf(portal_message, 1024,
"A shining door opens in the air in front of you, showing you the path to another place.");
1340 snprintf(portal_message, 1024,
"As you walk through %s's portal, flowers come out from the ground around you. You feel awed.",
op->name);
1347 snprintf(portal_name, 1024,
"%s's portal to %s",
op->name,
force->name);
1349 if (dummy == NULL) {
1351 "Oops, program error!");
1352 LOG(
llevError,
"object_new failed (perm_magic_portal) in cast_create_town_portal for %s!\n",
op->name);
1380 "Oops, program error!");
1381 LOG(
llevError,
"object_new failed (force) in cast_create_town_portal for %s!\n",
op->name);
1396 snprintf(portal_name, 1024,
"%s's portal to %s",
op->name,
op->map->path);
1398 if (dummy == NULL) {
1400 "Oops, program error!");
1401 LOG(
llevError,
"object_new failed (perm_magic_portal) in cast_create_town_portal for %s!\n",
op->name);
1428 "Oops, program error!");
1429 LOG(
llevError,
"object_new failed (force) in cast_create_town_portal for %s!\n",
op->name);
1441 "You see air moving and showing you the way home.");
1467 int i, posblocked, negblocked, maxrange;
1487 "Something is in the way.");
1492 }
else if (spell_ob->
race) {
1495 snprintf(buf1,
sizeof(buf1), spell_ob->
race, dir);
1498 LOG(
llevError,
"summon_wall: Unable to find archetype %s\n", buf1);
1500 "This spell is broken.");
1516 tmp->stats.maxhp =
tmp->stats.hp;
1526 tmp->stats.maxhp =
tmp->stats.hp;
1541 "Something destroys your %s",
1546 if (
tmp->other_arch &&
tmp->other_arch->clone.type ==
SPELL)
1559 for (i = 1; i <= maxrange; i++) {
1562 dir2 = (dir < 4) ? (dir+2) : dir-2;
1619 uint32_t dist, maxdist;
1629 "In what direction?");
1638 if (
op->contr->count) {
1639 if (
op->contr->count > maxdist) {
1641 "You can't dimension door that far!");
1645 for (dist = 0; dist <
op->contr->count; dist++) {
1659 if (dist < op->contr->count) {
1661 "Something blocks the magic of the spell.");
1662 op->contr->count = 0;
1665 op->contr->count = 0;
1679 "You cast your spell, but nothing happens.");
1688 for (dist = 0; dist < maxdist; dist++) {
1705 for (; dist > 0; dist--) {
1714 "Your spell failed!");
1719 if (
op->contr->transport &&
op->contr->transport->type ==
TRANSPORT) {
1721 if (
op->contr->transport) {
1723 "Your spell failed!");
1737 op->speed_left = -
FABS(
op->speed)*5;
1758 int heal = 0, success = 0;
1775 "You are already fully healed.");
1787 "You feel just fine!");
1788 }
else if (heal > 50) {
1790 "Your wounds close!");
1791 }
else if (heal > 25) {
1793 "Your wounds mostly close.");
1794 }
else if (heal > 10) {
1796 "Your wounds start to fade.");
1799 "Your wounds start to close.");
1815 "Your body feels cleansed");
1825 "Your mind feels clearer");
1836 "Your vision begins to return.");
1847 "Magical energies surge through your body!");
1855 "You feel redeemed with you god!");
1864 "You feel your belly fill with food");
1881 "You grow no stronger.",
1882 "You grow no more agile.",
1883 "You don't feel any healthier.",
1885 "You are no easier to look at.",
1911 object *
force = NULL;
1927 if (tmp2->name == spell_ob->
name) {
1930 }
else if (spell_ob->
race && spell_ob->
race == tmp2->name) {
1933 "You can not cast %s while %s is in effect",
1934 spell_ob->
name, tmp2->name_pl);
1939 if (
force == NULL) {
1953 if (duration >
force->duration) {
1954 force->duration = duration;
1956 "You recast the spell while in effect.");
1964 "Recasting the spell had no effect.");
1972 force->speed_left = -1.0;
1977 if (spell_ob->
resist[i]) {
1979 if (
force->resist[i] > 100)
1980 force->resist[i] = 100;
1993 for (k = 0; k < stat; k++)
2019 if (
op->speed > 0.5)
2072 if (tmp2->name == spell_ob->
name) {
2075 }
else if (spell_ob->
race && spell_ob->
race == tmp2->name) {
2077 "You can not cast %s while %s is in effect",
2078 spell_ob->
name, tmp2->name_pl);
2083 if (
force == NULL) {
2097 if (duration >
force->duration) {
2098 force->duration = duration;
2100 "You recast the spell while in effect.");
2103 "Recasting the spell had no effect.");
2109 force->speed_left = -1.0;
2113 "Your blessing seems empty.");
2118 if (god->
resist[i] > 0) {
2140 "You are blessed by %s!",
2182 #define SMALL_NUGGET "smallnugget"
2183 #define LARGE_NUGGET "largenugget"
2199 static void alchemy_object(
float value_adj,
object *
obj,
int *small_nuggets,
int *large_nuggets,
int *weight) {
2201 uint64_t small_value, large_value;
2212 if (small_nugget_arch == NULL) {
2217 if (large_nugget_arch == NULL) {
2232 assert(large_value != 0 && small_value != 0);
2234 *large_nuggets +=
count;
2237 *small_nuggets +=
count;
2244 if (*small_nuggets*small_value >= large_value) {
2245 assert(small_value != 0);
2247 *small_nuggets -= large_value/small_value;
2248 if (*small_nuggets && large_value%small_value)
2252 if (weight != NULL) {
2280 if (
x ==
op->x &&
y ==
op->y &&
op->map ==
m)
2283 if (small_nuggets) {
2285 tmp-> nrof = small_nuggets;
2288 if (large_nuggets) {
2290 tmp-> nrof = large_nuggets;
2310 int x,
y, weight = 0, weight_max, large_nuggets, small_nuggets, mflags;
2331 if (value_adj > 0.40)
2334 for (
y =
op->y-1; y <= op->
y+1;
y++) {
2335 for (
x =
op->x-1; x <= op->
x+1;
x++) {
2367 alchemy_object(value_adj, tmp1, &small_nuggets, &large_nuggets, &weight);
2372 if (weight > weight_max) {
2390 op->contr->socket.look_position = 0;
2410 int success = 0, was_one = 0;
2434 "You feel like some of your items are looser now.");
2438 "You failed to remove the curse.");
2441 "You are not using any cursed items.");
2463 "You need to mark an item first!");
2470 "The spell has no effect");
2477 "Your %s emits a dark light for a few seconds.",
name);
2486 "Your %s glows blue for a few seconds.",
name);
2509 int success = 0, num_ident;
2526 "The item has a story:\n%s",
2546 "On the ground is %s.",
2550 "The item has a story:\n%s",
2564 "You can't reach anything unidentified.");
2584 object *
tmp, *last, *detect;
2586 int done_one, range, mflags, floor,
level;
2587 int16_t
x,
y, nx, ny;
2597 for (
x =
op->x-range; x <= op->
x+range;
x++)
2598 for (
y =
op->y-range; y <= op->
y+range;
y++) {
2668 tmp->stats.Cha /= 4;
2703 int dx = nx, dy = ny;
2706 if (done_one == 2 && detect) {
2716 dx =
HEAD(detect)->x;
2717 dy =
HEAD(detect)->y;
2720 for (part = detect_ob; part != NULL; part = part->
more) {
2725 for (flag = 0; flag < 4; flag++) {
2758 if (!
tmp->invisible) {
2790 if (
victim->stats.maxsp <= 0)
2794 "You feel energy course through you.");
2800 "Your head explodes!");
2808 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.88) {
2810 "You feel like your head is going to explode.");
2811 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.66) {
2813 "You get a splitting headache!");
2814 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.5) {
2816 "Chaos fills your world.");
2818 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.25) {
2820 "You start hearing voices.");
2842 object *plyr = NULL;
2872 "There is no one there.");
2882 }
else if (
op != plyr) {
2890 sucked = (plyr->
stats.
sp*rate)/100;
2894 sucked = (sucked*rate)/100;
2895 op->stats.sp += sucked;
2949 && (
op->level > head->
level)) {
2952 }
else switch (head->
type) {
2954 if ((
op->level > head->
level) && !
op->stats.food && !
op->speed_left) {
2964 if (
rndm(0, 149) == 0) {
2996 "You can't consecrate anything if you don't worship a god!");
3006 "You are not powerful enough to reconsecrate the %s",
3016 letter = strlen(
buf);
3018 for (; letter < strlen(
buf); letter++)
3023 "You fail to consecrate the altar.");
3034 "You consecrated the altar to %s!",
3041 "You are not standing over an altar!");
3069 object *weapon, *
tmp;
3078 "Oops, program error!");
3079 LOG(
llevError,
"animate_weapon failed: spell %s missing other_arch!\n", spell->
name);
3098 "There is something in the way.");
3112 "There is something in the way.");
3121 "You must mark a weapon to use with this spell!");
3126 "The spell fails to transform your weapon.");
3131 "You need to mark a weapon to animate it.");
3136 "You need to pay for the weapon to animate it.");
3144 "You need to unequip %s before using it in this spell",
3149 if (weapon->
nrof > 1) {
3168 op->contr->golem_count =
tmp->count;
3192 tmp->stats.wc =
tmp->stats.wc
3197 if (
tmp->stats.wc < -127)
3198 tmp->stats.wc = -127;
3201 tmp->stats.maxhp =
tmp->stats.maxhp
3206 if (
tmp->stats.maxhp < 0)
3207 tmp->stats.maxhp = 10;
3208 tmp->stats.hp =
tmp->stats.maxhp;
3216 if (
tmp->stats.dam < 0)
3217 tmp->stats.dam = 127;
3220 if (!
tmp->attacktype)
3224 if (
op->materialname != NULL)
3228 tmp->resist[i] = 50-(mt->
save[i]*5);
3255 if (
tmp->speed > 3.33)
3259 snprintf(
buf,
sizeof(
buf),
"animated %s", weapon->
name);
3280 tmp->speed_left = -1;
3281 tmp->direction = dir;
3308 "It can be no brighter here.");
3311 "It can be no darker here.");
3395 "You recast the spell while in effect.");
3420 if (!
msg ||
msg[0] == 0) {
3428 "Trying to cheat are we?");
3429 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)
int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
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 remove_friendly_object(object *op)
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
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
const object * find_god(const char *name)
#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
void add_friendly_object(object *op)
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)
#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)
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)