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.65 by root, Thu Jun 10 06:03:18 2010 UTC vs.
Revision 1.69 by root, Sun May 1 16:58:17 2011 UTC

1/* 1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008,2009,2010,2011 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992 Frank Tore Johansen 6 * Copyright (©) 1992 Frank Tore Johansen
7 * 7 *
8 * Deliantra is free software: you can redistribute it and/or modify it under 8 * Deliantra is free software: you can redistribute it and/or modify it under
9 * the terms of the Affero GNU General Public License as published by the 9 * the terms of the Affero GNU General Public License as published by the
397 follower_remove_similar_item (this, tr->item); 397 follower_remove_similar_item (this, tr->item);
398 398
399 if (!new_god) 399 if (!new_god)
400 return; 400 return;
401 401
402 if (new_god->slaying && race.contains (new_god->slaying)) 402 if (new_god->slaying && new_god->slaying.contains (race))
403 { 403 {
404 failmsgf ("Fool! %s detests your kind! H<This god does not accept followers of your race.>", &new_god->name); 404 failmsgf ("Fool! %s detests your kind! H<This god does not accept followers of your race.>", &new_god->name);
405 405
406 if (random_roll (0, level - 1, this, PREFER_LOW) - 5 > 0) 406 if (random_roll (0, level - 1, this, PREFER_LOW) - 5 > 0)
407 { 407 {
408 object *tmp = get_archetype (LOOSE_MANA); 408 object *tmp = archetype::get (LOOSE_MANA);
409 409
410 cast_magic_storm (this, tmp, new_god->level + 10); 410 cast_magic_storm (this, tmp, new_god->level + 10);
411 } 411 }
412 412
413 return; 413 return;
656 if (!op->contr) 656 if (!op->contr)
657 return 0; 657 return 0;
658 658
659 object *weapon = op->contr->combat_ob; 659 object *weapon = op->contr->combat_ob;
660 660
661 if (!weapon)
662 return 0;
663
661 if (weapon->type != WEAPON && weapon->type != BOW) 664 if (weapon->type != WEAPON && weapon->type != BOW)
662 return 0; 665 return 0;
663 666
664 if (god_examines_item (god, weapon) <= 0) 667 if (god_examines_item (god, weapon) <= 0)
665 return 0; 668 return 0;
738 741
739 change_exp (op, -random_roll (0, loss * angry - 1, op, PREFER_LOW), skop ? skop->skill : shstr_none, SK_SUBTRACT_SKILL_EXP); 742 change_exp (op, -random_roll (0, loss * angry - 1, op, PREFER_LOW), skop ? skop->skill : shstr_none, SK_SUBTRACT_SKILL_EXP);
740 743
741 if (random_roll (0, angry, op, PREFER_LOW)) 744 if (random_roll (0, angry, op, PREFER_LOW))
742 { 745 {
743 object *tmp = get_archetype (LOOSE_MANA); 746 object *tmp = archetype::get (LOOSE_MANA);
744 747
745 cast_magic_storm (op, tmp, op->level + (angry * 3)); 748 cast_magic_storm (op, tmp, op->level + (angry * 3));
746 } 749 }
747 750
748 new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, op, "%s becomes angry and punishes you!", &god->name); 751 new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, op, "%s becomes angry and punishes you!", &god->name);
809 if (op->stats.grace < item->stats.grace || op->stats.grace < op->stats.maxgrace) 812 if (op->stats.grace < item->stats.grace || op->stats.grace < op->stats.maxgrace)
810 { 813 {
811 /* Follower lacks the required grace for the following 814 /* Follower lacks the required grace for the following
812 * treasure list items. */ 815 * treasure list items. */
813 816
814 object *tmp = get_archetype (HOLY_POSSESSION); 817 object *tmp = archetype::get (HOLY_POSSESSION);
815 cast_change_ability (op, op, tmp, 0, 1); 818 cast_change_ability (op, op, tmp, 0, 1);
816 tmp->destroy (); 819 tmp->destroy ();
817 return; 820 return;
818 } 821 }
819 822
1035 object *tmp; 1038 object *tmp;
1036 1039
1037 /* you really screwed up */ 1040 /* you really screwed up */
1038 angry = 3; 1041 angry = 3;
1039 new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, pl, "Foul Priest! %s punishes you!", &pl_god->name); 1042 new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, pl, "Foul Priest! %s punishes you!", &pl_god->name);
1040 tmp = get_archetype (LOOSE_MANA); 1043 tmp = archetype::get (LOOSE_MANA);
1041 cast_magic_storm (pl, tmp, pl_god->level + 20); 1044 cast_magic_storm (pl, tmp, pl_god->level + 20);
1042 } 1045 }
1043 else 1046 else
1044 new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, pl, "Foolish heretic! %s is livid!", &pl_god->name); 1047 new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, pl, "Foolish heretic! %s is livid!", &pl_god->name);
1045 } 1048 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines