… | |
… | |
393 | void |
393 | void |
394 | explode_bullet (object *op) |
394 | explode_bullet (object *op) |
395 | { |
395 | { |
396 | object *tmp, *owner; |
396 | object *tmp, *owner; |
397 | |
397 | |
398 | if (op->other_arch == NULL) |
398 | if (!op->other_arch) |
399 | { |
399 | { |
400 | LOG (llevError, "BUG: explode_bullet(): op without other_arch\n"); |
400 | LOG (llevError, "BUG: explode_bullet(): op without other_arch\n"); |
401 | op->destroy (); |
401 | op->destroy (); |
402 | return; |
402 | return; |
403 | } |
403 | } |
… | |
… | |
860 | |
860 | |
861 | success = 1; |
861 | success = 1; |
862 | tmp = arch_to_object (spell->other_arch); |
862 | tmp = arch_to_object (spell->other_arch); |
863 | tmp->set_owner (op); |
863 | tmp->set_owner (op); |
864 | set_spell_skill (op, caster, spell, tmp); |
864 | set_spell_skill (op, caster, spell, tmp); |
865 | tmp->level = caster_level (caster, spell); |
865 | tmp->level = casting_level (caster, spell); |
866 | tmp->attacktype = spell->attacktype; |
866 | tmp->attacktype = spell->attacktype; |
867 | |
867 | |
868 | /* holy word stuff */ |
868 | /* holy word stuff */ |
869 | if ((tmp->attacktype & AT_HOLYWORD) || (tmp->attacktype & AT_GODPOWER)) |
869 | if ((tmp->attacktype & AT_HOLYWORD) || (tmp->attacktype & AT_GODPOWER)) |
870 | if (!tailor_god_spell (tmp, op)) |
870 | if (!tailor_god_spell (tmp, op)) |
… | |
… | |
1112 | effect = arch_to_object (spell->other_arch); |
1112 | effect = arch_to_object (spell->other_arch); |
1113 | else |
1113 | else |
1114 | return 0; |
1114 | return 0; |
1115 | |
1115 | |
1116 | /* tailor the effect by priest level and worshipped God */ |
1116 | /* tailor the effect by priest level and worshipped God */ |
1117 | effect->level = caster_level (caster, spell); |
1117 | effect->level = casting_level (caster, spell); |
1118 | effect->attacktype = spell->attacktype; |
1118 | effect->attacktype = spell->attacktype; |
1119 | if (effect->attacktype & (AT_HOLYWORD | AT_GODPOWER)) |
1119 | if (effect->attacktype & (AT_HOLYWORD | AT_GODPOWER)) |
1120 | { |
1120 | { |
1121 | if (tailor_god_spell (effect, op)) |
1121 | if (tailor_god_spell (effect, op)) |
1122 | new_draw_info_format (NDI_UNIQUE, 0, op, "%s answers your call!", determine_god (op)); |
1122 | new_draw_info_format (NDI_UNIQUE, 0, op, "%s answers your call!", determine_god (op)); |
… | |
… | |
1451 | |
1451 | |
1452 | /* We precompute some values here so that we don't have to keep |
1452 | /* We precompute some values here so that we don't have to keep |
1453 | * doing it over and over again. |
1453 | * doing it over and over again. |
1454 | */ |
1454 | */ |
1455 | god = find_god (determine_god (op)); |
1455 | god = find_god (determine_god (op)); |
1456 | level = caster_level (caster, spell); |
1456 | level = casting_level (caster, spell); |
1457 | range = spell->range + SP_level_range_adjust (caster, spell); |
1457 | range = spell->range + SP_level_range_adjust (caster, spell); |
1458 | |
1458 | |
1459 | /* On the bright side, no monster should ever have a race of GOD_... |
1459 | /* On the bright side, no monster should ever have a race of GOD_... |
1460 | * so even if the player doesn't worship a god, if race=GOD_.., it |
1460 | * so even if the player doesn't worship a god, if race=GOD_.., it |
1461 | * won't ever match anything. |
1461 | * won't ever match anything. |
… | |
… | |
1845 | return 0; |
1845 | return 0; |
1846 | |
1846 | |
1847 | object *tmp = archetype::get (SWARM_SPELL); |
1847 | object *tmp = archetype::get (SWARM_SPELL); |
1848 | |
1848 | |
1849 | set_spell_skill (op, caster, spell, tmp); |
1849 | set_spell_skill (op, caster, spell, tmp); |
1850 | tmp->level = caster_level (caster, spell); /* needed later, to get level dep. right. */ |
1850 | tmp->level = casting_level (caster, spell); /* needed later, to get level dep. right. */ |
1851 | tmp->spell = spell->other_arch->instance (); |
1851 | tmp->spell = spell->other_arch->instance (); |
1852 | tmp->attacktype = tmp->spell->attacktype; |
1852 | tmp->attacktype = tmp->spell->attacktype; |
1853 | |
1853 | |
1854 | if (tmp->attacktype & AT_HOLYWORD || tmp->attacktype & AT_GODPOWER) |
1854 | if (tmp->attacktype & AT_HOLYWORD || tmp->attacktype & AT_GODPOWER) |
1855 | if (!tailor_god_spell (tmp, op)) |
1855 | if (!tailor_god_spell (tmp, op)) |
… | |
… | |
1998 | object *disease = arch_to_object (spell->other_arch); |
1998 | object *disease = arch_to_object (spell->other_arch); |
1999 | |
1999 | |
2000 | disease->set_owner (op); |
2000 | disease->set_owner (op); |
2001 | set_spell_skill (op, caster, spell, disease); |
2001 | set_spell_skill (op, caster, spell, disease); |
2002 | disease->stats.exp = 0; |
2002 | disease->stats.exp = 0; |
2003 | disease->level = caster_level (caster, spell); |
2003 | disease->level = casting_level (caster, spell); |
2004 | |
2004 | |
2005 | /* do level adjustments */ |
2005 | /* do level adjustments */ |
2006 | if (disease->stats.wc) |
2006 | if (disease->stats.wc) |
2007 | disease->stats.wc += dur_mod / 2; |
2007 | disease->stats.wc += dur_mod / 2; |
2008 | |
2008 | |