Hexblade shouldn't get Medium Armor prof. Weapon Specialization Whip isn't a Warblade bonus feat. Reorganized packages.2da. Fixed potential issue with SetCompositeBonusT(). Added materials iprops to material based crafting. Fixed bug w/ DoTrip(). Added heartbeat script to Monk to properly handle monk sizes. Cleaned up PRCGetCreatureSize(). Set Shielded Casting to use TagItemProperty(). Archivist now has a Lore check to learn spells from scrolls. Set Dragonfire Strike to use TagItemProperty(). Setup Forsaker to use TagItemProperty(). Fixed distance mismatch with Necrocarnum Shroud. Added too much debugging for the unarmed stuff. Cloudkill now obeys Mastery of Shapes.
34 lines
1.7 KiB
Plaintext
34 lines
1.7 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: OnDamaged NPC eventscript
|
|
//:: prc_npc_damaged
|
|
//:://////////////////////////////////////////////
|
|
#include "moi_inc_moifunc"
|
|
|
|
void main()
|
|
{
|
|
object oPC = GetLastDamager();
|
|
if(GetHasFeat(FEAT_SADISTIC_REWARD, oPC) && PRCGetIsAliveCreature(OBJECT_SELF))
|
|
{
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(EffectSavingThrowIncrease(SAVING_THROW_ALL, 1, SAVING_THROW_TYPE_ALL)), oPC, 6.0);
|
|
//SendMessageToPC(oPC, "Sadistic Reward running");
|
|
}
|
|
|
|
object oMeldshaper = GetLocalObject(OBJECT_SELF, "NecrocarnumShroud");
|
|
if (GetIsObjectValid(oMeldshaper) && PRCGetIsAliveCreature(OBJECT_SELF))
|
|
{
|
|
int nEssentia = GetEssentiaInvested(oMeldshaper, MELD_NECROCARNUM_SHROUD);
|
|
float fDist = GetDistanceBetween(oMeldshaper, OBJECT_SELF);
|
|
//float fDist = MetersToFeet(GetDistanceBetween(oMeldshaper, OBJECT_SELF));
|
|
float nCheck = FeetToMeters(5.0 + nEssentia * 5.0);
|
|
if (nCheck >= fDist && GetHasSpellEffect(MELD_NECROCARNUM_SHROUD, oMeldshaper))
|
|
{
|
|
if(PRCGetIsAliveCreature(OBJECT_SELF))
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectLinkEffects(EffectDamageIncrease(DAMAGE_BONUS_1), EffectAttackIncrease(1))), oMeldshaper, 6.0);
|
|
else // Assuming the enemy is dead here
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectLinkEffects(EffectDamageIncrease(DAMAGE_BONUS_1), EffectAttackIncrease(1))), oMeldshaper, RoundsToSeconds(GetHitDice(OBJECT_SELF)));
|
|
}
|
|
}
|
|
|
|
// Execute scripts hooked to this event for the NPC triggering it
|
|
ExecuteAllScriptsHookedToEvent(OBJECT_SELF, EVENT_NPC_ONDAMAGED);
|
|
} |