Further file organization

Further file organization
This commit is contained in:
Jaysyn904
2023-08-23 22:11:00 -04:00
parent 3062876237
commit d87fe14826
22364 changed files with 0 additions and 3253 deletions

View File

@@ -0,0 +1,45 @@
//::///////////////////////////////////////////////
//:: 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);
}
}