Major: Backport to rvn 241, with the addition of all previously found bug fixes.
This commit is contained in:
22
src/magic.c
22
src/magic.c
@@ -199,11 +199,6 @@ int mag_damage(int level, struct char_data *ch, struct char_data *victim,
|
||||
if (victim == NULL || ch == NULL)
|
||||
return (0);
|
||||
|
||||
if (ADM_FLAGGED(victim, ADM_NODAMAGE)) {
|
||||
send_to_char(ch, "Your spell is harmless to %s.\r\n", GET_NAME(victim));
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (spellnum) {
|
||||
/* Mostly mages */
|
||||
case SPELL_MAGIC_MISSILE:
|
||||
@@ -356,7 +351,7 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim,
|
||||
break;
|
||||
|
||||
case SPELL_BLINDNESS:
|
||||
if (MOB_FLAGGED(victim, MOB_NOBLIND) || IS_ADMIN(victim, ADMLVL_IMMORT) || mag_savingthrow(victim, savetype, 0)) {
|
||||
if (MOB_FLAGGED(victim, MOB_NOBLIND) || GET_LEVEL(victim) >= LVL_IMMORT || mag_savingthrow(victim, savetype, 0)) {
|
||||
send_to_char(ch, "You fail.\r\n");
|
||||
return;
|
||||
}
|
||||
@@ -447,7 +442,7 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim,
|
||||
break;
|
||||
|
||||
case SPELL_POISON:
|
||||
if (mag_savingthrow(victim, savetype, 0) || ADM_FLAGGED(victim, ADM_NOPOISON)) {
|
||||
if (mag_savingthrow(victim, savetype, 0)) {
|
||||
send_to_char(ch, "%s", CONFIG_NOEFFECT);
|
||||
return;
|
||||
}
|
||||
@@ -658,13 +653,11 @@ void mag_areas(int level, struct char_data *ch, int spellnum, int savetype)
|
||||
* 2: immortals
|
||||
* 3: if no pk on this mud, skips over all players
|
||||
* 4: pets (charmed NPCs)
|
||||
* 5: other players in the same group (if the spell is 'violent')
|
||||
* 6: Flying people if earthquake is the spell */
|
||||
* 5: other players in the same group (if the spell is 'violent')
|
||||
* 6: Flying people if earthquake is the spell */
|
||||
if (tch == ch)
|
||||
continue;
|
||||
if (IS_ADMIN(tch, ADMLVL_IMMORT))
|
||||
continue;
|
||||
if (ADM_FLAGGED(tch, ADM_NODAMAGE))
|
||||
if (!IS_NPC(tch) && GET_LEVEL(tch) >= LVL_IMMORT)
|
||||
continue;
|
||||
if (!CONFIG_PK_ALLOWED && !IS_NPC(ch) && !IS_NPC(tch))
|
||||
continue;
|
||||
@@ -673,9 +666,8 @@ void mag_areas(int level, struct char_data *ch, int spellnum, int savetype)
|
||||
if (!IS_NPC(tch) && spell_info[spellnum].violent && AFF_FLAGGED(tch, AFF_GROUP) && AFF_FLAGGED(ch, AFF_GROUP) &&
|
||||
( ((ch->master == NULL) ? ch : ch->master) == ((tch->master == NULL) ? tch : tch->master) ) )
|
||||
continue;
|
||||
if ((spellnum == SPELL_EARTHQUAKE) && AFF_FLAGGED(tch, AFF_FLYING))
|
||||
continue;
|
||||
|
||||
if ((spellnum == SPELL_EARTHQUAKE) && AFF_FLAGGED(tch, AFF_FLYING))
|
||||
continue;
|
||||
/* Doesn't matter if they die here so we don't check. -gg 6/24/98 */
|
||||
mag_damage(level, ch, tch, spellnum, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user