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.41 by pippijn, Thu Mar 1 12:28:16 2007 UTC vs.
Revision 1.45 by root, Mon Apr 16 06:23:43 2007 UTC

154 /* If it starts with a letter, presume it is a description */ 154 /* If it starts with a letter, presume it is a description */
155 if (isalpha (*stringarg)) 155 if (isalpha (*stringarg))
156 { 156 {
157 artifact *al = find_artifactlist (missile->type)->items; 157 artifact *al = find_artifactlist (missile->type)->items;
158 158
159 for (; al != NULL; al = al->next) 159 for (; al; al = al->next)
160 if (!strcasecmp (al->item->name, stringarg)) 160 if (!strcasecmp (al->item->name, stringarg))
161 break; 161 break;
162 162
163 if (!al) 163 if (!al)
164 { 164 {
398 else 398 else
399 op->contr->tmp_invis = 1; 399 op->contr->tmp_invis = 1;
400 400
401 op->contr->hidden = 0; 401 op->contr->hidden = 0;
402 } 402 }
403
403 if (makes_invisible_to (op, op)) 404 if (makes_invisible_to (op, op))
404 new_draw_info (NDI_UNIQUE, 0, op, "You can't see your hands!"); 405 new_draw_info (NDI_UNIQUE, 0, op, "You can't see your hands!");
405 else 406 else
406 new_draw_info (NDI_UNIQUE, 0, op, "You feel more transparent!"); 407 new_draw_info (NDI_UNIQUE, 0, op, "You feel more transparent!");
407 408
408 update_object (op, UP_OBJ_FACE); 409 update_object (op, UP_OBJ_CHANGE);
409 410
410 /* Only search the active objects - only these should actually do 411 /* Only search the active objects - only these should actually do
411 * harm to the player. 412 * harm to the player.
412 */ 413 */
413 for_all_actives (tmp) 414 for_all_actives (tmp)
564} 565}
565 566
566int 567int
567perceive_self (object *op) 568perceive_self (object *op)
568{ 569{
570 char buf[MAX_BUF];
569 char *cp = describe_item (op, op), buf[MAX_BUF]; 571 const char *cp = describe_item (op, op);
570 archetype *at = archetype::find (ARCH_DEPLETION); 572 archetype *at = archetype::find (ARCH_DEPLETION);
571 object *tmp; 573 object *tmp;
572 int i; 574 int i;
573 575
574 tmp = find_god (determine_god (op)); 576 tmp = find_god (determine_god (op));
2151 /* Basically, if the object is magical and not counterspell, 2153 /* Basically, if the object is magical and not counterspell,
2152 * we will more or less remove the object. Don't counterspell 2154 * we will more or less remove the object. Don't counterspell
2153 * monsters either. 2155 * monsters either.
2154 */ 2156 */
2155 2157
2156 if (head->attacktype & AT_MAGIC && 2158 if (head->attacktype & AT_MAGIC
2157 !(head->attacktype & AT_COUNTERSPELL) && !QUERY_FLAG (head, FLAG_MONSTER) && (op->level > head->level)) 2159 && !(head->attacktype & AT_COUNTERSPELL)
2160 && !QUERY_FLAG (head, FLAG_MONSTER)
2161 && (op->level > head->level))
2158 head->destroy (); 2162 head->destroy ();
2159 else 2163 else
2160 switch (head->type) 2164 switch (head->type)
2161 { 2165 {
2162 case SPELL_EFFECT: 2166 case SPELL_EFFECT:
2167 // XXX: Don't affect floor spelleffects. See also XXX comment
2168 // about sanctuary in spell_util.C
2169 if (QUERY_FLAG (tmp, FLAG_IS_FLOOR))
2170 continue;
2171
2163 if (op->level > head->level) 2172 if (op->level > head->level)
2164 head->destroy (); 2173 head->destroy ();
2165 2174
2166 break; 2175 break;
2167 2176

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines