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

Comparing deliantra/server/server/spell_effect.C (file contents):
Revision 1.9 by root, Tue Sep 12 19:20:08 2006 UTC vs.
Revision 1.10 by root, Thu Sep 14 21:16:13 2006 UTC

1 1
2/* 2/*
3 * static char *rcsid_spell_effect_c = 3 * static char *rcsid_spell_effect_c =
4 * "$Id: spell_effect.C,v 1.9 2006/09/12 19:20:08 root Exp $"; 4 * "$Id: spell_effect.C,v 1.10 2006/09/14 21:16:13 root Exp $";
5 */ 5 */
6 6
7 7
8/* 8/*
9 CrossFire, A Multiplayer game for X-windows 9 CrossFire, A Multiplayer game for X-windows
147 missile_name = tmp->race; 147 missile_name = tmp->race;
148 } 148 }
149 149
150 missile_plus = spell->stats.dam + SP_level_dam_adjust (caster, spell); 150 missile_plus = spell->stats.dam + SP_level_dam_adjust (caster, spell);
151 151
152 if (find_archetype (missile_name) == NULL) 152 if (archetype::find (missile_name) == NULL)
153 { 153 {
154 LOG (llevDebug, "Cast create_missile: could not find archetype %s\n", missile_name); 154 LOG (llevDebug, "Cast create_missile: could not find archetype %s\n", missile_name);
155 return 0; 155 return 0;
156 } 156 }
157 missile = get_archetype (missile_name); 157 missile = get_archetype (missile_name);
571 571
572int 572int
573perceive_self (object *op) 573perceive_self (object *op)
574{ 574{
575 char *cp = describe_item (op, op), buf[MAX_BUF]; 575 char *cp = describe_item (op, op), buf[MAX_BUF];
576 archetype *at = find_archetype (ARCH_DEPLETION); 576 archetype *at = archetype::find (ARCH_DEPLETION);
577 object *tmp; 577 object *tmp;
578 int i; 578 int i;
579 579
580 tmp = find_god (determine_god (op)); 580 tmp = find_god (determine_god (op));
581 if (tmp) 581 if (tmp)
714 { 714 {
715 new_draw_info (NDI_UNIQUE, 0, op, "Oops, program error!"); 715 new_draw_info (NDI_UNIQUE, 0, op, "Oops, program error!");
716 LOG (llevError, "get_object failed (force) in cast_create_town_portal for %s!\n", &op->name); 716 LOG (llevError, "get_object failed (force) in cast_create_town_portal for %s!\n", &op->name);
717 return 0; 717 return 0;
718 } 718 }
719 perm_portal = find_archetype (spell->slaying); 719 perm_portal = archetype::find (spell->slaying);
720 720
721 /* To kill a town portal, we go trough the player's inventory, 721 /* To kill a town portal, we go trough the player's inventory,
722 * for each marked portal in player's inventory, 722 * for each marked portal in player's inventory,
723 * -We try load the associated map (if impossible, consider the portal destructed) 723 * -We try load the associated map (if impossible, consider the portal destructed)
724 * -We find any portal in the specified location. 724 * -We find any portal in the specified location.
926 else if (spell_ob->race) 926 else if (spell_ob->race)
927 { 927 {
928 char buf1[MAX_BUF]; 928 char buf1[MAX_BUF];
929 929
930 sprintf (buf1, spell_ob->race, dir); 930 sprintf (buf1, spell_ob->race, dir);
931 at = find_archetype (buf1); 931 at = archetype::find (buf1);
932 if (!at) 932 if (!at)
933 { 933 {
934 LOG (llevError, "summon_wall: Unable to find archetype %s\n", buf1); 934 LOG (llevError, "summon_wall: Unable to find archetype %s\n", buf1);
935 new_draw_info (NDI_UNIQUE, 0, op, "This spell is broken."); 935 new_draw_info (NDI_UNIQUE, 0, op, "This spell is broken.");
936 return 0; 936 return 0;
1234 if (cure_disease (tmp, op)) 1234 if (cure_disease (tmp, op))
1235 success = 1; 1235 success = 1;
1236 1236
1237 if (spell->attacktype & AT_POISON) 1237 if (spell->attacktype & AT_POISON)
1238 { 1238 {
1239 at = find_archetype ("poisoning"); 1239 at = archetype::find ("poisoning");
1240 poison = present_arch_in_ob (at, tmp); 1240 poison = present_arch_in_ob (at, tmp);
1241 if (poison) 1241 if (poison)
1242 { 1242 {
1243 success = 1; 1243 success = 1;
1244 new_draw_info (NDI_UNIQUE, 0, tmp, "Your body feels cleansed"); 1244 new_draw_info (NDI_UNIQUE, 0, tmp, "Your body feels cleansed");
1255 poison->duration = 1; 1255 poison->duration = 1;
1256 } 1256 }
1257 } 1257 }
1258 if (spell->attacktype & AT_BLIND) 1258 if (spell->attacktype & AT_BLIND)
1259 { 1259 {
1260 at = find_archetype ("blindness"); 1260 at = archetype::find ("blindness");
1261 poison = present_arch_in_ob (at, tmp); 1261 poison = present_arch_in_ob (at, tmp);
1262 if (poison) 1262 if (poison)
1263 { 1263 {
1264 success = 1; 1264 success = 1;
1265 new_draw_info (NDI_UNIQUE, 0, tmp, "Your vision begins to return."); 1265 new_draw_info (NDI_UNIQUE, 0, tmp, "Your vision begins to return.");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines