//:://///////////////////////////////////////////// //:: Balagarn's Iron Horn //:: //:: Copyright (c) 2002 Bioware Corp. //::////////////////////////////////////////////// /* // Create a virbration that shakes creatures off their feet. // Make a strength check as if caster has strength 20 // against all enemies in area // Changes it so its not a cone but a radius. */ //::////////////////////////////////////////////// //:: Created By: Brent //:: Created On: July 22 2002 //::////////////////////////////////////////////// //:: Last Updated By: Andrew Nobbs May 01, 2003 //:: altered by mr_bumpkin Dec 4, 2003 for prc stuff #include "prc_inc_spells" #include "prc_alterations" #include "prc_add_spell_dc" void main() { DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION); /* Spellcast Hook Code Added 2003-06-20 by Georg If you want to make changes to all spells, check x2_inc_spellhook.nss to find out more */ if (!X2PreSpellCastCode()) { // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell return; } // End of Spell Cast Hook //Declare major variables object oCaster = OBJECT_SELF; int CasterLvl = PRCGetCasterLevel(OBJECT_SELF); int nCasterLvl = CasterLvl; int nPenetr = CasterLvl + SPGetPenetr(); int nMetaMagic = PRCGetMetaMagicFeat(); float fDelay; float nSize = RADIUS_SIZE_COLOSSAL; effect eExplode = EffectVisualEffect(VFX_FNF_HOWL_WAR_CRY); effect eVis = EffectVisualEffect(VFX_IMP_HEAD_NATURE); effect eShake = EffectVisualEffect(VFX_FNF_SCREEN_BUMP); //Get the spell target location as opposed to the spell target. location lTarget = PRCGetSpellTargetLocation(); //Limit Caster level for the purposes of damage if (nCasterLvl > 20) { nCasterLvl = 20; } SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eShake, OBJECT_SELF, RoundsToSeconds(d3()),TRUE,-1,CasterLvl); //Apply epicenter explosion on caster ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, GetLocation(OBJECT_SELF)); //Declare the spell shape, size and the location. Capture the first target object in the shape. object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, nSize, lTarget, TRUE, OBJECT_TYPE_CREATURE); //Cycle through the targets within the spell shape until an invalid object is captured. while (GetIsObjectValid(oTarget)) { // * spell should not affect the caster if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && (oTarget != oCaster)) { //Fire cast spell at event for the specified target SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 436)); //Get the distance between the explosion and the target to calculate delay fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; if (!PRCDoResistSpell(OBJECT_SELF, oTarget,nPenetr, fDelay)) { effect eTrip = EffectKnockdown(); // * DO a strength check vs. Strength 20 if (d20() + GetAbilityScore(oTarget, ABILITY_STRENGTH) <= 20 + d20() ) { // Apply effects to the currently selected target. DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eTrip, oTarget, 6.0,TRUE,-1,CasterLvl)); //This visual effect is applied to the target object not the location as above. This visual effect //represents the flame that erupts on the target not on the ground. DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); } else FloatingTextStrRefOnCreature(2750, OBJECT_SELF, FALSE); } } //Select the next target within the spell shape. oTarget = MyNextObjectInShape(SHAPE_SPHERE, nSize, lTarget, TRUE, OBJECT_TYPE_CREATURE); } DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); // Erasing the variable used to store the spell's spell school }