ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/gods.C
(Generate patch)

Comparing deliantra/server/server/gods.C (file contents):
Revision 1.18 by pippijn, Mon Jan 15 21:06:20 2007 UTC vs.
Revision 1.32 by root, Tue Apr 22 02:46:18 2008 UTC

1/* 1/*
2 * CrossFire, A Multiplayer game for X-windows 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team 4 * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (C) 2002 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
6 * Copyright (C) 1992 Frank Tore Johansen 6 * Copyright (©) 1992,2007 Frank Tore Johansen
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * Deliantra is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version. 11 * (at your option) any later version.
12 * 12 *
13 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software 19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * 20 *
22 * The authors can be reached via e-mail at <crossfire@schmorp.de> 21 * The authors can be reached via e-mail to <support@deliantra.net>
23 */ 22 */
24
25 23
26/* Oct 3, 1995 - Code laid down for initial gods, priest alignment, and 24/* Oct 3, 1995 - Code laid down for initial gods, priest alignment, and
27 * monster race initialization. b.t. 25 * monster race initialization. b.t.
28 */ 26 */
29 27
50 godlink *gl; 48 godlink *gl;
51 49
52 for (gl = first_god; gl; gl = gl->next) 50 for (gl = first_god; gl; gl = gl->next)
53 if (!strncmp (name, gl->name, MIN ((size_t) strlen (gl->name), nmlen))) 51 if (!strncmp (name, gl->name, MIN ((size_t) strlen (gl->name), nmlen)))
54 break; 52 break;
53
55 if (gl) 54 if (gl)
56 godnr = gl->id; 55 godnr = gl->id;
57 } 56 }
57
58 return godnr; 58 return godnr;
59} 59}
60 60
61/** 61/**
62 * Returns pointer to specified god's object through pntr_to_god_obj.. 62 * Returns pointer to specified god's object through pntr_to_god_obj..
104 { 104 {
105 105
106 /* find a god based on race */ 106 /* find a god based on race */
107 if (!op->title) 107 if (!op->title)
108 { 108 {
109 if (op->race != NULL) 109 if (op->race)
110 { 110 {
111 godname = get_god_for_race (op->race); 111 godname = get_god_for_race (op->race);
112
112 if (godname != NULL) 113 if (godname)
113 {
114 op->title = godname; 114 op->title = godname;
115 }
116 } 115 }
117 } 116 }
118 117
119 /* find a random god */ 118 /* find a random god */
120 if (!op->title) 119 if (!op->title)
124 godnr = rndm (1, gl->id); 123 godnr = rndm (1, gl->id);
125 while (gl) 124 while (gl)
126 { 125 {
127 if (gl->id == godnr) 126 if (gl->id == godnr)
128 break; 127 break;
128
129 gl = gl->next; 129 gl = gl->next;
130 } 130 }
131
131 op->title = gl->name; 132 op->title = gl->name;
132 } 133 }
133 134
134 return op->title; 135 return op->title;
135 } 136 }
140 * that skill, once we find it, we can return, either with the 141 * that skill, once we find it, we can return, either with the
141 * title or "none". 142 * title or "none".
142 */ 143 */
143 if (op->type == PLAYER) 144 if (op->type == PLAYER)
144 { 145 {
145 object *tmp;
146
147 for (tmp = op->inv; tmp != NULL; tmp = tmp->below) 146 for (object *tmp = op->inv; tmp; tmp = tmp->below)
148 if (tmp->type == SKILL && tmp->subtype == SK_PRAYING) 147 if (tmp->type == SKILL && tmp->subtype == SK_PRAYING)
149 { 148 {
150 if (tmp->title) 149 if (tmp->title)
151 return (tmp->title); 150 return tmp->title;
152 else 151 else
153 return ("none"); 152 return "none";
154 } 153 }
155 } 154 }
155
156 return ("none"); 156 return "none";
157} 157}
158 158
159/** 159/**
160 * Returns 1 if s1 and s2 are the same - either both NULL, or strcmp( ) == 0 160 * Returns 1 if s1 and s2 are the same - either both NULL, or strcmp( ) == 0
161 */ 161 */
171 return 0; 171 return 0;
172 else 172 else
173 return strcmp (s1, s2) == 0; 173 return strcmp (s1, s2) == 0;
174} 174}
175 175
176
177/** 176/**
178 * Checks for any occurrence of the given 'item' in the inventory of 'op' (recursively). 177 * Checks for any occurrence of the given 'item' in the inventory of 'op' (recursively).
179 * Any matching items in the inventory are deleted, and a 178 * Any matching items in the inventory are deleted, and a
180 * message is displayed to the player. 179 * message is displayed to the player.
181 */ 180 */
200 if (tmp->nrof > 1) 199 if (tmp->nrof > 1)
201 new_draw_info_format (NDI_UNIQUE, 0, op, "The %s crumble to dust!", query_short_name (tmp)); 200 new_draw_info_format (NDI_UNIQUE, 0, op, "The %s crumble to dust!", query_short_name (tmp));
202 else 201 else
203 new_draw_info_format (NDI_UNIQUE, 0, op, "The %s crumbles to dust!", query_short_name (tmp)); 202 new_draw_info_format (NDI_UNIQUE, 0, op, "The %s crumbles to dust!", query_short_name (tmp));
204 203
205 tmp->remove (); /* remove obj from players inv. */ 204 tmp->destroy ();
206 esrv_del_item (op->contr, tmp->count); /* notify client */
207 tmp->destroy (); /* free object */
208 } 205 }
209 206
210 if (tmp->inv) 207 if (tmp->inv)
211 follower_remove_similar_item (tmp, item); 208 follower_remove_similar_item (tmp, item);
212 } 209 }
243 object *tmp; 240 object *tmp;
244 241
245 if (!tr->item) 242 if (!tr->item)
246 return 0; 243 return 0;
247 244
248 if (follower_has_similar_item (op, &tr->item->clone)) 245 if (follower_has_similar_item (op, tr->item))
249 return 0; 246 return 0;
250 247
251 tmp = arch_to_object (tr->item); 248 tmp = arch_to_object (tr->item);
252 new_draw_info_format (NDI_UNIQUE, 0, op, "%s lets %s appear in your hands.", &god->name, query_short_name (tmp)); 249 new_draw_info_format (NDI_UNIQUE, 0, op, "%s lets %s appear in your hands.", &god->name, query_short_name (tmp));
253 tmp = insert_ob_in_ob (tmp, op); 250 tmp = insert_ob_in_ob (tmp, op);
274 return; 271 return;
275 272
276 /* hmm. what happend depends on pl's current god, level, etc */ 273 /* hmm. what happend depends on pl's current god, level, etc */
277 if (!pl_god) 274 if (!pl_god)
278 { /*new convert */ 275 { /*new convert */
279 become_follower (pl, &altar->other_arch->clone); 276 become_follower (pl, altar->other_arch);
280 return; 277 return;
281
282 } 278 }
283 else if (!strcmp (&pl_god->name, altar->other_arch->clone.name)) 279 else if (!strcmp (&pl_god->name, altar->other_arch->object::name))
284 { 280 {
285 /* pray at your gods altar */ 281 /* pray at your gods altar */
286 int bonus = (pl->stats.Wis + skill->level) / 10; 282 int bonus = (pl->stats.Wis + skill->level) / 10;
287 283
288 /* we can get neg grace up faster */ 284 /* we can get neg grace up faster */
289 if (pl->stats.grace < 0) 285 if (pl->stats.grace < 0)
290 pl->stats.grace += (bonus > -1 * (pl->stats.grace / 10) ? bonus : -1 * (pl->stats.grace / 10)); 286 pl->stats.grace += (bonus > -1 * (pl->stats.grace / 10) ? bonus : -1 * (pl->stats.grace / 10));
287
291 /* we can super-charge grace to 2x max */ 288 /* we can super-charge grace to 2x max */
292 if (pl->stats.grace < (2 * pl->stats.maxgrace)) 289 if (pl->stats.grace < 2 * pl->stats.maxgrace)
293 {
294 pl->stats.grace += bonus / 2; 290 pl->stats.grace += bonus / 2;
295 } 291 else
296 if (pl->stats.grace > (2 * pl->stats.maxgrace))
297 {
298 pl->stats.grace = (2 * pl->stats.maxgrace); 292 pl->stats.grace = 2 * pl->stats.maxgrace;
299 }
300 293
301 /* Every once in a while, the god decides to checkup on their 294 /* Every once in a while, the god decides to checkup on their
302 * follower, and may intervene to help them out. 295 * follower, and may intervene to help them out.
303 */ 296 */
304 bonus = MAX (1, bonus + MAX (pl->stats.luck, -3)); /* -- DAMN -- */ 297 bonus = MAX (1, bonus + MAX (pl->stats.luck, -3)); /* -- DAMN -- */
305 298
306 if (((random_roll (0, 399, pl, PREFER_LOW)) - bonus) < 0) 299 if (((random_roll (0, 399, pl, PREFER_LOW)) - bonus) < 0)
307 god_intervention (pl, pl_god, skill); 300 god_intervention (pl, pl_god, skill);
308
309 } 301 }
310 else 302 else
311 { /* praying to another god! */ 303 { /* praying to another god! */
312 uint64 loss = 0; 304 uint64 loss = 0;
313 int angry = 1; 305 int angry = 1;
317 * points to the god of this altar (which we have 309 * points to the god of this altar (which we have
318 * already verified is non null). pl_god->other_arch 310 * already verified is non null). pl_god->other_arch
319 * is the opposing god - we need to verify that exists before 311 * is the opposing god - we need to verify that exists before
320 * using its values. 312 * using its values.
321 */ 313 */
322 if (pl_god->other_arch && (altar->other_arch->name == pl_god->other_arch->name)) 314 if (pl_god->other_arch && (altar->other_arch->archname == pl_god->other_arch->archname))
323 { 315 {
324 angry = 2; 316 angry = 2;
325 if (random_roll (0, skill->level + 2, pl, PREFER_LOW) - 5 > 0) 317 if (random_roll (0, skill->level + 2, pl, PREFER_LOW) - 5 > 0)
326 { 318 {
327 object *tmp; 319 object *tmp;
348 340
349 /* May switch Gods, but its random chance based on our current level 341 /* May switch Gods, but its random chance based on our current level
350 * note it gets harder to swap gods the higher we get 342 * note it gets harder to swap gods the higher we get
351 */ 343 */
352 if ((angry == 1) && !(random_roll (0, skill->level, pl, PREFER_LOW))) 344 if ((angry == 1) && !(random_roll (0, skill->level, pl, PREFER_LOW)))
353 {
354 become_follower (pl, &altar->other_arch->clone); 345 become_follower (pl, altar->other_arch);
355 }
356 else 346 else
357 { 347 {
358 /* toss this player off the altar. He can try again. */ 348 /* toss this player off the altar. He can try again. */
359 new_draw_info (NDI_UNIQUE | NDI_NAVY, 0, pl, "A divine force pushes you off the altar."); 349 new_draw_info (NDI_UNIQUE | NDI_NAVY, 0, pl, "A divine force pushes you off the altar.");
350 pl->contr->fire_on = 0;
351 pl->speed_left = 1.f;
360 move_player (pl, absdir (pl->facing + 4)); /* back him off the way he came. */ 352 move_player (pl, absdir (pl->facing + 4)); /* back him off the way he came. */
361 } 353 }
362 } 354 }
363} 355}
364 356
401 { 393 {
402 object *item; 394 object *item;
403 395
404 if (!tr->item) 396 if (!tr->item)
405 continue; 397 continue;
398
406 item = &tr->item->clone; 399 item = tr->item;
407 400
408 /* Basically, see if the matching spell is granted by this god. */ 401 /* Basically, see if the matching spell is granted by this god. */
409 402
410 if (tr->item->clone.type == SPELL && tr->item->clone.name == tmp->name) 403 if (tr->item->type == SPELL && tr->item->object::name == tmp->name)
411 { 404 {
412 remove = 0; 405 remove = 0;
413 break; 406 break;
414 } 407 }
415 } 408 }
460 } 453 }
461 } 454 }
462 455
463 /* remove any godgiven items from the old god */ 456 /* remove any godgiven items from the old god */
464 if (old_god) 457 if (old_god)
465 {
466 for (tr = old_god->randomitems->items; tr != NULL; tr = tr->next) 458 for (tr = old_god->randomitems->items; tr; tr = tr->next)
467 {
468 if (tr->item && QUERY_FLAG (&tr->item->clone, FLAG_STARTEQUIP)) 459 if (tr->item && QUERY_FLAG (tr->item, FLAG_STARTEQUIP))
469 follower_remove_similar_item (op, &tr->item->clone); 460 follower_remove_similar_item (op, tr->item);
470 }
471 }
472 461
473 if (!op || !new_god) 462 if (!op || !new_god)
474 return; 463 return;
475 464
476 if (op->race && new_god->slaying && strstr (op->race, new_god->slaying)) 465 if (op->race && new_god->slaying && strstr (op->race, new_god->slaying))
477 { 466 {
478 new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, op, "Fool! %s detests your kind!", &new_god->name); 467 new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, op, "Fool! %s detests your kind!", &new_god->name);
468
479 if (random_roll (0, op->level - 1, op, PREFER_LOW) - 5 > 0) 469 if (random_roll (0, op->level - 1, op, PREFER_LOW) - 5 > 0)
480 { 470 {
481 object *tmp = get_archetype (LOOSE_MANA); 471 object *tmp = get_archetype (LOOSE_MANA);
482 472
483 cast_magic_storm (op, tmp, new_god->level + 10); 473 cast_magic_storm (op, tmp, new_god->level + 10);
484 } 474 }
475
485 return; 476 return;
486 } 477 }
487 478
488 479
489 /* give the player any special god-characteristic-items. */ 480 /* give the player any special god-characteristic-items. */
490 for (tr = new_god->randomitems->items; tr != NULL; tr = tr->next) 481 for (tr = new_god->randomitems->items; tr; tr = tr->next)
491 { 482 {
492 if (tr->item && tr->item->clone.invisible && tr->item->clone.type != SPELLBOOK && 483 if (tr->item && tr->item->invisible && tr->item->type != SPELLBOOK
493 tr->item->clone.type != BOOK && tr->item->clone.type != SPELL) 484 && tr->item->type != BOOK && tr->item->type != SPELL)
494 god_gives_present (op, new_god, tr); 485 god_gives_present (op, new_god, tr);
495 } 486 }
496 487
497 488
498 new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, op, "You become a follower of %s!", &new_god->name); 489 new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, op, "You become a follower of %s!", &new_god->name);
505 if (!skop) 496 if (!skop)
506 { 497 {
507 /* The arhetype should always be defined - if we crash here because it doesn't, 498 /* The arhetype should always be defined - if we crash here because it doesn't,
508 * things are really messed up anyways. 499 * things are really messed up anyways.
509 */ 500 */
510 skop = give_skill_by_name (op, get_archetype_by_type_subtype (SKILL, SK_PRAYING)->clone.skill); 501 skop = give_skill_by_name (op, get_archetype_by_type_subtype (SKILL, SK_PRAYING)->skill);
511 link_player_skills (op); 502 link_player_skills (op);
512 } 503 }
513 504
514 sk_applied = QUERY_FLAG (skop, FLAG_APPLIED); /* save skill status */ 505 sk_applied = QUERY_FLAG (skop, FLAG_APPLIED); /* save skill status */
515 506
610 601
611int 602int
612worship_forbids_use (object *op, object *exp_obj, uint32 flag, const char *string) 603worship_forbids_use (object *op, object *exp_obj, uint32 flag, const char *string)
613{ 604{
614 605
615 if (QUERY_FLAG (&op->arch->clone, flag)) 606 if (QUERY_FLAG (op->arch, flag))
616 if (QUERY_FLAG (op, flag) != QUERY_FLAG (exp_obj, flag)) 607 if (QUERY_FLAG (op, flag) != QUERY_FLAG (exp_obj, flag))
617 { 608 {
618 update_priest_flag (exp_obj, op, flag); 609 update_priest_flag (exp_obj, op, flag);
619 if (QUERY_FLAG (op, flag)) 610 if (QUERY_FLAG (op, flag))
620 new_draw_info_format (NDI_UNIQUE, 0, op, "You may use %s again.", string); 611 new_draw_info_format (NDI_UNIQUE, 0, op, "You may use %s again.", string);
681 { 672 {
682 LOG (llevError, "BUG: determine_holy_arch(): no god or god without " "randomitems\n"); 673 LOG (llevError, "BUG: determine_holy_arch(): no god or god without " "randomitems\n");
683 return NULL; 674 return NULL;
684 } 675 }
685 676
686 for (tr = god->randomitems->items; tr != NULL; tr = tr->next) 677 for (tr = god->randomitems->items; tr; tr = tr->next)
687 { 678 {
688 object *item;
689
690 if (!tr->item) 679 if (!tr->item)
691 continue; 680 continue;
692 681
693 item = &tr->item->clone; 682 object *item = tr->item;
694 683
695 if (item->type == BOOK && item->invisible && strcmp (item->name, type) == 0) 684 if (item->type == BOOK && item->invisible && strcmp (item->name, type) == 0)
696 return item->other_arch; 685 return item->other_arch;
697 } 686 }
698 return NULL; 687 return NULL;
740 729
741 if (level <= 20) 730 if (level <= 20)
742 return level / difficulty; 731 return level / difficulty;
743 if (level <= 40) 732 if (level <= 40)
744 return (20 + (level - 20) / 2) / difficulty; 733 return (20 + (level - 20) / 2) / difficulty;
734
745 return (30 + (level - 40) / 4) / difficulty; 735 return (30 + (level - 40) / 4) / difficulty;
746} 736}
747 737
748/** 738/**
749 * God wants to enchant weapon. 739 * God wants to enchant weapon.
760 int tmp; 750 int tmp;
761 751
762 for (weapon = op->inv; weapon; weapon = weapon->below) 752 for (weapon = op->inv; weapon; weapon = weapon->below)
763 if ((weapon->type == WEAPON || weapon->type == BOW) && QUERY_FLAG (weapon, FLAG_APPLIED)) 753 if ((weapon->type == WEAPON || weapon->type == BOW) && QUERY_FLAG (weapon, FLAG_APPLIED))
764 break; 754 break;
755
765 if (weapon == NULL || god_examines_item (god, weapon) <= 0) 756 if (weapon == NULL || god_examines_item (god, weapon) <= 0)
766 return 0; 757 return 0;
767 758
768 /* First give it a title, so other gods won't touch it */ 759 /* First give it a title, so other gods won't touch it */
769 if (!weapon->title) 760 if (!weapon->title)
804 } 795 }
805 796
806 return 0; 797 return 0;
807} 798}
808 799
809
810/** 800/**
811 * Every once in a while the god will intervene to help the worshiper. 801 * Every once in a while the god will intervene to help the worshiper.
812 * Later, this fctn can be used to supply quests, etc for the 802 * Later, this fctn can be used to supply quests, etc for the
813 * priest. -b.t. 803 * priest. -b.t.
814 * called from pray_at_altar() currently. 804 * called from pray_at_altar() currently.
815 */ 805 */
816
817void 806void
818god_intervention (object *op, object *god, object *skill) 807god_intervention (object *op, object *god, object *skill)
819{ 808{
820 treasure *tr; 809 treasure *tr;
821 810
829 818
830 /* lets do some checks of whether we are kosher with our god */ 819 /* lets do some checks of whether we are kosher with our god */
831 if (god_examines_priest (op, god) < 0) 820 if (god_examines_priest (op, god) < 0)
832 return; 821 return;
833 822
823 op->play_sound (sound_find ("god_intervention"));
834 new_draw_info (NDI_UNIQUE, 0, op, "You feel a holy presence!"); 824 new_draw_info (NDI_UNIQUE, 0, op, "You feel a holy presence!");
835 825
836 for (tr = god->randomitems->items; tr != NULL; tr = tr->next) 826 for (tr = god->randomitems->items; tr; tr = tr->next)
837 { 827 {
838 object *item; 828 object *item;
839 829
840 if (tr->chance <= random_roll (0, 99, op, PREFER_HIGH)) 830 if (tr->chance <= random_roll (0, 99, op, PREFER_HIGH))
841 continue; 831 continue;
842 832
843 /* Treasurelist - generate some treasure for the follower */ 833 /* Treasurelist - generate some treasure for the follower */
844 if (tr->name) 834 if (tr->name)
845 { 835 {
846 treasurelist *tl = find_treasurelist (tr->name); 836 treasurelist *tl = treasurelist::find (tr->name);
847 837
848 if (tl == NULL) 838 if (tl == NULL)
849 continue; 839 continue;
850 840
851 new_draw_info (NDI_UNIQUE, 0, op, "Something appears before your " "eyes. You catch it before it falls to the ground."); 841 new_draw_info (NDI_UNIQUE, 0, op, "Something appears before your eyes. You catch it before it falls to the ground.");
852 842
853 create_treasure (tl, op, GT_STARTEQUIP | GT_ONLY_GOOD | GT_UPDATE_INV, skill->level, 0); 843 create_treasure (tl, op, GT_STARTEQUIP | GT_ONLY_GOOD | GT_UPDATE_INV, skill->level, 0);
854 return; 844 return;
855 } 845 }
856 846
857 if (!tr->item) 847 if (!tr->item)
858 continue; 848 continue;
859 849
860 item = &tr->item->clone; 850 item = tr->item;
861 851
862 /* Grace limit */ 852 /* Grace limit */
863 if (item->type == BOOK && item->invisible && strcmp (item->name, "grace limit") == 0) 853 if (item->type == BOOK && item->invisible && strcmp (item->name, "grace limit") == 0)
864 { 854 {
865 if (op->stats.grace < item->stats.grace || op->stats.grace < op->stats.maxgrace) 855 if (op->stats.grace < item->stats.grace || op->stats.grace < op->stats.maxgrace)
872 tmp = get_archetype (HOLY_POSSESSION); 862 tmp = get_archetype (HOLY_POSSESSION);
873 cast_change_ability (op, op, tmp, 0, 1); 863 cast_change_ability (op, op, tmp, 0, 1);
874 tmp->destroy (); 864 tmp->destroy ();
875 return; 865 return;
876 } 866 }
867
877 continue; 868 continue;
878 } 869 }
879 870
880 /* Restore grace */ 871 /* Restore grace */
881 if (item->type == BOOK && item->invisible && strcmp (item->name, "restore grace") == 0) 872 if (item->type == BOOK && item->invisible && strcmp (item->name, "restore grace") == 0)
963 continue; 954 continue;
964 955
965 new_draw_info (NDI_UNIQUE, 0, op, "Shimmering light surrounds and restores you!"); 956 new_draw_info (NDI_UNIQUE, 0, op, "Shimmering light surrounds and restores you!");
966 957
967 for (i = 0; i < NUM_STATS; i++) 958 for (i = 0; i < NUM_STATS; i++)
968 if (get_attr_value (&depl->stats, i)) 959 if (depl->stats.stat (i))
969 new_draw_info (NDI_UNIQUE, 0, op, restore_msg[i]); 960 new_draw_info (NDI_UNIQUE, 0, op, restore_msg[i]);
970 961
971 depl->destroy (); 962 depl->destroy ();
972 op->update_stats (); 963 op->update_stats ();
973 return; 964 return;
974 } 965 }
975 966
976 /* Voices */ 967 /* Voices */
977 if (item->type == BOOK && item->invisible && strcmp (item->name, "voice_behind") == 0) 968 if (item->type == BOOK && item->invisible && strcmp (item->name, "voice_behind") == 0)
978 { 969 {
979 new_draw_info (NDI_UNIQUE, 0, op, "You hear a voice from behind you, but you don't dare to " "turn around:"); 970 new_draw_info (NDI_UNIQUE, 0, op, "You hear a voice from behind you, but you don't dare to turn around:");
980 new_draw_info (NDI_WHITE, 0, op, item->msg); 971 new_draw_info (NDI_WHITE, 0, op, item->msg);
981 return; 972 return;
982 } 973 }
983 974
984 /* Messages */ 975 /* Messages */
1135 1126
1136 if (race == NULL) 1127 if (race == NULL)
1137 return NULL; 1128 return NULL;
1138 while (gl) 1129 while (gl)
1139 { 1130 {
1140 if (!strcasecmp (gl->arch->clone.race, race)) 1131 if (!strcasecmp (gl->arch->race, race))
1141 { 1132 {
1142 godname = gl->name; 1133 godname = gl->name;
1143 break; 1134 break;
1144 } 1135 }
1145 gl = gl->next; 1136 gl = gl->next;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines