69 if (!strcmp(name, plname))
87 size_t namelen = strlen(plname);
90 if (strlen(pl->
ob->
name) < namelen)
93 if (!strcmp(pl->
ob->
name, plname))
125 while (fgets(buf,
MAX_BUF, fp) != NULL) {
128 strncat(motd+size, buf,
HUGE_BUF-size);
155 while (fgets(buf,
MAX_BUF, fp) != NULL) {
162 strncat(rules+size, buf,
HUGE_BUF-size);
190 while (fgets(buf,
MAX_BUF, fp) != NULL) {
200 strcpy(subject, buf+1);
209 strncat(news+size, buf,
HUGE_BUF-size);
232 if (*cp ==
'-' || *cp ==
'_')
235 for (; *cp !=
'\0'; cp++)
236 if (!((*cp >=
'a' && *cp <=
'z') || (*cp >=
'A' && *cp <=
'Z'))
276 while (tmp != NULL && tmp->
next != NULL)
305 p->last_save_tick = 9999999;
426 if (at == NULL || at->
next == NULL)
461 object *tmp = ol->
ob;
466 LOG(
llevDebug,
"get_nearest_player: Found free/non friendly object on friendly list\n");
508 #define DETOUR_AMOUNT 2
523 #define MAX_SPACES 50
559 int lastx, lasty, dir, i, diff, firstdir = 0, lastdir, max =
MAX_SPACES, mflags, blocked;
576 while (diff > 1 && max > 0) {
626 x = lastx+freearr_x[
absdir(lastdir+i)];
627 y = lasty+freearr_y[
absdir(lastdir+i)];
630 if (mflags&P_OUT_OF_MAP)
689 object *op, *next = NULL;
694 for (op = pl->
inv; op; op = next) {
732 LOG(
llevError,
"give_initial_items: Removing duplicate object %s\n", tmp->
name);
773 for (op = pl->
inv; op; op = next) {
840 if (key ==
'q' || key ==
'Q') {
844 }
else if (key ==
'a' || key ==
'A') {
846 const char *name = op->
name;
893 LOG(
llevError,
"get_party_password(): tried to make player %s join a NULL party\n", op->
name);
911 for (i = 0; i < 4; i++)
912 a[i] = (
int)RANDOM()%6+1;
914 for (i = 0, j = 0, k = 7; i < 4; i++)
919 for (i = 0, k = 0; i < 4; i++) {
946 }
while (sum != 105);
959 if (statsort[i] < statsort[i+1]) {
961 statsort[i] = statsort[i+1];
1024 LOG(
llevError,
"player.c:swap_stat() - Swap_First is -1\n");
1080 int keynum = key-
'0';
1081 static const sint8 stat_trans[] = {
1092 if (keynum > 0 && keynum <= 7) {
1109 if (op->
map == NULL) {
1159 if (key ==
'q' || key ==
'Q') {
1164 if (key ==
'd' || key ==
'D') {
1217 if (oldmap != op->
map) {
1238 int x = op->
x, y = op->
y;
1281 if (key !=
'y' && key !=
'Y' && key !=
'q' && key !=
'Q') {
1284 "OK, continuing to play.", NULL);
1294 "%s quits the game.",
1295 "%s quits the game.",
1312 for (mp =
first_map; mp != NULL; mp = next) {
1314 if (!strncmp(mp->
path, buf, strlen(buf)))
1339 if (op->
enemy == NULL) {
1363 for (diff = 0; diff < 3; diff++) {
1364 int m = 1-(RANDOM()&2);
1386 tag_t next_tag = 0, op_tag;
1389 char putstring[128], tmpstr[16];
1399 next_tag = next->
count;
1407 next_tag = next->
count;
1469 "item name: %s item type: %d weight/value: %d",
1470 "item name: %s item type: %d weight/value: %d",
1475 snprintf(putstring,
sizeof(putstring),
"...flags: ");
1476 for (k = 0; k < 4; k++) {
1477 for (j = 0; j < 32; j++) {
1478 if ((tmp->
flags[k]>>j)&0x01) {
1479 snprintf(tmpstr,
sizeof(tmpstr),
"%d ", k*32+j);
1480 strcat(putstring, tmpstr);
1485 putstring, putstring);
1534 fprintf(stderr,
"FOOD\n");
1541 fprintf(stderr,
"DRINK\n");
1549 fprintf(stderr,
"FLESH\n");
1556 fprintf(stderr,
"POTION\n");
1565 fprintf(stderr,
"SPELLBOOK\n");
1572 fprintf(stderr,
"SKILLSCROLL\n");
1579 fprintf(stderr,
"READABLES\n");
1588 fprintf(stderr,
"MAGIC_DEVICE\n");
1597 fprintf(stderr,
"MAGICAL\n");
1605 fprintf(stderr,
"MONEY/GEM\n");
1615 fprintf(stderr,
"JEWELS\n");
1624 fprintf(stderr,
"BOW\n");
1631 fprintf(stderr,
"ARROW\n");
1640 fprintf(stderr,
"ARMOUR\n");
1647 fprintf(stderr,
"HELMET\n");
1654 fprintf(stderr,
"SHIELD\n");
1661 fprintf(stderr,
"BOOTS\n");
1668 fprintf(stderr,
"GLOVES\n");
1675 fprintf(stderr,
"GLOVES\n");
1684 fprintf(stderr,
"MISSILEWEAPON\n");
1691 if (strstr(tmp->
name,
"table") == NULL
1692 && strstr(tmp->
arch->
name,
"table") == NULL
1693 && strstr(tmp->
name,
"chair")
1694 && strstr(tmp->
arch->
name,
"chair") == NULL) {
1697 fprintf(stderr,
"WEAPON\n");
1702 if (strstr(tmp->
arch->
name,
"table") == NULL
1703 && strstr(tmp->
arch->
name,
"chair") == NULL) {
1706 fprintf(stderr,
"WEAPON\n");
1717 fprintf(stderr,
"KEY\n");
1754 for (op = op->
inv; op; op = op->
below)
1783 object *tmp = NULL, *arrow, *ntmp;
1784 int attacknum, attacktype, betterby = 0, i;
1789 for (arrow = op->
inv; arrow; arrow = arrow->
below) {
1791 && arrow->race == type
1799 }
else if (arrow->type ==
ARROW && arrow->race == type) {
1801 if (target->
race != NULL
1802 && arrow->slaying != NULL
1803 && strstr(arrow->slaying, target->
race)) {
1810 betterby = (arrow->magic+arrow->stats.dam)*2;
1813 for (attacknum = 0; attacknum <
NROFATTACKS; attacknum++) {
1814 attacktype = 1<<attacknum;
1815 if ((arrow->attacktype&attacktype) && (target->
arch->
clone.
resist[attacknum]) < 0)
1816 if (((arrow->magic+arrow->stats.dam)*(100-target->
arch->
clone.
resist[attacknum])/100) > betterby) {
1818 betterby = (arrow->magic+arrow->stats.dam)*(100-target->
arch->
clone.
resist[attacknum])/100;
1821 if ((2+arrow->magic+arrow->stats.dam) > betterby) {
1823 betterby = 2+arrow->
magic+arrow->stats.dam;
1825 if (arrow->title && (1+arrow->magic+arrow->stats.dam) > betterby) {
1827 betterby = 1+arrow->
magic+arrow->stats.dam;
1832 if (tmp == NULL && arrow == NULL)
1855 int i, mflags, found, number;
1858 if (op->
map == NULL)
1871 for (i = 0, found = 0; i < 20; i++) {
1924 tag_t left_tag, tag;
1925 int bowspeed, mflags;
1930 "You can't shoot yourself!", NULL);
1936 for (bow = op->
inv; bow; bow = bow->
below)
1950 "Your %s is broken.",
1951 "Your %s is broken.",
1964 if (arrow == NULL) {
1969 "You have no %s left.",
1970 "You have no %s left.",
1987 if (arrow->
nrof == 0) {
1995 left_tag = left->
count;
1997 if (arrow == NULL) {
1999 "You have no %s left.",
2000 "You have no %s left.",
2038 if (arrow->
speed < 1.0)
2045 int mod = bow->
magic
2053 if (plmod+mod > 140)
2055 else if (plmod+mod < -100)
2107 int ret = 0, wcmod = 0;
2116 ret =
fire_bow(op, NULL, dir, 0, op->
x, op->
y);
2120 ret |=
fire_bow(op, NULL, dir, 0, op->
x, op->
y);
2126 ret =
fire_bow(op, NULL, dir, 0, op->
x, op->
y);
2149 "You have no range item readied.", NULL);
2163 "The %s goes poof.",
2164 "The %s goes poof.",
2174 "The %s whines for a while, but nothing happens.",
2175 "The %s whines for a while, but nothing happens.",
2179 "The %s needs more time to charge.",
2180 "The %s needs more time to charge.",
2242 "You have no applicable skill to use.", NULL);
2254 "Illegal shoot type.", NULL);
2282 if (container->
inv == NULL)
2286 for (tmp = container->
inv; tmp != NULL; tmp = tmp->
below) {
2303 for (tmp = container->
inv; tmp != NULL; tmp = tmp->
below) {
2306 if ((key =
find_key(pl, tmp, door)) != NULL)
2316 if (pl != container) {
2342 "The %s in your %s vibrates as you approach the door",
2343 "The %s in your %s vibrates as you approach the door",
2344 name_tmp, name_cont);
2367 object *key =
find_key(op, op, door);
2371 object *container = key->
env;
2386 "You open the door with the %s",
2387 "You open the door with the %s",
2394 if (container != op)
2420 object *tmp, *
mon, *tpl, *mon_owner;
2422 int on_battleground;
2462 while (tmp != NULL) {
2484 if (mon->
head != NULL)
2530 "You withhold your attack", NULL);
2551 }
else if ((mon->
stats.
hp >= 0)
2601 if (dir == 1 || dir == 5) {
2603 for (y = 0; y <= sy; y++) {
2604 for (x = 0; x < sx; x++) {
2611 }
else if (dir == 3 || dir == 7) {
2613 for (y = 0; y < sy; y++) {
2614 for (x = 0; x <= sx; x++) {
2624 for (part = transport; part; part = part->
more) {
2640 int x, y, scroll_dir = 0;
2647 if (transport->
direction == 1 && dir == 8) {
2649 }
else if (transport->
direction == 2 && dir == 3) {
2651 }
else if (transport->
direction == 3 && dir == 2) {
2653 }
else if (transport->
direction == 5 && dir == 6) {
2655 }
else if (transport->
direction == 6 && dir == 5) {
2657 }
else if (transport->
direction == 7 && dir == 8) {
2659 }
else if (transport->
direction == 8 && dir == 7) {
2661 }
else if (transport->
direction == 8 && dir == 1) {
2673 if (x != transport->
x || y != transport->
y) {
2678 for (pl = transport->
inv; pl; pl = pl->
below) {
2681 pl->
map = transport->
map;
2749 if ((dir < 0) || (dir >= 9)) {
2750 LOG(
llevError,
"move_player: invalid direction %d\n", dir);
2756 dir =
absdir(dir+RANDOM()%3+RANDOM()%3-2);
2760 if (!transport && op->
hide)
2840 "Your invisibility spell runs out.", NULL);
2905 for (tmp = op->
inv; tmp != NULL; tmp = tmp->
below)
2912 "Your %s vibrates violently, then evaporates.",
2913 "Your %s vibrates violently, then evaporates.",
2925 LOG(
llevError,
"Error: LIFESAVE set without applied object.\n");
2984 time_t now = time(NULL);
2986 strncpy(buf2,
" R.I.P.\n\n", len);
2991 strncat(buf2,
" ", 20-strlen(buf)/2);
2992 strncat(buf2, buf, len-strlen(buf2)-1);
2994 snprintf(buf,
sizeof(buf),
"who was in level %d when killed\n", op->
level);
2996 snprintf(buf,
sizeof(buf),
"who was in level %d when died.\n\n", op->
level);
2997 strncat(buf2,
" ", 20-strlen(buf)/2);
2998 strncat(buf2, buf, len-strlen(buf2)-1);
3001 strncat(buf2,
" ", 21-strlen(buf)/2);
3002 strncat(buf2, buf, len-strlen(buf2)-1);
3004 strftime(buf,
MAX_BUF,
"%b %d %Y\n", localtime(&now));
3005 strncat(buf2,
" ", 20-strlen(buf)/2);
3006 strncat(buf2, buf, len-strlen(buf2)-1);
3019 int gen_hp, gen_sp, gen_grace;
3020 int over_hp, over_sp, over_grace;
3024 int rate_grace = 2000;
3025 const int max_hp = 1;
3026 const int max_sp = 1;
3027 const int max_grace = 1;
3051 if (op->contr->gen_grace >= 0)
3052 gen_grace = (op->contr->gen_grace+1)*op->stats.maxgrace;
3054 gen_grace = op->stats.maxgrace;
3055 rate_grace -= rate_grace/2*op->contr->gen_grace;
3059 if (op->contr->ranges[
range_golem] == NULL && --op->last_sp < 0) {
3060 gen_sp = gen_sp*10/
MAX(op->contr->gen_sp_armour, 10);
3061 if (op->stats.sp < op->stats.maxsp) {
3066 if (op->contr->digestion < 0)
3067 op->stats.food += op->contr->digestion;
3068 else if (op->contr->digestion > 0
3070 op->stats.food = last_food;
3074 over_sp = (gen_sp+10)/rate_sp;
3076 if (op->stats.sp < op->stats.maxsp) {
3077 op->stats.sp +=
MIN(over_sp, max_sp);
3080 if (op->stats.sp > op->stats.maxsp)
3081 op->stats.sp = op->stats.maxsp;
3085 op->last_sp = rate_sp/(
MAX(gen_sp, 20)+10);
3088 op->last_sp = rate_sp/(
MAX(gen_sp, 20)+10);
3094 if (--op->last_grace < 0) {
3095 if (op->stats.grace < op->stats.maxgrace/2)
3097 if (max_grace > 1) {
3098 over_grace = (
MAX(gen_grace, 20)+10)/rate_grace;
3099 if (over_grace > 0) {
3100 op->stats.sp += over_grace+(
random_roll(0, rate_grace-1, op,
PREFER_HIGH) > ((
MAX(gen_grace, 20)+10)%rate_grace)) ? -1 : 0;
3103 op->last_grace = rate_grace/(
MAX(gen_grace, 20)+10);
3106 op->last_grace = rate_grace/(
MAX(gen_grace, 20)+10);
3113 if (op->stats.hp < op->stats.maxhp) {
3118 if (op->contr->digestion < 0)
3119 op->stats.food += op->contr->digestion;
3120 else if (op->contr->digestion > 0
3122 op->stats.food = last_food;
3126 over_hp = (
MAX(gen_hp, 20)+10)/rate_hp;
3128 op->stats.sp += over_hp+(RANDOM()%rate_hp > ((
MAX(gen_hp, 20)+10)%rate_hp)) ? -1 : 0;
3131 op->last_heal = rate_hp/(
MAX(gen_hp, 20)+10);
3134 op->last_heal = rate_hp/(
MAX(gen_hp, 20)+10);
3139 if (--op->last_eat < 0) {
3140 int bonus =
MAX(op->contr->digestion, 0);
3141 int penalty =
MAX(-op->contr->digestion, 0);
3142 if (op->contr->gen_hp > 0)
3143 op->last_eat = 25*(1+bonus)/(op->contr->gen_hp+penalty+1);
3145 op->last_eat = 25*(1+bonus)/(penalty+1);
3152 if (op->contr->state ==
ST_PLAYING && op->stats.food < 0 && op->stats.hp >= 0) {
3156 object *tmp, *flesh = NULL;
3158 for (tmp = op->
inv; tmp != NULL; tmp = tmp->
below) {
3162 "You blindly grab for a bite of food.", NULL);
3164 if (op->stats.food >= 0 || op->stats.hp < 0)
3173 if (op->stats.food < 0 && op->stats.hp >= 0 && flesh) {
3175 "You blindly grab for a bite of food.", NULL);
3181 while (op->stats.food < 0 && op->stats.hp > 0)
3185 if (!op->contr->state && !
QUERY_FLAG(op,
FLAG_WIZ) && (op->stats.hp < 0 || op->stats.food < 0))
3196 object *tmp, *tmp2, *next;
3202 for (tmp = op->
inv; tmp != NULL; tmp = next) {
3214 if (tmp->
nrof > 1) {
3247 int will_kill_again;
3261 "You have been defeated in combat!\n"
3262 "Local medics have saved your life...",
3272 "Your body feels cleansed", NULL);
3281 "Your mind feels clearer", NULL);
3295 snprintf(buf,
sizeof(buf),
" This %s has been cut off %s\n"
3296 " the %s, when he was defeated at\n"
3297 " level %d by %s.\n",
3301 snprintf(buf,
sizeof(buf),
" This %s has been taken from %s\n"
3302 " the %s, when he was defeated at\n"
3303 " level %d by %s.\n",
3332 "You would have starved, but you are "
3333 "in explore mode, so...", NULL);
3337 snprintf(buf,
sizeof(buf),
"%s starved to death.", op->
name);
3343 "You would have died, but you are "
3344 "in explore mode, so...", NULL);
3385 for (z = 0; z < num_stats_lose; z++) {
3415 if (this_stat < 0) {
3417 int keep_chance = this_stat*this_stat;
3419 if (keep_chance < 1)
3435 if (lose_this_stat) {
3443 if (this_stat >= -50) {
3459 if (god && (strcmp(god,
"none")))
3462 "For a brief moment you feel the holy presence of %s protecting you",
3463 "For a brief moment you feel the holy presence of %s protecting you",
3468 "For a brief moment you feel a holy presence protecting you.",
3476 snprintf(buf,
sizeof(buf),
"%s's gravestone", op->
name);
3478 snprintf(buf,
sizeof(buf),
"%s's gravestones", op->
name);
3480 snprintf(buf,
sizeof(buf),
"RIP\nHere rests the hero %s the %s,\n"
3498 "Your body feels cleansed", NULL);
3507 "Your mind feels clearer", NULL);
3545 will_kill_again = 0;
3550 if (will_kill_again) {
3560 if (will_kill_again&(1<<at))
3569 "YOU HAVE DIED.", NULL);
3608 if (op->
map != NULL)
3683 object *skop, *spob;
3689 LOG(
llevError,
"Player %s lacks critical skill use_magic_item!\n", op->
name);
3692 spob = throw_ob->
inv;
3738 for (tmp = op->
inv; tmp; tmp = tmp->
below)
3756 int i, level = 0, mflag;
3759 if (!ob || !ob->
map)
3800 if (!op || !op->
map)
3807 if (!skop || num >= skop->
level) {
3809 "You ran too much! You are no longer hidden!", NULL);
3823 "You moved out of hiding! You are visible!", NULL);
3839 int i, friendly = 0,
player = 0, mflags;
3852 for (i = 1; i < 9; i++) {
3911 LOG(
llevError,
"player_can_view() called for non-player object\n");
3971 op->
hide ?
"unhidden" :
"visible");
4011 for (tmp = op->
below; tmp != NULL; tmp = tmp->
below) {
4014 && strcmp(tmp->
name,
"battleground") == 0
4022 for (invtmp = op->
inv; invtmp != NULL; invtmp = invtmp->
below) {
4026 if (x != NULL && y != NULL)
4033 if (x != NULL && y != NULL)
4036 if (trophy != NULL) {
4081 for (i = 0, tr = trlist->
items; tr != NULL && i < level-1; tr = tr->next, i++)
4083 if (tr == NULL || tr->
item == NULL) {
4097 "You gained the ability of %s",
4098 "You gained the ability of %s",
4115 "You gained the ability of %s",
4116 "You gained the ability of %s",
4135 if (item->
msg != NULL)
4156 for (skin = who->
inv; skin != NULL && strcmp(skin->
arch->
name,
"dragon_skin_force") != 0; skin = skin->
below)
4166 snprintf(buf,
sizeof(buf),
"You feel attuned to ");
4170 strcat(buf,
" and ");
4191 if (item->
msg != NULL)
4225 if (pl->
ranges[i] == ob) {
static int player_fire_bow(object *op, int dir)
void spring_trap(object *trap, object *victim)
static void swap_stat(object *op, int Swap_Second)
int player_can_view(object *pl, object *op)
static int player_attack_door(object *op, object *door)
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, sint16 x, sint16 y, sint16 *nx, sint16 *ny)
const char * determine_god(object *op)
archetype * find_archetype(const char *name)
#define ST_GET_PARTY_PASSWORD
int is_in_shop(object *ob)
#define MSG_TYPE_ATTRIBUTE_GOD
const char * get_ob_key_value(const object *op, const char *const key)
void enter_exit(object *op, object *exit_ob)
object * find_obj_by_type_subtype(const object *who, int type, int subtype)
void esrv_new_player(player *pl, uint32 weight)
void change_exp(object *op, sint64 exp, const char *skill_name, int flag)
void leave(player *pl, int draw_exit)
static void loot_object(object *op)
object * check_spell_known(object *op, const char *name)
void set_owner(object *op, object *owner)
const int dam_bonus[MAX_STAT+1]
void esrv_send_item(object *pl, object *op)
sstring add_refcount(sstring str)
int similar_direction(int a, int b)
void SockList_ResetRead(SockList *sl)
void get_name(object *op)
void make_path_to_file(const char *filename)
void send_news(const object *op)
#define BALSL_NUMBER_LOSSES_RATIO
void drain_wand_charge(object *wand)
EXTERN objectlink * first_friendly_object
int push_ob(object *who, int dir, object *pusher)
object * insert_ob_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
int op_on_battleground(object *op, int *x, int *y, archetype **trophy)
static int turn_transport(object *transport, object *captain, int dir)
#define SOUND_TYPE_GROUND
treasurelist * find_treasurelist(const char *name)
int save_player(object *op, int flag)
void dragon_ability_gain(object *who, int atnr, int level)
const int dex_bonus[MAX_STAT+1]
sint8 get_attr_value(const living *stats, int attr)
void free_string(sstring str)
#define MSG_TYPE_ATTACK_NOATTACK
#define SET_ANIMATION(ob, newanim)
void esrv_update_item(int flags, object *pl, object *op)
#define MSG_TYPE_SKILL_FAILURE
struct treasureliststruct * randomitems
void pick_up(object *op, object *alt)
#define MSG_TYPE_COMMAND_SUCCESS
int item_matched_string(object *pl, object *op, const char *name)
void query_base_name(const object *op, int plural, char *buf, size_t size)
short freearr_x[SIZEOFFREE]
#define ST_CONFIRM_PASSWORD
#define MSG_TYPE_ADMIN_PLAYER
void draw_ext_info(int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char *message, const char *oldmessage)
void esrv_send_inventory(object *pl, object *op)
Output_Buf outputs[NUM_OUTPUT_BUFS]
static object * pick_arrow_target(object *op, const char *type, int dir)
object * ranges[range_size]
void update_object(object *op, int action)
void send_rules(const object *op)
#define SOUND_TYPE_LIVING
void control_golem(object *op, int dir)
void play_again(object *op)
void close_and_delete(FILE *fp, int compressed)
void change_luck(object *op, int value)
method_ret ob_process(object *op)
#define OUT_OF_REAL_MAP(M, X, Y)
void handle_client(socket_struct *ns, player *pl)
int manual_apply(object *op, object *tmp, int aflag)
#define MSG_TYPE_ADMIN_RULES
void do_some_living(object *op)
void give_initial_items(object *pl, treasurelist *items)
void remove_friendly_object(object *op)
signed long sum_weight(object *op)
void get_multi_size(object *ob, int *sx, int *sy, int *hx, int *hy)
void dead_player(object *op)
void change_attr_value(living *stats, int attr, sint8 value)
EXTERN char first_map_ext_path[MAX_BUF]
void strip_endline(char *buf)
int path_to_player(object *mon, object *pl, unsigned mindiff)
void get_password(object *op)
int is_true_undead(object *op)
player * find_player_partial_name(const char *plname)
void draw_ext_info_format(int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char *new_format, const char *old_format,...)
static const char * gravestone_text(object *op, char *buf2, int len)
sint64 last_skill_exp[NUM_SKILLS]
object * get_nearest_player(object *mon)
struct archt * other_arch
void terminate_all_pets(object *owner)
char savebed_map[MAX_BUF]
const char *const spellpathnames[NRSPELLPATHS]
#define MSG_TYPE_COMMAND_FAILURE
static int turn_one_transport(object *transport, object *captain, int dir)
#define MSG_TYPE_COMMAND_NEWPLAYER
#define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_END
void kill_player(object *op)
int check_pick(object *op)
short freearr_y[SIZEOFFREE]
#define FLAG_KNOWN_MAGICAL
void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries)
struct obj * chosen_skill
object * find_key(object *pl, object *container, object *door)
void clear_player(player *pl)
void remove_ob(object *op)
static void fire_misc_object(object *op, int dir)
void get_rangevector_from_mapcoord(const mapstruct *m, int x, int y, const object *op2, rv_vector *retval, int flags)
#define MSG_TYPE_ITEM_REMOVE
int stand_near_hostile(object *who)
object * create_archetype(const char *name)
int is_wraith_pl(object *op)
int blocked_link(object *ob, mapstruct *m, int sx, int sy)
const char * materialname
const int thaco_bonus[MAX_STAT+1]
int skill_attack(object *tmp, object *pl, int dir, const char *string, object *skill)
#define FLAG_CAN_USE_SKILL
void drain_rod_charge(object *rod)
int hide(object *op, object *skill)
#define FLAG_UNAGGRESSIVE
#define MSG_TYPE_ITEM_INFO
void receive_play_again(object *op, char key)
void set_attr_value(living *stats, int attr, sint8 value)
void get_rangevector(object *op1, const object *op2, rv_vector *retval, int flags)
void add_player(socket_struct *ns)
sint64 calc_skill_exp(object *who, object *op, object *skill)
int die_roll(int num, int size, const object *op, int goodbad)
void add_friendly_object(object *op)
int cure_disease(object *sufferer, object *caster)
#define MSG_TYPE_ATTRIBUTE
int fire_bow(object *op, object *arrow, int dir, int wc_mod, sint16 sx, sint16 sy)
int allowed_class(const object *op)
object * get_owner(object *op)
void roll_again(object *op)
int execute_global_event(int eventcode,...)
void send_query(socket_struct *ns, uint8 flags, const char *text)
void display_motd(const object *op)
#define offsetof(type, member)
#define CS_QUERY_SINGLECHAR
static player * get_player(player *p)
void flush_output_element(const object *pl, Output_Buf *outputs)
int can_detect_enemy(object *op, object *enemy, rv_vector *rv)
void fire(object *op, int dir)
#define OB_TYPE_MOVE_BLOCK(ob1, type)
void check_score(object *op, int quiet)
void remove_locked_door(object *op)
mapstruct * get_map_from_coord(mapstruct *m, sint16 *x, sint16 *y)
#define GET_MAP_MOVE_BLOCK(M, X, Y)
int do_skill(object *op, object *part, object *skill, int dir, const char *string)
int move_ob(object *op, int dir, object *originator)
void do_learn_spell(object *op, object *spell, int special_prayer)
static void flee_player(object *op)
int can_pick(const object *who, const object *item)
void add_statbonus(object *op)
void play_sound_map(sint8 sound_type, object *emitter, int dir, const char *action)
#define FREE_AND_CLEAR_STR(xyz)
#define QUERY_FLAG(xyz, p)
#define CLEAR_FLAG(xyz, p)
char * strdup_local(const char *str)
party_rejoin_mode rejoin_party
void clear_los(object *op)
#define FLAG_BEEN_APPLIED
object * insert_ob_in_ob(object *op, object *where)
#define BALSL_LOSS_CHANCE_RATIO
void delete_character(const char *name)
object * get_object(void)
void start_info(object *op)
void do_hidden_move(object *op)
#define MSG_TYPE_COMMAND_DEBUG
int strncasecmp(const char *s1, const char *s2, int n)
object * insert_ob_in_map(object *op, mapstruct *m, object *originator, int flag)
struct treasurestruct * items
void esrv_map_scroll(socket_struct *ns, int dx, int dy)
void get_party_password(object *op, partylist *party)
void animate_object(object *op, int dir)
sint16 resist[NROFATTACKS]
#define FLAG_KNOWN_CURSED
int has_carried_lights(const object *op)
#define MSG_TYPE_ATTRIBUTE_STAT_LOSS
int need_identify(const object *op)
const char *const lose_msg[NUM_STATS]
uint64 query_cost(const object *tmp, object *who, int flag)
#define MSG_TYPE_ATTRIBUTE_RACE
int snprintf(char *dest, int max, const char *format,...)
int move_player(object *op, int dir)
void key_roll_stat(object *op, char key)
#define MSG_TYPE_APPLY_SUCCESS
sint16 last_resist[NROFATTACKS]
int handle_newcs_player(object *op)
#define FREE_AND_COPY(sv, nv)
void recursive_roll(object *op, int dir, object *pusher)
static int save_life(object *op)
int playername_ok(const char *cp)
int apply_container(object *op, object *sack)
object * present_arch_in_ob(const archetype *at, const object *op)
void make_visible(object *op)
static archetype * get_player_archetype(archetype *at)
void move_player_attack(object *op, int dir)
void query_short_name(const object *op, char *buf, size_t size)
int out_of_map(mapstruct *m, int x, int y)
int execute_event(object *op, int eventcode, object *activator, object *third, const char *message, int fix)
void remove_unpaid_objects(object *op, object *env, int free_items)
sint16 SP_level_spellpoint_cost(object *caster, object *spell, int flags)
void delete_map(mapstruct *m)
void check_stat_bounds(living *stats)
#define MSG_TYPE_SPELL_END
EXTERN char first_map_path[MAX_BUF]
void apply_death_exp_penalty(object *op)
void update_ob_speed(object *op)
sstring add_string(const char *str)
EXTERN player * first_player
void link_player_skills(object *op)
#define MSG_TYPE_VICTIM_DIED
void play_sound_player_only(player *pl, sint8 sound_type, object *emitter, int dir, const char *action)
#define GET_MAP_OB(M, X, Y)
player * find_player(const char *plname)
void confirm_password(object *op)
#define EVENT_PLAYER_DEATH
void LOG(LogLevel logLevel, const char *format,...)
#define CS_QUERY_HIDEINPUT
object * get_split_ob(object *orig_ob, uint32 nr, char *err, size_t size)
static int action_makes_visible(object *op)
int did_make_save(const object *op, int level, int bonus)
#define was_destroyed(op, old_tag)
int transfer_ob(object *op, int x, int y, int randomly, object *originator)
void player_unready_range_ob(player *pl, object *ob)
void roll_stats(object *op)
#define MSG_TYPE_ADMIN_NEWS
object * last_skill_ob[NUM_SKILLS]
void key_change_class(object *op, char key)
static void update_transport_block(object *transport, int dir)
#define MSG_TYPE_ATTACK_NOKEY
void copy_object(object *op2, object *op)
void query_name(const object *op, char *buf, size_t size)
void apply_map_builder(object *pl, int dir)
void remove_statbonus(object *op)
void free_object(object *ob)
int random_roll(int min, int max, const object *op, int goodbad)
static object * find_better_arrow(object *op, object *target, const char *type, int *better)
const char *const short_stat_name[NUM_STATS]
#define MSG_TYPE_ADMIN_LOGIN
void enter_player_savebed(object *op)
partylist * party_to_join
void fix_object(object *op)
#define BALSL_MAX_LOSS_RATIO
EXTERN mapstruct * first_map
#define MSG_TYPE_COMMAND_ERROR
void cast_dust(object *op, object *throw_ob, int dir)
EXTERN archetype * first_archetype
#define MSG_TYPE_ITEM_ADD
object * find_skill_by_name(object *who, const char *name)
object * arch_to_object(archetype *at)
FILE * open_and_uncompress(const char *name, int flag, int *compressed)
static void set_first_map(object *op)
static object * find_arrow(object *op, const char *type)
int hit_player(object *op, int dam, object *hitter, uint32 type, int full_hit)
int cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
sint8 blocked_los[MAP_CLIENT_X][MAP_CLIENT_Y]
int hideability(object *ob)
int ob_blocked(const object *ob, mapstruct *m, sint16 x, sint16 y)
void key_confirm_quit(object *op, char key)