PRC8/nwn/nwnprc/trunk/scripts/prc_fh_dr.nss
Jaysyn904 6ec137a24e Updated AMS marker feats
Updated AMS marker feats.  Removed arcane & divine marker feats.  Updated Dread Necromancer for epic progression. Updated weapon baseitem models.  Updated new weapons for crafting & npc equip.
 Updated prefix.  Updated release archive.
2024-02-11 14:01:05 -05:00

45 lines
1.1 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Foe Hunter
//:://////////////////////////////////////////////
/*
Foe Hunter DR
*/
//:://////////////////////////////////////////////
//:: Created By: Oni5115
//:: Created On: Mar 17, 2004
//:://////////////////////////////////////////////
#include "prc_feat_const"
#include "prc_class_const"
#include "prc_spell_const"
#include "prc_alterations"
void main()
{
object oPC = OBJECT_SELF;
object oFoe = GetLastDamager();
int iFoeRace = MyPRCGetRacialType(oFoe);
int iHatedFoe = GetLocalInt(oPC, "HatedFoe");
int iDR = GetLocalInt(oPC, "HatedFoeDR");
int iDamageTaken = GetTotalDamageDealt();
int iHeal = 0;
if(iFoeRace == iHatedFoe && iDamageTaken > 0)
{
// Prevents player from regaining more HP than damage taken
if(iDamageTaken >= iDR)
{
iHeal = iDR;
}
else
{
iHeal = iDamageTaken;
}
effect eHeal = EffectHeal(iHeal);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oPC);
}
}