diff -u5 murk++stock/config.hpp murk++mod/config.hpp --- murk++stock/config.hpp 2012-06-11 20:59:50.000000000 -0500 +++ murk++mod/config.hpp 2014-04-22 13:31:52.000000000 -0500 @@ -149,10 +149,11 @@ #define AFF_HIDE 1 << 16 #define AFF_SLEEP 1 << 17 #define AFF_CHARM 1 << 18 #define AFF_FLYING 1 << 19 #define AFF_PASS_DOOR 1 << 20 +#define AFF_DARK_WARD 1 << 21 /* * Sex. * Used in #MOBILES. */ diff -u5 murk++stock/murk.cpp murk++mod/murk.cpp --- murk++stock/murk.cpp 2012-06-11 21:09:14.000000000 -0500 +++ murk++mod/murk.cpp 2014-04-23 09:06:36.000000000 -0500 @@ -740,10 +740,19 @@ &Character::spell_weaken, TAR_CHAR_OFFENSIVE, POS_FIGHTING, 20, 12, "spell", "You feel stronger."}, { "word of recall", {37, 37, 37, 37}, &Character::spell_word_of_recall, TAR_CHAR_SELF, POS_RESTING, 5, 12, "", "!Word of Recall!"}, + +/* + * New spell + */ + + { "dark ward", {1, 1, 37, 37}, + &Character::spell_dark_ward, TAR_CHAR_DEFENSIVE, POS_STANDING, + 75, 12, "", "The dark aura around your body disappears."}, + /* * Dragon breath */ { "acid breath", {33, 37, 37, 37}, &Character::spell_acid_breath, TAR_CHAR_OFFENSIVE, POS_FIGHTING, @@ -4154,10 +4163,32 @@ } /* * Damage modifiers. */ + + /* dark ward: lower alignment instead of health by not more + than the victim's level */ + if (victim->is_affected (AFF_DARK_WARD) + && victim->alignment > -1000) { + // full damage absorption + if (victim->level >= dam) { + victim->alignment -= dam; + dam = 0; + } + // partial damage absorption + else { + victim->alignment -= dam - victim->level; + dam -= victim->level; + } + // correct past -1000 + if (victim->alignment < -1000) { + dam += -1.0 * (victim->alignment + 1000); + victim->alignment = -1000; + } + } + if (victim->is_affected (AFF_SANCTUARY)) dam /= 2; if (victim->is_affected (AFF_PROTECT) && ch->is_evil ()) dam -= dam / 4; Only in murk++mod: murk.cpp~ diff -u5 murk++stock/spell_list.hpp murk++mod/spell_list.hpp --- murk++stock/spell_list.hpp 2007-01-04 00:10:24.000000000 -0600 +++ murk++mod/spell_list.hpp 2014-04-22 13:30:51.000000000 -0500 @@ -93,8 +93,9 @@ SPELL (spell_acid_breath) SPELL (spell_fire_breath) SPELL (spell_frost_breath) SPELL (spell_gas_breath) SPELL (spell_lightning_breath) +SPELL (spell_dark_ward) #undef SPELL diff -u5 murk++stock/spells.cpp murk++mod/spells.cpp --- murk++stock/spells.cpp 2011-06-10 01:16:02.000000000 -0500 +++ murk++mod/spells.cpp 2014-04-22 13:30:03.000000000 -0500 @@ -1569,5 +1569,23 @@ dam /= 2; damage (this, victim, dam, sn); return; } +void Character::spell_dark_ward (int sn, int lvl, void *vo) +{ + Character *victim = (Character *) vo; + Affect af; + + if (victim->is_affected (AFF_DARK_WARD)) + return; + af.type = sn; + af.duration = number_fuzzy (lvl / 8); + af.location = APPLY_NONE; + af.modifier = 0; + af.bitvector = AFF_DARK_WARD; + victim->affect_to_char(&af); + victim->act ("$n is surrounded by a dark aura.", NULL, NULL, TO_ROOM); + victim->send_to_char ("You are surrounded by a dark aura.\r\n"); + return; +} +