2025/06/10 afternoon update

Fixed incorrect action for Sublime Chord songs.
Hopefully fixed Factotum Inspiration not accumulating after logging back in.
Hopefully fixed Archmage SLA ability from grabbing wrong spell level for spell radials.
Bluesteel Bracer script now add itself and not Bloodwar Bracers.
Fixed Pearl of Black Doubt as good as NWN will allow.
Fixed Diamond Dragon level up blocker.
This commit is contained in:
Jaysyn904 2025-06-10 17:38:59 -04:00
parent 2926d346ac
commit b5d31c0297
11 changed files with 349 additions and 117 deletions

147
Notes/old_pearl.nss Normal file
View File

@ -0,0 +1,147 @@
/*
----------------
Pearl of Black Doubt
tob_dmnd_prlbdt
----------------
15/07/07 by Stratovarius
*/ /** @file
Pearl of Black Doubt
Diamond Mind (Stance)
Level: Swordsage 3, Warmage 3
Prerequisite: One Diamond Mind maneuver.
Initiation Action: 1 Swift Action
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.
*/
#include "x0_i0_match"
#include "tob_inc_move"
#include "tob_movehook"
////#include "prc_alterations"
#include "x0_i0_match"
#include "tob_inc_move"
#include "tob_movehook"
const float POBD_RADIUS_MELEE = 8.0;
int GetApproximateAPR(object oCreature)
{
int nBAB = GetBaseAttackBonus(oCreature);
int nAttacks = 1;
if (nBAB >= 6) nAttacks++;
if (nBAB >= 11) nAttacks++;
if (nBAB >= 16) nAttacks++;
if (GetHasEffect(EFFECT_TYPE_HASTE, oCreature))
{
nAttacks++;
}
return nAttacks;
}
void PoBDZeroRecursive(object oTarget)
{
if (GetHasSpellEffect(MOVE_DM_PEARL_BLACK_DOUBT, oTarget))
{
DeleteLocalInt(oTarget, "PearlOfBlackDoubtBonus");
DelayCommand(6.0, PoBDZeroRecursive(oTarget));
}
}
void PoBDACRecursive(object oTarget)
{
if (!GetHasSpellEffect(MOVE_DM_PEARL_BLACK_DOUBT, oTarget))
return;
if (!GetIsInCombat(oTarget))
{
DeleteLocalInt(oTarget, "PearlOfBlackDoubtBonus");
return;
}
int nTotalAPR = 0;
location lLoc = GetLocation(oTarget);
object oEnemy = GetFirstObjectInShape(SHAPE_SPHERE, 8.0, lLoc, TRUE, OBJECT_TYPE_CREATURE);
while (GetIsObjectValid(oEnemy))
{
if (GetIsEnemy(oTarget, oEnemy) && GetIsInCombat(oEnemy))
{
// Melee only: must be in range and not holding ranged weapon
object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oEnemy);
int nWeaponBase = GetBaseItemType(oWeapon);
if (nWeaponBase == BASE_ITEM_INVALID || !GetWeaponRanged(oWeapon))
{
nTotalAPR += GetApproximateAPR(oEnemy);
}
}
oEnemy = GetNextObjectInShape(SHAPE_SPHERE, 8.0, lLoc);
}
int nBonus = 0;
if (nTotalAPR > 0)
{
nBonus = 2 * nTotalAPR;
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(EffectACIncrease(nBonus)), oTarget, 6.0);
}
SetLocalInt(oTarget, "PearlOfBlackDoubtBonus", nBonus);
DelayCommand(1.0, PoBDACRecursive(oTarget));
}
void main()
{
if (!PreManeuverCastCode())
return;
object oInitiator = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
struct maneuver move = EvaluateManeuver(oInitiator, oTarget);
if (!move.bCanManeuver)
return;
object oItem = GetItemInSlot(INVENTORY_SLOT_CHEST, oInitiator);
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);
PoBDZeroRecursive(oInitiator);
}

View File

@ -1849,7 +1849,7 @@
1845 Unicorn_Companion 16825308 is_LsPlanar C P 0 0x00 0x01 prc_heal_comp **** **** **** **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** 1844 3 **** 0 0 **** 0 248778451 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
1846 Lammasu_Companion 16826223 is_Planar C P 0 0x00 0x01 prc_heal_comp **** **** **** **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** 1844 3 **** 0 0 **** 0 248843987 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
1847 Androsphinx_Companion 16826550 is_GrPlanar C P 0 0x00 0x01 prc_heal_comp **** **** **** **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** 1844 3 **** 0 0 **** 0 248909523 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
1848 SongArcanePower 16827005 ife_maximize G P v 0x00 0x01 prc_sch_arcanep **** **** **** **** **** **** **** 500 **** **** **** **** **** **** **** self 500 **** **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** 10 **** 3 **** 0 0 **** 0 1995 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
1848 SongArcanePower 16827005 ife_maximize G P v 0x00 0x01 prc_sch_arcanep **** **** **** **** **** **** **** 500 **** **** **** **** **** **** **** self 500 **** **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** 10 **** 3 16828401 0 0 53224 0 1995 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
1849 Close_Wounds 16828321 ife_fasthealing1 C S v 0x1d 0x0b sp_close_wounds **** 3 **** **** **** **** 3 500 **** **** **** **** **** vs_chant_conj_hm vs_chant_conj_hf **** 500 **** **** **** **** 0 **** **** **** **** **** Positive 0 **** **** **** **** **** 5 **** 1 16828322 1 1 **** 0 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 3 ****
1850 Revivify 16828323 is_RaisDead C T vs 0x38 0x2b sp_revivify **** 5 **** **** **** **** 5 1500 head **** **** vco_lgrinholy01 sco_lgrinholy01 vs_chant_conj_hm vs_chant_conj_hf touch 1000 **** **** **** **** 0 **** **** **** **** **** **** 0 **** **** **** **** **** 7 **** 1 16828324 1 0 **** 0 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 5 ****
1851 Bless_Water 16828325 is_blesswater T T vs 0x38 0x01 sp_bless_water **** 1 **** 1 **** **** 1 1500 **** **** **** **** **** vs_chant_ench_hm vs_chant_ench_hf **** 1000 **** **** **** **** 0 **** **** **** **** **** **** 0 **** **** **** **** **** 18 **** 1 16828337 1 0 **** 0 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** 1 **** 1 **** 1 1
@ -1858,7 +1858,7 @@
1854 Holy_Aura 16828342 ife_holyaura A P vs 0x3a 0x01 sp_holy_aura **** 8 **** **** **** **** 8 1500 **** **** **** **** **** vs_chant_illu_lm vs_chant_illu_lf **** 1000 **** vco_gazemind **** c_archlant_bat1 0 **** **** **** **** **** **** 0 **** **** **** **** **** 1 **** 1 16828343 1 0 **** 0 **** **** **** 0 sphere 6.096 **** 21 **** **** **** **** **** **** **** **** **** **** **** 8 8
1855 True_Resurrection 16828344 is_Resurrec C T vs 0x38 0x01 sp_true_res **** 9 **** **** **** **** 9 1500 head vco_mehanelec01 **** vco_lgsprholy01 sco_lgsprholy01 vs_chant_conj_hm vs_chant_conj_hf up 1000 **** **** **** **** 0 **** **** **** **** **** **** 0 **** **** **** **** **** 7 **** 1 16828345 1 0 **** 0 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 9 9
1856 Foresight 16828346 fot_farsight D P vs 0x3a 0x09 sp_foresight **** **** 9 **** **** 9 9 1500 **** **** **** **** **** vs_chant_illu_hm vs_chant_illu_hf **** 1000 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 7 **** 1 16828347 1 0 **** 0 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** 9 9 ****
1857 SongTimelessness 16827716 is_timestop G M **** **** 0x02 prc_sch_timeless **** **** **** **** **** **** **** 500 head vco_mehanmind02 **** vco_lgsprnatr01 sco_lgsprnatr01 vs_chant_ench_hm vs_chant_ench_hf touch 1000 **** **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** 2 **** 3 **** **** **** **** 0 1996 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
1857 SongTimelessness 16827715 is_timestop G M **** **** 0x02 prc_sch_timeless **** **** **** **** **** **** **** 500 head vco_mehanmind02 **** vco_lgsprnatr01 sco_lgsprnatr01 vs_chant_ench_hm vs_chant_ench_hf touch 1000 **** **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** 2 **** 3 16829024 **** **** 53224 0 1996 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
1858 Draconic_Arcane_Grace_Master_1_5 16832563 ife_dodge G P 0 0x00 0x01 **** **** **** **** **** **** **** 1 0 **** **** **** **** **** **** **** **** 0 **** **** **** **** 0 **** **** **** **** **** **** **** 1862 1863 1864 1865 1866 12 **** 3 16832560 0 0 **** 0 3900 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
1859 Draconic_Arcane_Grace_Master_6_9 16832583 ife_dodge G P 0 0x00 0x01 **** **** **** **** **** **** **** 1 0 **** **** **** **** **** **** **** **** 0 **** **** **** **** 0 **** **** **** **** **** **** **** 1867 1868 1869 1870 **** 12 **** 1 16832560 0 0 **** 0 3902 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
1860 Draconic_Breath_Master_1_5 16832564 ife_X2DDBreath V L 0 0x00 0x36 **** **** **** **** **** **** **** 1 0 **** **** **** **** **** **** **** **** 0 **** **** **** **** 0 **** **** **** **** **** **** **** 1871 1872 1873 1874 1875 19 **** 3 16832562 0 0 **** 1 3901 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
@ -1900,7 +1900,7 @@
1896 Firewalk 16827070 is_WallFire V P 0 **** 0x01 psi_pyro_walk **** **** **** **** **** **** **** 1500 **** **** vco_mehanfire03 **** sco_mehanfire03 **** **** **** 1000 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 7 **** 3 16827075 **** **** **** **** 2858 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
1897 Heat_Death 16827076 is_FlmStrike V S 0 **** 0x02 psi_pyro_death **** **** **** **** **** **** **** 1500 **** **** vco_mehanfire03 **** sco_mehanfire03 **** **** out 1000 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 2 **** 3 16827077 **** **** **** 1 2861 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
1898 Conflagration 16827078 ife_X2SpRuin V P 0 **** 0x01 psi_pyro_conf **** **** **** **** **** **** **** 1500 **** **** vco_mehanfire03 **** sco_mehanfire03 **** **** out 1000 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 11 **** 3 16827079 **** **** **** **** 2862 **** **** **** sphere 9.14 **** 19 **** **** **** **** **** **** **** **** **** **** **** **** ****
1899 SongCosmicFire 16827716 is_fireburst G L **** **** 0x3E prc_sch_cosmfire **** **** **** **** **** **** 9 1500 hand **** vco_mebalfire01 **** sco_mebalfire01 vs_chant_evoc_hm vs_chant_evoc_hf out 1000 **** **** **** **** 1 vpr_fireball homing hand spr_fireball path Fire **** **** **** **** **** **** 11 **** 3 **** **** **** **** 1 1997 **** **** 1 sphere 6.67 **** 3 **** **** **** **** **** **** **** **** **** **** **** **** ****
1899 SongCosmicFire 16827716 is_fireburst G L **** **** 0x3E prc_sch_cosmfire **** **** **** **** **** **** 9 1500 hand **** vco_mebalfire01 **** sco_mebalfire01 vs_chant_evoc_hm vs_chant_evoc_hf out 1000 **** **** **** **** 1 vpr_fireball homing hand spr_fireball path Fire **** **** **** **** **** **** 11 **** 3 16829448 **** **** 53224 1 1997 **** **** 1 sphere 6.67 **** 3 **** **** **** **** **** **** **** **** **** **** **** **** ****
1900 Shifter_GWShape 16824354 ife_X2GWShp1 T L **** **** 0x02 pnp_shft_gwshape **** **** **** **** **** **** 3 500 head vco_smhannatr01 **** **** sco_mehannatr01 **** **** up 1000 **** **** **** **** 0 **** **** **** **** **** **** 0 **** **** **** **** **** **** **** 3 **** 0 0 **** 0 2900 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
1901 Shifter_EGWShape 16824356 ife_X2GWShp1 T L **** **** 0x02 pnp_shft_ewshape **** **** **** **** **** **** 3 500 head vco_smhannatr01 **** **** sco_mehannatr01 **** **** up 1000 **** **** **** **** 0 **** **** **** **** **** **** 0 **** **** **** **** **** **** **** 3 **** 0 0 **** 0 2906 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
1902 Shifter_Options 16824364 ife_X2GWShp1 T P **** **** 0x01 pnp_shft_options **** **** **** **** **** **** 3 0 **** **** **** **** **** **** **** **** 0 **** **** **** **** 0 **** **** **** **** **** **** 0 **** **** **** **** **** **** **** 3 **** 0 0 **** 0 2913 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
@ -2723,7 +2723,7 @@
2719 Gather_Axe_Thrower 16824332 ife_x2wftaxe V P **** 0x00 0x04 ow_sum_axe **** **** **** **** **** **** 1 0 head **** **** **** **** **** **** self 0 **** **** **** **** 0 **** **** **** **** **** **** 1 **** **** **** **** **** **** 2715 3 **** 0 0 **** 0 365498884 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
2720 Gather_Shaman 16824333 ife_x2wfspr V P **** 0x00 0x04 ow_sum_sham **** **** **** **** **** **** 1 0 head **** **** **** **** **** **** self 0 **** **** **** **** 0 **** **** **** **** **** **** 1 **** **** **** **** **** **** 2715 3 **** 0 0 **** 0 365564420 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
2721 BLOOD_OF_THE_WARLORD 16824316 ife_x2mightrage V P 0 0x00 0x09 ft_bloodwarlord **** **** **** **** **** **** 4 1 head **** **** **** **** **** **** out 500 **** **** **** **** 0 **** **** **** **** **** **** 1 **** **** **** **** **** 16 **** 3 **** 0 0 53219 0 4608 **** **** 0 sphere 10 **** 20 **** **** **** **** **** **** **** **** **** **** **** **** ****
2722 Dirge_Sorrow 16835023 IR_USE V P v **** 0x01 prc_ft_hntmldy **** **** **** **** **** **** 1 500 head **** **** **** **** **** **** out 500 **** **** **** **** 0 **** **** **** **** **** Cold 1 **** **** **** **** **** 8 **** 3 6075 0 0 **** 0 257 **** **** 0 Sphere 9.14 **** 18 **** **** **** **** **** **** **** **** **** **** **** **** ****
2722 Dirge_Sorrow 16835023 IR_USE V P v **** 0x01 prc_ft_hntmldy **** **** **** **** **** **** 1 500 head **** **** **** **** **** **** out 500 **** **** **** **** 0 **** **** **** **** **** Cold 1 **** **** **** **** **** 8 **** 3 6075 0 0 53224 0 257 **** **** 0 Sphere 9.14 **** 18 **** **** **** **** **** **** **** **** **** **** **** **** ****
2723 InlindlSchool 16834993 is_Invisib I P s 0x00 0x01 prc_ft_inlindl **** **** **** **** **** **** 2 0 **** **** **** **** **** **** **** self 1000 **** **** **** sdr_invisible 0 **** **** **** **** **** **** 0 **** **** **** **** **** 10 **** 3 **** 0 0 **** 0 5284 **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
2724 SpinningHalberd 16834987 is_SlayLive N T 0 **** 0x02 prc_ft_spnhlbrd **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** attack 1000 **** **** **** **** 0 **** **** **** **** **** **** 0 **** **** **** **** **** **** **** 1 **** 0 0 **** 0 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
2725 Shou_Flurry_Light **** **** V L **** 0x00 0x04 prc_shou_flrylgt **** **** **** **** **** **** 0 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 1 **** **** **** **** **** **** **** 3 **** 0 0 **** 0 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****

View File

@ -896,7 +896,7 @@ void DeletePRCLocalInts(object oSkin)
// Sacred Fist
DeleteLocalInt(oSkin,"SacFisMv");
// Minstrel
DeleteLocalInt(oSkin,"MinstrelSFBonus"); /// @todo Make ASF reduction compositable
DeleteLocalInt(oSkin,"MinstrelSFBonus"); //:: @todo Make ASF reduction compositable
// Nightshade
DeleteLocalInt(oSkin,"ImmuNSWeb");
DeleteLocalInt(oSkin,"ImmuNSPoison");
@ -929,7 +929,9 @@ void DeletePRCLocalInts(object oSkin)
DeleteLocalInt(oSkin, "ThickerThanWater");
//:: Crusader
DeleteLocalInt(oPC, "DelayedDamageHB");
//:: Factotum
DeleteLocalInt(oPC, "InspirationHB");
// Feats
DeleteLocalInt(oPC, "ForceOfPersonalityWis");
DeleteLocalInt(oPC, "ForceOfPersonalityCha");

View File

@ -1903,6 +1903,14 @@ int ClassSLAStore(object oCaster, int nSpellID, int nCastingClass, int nSpellLev
{
FloatingTextStringOnCreature("SLA "+IntToString(nSLAID)+" stored", oCaster, FALSE);
int nMetamagic = GetMetaMagicFeat();
// Look up spell level if invalid (radial spells)
if(nSpellLevel < 0 || nSpellLevel >= 10)
{
string sInnateLevel = Get2DACache("spells", "Innate", nSpellID);
nSpellLevel = StringToInt(sInnateLevel);
}
SetPersistantLocalInt(oCaster, "PRC_SLA_SpellID_"+IntToString(nSLAID), nSpellID+1);
SetPersistantLocalInt(oCaster, "PRC_SLA_Class_"+IntToString(nSLAID), nCastingClass);
SetPersistantLocalInt(oCaster, "PRC_SLA_Meta_"+IntToString(nSLAID), nMetamagic);

View File

@ -55,7 +55,8 @@ void main()
if (nEssentia) eLink = EffectLinkEffects(eLink, EffectDamageIncrease(IPGetDamageBonusConstantFromNumber(nEssentia), DAMAGE_TYPE_BASE_WEAPON));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(eLink), oMeldshaper, 9999.0);
IPSafeAddItemProperty(GetPCSkin(oMeldshaper), ItemPropertyBonusFeat(IP_CONST_MELD_BLOODWAR_GAUNTLETS), 9999.0, X2_IP_ADDPROP_POLICY_KEEP_EXISTING);
//IPSafeAddItemProperty(GetPCSkin(oMeldshaper), ItemPropertyBonusFeat(IP_CONST_MELD_BLOODWAR_GAUNTLETS), 9999.0, X2_IP_ADDPROP_POLICY_KEEP_EXISTING); //:: <- Wrong?
IPSafeAddItemProperty(GetPCSkin(oMeldshaper), ItemPropertyBonusFeat(IP_CONST_MELD_BLUESTEEL_BRACERS), 9999.0, X2_IP_ADDPROP_POLICY_KEEP_EXISTING);
IPSafeAddItemProperty(GetPCSkin(oMeldshaper), ItemPropertyBonusFeat(IP_CONST_FEAT_BLOODED), 9999.0, X2_IP_ADDPROP_POLICY_KEEP_EXISTING);
if (GetIsMeldBound(oMeldshaper) == CHAKRA_ARMS) BluesteelBracersHB(oMeldshaper);
}

View File

@ -17,117 +17,148 @@
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.
*/
#include "x0_i0_match"
#include "tob_inc_move"
#include "tob_movehook"
////#include "prc_alterations"
void PoBDACRecursive(object oTarget, object oAttacker);
// All this one does is zero out the boost every six seconds.
void PoBDZeroRecursive(object oTarget)
{
if(GetHasSpellEffect(MOVE_DM_PEARL_BLACK_DOUBT, oTarget))
{
DeleteLocalInt(oTarget, "PearlOfBlackDoubtBonus");
DelayCommand(6.0, PoBDZeroRecursive(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 >= 6) nAttacks++;
if (nBAB >= 11) nAttacks++;
if (nBAB >= 16) nAttacks++;
// Add 1 if hasted
if (GetHasEffect(EFFECT_TYPE_HASTE, oCreature))
if (PRCGetHasEffect(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())
{
// If code within the PreManeuverCastCode (i.e. UMD) reports FALSE, do not run this spell
return;
}
// End of Spell Cast Hook
object oInitiator = OBJECT_SELF;
object oAttacker = GetLastAttacker();
object oTarget = PRCGetSpellTargetObject();
//Declare main variables.
int nEvent = GetRunningEvent();
struct maneuver move = EvaluateManeuver(oInitiator, oTarget);
if(move.bCanManeuver)
object oItem;
object oInitiator;
object oTarget = PRCGetSpellTargetObject();
switch(nEvent)
{
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);
effect eDur = EffectVisualEffect(VFX_DUR_BLUESHIELDPROTECT);
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(eDur), oTarget, 9999.0);
PoBDACRecursive(oInitiator, oAttacker);
case EVENT_ONHEARTBEAT: oInitiator = OBJECT_SELF; break;
case EVENT_ONPLAYERREST_FINISHED: oInitiator = GetLastBeingRested(); break;
default:
oInitiator = OBJECT_SELF;
}
if(nEvent == FALSE)
{
if (!PreManeuverCastCode())
{
// If code within the PreManeuverCastCode (i.e. UMD) reports FALSE, do not run this spell
return;
}
// End of Spell Cast Hook
struct maneuver move = EvaluateManeuver(oInitiator, oTarget);
if(move.bCanManeuver)
{
object oItem = GetItemInSlot(INVENTORY_SLOT_CHEST, oInitiator);
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);
eDur = TagEffect(eDur, "PEARL_OF_BLACK_DOUBT");
eDur = ExtraordinaryEffect(eDur);
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, oTarget, 9999.0);
if(DEBUG) DoDebug("PoBD stance activated");
AddEventScript(oInitiator, EVENT_ONHEARTBEAT, "tob_dmnd_prlbdt", TRUE, FALSE);
AddEventScript(oInitiator, EVENT_ONPLAYERREST_FINISHED, "tob_dmnd_prlbdt", TRUE, FALSE);
}
}
if(nEvent == EVENT_ONHEARTBEAT)
{
int nBonus = 0;
location lLoc = GetLocation(oTarget);
object oEnemy = GetFirstObjectInShape(SHAPE_SPHERE, 5.0, lLoc, TRUE, OBJECT_TYPE_CREATURE);
while (GetIsObjectValid(oEnemy))
{
if (GetIsEnemy(oTarget, oEnemy) &&
GetIsInCombat(oEnemy) &&
GetDistanceBetween(oEnemy, oTarget) <= 5.0 &&
GetCurrentAction(oEnemy) == ACTION_ATTACKOBJECT && // Must be attacking
GetAttackTarget(oEnemy) == oTarget) // Must be attacking this PC
{
int nAPR = GetApproximateAPR(oEnemy);
nBonus += 2 * nAPR;
string s = "Enemy: " + GetName(oEnemy) + " APR: " + IntToString(nAPR);
if(DEBUG) DoDebug(s, oTarget);
}
oEnemy = GetNextObjectInShape(SHAPE_SPHERE, 5.0, lLoc);
}
if (nBonus > 0)
{
if(DEBUG) DoDebug("Applying AC Bonus: " + IntToString(nBonus));
effect eAC = EffectACIncrease(nBonus);
eAC = ExtraordinaryEffect(eAC);
eAC = TagEffect(eAC, "PEARL_OF_BLACK_DOUBT_BONUS");
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAC, oTarget, 5.9);
SetLocalInt(oTarget, "PearlOfBlackDoubtBonus", nBonus);
}
else
{
if(DEBUG) DoDebug("PoBD: No enemies in melee");
DeleteLocalInt(oTarget, "PearlOfBlackDoubtBonus");
effect eEffect = GetFirstEffect(oInitiator);
while(GetIsEffectValid(eEffect))
{
if(GetEffectTag(eEffect) == "PEARL_OF_BLACK_DOUBT_BONUS")
RemoveEffect(oInitiator, eEffect);
eEffect = GetNextEffect(oInitiator);
}
}
}
if(nEvent == EVENT_ONPLAYERREST_FINISHED)
{
effect eEffect = GetFirstEffect(oInitiator);
while(GetIsEffectValid(eEffect))
{
if(GetEffectTag(eEffect) == "PEARL_OF_BLACK_DOUBT")
RemoveEffect(oInitiator, eEffect);
eEffect = GetNextEffect(oInitiator);
}
if(DEBUG) DoDebug("Removing Pearl of Black Doubt");
RemoveEventScript(oInitiator, EVENT_ONHEARTBEAT, "tob_dmnd_prlbdt", TRUE, FALSE);
RemoveEventScript(oInitiator, EVENT_ONPLAYERREST_FINISHED, "tob_dmnd_prlbdt", TRUE, FALSE);
}
}

View File

@ -313,6 +313,8 @@ int HotWMFeats()
{
int nHotWM = GetLevelByClass(CLASS_TYPE_HANDOTWM);
if(nHotWM < 1) return FALSE;
if (nHotWM > 30)
{
nHotWM = 30;
@ -353,11 +355,15 @@ int HotWMFeats()
int DiamondDragonFeats()
{
int iDiamond = (GetLevelByClass(CLASS_TYPE_DIAMOND_DRAGON) + 5) / 5;
int iDiamond = GetLevelByClass(CLASS_TYPE_DIAMOND_DRAGON);
if(iDiamond < 1) return FALSE;
int nCount = (iDiamond + 5) / 5;
if(iDiamond)
if(nCount)
{
int iAugments = GetHasFeat(FEAT_DRAGON_AUGMENT_STR_1)
int iAugments = GetHasFeat(FEAT_DRAGON_AUGMENT_STR_1)
+ GetHasFeat(FEAT_DRAGON_AUGMENT_STR_2)
+ GetHasFeat(FEAT_DRAGON_AUGMENT_STR_3)
+ GetHasFeat(FEAT_DRAGON_AUGMENT_STR_4)
@ -385,10 +391,9 @@ int DiamondDragonFeats()
+ GetHasFeat(FEAT_DRAGON_AUGMENT_CON_8)
+ GetHasFeat(FEAT_DRAGON_AUGMENT_CON_9);
if(iDiamond != iAugments)
if(nCount != iAugments)
{
FloatingTextStringOnCreature("You must pick a Diamond Dragon Ability Augment. Please reslect your feats.", OBJECT_SELF, FALSE);
FloatingTextStringOnCreature("You must pick a Diamond Dragon Ability Augment. Please reselect your feats.", OBJECT_SELF, FALSE);
return TRUE;
}
}

View File

@ -393,7 +393,18 @@ void main()
if(GetHasSpellEffect(MOVE_DM_PEARL_BLACK_DOUBT, oSpellOrigin) && GetBaseItemType(oItem) == BASE_ITEM_ARMOR)
{
// Will reset to 0.
DeleteLocalInt(oSpellOrigin, "PearlOfBlackDoubtBonus");
effect eEffect = GetFirstEffect(oSpellOrigin);
while(GetIsEffectValid(eEffect))
{
if(GetEffectTag(eEffect) == "PEARL_OF_BLACK_DOUBT_BONUS")
{
if(DEBUG) DoDebug("prc_onhit: PoBD onHit >> restting AC.");
DeleteLocalInt(oSpellOrigin, "PearlOfBlackDoubtBonus");
RemoveEffect(oSpellOrigin, eEffect);
}
eEffect = GetNextEffect(oSpellOrigin);
}
}
// Tactics of the Wolf
if(GetHasSpellEffect(MOVE_WR_TACTICS_WOLF, oSpellOrigin) && GetBaseItemType(oItem) != BASE_ITEM_ARMOR)

View File

@ -54,6 +54,9 @@ void main()
int nMetaMagic = PRCGetMetaMagicFeat();
int nDuration = GetLevelByClass(CLASS_TYPE_DRUID, oPC)
+ GetLevelByClass(CLASS_TYPE_ARCANE_HIEROPHANT, oPC);
int bShiftingDruid = GetLocalInt(GetModule(),"PRC_DRUID_USES_SHIFTING");
if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
{ // check to see if abort due to being mounted
if (PRCHorseGetIsMounted(oTarget))
@ -71,6 +74,8 @@ void main()
//this command will make shore that polymorph plays nice with the shifter
ShifterCheck(OBJECT_SELF);
StoreCurrentAppearanceAsTrueAppearance(oPC, TRUE);
int nShape = GetPersistantLocalInt(oPC, PRC_PNP_SHIFTING + IntToString(nSpell));
if(nShape > 0)
@ -80,13 +85,31 @@ void main()
}
//Determine Polymorph subradial type
string sDruidShape;
if(nSpell == 401)
{
nPoly = POLYMORPH_TYPE_BROWN_BEAR;
if (nDuration >= 12)
{
nPoly = POLYMORPH_TYPE_DIRE_BROWN_BEAR;
}
if (bShiftingDruid)
{
if (nDuration < 12)
{//:: Brown Bear
//ShiftIntoResRef(oPC, SHIFTER_TYPE_DRUID, "nw_bearbrwn", FALSE);
sDruidShape = "nw_bearbrwn";
}
else
{//:: Dire Bear
//ShiftIntoResRef(oPC, SHIFTER_TYPE_DRUID, "nw_beardire", FALSE);
sDruidShape = "nw_beardire";
}
}
else
{
nPoly = POLYMORPH_TYPE_BROWN_BEAR;
if (nDuration >= 12)
{
nPoly = POLYMORPH_TYPE_DIRE_BROWN_BEAR;
}
}
}
else if (nSpell == 402)
{
@ -158,7 +181,15 @@ void main()
//Apply the VFX impact and effects
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ePoly, OBJECT_SELF, HoursToSeconds(nDuration));
if(bShiftingDruid)
{
ShiftIntoResRef(oPC, SHIFTER_TYPE_DRUID, sDruidShape, FALSE);
DelayCommand(HoursToSeconds(nDuration), SetShiftTrueForm(oPC));
}
else
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ePoly, OBJECT_SELF, HoursToSeconds(nDuration));
}
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);

View File

@ -32494,9 +32494,8 @@ Spell Resistance: Yes
This spell causes instant growth of a humanoid creature, doubling its height and multiplying its weight by 8. This increase changes the creature's size category to the next larger one. The target gains a +2 size bonus to Strength, a -2 size penalty to Dexterity (to a minimum of 1), and a -1 penalty on attack rolls and AC due to its increased size.
A humanoid creature whose size increases to Large has a space of 10 feet and a natural reach of 10 feet. This spell does not change the target's speed.
If insufficient room is available for the desired growth, the creature attains the maximum possible size and may make a Strength check (using its increased Strength) to burst any enclosures in the process. If it fails, it is constrained without harm by the materials enclosing it - the spell cannot be used to crush a creature by increasing its size.
All equipment worn or carried by a creature is similarly enlarged by the spell. Melee and projectile weapons affected by this spell deal more damage. Other magical properties are not affected by this spell. Any enlarged item that leaves an enlarged creature's possession (including a projectile or thrown weapon) instantly returns to its normal size. This means that thrown weapons deal their normal damage, and projectiles deal damage based on the size of the weapon that fired them. Magical properties of enlarged items are not increased by this spell.
Multiple magical effects that increase size do not stack,.
If insufficient room is available for the desired growth, the creature attains the maximum possible size and may make a Strength check (using its increased Strength) to burst any enclosures in the process. If it fails, it is constrained without harm by the materials enclosing it - the spell cannot be used to crush a creature by increasing its size. Multiple magical effects that increase size do not stack.
Enlarge person counters and dispels reduce person.
Enlarge person can be made permanent with a permanency spell.
@ -32520,10 +32519,8 @@ Saving Throw: Fortitude negates
Spell Resistance: Yes
This spell causes instant diminution of a humanoid creature, halving its height, length, and width and dividing its weight by 8. This decrease changes the creature's size category to the next smaller one. The target gains a +2 size bonus to Dexterity, a -2 size penalty to Strength (to a minimum of 1), and a +1 bonus on attack rolls and AC due to its reduced size.
A Small humanoid creature whose size decreases to Tiny has a space of 2-1/2 feet and a natural reach of 0 feet (meaning that it must enter an opponent's square to attack). A Large humanoid creature whose size decreases to Medium has a space of 5 feet and a natural reach of 5 feet. This spell doesn't change the target's speed.
All equipment worn or carried by a creature is similarly reduced by the spell.
Melee and projectile weapons deal less damage. Other magical properties are not affected by this spell. Any reduced item that leaves the reduced creature's possession (including a projectile or thrown weapon) instantly returns to its normal size. This means that thrown weapons deal their normal damage (projectiles deal damage based on the size of the weapon that fired them).
Multiple magical effects that reduce size do not stack.
A Small humanoid creature whose size decreases to Tiny has a space of 2-1/2 feet and a natural reach of 0 feet (meaning that it must enter an opponent's square to attack). A Large humanoid creature whose size decreases to Medium has a space of 5 feet and a natural reach of 5 feet. This spell doesn't change the target's speed. Multiple magical effects that reduce size do not stack.
Reduce person counters and dispels enlarge person.
Reduce person can be made permanent with a permanency spell.
@ -73239,8 +73236,7 @@ Wild Frenzy: You gain a +2 bonus on attack rolls and damage rolls with melee wea
<entry id="80004" lang="en" sex="m">23 Damage</entry>
<entry id="80005" lang="en" sex="m">+23</entry>
<entry id="80006" lang="en" sex="m">24 Damage</entry>
<entry id="80007" lang="en" sex="m">+24
</entry>
<entry id="80007" lang="en" sex="m">+24</entry>
<entry id="80008" lang="en" sex="m">25 Damage</entry>
<entry id="80009" lang="en" sex="m">+25</entry>
<entry id="80010" lang="en" sex="m">26 Damage</entry>
@ -75340,4 +75336,4 @@ Specifics: You gain a +4 perfection bonus on Will saving throws against charm an
<entry id="213330" lang="en" sex="m">Type of Feat: Exalted
Prerequisite: Wis 13+
Specifics: You gain a +2 bonus on saving throws to resist any fear effect, despair effect (such as the crushing despair spell), or similar mind-affecting condition, but not charms or compulsions (such as the charm person and dominate person spells)</entry>
</tlk>
</tlk>