71 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			71 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
|    //::///////////////////////////////////////////////
 | |
| //:: Firebrand
 | |
| //:: x0_x0_Firebrand
 | |
| //:: Copyright (c) 2002 Bioware Corp.
 | |
| //:://////////////////////////////////////////////
 | |
| /*
 | |
| // * Fires a flame arrow to every target in a
 | |
| // * colossal area
 | |
| // * Each target explodes into a small fireball for
 | |
| // * 1d6 damage / level (max = 15 levels)
 | |
| // * Only nLevel targets can be affected
 | |
| */
 | |
| //:://////////////////////////////////////////////
 | |
| //:: Created By: Brent
 | |
| //:: Created On: July 29 2002
 | |
| //:://////////////////////////////////////////////
 | |
| //:: Last Updated By:
 | |
| 
 | |
| #include "ke_spell_factor"
 | |
| 
 | |
| #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 nDamage =  GetCasterLevel(OBJECT_SELF) +8 ; // * 2
 | |
| 
 | |
|     if (nDamage > 40)
 | |
|         nDamage = 40;
 | |
| 
 | |
|     //starting the grand circus of importing and converting back and forth //
 | |
| 
 | |
|                 float fDamage = IntToFloat(nDamage);
 | |
| 
 | |
|                 // multiplaying damage with fFactor //
 | |
| 
 | |
|                 float fFactor = CalculateFactor();
 | |
| 
 | |
|                 fDamage = fDamage * fFactor;
 | |
| 
 | |
|                 // converting the float damage back to INT damage so we can use it again //
 | |
| 
 | |
|                 int nDamage2 = FloatToInt(fDamage);
 | |
| 
 | |
|                // Done and remember to change nDamage with nDamage2 below :) //
 | |
| 
 | |
| 
 | |
|     DoMissileStorm(nDamage2, 48, SPELL_FIREBRAND, VFX_IMP_MIRV_FLAME, VFX_IMP_FLAME_M, DAMAGE_TYPE_MAGICAL, TRUE, TRUE);
 | |
| 
 | |
| 
 | |
| }
 | |
| 
 |