//:://///////////////////////////////////////////// //:: Greater Magic Fang //:: x0_s0_gmagicfang.nss //:: Copyright (c) 2002 Bioware Corp. //::////////////////////////////////////////////// /* +1 enhancement bonus to attack and damage rolls. Also applys damage reduction +1; this allows the creature to strike creatures with +1 damage reduction. Checks to see if a valid summoned monster or animal companion exists to apply the effects to. If none exists, then the spell is wasted. */ //::////////////////////////////////////////////// //:: Created By: Brent Knowles //:: Created On: September 6, 2002 //::////////////////////////////////////////////// //:: VFX Pass By: #include "X0_I0_SPELLS" #include "x2_inc_spellhook" void main() { /* 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 int nCasterLevel = GetCasterLevel(OBJECT_SELF); int nPower = (nCasterLevel + 1) / 3; if (nPower > 10) nPower = 10; // * max of +5 bonus int nDamagePower = DAMAGE_POWER_PLUS_ONE; switch (nPower) { case 1: nDamagePower = DAMAGE_POWER_PLUS_ONE; break; case 2: nDamagePower = DAMAGE_POWER_PLUS_TWO; break; case 3: nDamagePower = DAMAGE_POWER_PLUS_THREE; break; case 4: nDamagePower = DAMAGE_POWER_PLUS_FOUR; break; case 5: nDamagePower = DAMAGE_POWER_PLUS_FIVE; break; } DoMagicFang(nPower, nDamagePower); }