20025/05/27 Late Update
Expanded Disciple of Mephistopheles for epic progression. Expanded Disciple of Soul Eater for epic progression. Crusader's Aura of Triumph has a range of Touch. Swordsage's Pearl of Black Doubt may actually increase AC now. Crusader's Steely Resolve should start back up after logging back into MP. Hopefully Desert Wind strikes will no longer burn the wielder when using Flame Weapon. Keen Senses should go away when leaving Hunter's Senses stance. Moment of Prescience should be calculating bonuses correctly.
This commit is contained in:
@@ -17,36 +17,32 @@
|
||||
Range: Personal
|
||||
Target: You
|
||||
Duration: Stance
|
||||
|
||||
With every miss, your opponents become more uncertain,
|
||||
their doubt growing like an irritating pearl in the mouth
|
||||
of a helpless oyster.
|
||||
|
||||
You prey on your opponents' fear and lack of confidence.
|
||||
Each failed attack against you reminds them that their
|
||||
skill cannot hope to match yours.
|
||||
|
||||
When you enter this stance, you become more difficult to
|
||||
hit with each successive attack that misses you. Each
|
||||
time an opponent misses you with a melee attack, you
|
||||
gain a +2 dodge bonus to AC. This bonus lasts until the
|
||||
start of your next turn and is cumulative for the round.
|
||||
The bonus applies to any attacks made by all opponents
|
||||
until the beginning of your next turn.
|
||||
|
||||
With every miss, your opponents become more uncertain, their doubt growing
|
||||
like an irritating pearl in the mouth of a helpless oyster.
|
||||
|
||||
Whenever a foe swings and misses you, you gain +2 AC.
|
||||
*/
|
||||
|
||||
void PoBDACRecursive(object oTarget);
|
||||
|
||||
#include "x0_i0_match"
|
||||
#include "tob_inc_move"
|
||||
#include "tob_movehook"
|
||||
////#include "prc_alterations"
|
||||
|
||||
void PoBDACRecursive(object oTarget)
|
||||
{
|
||||
// No need to do this if the spell doesn't exist
|
||||
if(GetHasSpellEffect(MOVE_DM_PEARL_BLACK_DOUBT, oTarget))
|
||||
{ // No bonuses when not in combat
|
||||
if (GetIsInCombat(oTarget))
|
||||
{
|
||||
int nBonus = GetLocalInt(oTarget, "PearlOfBlackDoubtBonus");
|
||||
nBonus += 2;
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(EffectACIncrease(nBonus)), oTarget, 1.01);
|
||||
SetLocalInt(oTarget, "PearlOfBlackDoubtBonus", nBonus);
|
||||
}
|
||||
DelayCommand(1.0, PoBDACRecursive(oTarget));
|
||||
}
|
||||
|
||||
}
|
||||
void PoBDACRecursive(object oTarget, object oAttacker);
|
||||
|
||||
|
||||
// All this one does is zero out the boost every six seconds.
|
||||
void PoBDZeroRecursive(object oTarget)
|
||||
@@ -58,6 +54,55 @@ void PoBDZeroRecursive(object oTarget)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int GetApproximateAPR(object oCreature)
|
||||
{
|
||||
int nBAB = GetBaseAttackBonus(oCreature);
|
||||
int nAttacks = 1;
|
||||
|
||||
// +1 attack per +5 BAB over 6
|
||||
if (nBAB >= 6) nAttacks++;
|
||||
if (nBAB >= 11) nAttacks++;
|
||||
if (nBAB >= 16) nAttacks++;
|
||||
|
||||
// Add 1 if hasted
|
||||
if (GetHasEffect(EFFECT_TYPE_HASTE, oCreature))
|
||||
{
|
||||
nAttacks++;
|
||||
}
|
||||
|
||||
// NOTE: Dual-wielding or monk logic not included here
|
||||
|
||||
return nAttacks;
|
||||
}
|
||||
|
||||
|
||||
void PoBDACRecursive(object oTarget, object oAttacker)
|
||||
{
|
||||
// No need to do this if the spell doesn't exist
|
||||
if(GetHasSpellEffect(MOVE_DM_PEARL_BLACK_DOUBT, oTarget))
|
||||
{ // No bonuses when not in combat
|
||||
if (GetIsInCombat(oTarget))
|
||||
{
|
||||
int nAPR = GetApproximateAPR(oAttacker);
|
||||
|
||||
int nBonus = GetLocalInt(oTarget, "PearlOfBlackDoubtBonus");
|
||||
nBonus += 2 * nAPR;
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(EffectACIncrease(nBonus)), oTarget, 6.0f);
|
||||
SetLocalInt(oTarget, "PearlOfBlackDoubtBonus", nBonus);
|
||||
|
||||
DelayCommand(0.0, PoBDACRecursive(oTarget, oAttacker));
|
||||
DelayCommand(6.0, PoBDZeroRecursive(oTarget));
|
||||
}
|
||||
else
|
||||
{
|
||||
DeleteLocalInt(oTarget, "PearlOfBlackDoubtBonus");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
if (!PreManeuverCastCode())
|
||||
@@ -68,18 +113,21 @@ void main()
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
object oInitiator = OBJECT_SELF;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
struct maneuver move = EvaluateManeuver(oInitiator, oTarget);
|
||||
object oInitiator = OBJECT_SELF;
|
||||
object oAttacker = GetLastAttacker();
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
|
||||
struct maneuver move = EvaluateManeuver(oInitiator, oTarget);
|
||||
|
||||
if(move.bCanManeuver)
|
||||
{
|
||||
object oItem = GetItemInSlot(INVENTORY_SLOT_CHEST, oInitiator);
|
||||
object oItem = GetItemInSlot(INVENTORY_SLOT_CHEST, oInitiator);
|
||||
// Add the OnHit
|
||||
IPSafeAddItemProperty(oItem, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_ONHIT_UNIQUEPOWER, 1), 9999.0, X2_IP_ADDPROP_POLICY_KEEP_EXISTING, FALSE, FALSE);
|
||||
IPSafeAddItemProperty(oItem, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_ONHIT_UNIQUEPOWER, 1), 9999.0, X2_IP_ADDPROP_POLICY_KEEP_EXISTING, FALSE, FALSE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_BLUESHIELDPROTECT);
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(eDur), oTarget, 9999.0);
|
||||
|
||||
|
||||
|
||||
PoBDACRecursive(oInitiator, oAttacker);
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user