diff -u5 murk++-1.8/config.hpp fighterEnvySpell/config.hpp --- murk++-1.8/config.hpp 2012-06-11 20:59:50.000000000 -0500 +++ fighterEnvySpell/config.hpp 2014-03-04 19:24:38.000000000 -0600 @@ -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_FIGHTER_ENVY 1 << 21 /* * Sex. * Used in #MOBILES. */ diff -u5 murk++-1.8/murk.cpp fighterEnvySpell/murk.cpp --- murk++-1.8/murk.cpp 2012-06-11 21:09:14.000000000 -0500 +++ fighterEnvySpell/murk.cpp 2014-03-05 00:12:15.000000000 -0600 @@ -812,10 +812,16 @@ &Character::spell_general_purpose, TAR_CHAR_OFFENSIVE, POS_FIGHTING, 0, 12, "general purpose ammo", "!General Purpose Ammo!"}, { "high explosive", {37, 37, 37, 37}, &Character::spell_high_explosive, TAR_CHAR_OFFENSIVE, POS_FIGHTING, 0, 12, "high explosive ammo", "!High Explosive Ammo!"} +/* + * new spell +*/ + ,{ "fighter envy", {1, 37, 37, 37}, + &Character::spell_fighter_envy, TAR_CHAR_DEFENSIVE, POS_STANDING, + 75, 12, "", "Your frustration at being less than a perfect fighter ends."} }; /////////////////// // start of code // /////////////////// @@ -945,10 +951,12 @@ buf.append(" charm"); if (vector & AFF_FLYING) buf.append(" flying"); if (vector & AFF_PASS_DOOR) buf.append(" pass_door"); + if (vector & AFF_FIGHTER_ENVY) + buf.append(" fighter_envy"); if (buf.empty()) buf.append("none"); else buf.erase(0,1); return buf; @@ -4379,10 +4387,23 @@ if (dam <= 0) dam = 1; damage (ch, victim, dam, dt); + /* + * Fighter Envy. + */ + if (ch->is_affected (AFF_FIGHTER_ENVY)) { + if (ch->is_npc () && dam < ch->level) + ch->hit += ch->level - dam; + else { + if (wield != NULL && dam < wield->value[2]) + ch->hit += wield->value[2] - dam; + else if (dam < 4) + ch->hit += 4 - dam; + } + } return; } /* * Do one group of attacks. diff -u5 murk++-1.8/spell_list.hpp fighterEnvySpell/spell_list.hpp --- murk++-1.8/spell_list.hpp 2007-01-04 00:10:24.000000000 -0600 +++ fighterEnvySpell/spell_list.hpp 2014-03-04 19:34:34.000000000 -0600 @@ -53,10 +53,11 @@ SPELL (spell_dispel_magic) SPELL (spell_dispel_evil) SPELL (spell_earthquake) SPELL (spell_enchant_weapon) SPELL (spell_energy_drain) +SPELL (spell_fighter_envy) SPELL (spell_fireball) SPELL (spell_flamestrike) SPELL (spell_faerie_fire) SPELL (spell_faerie_fog) SPELL (spell_fly) diff -u5 murk++-1.8/spells.cpp fighterEnvySpell/spells.cpp --- murk++-1.8/spells.cpp 2011-06-10 01:16:02.000000000 -0500 +++ fighterEnvySpell/spells.cpp 2014-03-04 19:14:37.000000000 -0600 @@ -1569,5 +1569,22 @@ dam /= 2; damage (this, victim, dam, sn); return; } +void Character::spell_fighter_envy (int sn, int lvl, void *vo) +{ + Character *victim = (Character *) vo; + Affect af; + + if (victim->is_affected (AFF_FIGHTER_ENVY)) + return; + af.type = sn; + af.duration = number_fuzzy (lvl / 8); + af.location = APPLY_NONE; + af.modifier = 0; + af.bitvector = AFF_FIGHTER_ENVY; + victim->affect_to_char(&af); + victim->act ("$n is perturbed by $s lacking fighting ability.", NULL, NULL, TO_ROOM); + victim->send_to_char ("You wish you were a better fighter!\r\n"); + return; +}