… | |
… | |
2153 | /* Basically, if the object is magical and not counterspell, |
2153 | /* Basically, if the object is magical and not counterspell, |
2154 | * we will more or less remove the object. Don't counterspell |
2154 | * we will more or less remove the object. Don't counterspell |
2155 | * monsters either. |
2155 | * monsters either. |
2156 | */ |
2156 | */ |
2157 | |
2157 | |
2158 | if (head->attacktype & AT_MAGIC && |
2158 | if (head->attacktype & AT_MAGIC |
2159 | !(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)) |
2160 | head->destroy (); |
2162 | head->destroy (); |
2161 | else |
2163 | else |
2162 | switch (head->type) |
2164 | switch (head->type) |
2163 | { |
2165 | { |
2164 | 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 | |
2165 | if (op->level > head->level) |
2172 | if (op->level > head->level) |
2166 | head->destroy (); |
2173 | head->destroy (); |
2167 | |
2174 | |
2168 | break; |
2175 | break; |
2169 | |
2176 | |