2025/05/27 Early Update
Fixed errant domains showing up as epic bonus feats in several class lists. Allow Lasher's Improved Trip to allow FEATOR entry Vae School. Updated filends. Add ProcessPreparedSpellLevel() by TiredByFirelight. Endure Exposure should allow multiple castings. Updated Bloodclaw Master's Scent ability. Avalanche of Blades should stop after the first miss now.
This commit is contained in:
@@ -26,6 +26,63 @@ void main()
|
||||
{
|
||||
if (!PreInvocationCastCode()) return;
|
||||
|
||||
object oCaster = OBJECT_SELF;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nCasterLevel = GetInvokerLevel(oCaster, GetInvokingClass());
|
||||
int bValid = FALSE;
|
||||
int nBPIndex = 0;
|
||||
int nBPTIndex = 0;
|
||||
|
||||
int bValidTarget = FALSE;
|
||||
int bValidCaster = FALSE;
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_ELEMENTAL_PROTECTION);
|
||||
|
||||
//Add to array on target of breaths they're protected from
|
||||
|
||||
if(!array_exists(oTarget, "BreathProtected"))
|
||||
array_create(oTarget, "BreathProtected");
|
||||
|
||||
while(!bValidTarget)
|
||||
{
|
||||
if(array_get_object(oTarget, "BreathProtected", nBPIndex) == OBJECT_INVALID)
|
||||
{
|
||||
array_set_object(oTarget, "BreathProtected", nBPIndex, oCaster);
|
||||
bValidTarget = TRUE;
|
||||
}
|
||||
else
|
||||
nBPIndex++;
|
||||
}
|
||||
|
||||
if(!array_exists(oCaster, "BreathProtectTargets"))
|
||||
array_create(oCaster, "BreathProtectTargets");
|
||||
|
||||
while(!bValidCaster)
|
||||
{
|
||||
if(array_get_object(oCaster, "BreathProtectTargets", nBPTIndex) == OBJECT_INVALID)
|
||||
{
|
||||
array_set_object(oCaster, "BreathProtectTargets", nBPTIndex, oTarget);
|
||||
if(DEBUG) DoDebug("Storing target: " + GetName(oTarget));
|
||||
bValidCaster = TRUE;
|
||||
}
|
||||
else
|
||||
nBPTIndex++;
|
||||
}
|
||||
|
||||
//add to array on caster of targets protected by their spell for resting cleanup
|
||||
|
||||
if(!array_exists(oCaster, "BreathProtectTargets"))
|
||||
array_create(oCaster, "BreathProtectTargets");
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
DispelMonitor(oCaster, oTarget, INVOKE_ENDURE_EXPOSURE);
|
||||
}
|
||||
|
||||
|
||||
/* void main()
|
||||
{
|
||||
if (!PreInvocationCastCode()) return;
|
||||
|
||||
object oCaster = OBJECT_SELF;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nCasterLevel = GetInvokerLevel(oCaster, GetInvokingClass());
|
||||
@@ -73,6 +130,7 @@ void main()
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
DispelMonitor(oCaster, oTarget, INVOKE_ENDURE_EXPOSURE);
|
||||
}
|
||||
*/
|
||||
|
||||
void DispelMonitor(object oCaster, object oTarget, int nSpellID)
|
||||
{
|
||||
|
@@ -56,6 +56,28 @@ void RendingClaws(object oInitiator, object oTarget)
|
||||
}
|
||||
|
||||
void Scent(object oInitiator)
|
||||
{
|
||||
effect eTest = GetFirstEffect(oInitiator);
|
||||
while (GetIsEffectValid(eTest))
|
||||
{
|
||||
if (GetEffectTag(eTest) == "BCM_SCENT_ACTIVE")
|
||||
return;
|
||||
eTest = GetNextEffect(oInitiator);
|
||||
}
|
||||
|
||||
effect eLink;
|
||||
effect eScent;
|
||||
|
||||
eScent = EffectLinkEffects(EffectSkillIncrease(SKILL_SPOT, 4), EffectSkillIncrease(SKILL_LISTEN, 4));
|
||||
eLink = EffectLinkEffects(eScent, EffectSkillIncrease(SKILL_SEARCH, 4));
|
||||
eLink = EffectLinkEffects(eLink, EffectBonusFeat(FEAT_KEEN_SENSE));
|
||||
eLink = TagEffect(eLink, "BCM_SCENT_ACTIVE");
|
||||
eLink = UnyieldingEffect(eLink);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oInitiator);
|
||||
}
|
||||
|
||||
/* void Scent(object oInitiator)
|
||||
{
|
||||
object oSkin = GetPCSkin(oInitiator);
|
||||
|
||||
@@ -65,7 +87,7 @@ void Scent(object oInitiator)
|
||||
IPSafeAddItemProperty(oSkin, ItemPropertyBonusFeat(IP_CONST_FEAT_KEEN_SENSES), 0.0f, X2_IP_ADDPROP_POLICY_KEEP_EXISTING, FALSE, FALSE);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eScent, oInitiator);
|
||||
}
|
||||
} */
|
||||
|
||||
void main()
|
||||
{
|
||||
|
@@ -52,11 +52,37 @@ void main()
|
||||
{
|
||||
int nHit = 1;
|
||||
int nPenalty = 0;
|
||||
DelayCommand(0.1, Owieowieowowow(oInitiator, oTarget, nHit, nPenalty));
|
||||
DelayCommand(0.1, Owieowieowowow(oInitiator, oTarget, nHit, nPenalty));
|
||||
}
|
||||
}
|
||||
|
||||
void Owieowieowowow(object oInitiator, object oTarget, int nHit, int nPenalty)
|
||||
{
|
||||
if (GetLocalInt(oInitiator, "SupernalAttack")) nPenalty += 1;
|
||||
|
||||
if (nHit == 1)
|
||||
{
|
||||
effect eNone;
|
||||
PerformAttack(oTarget, oInitiator, eNone, 0.0, nPenalty, 0, 0, "Avalanche of Blades Hit", "Avalanche of Blades Miss");
|
||||
|
||||
// Check result of attack
|
||||
if (GetLocalInt(oTarget, "PRCCombat_StruckByAttack"))
|
||||
{
|
||||
nPenalty -= 4;
|
||||
if (GetLocalInt(oInitiator, "SupernalAttack")) nPenalty -= 1;
|
||||
|
||||
// Continue the loop only on hit
|
||||
DelayCommand(0.1, Owieowieowowow(oInitiator, oTarget, 1, nPenalty));
|
||||
|
||||
DelayCommand(3.0, DeleteLocalInt(oTarget, "PRCCombat_StruckByAttack"));
|
||||
}
|
||||
// No else block: if the attack missed, don't queue another call
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* void Owieowieowowow(object oInitiator, object oTarget, int nHit, int nPenalty)
|
||||
{
|
||||
if (GetLocalInt(oInitiator, "SupernalAttack")) nPenalty += 1;
|
||||
if(nHit == 1)
|
||||
@@ -74,4 +100,4 @@ void Owieowieowowow(object oInitiator, object oTarget, int nHit, int nPenalty)
|
||||
//Again! Again!
|
||||
DelayCommand(0.1, Owieowieowowow(oInitiator, oTarget, nHit, nPenalty));
|
||||
}
|
||||
}
|
||||
} */
|
Reference in New Issue
Block a user