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.66 by root, Fri Aug 10 01:47:53 2007 UTC vs.
Revision 1.69 by root, Thu Aug 23 17:17:41 2007 UTC

335 * pl is invisible. 335 * pl is invisible.
336 */ 336 */
337int 337int
338makes_invisible_to (object *pl, object *mon) 338makes_invisible_to (object *pl, object *mon)
339{ 339{
340
341 if (!pl->invisible) 340 if (!pl->invisible)
342 return 0; 341 return 0;
342
343 if (pl->type == PLAYER) 343 if (pl->type == PLAYER)
344 { 344 {
345 /* If race isn't set, then invisible unless it is undead */ 345 /* If race isn't set, then invisible unless it is undead */
346 if (!pl->contr->invis_race) 346 if (!pl->contr->invis_race)
347 { 347 {
348 if (QUERY_FLAG (mon, FLAG_UNDEAD)) 348 if (QUERY_FLAG (mon, FLAG_UNDEAD))
349 return 0; 349 return 0;
350
350 return 1; 351 return 1;
351 } 352 }
353
352 /* invis_race is set if we get here */ 354 /* invis_race is set if we get here */
353 if (!strcmp (pl->contr->invis_race, "undead") && is_true_undead (mon)) 355 if (!strcmp (pl->contr->invis_race, "undead") && is_true_undead (mon))
354 return 1; 356 return 1;
357
355 /* No race, can't be invisible to it */ 358 /* No race, can't be invisible to it */
356 if (!mon->race) 359 if (!mon->race)
357 return 0; 360 return 0;
361
358 if (strstr (mon->race, pl->contr->invis_race)) 362 if (strstr (mon->race, pl->contr->invis_race))
359 return 1; 363 return 1;
364
360 /* Nothing matched above, return 0 */ 365 /* Nothing matched above, return 0 */
361 return 0; 366 return 0;
362 } 367 }
363 else 368 else
364 { 369 {
601 606
602 if (is_dragon_pl (op)) 607 if (is_dragon_pl (op))
603 /* now grab the 'dragon_ability'-force from the player's inventory */ 608 /* now grab the 'dragon_ability'-force from the player's inventory */
604 for (tmp = op->inv; tmp; tmp = tmp->below) 609 for (tmp = op->inv; tmp; tmp = tmp->below)
605 { 610 {
606 if (tmp->type == FORCE && !strcmp (tmp->arch->archname, "dragon_ability_force")) 611 if (tmp->type == FORCE && tmp->arch->archname == shstr_dragon_ability_force)
607 { 612 {
608 if (tmp->stats.exp == 0) 613 if (tmp->stats.exp == 0)
609 buf << "Your metabolism isn't focused on anything.\n"; 614 buf << "Your metabolism isn't focused on anything.\n";
610 else 615 else
611 buf << "Your metabolism is focused on " << change_resist_msg[tmp->stats.exp] << ".\n"; 616 buf << "Your metabolism is focused on " << change_resist_msg[tmp->stats.exp] << ".\n";
1397 value -= nrof * nugget[i]->value; 1402 value -= nrof * nugget[i]->value;
1398 1403
1399 object *tmp = arch_to_object (nugget[i]); 1404 object *tmp = arch_to_object (nugget[i]);
1400 tmp->nrof = nrof; 1405 tmp->nrof = nrof;
1401 tmp->flag [FLAG_IDENTIFIED] = true; 1406 tmp->flag [FLAG_IDENTIFIED] = true;
1402 caster->map->insert (tmp, x, y, caster, 0); 1407 op->map->insert (tmp, x, y, op, 0);
1403 } 1408 }
1404 1409
1405 if (weight > weight_max) 1410 if (weight > weight_max)
1406 goto bailout; 1411 goto bailout;
1407 } 1412 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines