Go to the documentation of this file.
20 #define _GNU_SOURCE // strcasestr() is a GNU extension in string.h
52 tmp->level =
op->level;
54 tmp->duration += lvl/5;
61 if (
tmp->duration >= 40)
64 tmp->stats.maxhp =
tmp->count;
65 if (
tmp->stats.maxhp == 0)
84 int recharge(
object *
op,
object *caster,
object *spell_ob) {
90 if (wand == NULL || wand->
type !=
WAND) {
92 "You need to mark the wand you want to recharge.");
98 "The %s vibrates violently, then explodes!",
107 tmp->stats.hp =
tmp->stats.dam/2;
108 if (
tmp->stats.hp < 2)
120 "Your %s is broken.",
130 "The %s glows with power.",
163 int x =
op->x,
y =
op->y, choice, friendly;
165 object *owner, *replacing;
179 std::vector<std::pair<archetype *, int>> candidates;
185 candidates.push_back(std::make_pair(at, pos));
189 if (candidates.empty()) {
195 choice =
rndm(0, candidates.size() - 1);
196 auto at = candidates[choice].first;
197 int pos = candidates[choice].second;
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;
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;
292 std::vector<archetype *> candidates;
305 candidates.push_back(at);
308 if (candidates.empty())
311 difficulty =
op->magic*5;
316 choice =
rndm(0, candidates.size() - 1);
317 at = candidates[choice];
322 }
while (new_ob->
value > max_value && tries < 10);
324 LOG(
llevError,
"polymorph_item: fix_generated_object made %s invisible?!\n", new_ob->
name);
336 if (
op->nrof && new_ob->
nrof) {
339 if (new_ob->
nrof > 2)
347 op->stats.food = charges;
427 int range, mflags, maxrange,
level;
435 for (range = 1; range < maxrange; range++) {
494 int missile_plus = 0, bonus_plus = 0;
495 const char *missile_name;
496 object *
tmp, *missile;
500 missile_name =
tmp != NULL ?
tmp->race :
"arrow";
504 if (!strcmp(missile_name,
"arrows"))
505 missile_name =
"arrow";
506 else if (!strcmp(missile_name,
"crossbow bolts"))
507 missile_name =
"bolt";
510 if ( stringarg && strncmp(stringarg,
"of ",3)==0 ) stringarg +=3;
511 if ( stringarg && strncmp(stringarg,
"bolt",4)==0 ) {
512 missile_name =
"bolt";
514 while ( isalpha(*stringarg) ) ++stringarg;
515 while ( *stringarg==
' ' ) ++stringarg;
517 if ( stringarg && strncmp(stringarg,
"arrow",5)==0 ) {
518 missile_name =
"arrow";
520 while ( isalpha(*stringarg) ) ++stringarg;
521 while ( *stringarg==
' ' ) ++stringarg;
525 LOG(
llevDebug,
"Cast create_missile: could not find archetype %s\n", missile_name);
530 if ( stringarg && strncmp(stringarg,
"of ",3)==0 ) stringarg +=3;
533 if (isalpha(*stringarg)) {
535 auto ial = std::find_if(items.cbegin(), items.cend(), [&] (
const auto al) { return !strcasecmp(al->item->name, stringarg); });
536 if (ial == items.cend()) {
539 "No such object %ss of %s",
540 missile_name, stringarg);
547 "You are not allowed to create %ss of %s",
548 missile_name, stringarg);
558 }
else if (atoi(stringarg) < missile_plus)
559 missile_plus = atoi(stringarg);
561 if (missile_plus > 4)
563 else if (missile_plus < -4)
567 if (missile->
nrof <= (uint32_t)3 * (missile_plus + bonus_plus)) {
570 "This item is too powerful for you to create!");
573 missile->
nrof -= 3*(missile_plus+bonus_plus);
574 if (missile->
nrof < 1)
577 missile->
magic = missile_plus;
660 "You don't have enough experience to create any food.");
667 new_op->
nrof = food_value;
670 if (new_op->
nrof < 1)
695 int probe(
object *
op,
object *caster,
object *spell_ob,
int dir,
int level) {
696 int r, mflags, maxrange;
704 for (
r = 1;
r < maxrange;
r++) {
715 "Something blocks your magic.");
722 "You detect something.");
730 "You detect nothing.");
757 if (!
pl->contr->invis_race) {
768 if (strstr(
mon->
race,
pl->contr->invis_race))
800 if (
op->invisible > 1000) {
802 "You can not extend the duration of your invisibility any further");
811 if (
op->invisible > 1000)
812 op->invisible = 1000;
815 if (
op->contr->invis_race)
820 op->contr->tmp_invis = 0;
822 op->contr->tmp_invis = 1;
824 op->contr->hidden = 0;
828 "You can't see your hands!");
831 "You feel more transparent!");
852 int range, i, j, mflags;
861 for (i = -range; i < range; i++)
862 for (j = -range; j < range; j++) {
911 "You feel a force starting to build up inside you.");
918 "Oops, program error!");
919 LOG(
llevError,
"cast_word_of_recall: create_archetype(force) failed!\n");
930 dummy->
speed = 0.002;
945 "You feel a force starting to build up inside you.");
973 LOG(
llevError,
"cast_wonder: Unable to get a spell!\n");
977 LOG(
llevError,
"cast_wonder: spell returned is not a spell (%d, %s)!\n", newspell->
type, newspell->
name);
982 LOG(
llevError,
"cast_wonder: spell returned is another wonder spell!\n");
1016 "You worship no god");
1022 if (*cp ==
'\0' &&
tmp == NULL)
1024 "You feel very mundane");
1034 "Your %s is depleted by %d",
1042 if (
op->glow_radius > 0)
1044 "You glow in the dark.");
1049 if (immunity == NULL) {
1056 if (
tmp->level > 100)
1058 else if (
tmp->level > 70)
1060 else if (
tmp->level > 20)
1065 if (immunity != NULL) {
1078 if (
tmp->stats.exp == 0) {
1079 snprintf(
buf,
sizeof(
buf),
"Your metabolism isn't focused on anything.");
1107 object *dummy, *
force;
1113 if (dummy == NULL) {
1115 "Oops, program error!");
1116 LOG(
llevError,
"object_new failed (force in cast_create_town_portal for %s!\n",
op->name);
1121 if (
force == NULL) {
1134 "You fix this place in your mind and feel that you "
1135 "can come here from anywhere.");
1148 if (dummy == NULL) {
1150 "Oops, program error!");
1151 LOG(
llevError,
"object_new failed (force) in cast_create_town_portal for %s!\n",
op->name);
1156 if (perm_portal == NULL) {
1158 "Oops, program error!");
1170 int16_t exitx =
EXIT_X(old_force);
1171 int16_t exity =
EXIT_Y(old_force);
1172 LOG(
llevDebug,
"Trying to kill a portal in %s (%d,%d)\n", old_force->
race, exitx, exity);
1183 if (
tmp->name == old_force->
name) {
1195 if (
tmp->name == old_force->
name) {
1239 char portal_name [1024], portal_message [1024];
1250 "You can't cast that here.");
1256 if (
op->contr &&
op->contr->transport) {
1258 "You need to exit the transport to cast that.");
1263 if (
force == NULL) {
1303 if (exitmap == NULL) {
1305 "Something strange happens. You can't remember where to go!?");
1312 "The spell effect has expired.");
1321 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);
1322 else if (op_level < 30)
1323 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);
1324 else if (op_level < 60)
1325 snprintf(portal_message, 1024,
"A shining door opens in the air in front of you, showing you the path to another place.");
1327 snprintf(portal_message, 1024,
"As you walk through %s's portal, flowers come out from the ground around you. You feel awed.",
op->name);
1334 snprintf(portal_name, 1024,
"%s's portal to %s",
op->name,
force->name);
1336 if (dummy == NULL) {
1338 "Oops, program error!");
1339 LOG(
llevError,
"object_new failed (perm_magic_portal) in cast_create_town_portal for %s!\n",
op->name);
1367 "Oops, program error!");
1368 LOG(
llevError,
"object_new failed (force) in cast_create_town_portal for %s!\n",
op->name);
1383 snprintf(portal_name, 1024,
"%s's portal to %s",
op->name,
op->map->path);
1385 if (dummy == NULL) {
1387 "Oops, program error!");
1388 LOG(
llevError,
"object_new failed (perm_magic_portal) in cast_create_town_portal for %s!\n",
op->name);
1415 "Oops, program error!");
1416 LOG(
llevError,
"object_new failed (force) in cast_create_town_portal for %s!\n",
op->name);
1428 "You see air moving and showing you the way home.");
1454 int i, posblocked, negblocked, maxrange;
1474 "Something is in the way.");
1479 }
else if (spell_ob->
race) {
1482 snprintf(buf1,
sizeof(buf1), spell_ob->
race, dir);
1485 LOG(
llevError,
"summon_wall: Unable to find archetype %s\n", buf1);
1487 "This spell is broken.");
1503 tmp->stats.maxhp =
tmp->stats.hp;
1513 tmp->stats.maxhp =
tmp->stats.hp;
1528 "Something destroys your %s",
1533 if (
tmp->other_arch &&
tmp->other_arch->clone.type ==
SPELL)
1546 for (i = 1; i <= maxrange; i++) {
1549 dir2 = (dir < 4) ? (dir+2) : dir-2;
1606 uint32_t dist, maxdist;
1616 "In what direction?");
1625 if (
op->contr->count) {
1626 if (
op->contr->count > maxdist) {
1628 "You can't dimension door that far!");
1632 for (dist = 0; dist <
op->contr->count; dist++) {
1646 if (dist < op->contr->count) {
1648 "Something blocks the magic of the spell.");
1649 op->contr->count = 0;
1652 op->contr->count = 0;
1666 "You cast your spell, but nothing happens.");
1675 for (dist = 0; dist < maxdist; dist++) {
1692 for (; dist > 0; dist--) {
1701 "Your spell failed!");
1706 if (
op->contr->transport &&
op->contr->transport->type ==
TRANSPORT) {
1708 if (
op->contr->transport) {
1710 "Your spell failed!");
1724 op->speed_left = -
FABS(
op->speed)*5;
1745 int heal = 0, success = 0;
1762 "You are already fully healed.");
1774 "You feel just fine!");
1775 }
else if (heal > 50) {
1777 "Your wounds close!");
1778 }
else if (heal > 25) {
1780 "Your wounds mostly close.");
1781 }
else if (heal > 10) {
1783 "Your wounds start to fade.");
1786 "Your wounds start to close.");
1802 "Your body feels cleansed");
1812 "Your mind feels clearer");
1823 "Your vision begins to return.");
1834 "Magical energies surge through your body!");
1842 "You feel redeemed with you god!");
1851 "You feel your belly fill with food");
1868 "You grow no stronger.",
1869 "You grow no more agile.",
1870 "You don't feel any healthier.",
1872 "You are no easier to look at.",
1898 object *
force = NULL;
1914 if (tmp2->name == spell_ob->
name) {
1917 }
else if (spell_ob->
race && spell_ob->
race == tmp2->name) {
1920 "You can not cast %s while %s is in effect",
1921 spell_ob->
name, tmp2->name_pl);
1926 if (
force == NULL) {
1940 if (duration >
force->duration) {
1941 force->duration = duration;
1943 "You recast the spell while in effect.");
1951 "Recasting the spell had no effect.");
1959 force->speed_left = -1.0;
1964 if (spell_ob->
resist[i]) {
1966 if (
force->resist[i] > 100)
1967 force->resist[i] = 100;
1980 for (k = 0; k < stat; k++)
2006 if (
op->speed > 0.5)
2059 if (tmp2->name == spell_ob->
name) {
2062 }
else if (spell_ob->
race && spell_ob->
race == tmp2->name) {
2064 "You can not cast %s while %s is in effect",
2065 spell_ob->
name, tmp2->name_pl);
2070 if (
force == NULL) {
2084 if (duration >
force->duration) {
2085 force->duration = duration;
2087 "You recast the spell while in effect.");
2090 "Recasting the spell had no effect.");
2096 force->speed_left = -1.0;
2100 "Your blessing seems empty.");
2105 if (god->
resist[i] > 0) {
2127 "You are blessed by %s!",
2169 #define SMALL_NUGGET "smallnugget"
2170 #define LARGE_NUGGET "largenugget"
2186 static void alchemy_object(
float value_adj,
object *
obj,
int *small_nuggets,
int *large_nuggets,
int *weight) {
2188 uint64_t small_value, large_value;
2199 if (small_nugget_arch == NULL) {
2204 if (large_nugget_arch == NULL) {
2216 if ((
obj->value > 0) &&
rndm(0, 29)) {
2219 assert(large_value != 0 && small_value != 0);
2221 *large_nuggets +=
count;
2224 *small_nuggets +=
count;
2231 if (*small_nuggets*small_value >= large_value) {
2232 assert(small_value != 0);
2234 *small_nuggets -= large_value/small_value;
2235 if (*small_nuggets && large_value%small_value)
2239 if (weight != NULL) {
2240 *weight +=
obj->weight;
2267 if (
x ==
op->x &&
y ==
op->y &&
op->map ==
m)
2270 if (small_nuggets) {
2272 tmp-> nrof = small_nuggets;
2275 if (large_nuggets) {
2277 tmp-> nrof = large_nuggets;
2297 int x,
y, weight = 0, weight_max, large_nuggets, small_nuggets, mflags;
2318 if (value_adj > 0.40)
2321 for (
y =
op->y-1; y <= op->
y+1;
y++) {
2322 for (
x =
op->x-1; x <= op->
x+1;
x++) {
2354 alchemy_object(value_adj, tmp1, &small_nuggets, &large_nuggets, &weight);
2359 if (weight > weight_max) {
2377 op->contr->socket->look_position = 0;
2397 int success = 0, was_one = 0;
2421 "You feel like some of your items are looser now.");
2425 "You failed to remove the curse.");
2428 "You are not using any cursed items.");
2450 "You need to mark an item first!");
2457 "The spell has no effect");
2464 "Your %s emits a dark light for a few seconds.",
name);
2473 "Your %s glows blue for a few seconds.",
name);
2496 int success = 0, num_ident;
2513 "The item has a story:\n%s",
2533 "On the ground is %s.",
2537 "The item has a story:\n%s",
2551 "You can't reach anything unidentified.");
2571 object *
tmp, *last, *detect;
2573 int done_one, range, mflags, floor,
level;
2574 int16_t
x,
y, nx, ny;
2584 for (
x =
op->x-range; x <= op->
x+range;
x++)
2585 for (
y =
op->y-range; y <= op->
y+range;
y++) {
2655 tmp->stats.Cha /= 4;
2690 int dx = nx, dy = ny;
2693 if (done_one == 2 && detect) {
2703 dx =
HEAD(detect)->x;
2704 dy =
HEAD(detect)->y;
2707 for (part = detect_ob; part != NULL; part = part->
more) {
2712 for (flag = 0; flag < 4; flag++) {
2745 if (!
tmp->invisible) {
2777 if (
victim->stats.maxsp <= 0)
2781 "You feel energy course through you.");
2787 "Your head explodes!");
2795 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.88) {
2797 "You feel like your head is going to explode.");
2798 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.66) {
2800 "You get a splitting headache!");
2801 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.5) {
2803 "Chaos fills your world.");
2805 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.25) {
2807 "You start hearing voices.");
2829 object *plyr = NULL;
2859 "There is no one there.");
2869 }
else if (
op != plyr) {
2877 sucked = (plyr->
stats.
sp*rate)/100;
2881 sucked = (sucked*rate)/100;
2882 op->stats.sp += sucked;
2936 && (
op->level > head->
level)) {
2939 }
else switch (head->
type) {
2941 if ((
op->level > head->
level) && !
op->stats.food && !
op->speed_left) {
2951 if (
rndm(0, 149) == 0) {
2983 "You can't consecrate anything if you don't worship a god!");
2993 "You are not powerful enough to reconsecrate the %s",
3003 letter = strlen(
buf);
3005 for (; letter < strlen(
buf); letter++)
3010 "You fail to consecrate the altar.");
3021 "You consecrated the altar to %s!",
3028 "You are not standing over an altar!");
3056 object *weapon, *
tmp;
3065 "Oops, program error!");
3066 LOG(
llevError,
"animate_weapon failed: spell %s missing other_arch!\n", spell->
name);
3085 "There is something in the way.");
3099 "There is something in the way.");
3108 "You must mark a weapon to use with this spell!");
3113 "The spell fails to transform your weapon.");
3118 "You need to mark a weapon to animate it.");
3123 "You need to pay for the weapon to animate it.");
3131 "You need to unequip %s before using it in this spell",
3136 if (weapon->
nrof > 1) {
3155 op->contr->golem_count =
tmp->count;
3179 tmp->stats.wc =
tmp->stats.wc
3184 if (
tmp->stats.wc < -127)
3185 tmp->stats.wc = -127;
3188 tmp->stats.maxhp =
tmp->stats.maxhp
3193 if (
tmp->stats.maxhp < 0)
3194 tmp->stats.maxhp = 10;
3195 tmp->stats.hp =
tmp->stats.maxhp;
3203 if (
tmp->stats.dam < 0)
3204 tmp->stats.dam = 127;
3207 if (!
tmp->attacktype)
3211 if (
op->materialname != NULL)
3215 tmp->resist[i] = 50-(mt->
save[i]*5);
3242 if (
tmp->speed > 3.33)
3246 snprintf(
buf,
sizeof(
buf),
"animated %s", weapon->
name);
3267 tmp->speed_left = -1;
3268 tmp->direction = dir;
3295 "It can be no brighter here.");
3298 "It can be no darker here.");
3382 "You recast the spell while in effect.");
3407 if (!
msg ||
msg[0] == 0) {
3415 "Trying to cheat are we?");
3416 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)
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_)
std::vector< artifact * > items
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
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)
AssetsManager * getManager()
materialtype_t * name_to_material(const char *name)
object * object_insert_in_ob(object *op, object *where)
int16_t resist[NROFATTACKS]
#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
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)
#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)
void each(std::function< void(T *)> op)
#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)
struct archetype * other_arch
Archetypes * archetypes()
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)
struct treasurelist * randomitems
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)
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)