… | |
… | |
995 | if (!spell_ob->other_arch) |
995 | if (!spell_ob->other_arch) |
996 | { |
996 | { |
997 | LOG (llevError, "cast_party_spell: empty other arch\n"); |
997 | LOG (llevError, "cast_party_spell: empty other arch\n"); |
998 | return 0; |
998 | return 0; |
999 | } |
999 | } |
|
|
1000 | |
1000 | spell = arch_to_object (spell_ob->other_arch); |
1001 | spell = arch_to_object (spell_ob->other_arch); |
1001 | |
1002 | |
1002 | /* Always cast spell on caster */ |
1003 | /* Always cast spell on caster */ |
1003 | success = cast_spell (op, caster, dir, spell, stringarg); |
1004 | success = cast_spell (op, caster, dir, spell, stringarg); |
1004 | |
1005 | |
1005 | if (caster->contr->party == NULL) |
1006 | if (caster->contr->party == NULL) |
1006 | { |
1007 | { |
1007 | spell->remove (); |
1008 | spell->remove (); |
1008 | return success; |
1009 | return success; |
1009 | } |
1010 | } |
|
|
1011 | |
1010 | for_all_players (pl) |
1012 | for_all_players (pl) |
1011 | if ((pl->ob->contr->party == caster->contr->party) && (on_same_map (pl->ob, caster))) |
1013 | if ((pl->ob->contr->party == caster->contr->party) && (on_same_map (pl->ob, caster))) |
1012 | { |
|
|
1013 | cast_spell (pl->ob, caster, pl->ob->facing, spell, stringarg); |
1014 | cast_spell (pl->ob, caster, pl->ob->facing, spell, stringarg); |
1014 | } |
1015 | |
1015 | spell->remove (); |
1016 | spell->remove (); |
1016 | return success; |
1017 | return success; |
1017 | } |
1018 | } |
1018 | |
1019 | |
1019 | /* This is where the main dispatch when someone casts a spell. |
1020 | /* This is where the main dispatch when someone casts a spell. |
… | |
… | |
1244 | } |
1245 | } |
1245 | |
1246 | |
1246 | if (INVOKE_OBJECT (CAST_SPELL, spell_ob, ARG_OBJECT (op), ARG_OBJECT (caster), ARG_INT (dir), ARG_STRING (stringarg))) |
1247 | if (INVOKE_OBJECT (CAST_SPELL, spell_ob, ARG_OBJECT (op), ARG_OBJECT (caster), ARG_INT (dir), ARG_STRING (stringarg))) |
1247 | return RESULT_INT (0); |
1248 | return RESULT_INT (0); |
1248 | |
1249 | |
|
|
1250 | op->play_sound (spell_ob->sound); |
|
|
1251 | |
1249 | switch (spell_ob->subtype) |
1252 | switch (spell_ob->subtype) |
1250 | { |
1253 | { |
1251 | /* The order of case statements is same as the order they show up |
1254 | /* The order of case statements is same as the order they show up |
1252 | * in in spells.h. |
1255 | * in in spells.h. |
1253 | */ |
1256 | */ |