… | |
… | |
497 | * resources, and may not work as well if a player is standing |
497 | * resources, and may not work as well if a player is standing |
498 | * on top of a counterwall spell (may hit the player before being |
498 | * on top of a counterwall spell (may hit the player before being |
499 | * removed.) On the other hand, it may be more dramatic for the |
499 | * removed.) On the other hand, it may be more dramatic for the |
500 | * spell to actually hit the counterwall and be sucked up. |
500 | * spell to actually hit the counterwall and be sucked up. |
501 | */ |
501 | */ |
502 | if ((tmp->attacktype & AT_COUNTERSPELL) && |
502 | if ((tmp->attacktype & AT_COUNTERSPELL) |
503 | (tmp->type != PLAYER) && !QUERY_FLAG (tmp, FLAG_MONSTER) && |
503 | && !QUERY_FLAG (tmp, FLAG_MONSTER) |
504 | (tmp->type != WEAPON) && (tmp->type != BOW) && (tmp->type != ARROW) && (tmp->type != GOLEM) && (immune_stop & AT_MAGIC)) |
504 | && (tmp->type != PLAYER) |
|
|
505 | && (tmp->type != WEAPON) |
|
|
506 | && (tmp->type != BOW) |
|
|
507 | && (tmp->type != ARROW) |
|
|
508 | && (tmp->type != GOLEM) |
|
|
509 | && !QUERY_FLAG (tmp, FLAG_IS_FLOOR) // XXX: |
|
|
510 | // we special case floor here because there |
|
|
511 | // are sometimes spell effect floors |
|
|
512 | // which are used to inflict damage |
|
|
513 | // (and those shouldn't go away from |
|
|
514 | // sanctuary) see also: permanent lava |
|
|
515 | && (immune_stop & AT_MAGIC)) |
505 | return 0; |
516 | return 0; |
506 | |
517 | |
507 | /* This is to prevent 'out of control' spells. Basically, this |
518 | /* This is to prevent 'out of control' spells. Basically, this |
508 | * limits one spell effect per space per spell. This is definately |
519 | * limits one spell effect per space per spell. This is definately |
509 | * needed for performance reasons, and just for playability I believe. |
520 | * needed for performance reasons, and just for playability I believe. |
… | |
… | |
1006 | |
1017 | |
1007 | int |
1018 | int |
1008 | cast_party_spell (object *op, object *caster, int dir, object *spell_ob, char *stringarg) |
1019 | cast_party_spell (object *op, object *caster, int dir, object *spell_ob, char *stringarg) |
1009 | { |
1020 | { |
1010 | int success; |
1021 | int success; |
1011 | player *pl; |
|
|
1012 | object *spell; |
1022 | object *spell; |
1013 | |
1023 | |
1014 | if (!spell_ob->other_arch) |
1024 | if (!spell_ob->other_arch) |
1015 | { |
1025 | { |
1016 | LOG (llevError, "cast_party_spell: empty other arch\n"); |
1026 | LOG (llevError, "cast_party_spell: empty other arch\n"); |