Aller au contenu

Photo

Blackguard class Edit


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
strakej01

strakej01
  • Members
  • 3 messages
Hello everyone.

I was wondering if anyone could help me with this somewhat complex ability edit for blackguard. I'm trying to make it so when a blackguard uses the BG spell contagion and has the feat "Epic Fiendish Servant", instead of the normal affects, it will apply onhit creeping doom caster level 3 to his weapon, as well as grant him 2 additional AB.

If it is impossible to make the contagion have this affect, it'd work equally well going off of bull's strength since it's a self-target buff.

Thanks guys.

#2
ChaosInTwilight

ChaosInTwilight
  • Members
  • 89 messages
//::///////////////////////////////////////////////


//:: Contagion


//:: NW_S0_Contagion.nss


//:: Copyright (c) 2001 Bioware Corp.


//:://////////////////////////////////////////////


/*


    The target must save or be struck down with


    Blidning Sickness, Cackle Fever, Filth Fever


    Mind Fire, Red Ache, the Shakes or Slimy Doom.


*/


//:://////////////////////////////////////////////


//:: Created By: Preston Watamaniuk


//:: Created On: June 6, 2001


//:://////////////////////////////////////////////





#include "NW_I0_SPELLS"


#include "x2_inc_spellhook"


#include "x2_i0_spells"





void main()


{


    if (!X2PreSpellCastCode())


    {


    // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell


        return;


    }





// End of Spell Cast Hook





//Begin requested Edit


object oCaster = OBJECT_SELF;


if( (GetSpellId()==613)                 //We must be casting from Contagion Feat


&&  (GetHasFeat(FEAT_EPIC_EPIC_FIEND, oCaster))  )    //And have Epic Fiend Feat


{


    object oMyWeapon   =  IPGetTargetedOrEquippedMeleeWeapon();


    //Done to melee Weapon.  1 hour per BG level.


    float fDuration =      HoursToSeconds(GetLevelByclass(class_TYPE_BLACKGUARD, oCaster));





IPSafeAddItemProperty(oMyWeapon, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_CREEPING_DOOM, 3), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);


ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectAttackIncrease(2, ATTACK_BONUS_ONHAND), oCaster, fDuration);


return;


}








/*    REQUEST:


I was wondering if anyone could help me with this somewhat complex ability edit


for blackguard. I'm trying to make it so when a blackguard uses the BG spell


contagion and has the feat "Epic Fiendish Servant", instead of the normal


affects, it will apply onhit creeping doom caster level 3 to his weapon, as well


as grant him 2 additional AB.





If it is impossible to make the contagion have this affect, it'd work equally


well going off of bull's strength since it's a self-target buff.





Thanks guys.





*/





//End requested Edit





    //Declare major variables


    object oTarget = GetSpellTargetObject();


    int nRand = Random(7)+1;


    int nDisease;


    //Use a random seed to determine the disease that will be delivered.


    switch (nRand)


    {


        case 1:


            nDisease = DISEASE_BLINDING_SICKNESS;


        break;


        case 2:


            nDisease = DISEASE_CACKLE_FEVER;


        break;


        case 3:


            nDisease = DISEASE_FILTH_FEVER;


        break;


        case 4:


            nDisease = DISEASE_MINDFIRE;


        break;


        case 5:


            nDisease = DISEASE_RED_ACHE;


        break;


        case 6:


            nDisease = DISEASE_SHAKES;


        break;


        case 7:


            nDisease = DISEASE_SLIMY_DOOM;


        break;


    }


    if(!GetIsReactionTypeFriendly(oTarget))


    {


        //Fire cast spell at event for the specified target


        SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CONTAGION));


        effect eDisease = EffectDisease(nDisease);


        //Make SR check


        if (!MyResistSpell(OBJECT_SELF, oTarget))


        {


            //The effect is permament because the disease subsystem has its own internal resolution


            //system in place.


            ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDisease, oTarget);


        }


    }


}