mirror of
https://github.com/tbamud/tbamud.git
synced 2026-01-08 10:28:50 +01:00
MAJOR UPDATE: Admin Levels split from Mortal Levels
This commit is contained in:
parent
2b30509371
commit
dcba9d6441
77 changed files with 2882 additions and 2067 deletions
13
src/magic.c
13
src/magic.c
|
|
@ -199,6 +199,11 @@ 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:
|
||||
|
|
@ -351,7 +356,7 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim,
|
|||
break;
|
||||
|
||||
case SPELL_BLINDNESS:
|
||||
if (MOB_FLAGGED(victim, MOB_NOBLIND) || GET_LEVEL(victim) >= LVL_IMMORT || mag_savingthrow(victim, savetype, 0)) {
|
||||
if (MOB_FLAGGED(victim, MOB_NOBLIND) || IS_ADMIN(victim, ADMLVL_IMMORT) || mag_savingthrow(victim, savetype, 0)) {
|
||||
send_to_char(ch, "You fail.\r\n");
|
||||
return;
|
||||
}
|
||||
|
|
@ -442,7 +447,7 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim,
|
|||
break;
|
||||
|
||||
case SPELL_POISON:
|
||||
if (mag_savingthrow(victim, savetype, 0)) {
|
||||
if (mag_savingthrow(victim, savetype, 0) || ADM_FLAGGED(victim, ADM_NOPOISON)) {
|
||||
send_to_char(ch, "%s", CONFIG_NOEFFECT);
|
||||
return;
|
||||
}
|
||||
|
|
@ -656,7 +661,9 @@ void mag_areas(int level, struct char_data *ch, int spellnum, int savetype)
|
|||
* 5: other players in the same group (if the spell is 'violent') */
|
||||
if (tch == ch)
|
||||
continue;
|
||||
if (!IS_NPC(tch) && GET_LEVEL(tch) >= LVL_IMMORT)
|
||||
if (IS_ADMIN(tch, ADMLVL_IMMORT))
|
||||
continue;
|
||||
if (ADM_FLAGGED(tch, ADM_NODAMAGE))
|
||||
continue;
|
||||
if (!CONFIG_PK_ALLOWED && !IS_NPC(ch) && !IS_NPC(tch))
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue