Fixed a few TLK entries
Fixed a few TLK entries. Added potential future spell scripts to notes.
This commit is contained in:
		
							
								
								
									
										162
									
								
								Notes/future spells/pg_s0_chromorb.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										162
									
								
								Notes/future spells/pg_s0_chromorb.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,162 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Sihlbrane's Grove | ||||
| //:: Chromatic Orb | ||||
| //:: 00_S0_CHROMORB | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|     This spell creates a 4-inch-diameter sphere | ||||
|     that can be hurled unerringly to its target. | ||||
|     The orb's effect depends on the level of the | ||||
|     wizard: | ||||
|     A 1st-level sphere inflicts 1d4 damage and blinds | ||||
|     the target for one round. | ||||
|     A 2nd-level sphere inflicts 1d6 damage. | ||||
|     A 3rd-level sphere deals 1d8 damage and burns the | ||||
|     victim for 1d3 fire damage. | ||||
|     A 4th-level sphere deals 1d10 damage and blinds | ||||
|     the target for four rounds. | ||||
|     A 5th to 6th-level sphere deals 1d12 damage and | ||||
|     stuns the target for three rounds. | ||||
|     The 7th+ level sphere deals 2d8 damage and | ||||
|     paralyzes the victim for 13 rounds. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Yaballa | ||||
| //:: Created On: 5/9/2003 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "NW_I0_SPELLS" | ||||
| #include "pg_spell_CONST" | ||||
| #include "x2_inc_spellhook" | ||||
| #include "prc_inc_spells" | ||||
|  | ||||
| void RunWhiteOrb(object oTarget, int nDamage, int nColor); | ||||
| void RunRedOrb(object oTarget, int nDamage, int nColor); | ||||
| void RunOrangeOrb(object oTarget, int nDamage, int nDamage2, int nColor); | ||||
| void RunYellowOrb(object oTarget, int nDamage, int nColor); | ||||
| void RunGreenOrb(object oTarget, int nDamage, int nColor); | ||||
| void RunBlackOrb(object oTarget, int nDamage, int nColor); | ||||
|  | ||||
| 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 | ||||
|  | ||||
|     object oCaster = OBJECT_SELF; | ||||
|     object oTarget = PRCGetSpellTargetObject(); | ||||
|     int nHD = PRCGetCasterLevel(oCaster); | ||||
|     int nMetaMagic = PRCGetMetaMagicFeat(); | ||||
|     int nDamage, nDamage2, nColor; | ||||
|     effect eMissile = EffectVisualEffect(VFX_IMP_MIRV); | ||||
|     float fDist = GetDistanceBetween(OBJECT_SELF, oTarget); | ||||
|     float fDelay = (fDist/25.0f); | ||||
|     float fDelay2, fTime; | ||||
|  | ||||
|     if(nHD < 1) {nHD = 1;} | ||||
|     switch(nHD) | ||||
|     { | ||||
|         case 1: nDamage = d4(); nColor = VFX_DUR_LIGHT_WHITE_20; break; | ||||
|         case 2: nDamage = d6(); nColor = VFX_DUR_LIGHT_RED_20; break; | ||||
|         case 3: nDamage = d8(); nDamage2 = d3(); nColor = VFX_DUR_LIGHT_ORANGE_20; break; | ||||
|         case 4: nDamage = d10(); nColor = VFX_DUR_LIGHT_YELLOW_20; break; | ||||
|         case 5: case 6: nDamage = d12(); nColor = VFX_DUR_LIGHT_PURPLE_20; break; | ||||
|         default: nDamage = d8(2); nColor = VFX_DUR_DARKNESS; break; | ||||
|     } | ||||
|     if(nMetaMagic == METAMAGIC_MAXIMIZE) | ||||
|     { | ||||
|         switch(nHD) | ||||
|         { | ||||
|             case 1: nDamage = 4; break; | ||||
|             case 2: nDamage = 6; break; | ||||
|             case 3: nDamage = 8; nDamage2 = 3; break; | ||||
|             case 4: nDamage = 10; break; | ||||
|             case 5: case 6: nDamage = 12; break; | ||||
|             default: nDamage = 16; break; | ||||
|         } | ||||
|     } | ||||
|     else if(nMetaMagic == METAMAGIC_EMPOWER) { | ||||
|         nDamage = nDamage + (nDamage/2); } | ||||
|     if(!GetIsReactionTypeFriendly(oTarget)) | ||||
|     { | ||||
|         fTime = fDelay; | ||||
|         fDelay2 += 0.1f; | ||||
|         fTime += fDelay2; | ||||
|         SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CHROMATIC_ORB)); | ||||
|         if(!PRCDoResistSpell(OBJECT_SELF, oTarget, FloatToInt(fDelay))) | ||||
|         { | ||||
|             if(!PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay)) | ||||
|             { | ||||
|                 switch(nHD) | ||||
|                 { | ||||
|                     case 1: DelayCommand(fTime, RunWhiteOrb(oTarget, nDamage, nColor)); break; | ||||
|                     case 2: DelayCommand(fTime, RunRedOrb(oTarget, nDamage, nColor)); break; | ||||
|                     case 3: DelayCommand(fTime, RunOrangeOrb(oTarget, nDamage, nDamage2, nColor)); break; | ||||
|                     case 4: DelayCommand(fTime, RunYellowOrb(oTarget, nDamage, nColor)); break; | ||||
|                     case 5: case 6: DelayCommand(fTime, RunGreenOrb(oTarget, nDamage, nColor)); break; | ||||
|                     default: DelayCommand(fTime, RunBlackOrb(oTarget, nDamage, nColor)); break; | ||||
|                 } | ||||
|                 DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_MAGBLUE), oTarget)); | ||||
|             } | ||||
|         } | ||||
|         DelayCommand(fDelay2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eMissile, oTarget)); | ||||
|     } | ||||
| } | ||||
|  | ||||
| void RunWhiteOrb(object oTarget, int nDamage, int nColor) | ||||
| { | ||||
|     ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_BLIND_DEAF_M), oTarget); | ||||
|     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(nColor), oTarget, 3.0f); | ||||
|     ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget); | ||||
|     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectBlindness(), oTarget, 6.0f); | ||||
| } | ||||
|  | ||||
| void RunRedOrb(object oTarget, int nDamage, int nColor) | ||||
| { | ||||
|     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(nColor), oTarget, 3.0f); | ||||
|     ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget); | ||||
| } | ||||
|  | ||||
| void RunOrangeOrb(object oTarget, int nDamage, int nDamage2, int nColor) | ||||
| { | ||||
|     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(nColor), oTarget, 3.0f); | ||||
|     ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget); | ||||
|     ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage2, DAMAGE_TYPE_FIRE), oTarget); | ||||
| } | ||||
|  | ||||
| void RunYellowOrb(object oTarget, int nDamage, int nColor) | ||||
| { | ||||
|     ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_BLIND_DEAF_M), oTarget); | ||||
|     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(nColor), oTarget, 3.0f); | ||||
|     ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget); | ||||
|     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectBlindness(), oTarget, 24.0f); | ||||
| } | ||||
|  | ||||
| void RunGreenOrb(object oTarget, int nDamage, int nColor) | ||||
| { | ||||
|     ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_STUN), oTarget); | ||||
|     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(nColor), oTarget, 3.0f); | ||||
|     ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget); | ||||
|     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectStunned(), oTarget, 18.0f); | ||||
| } | ||||
|  | ||||
| void RunBlackOrb(object oTarget, int nDamage, int nColor) | ||||
| { | ||||
|     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_PARALYZE_HOLD), oTarget, 78.0f); | ||||
|     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(nColor), oTarget, 3.0f); | ||||
|     ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget); | ||||
|     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectParalyze(), oTarget, 78.0f); | ||||
| } | ||||
							
								
								
									
										64
									
								
								Notes/future spells/pg_s0_larldrain.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								Notes/future spells/pg_s0_larldrain.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,64 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Sihlbrane's Grove | ||||
| //:: Larloch's Minor Drain | ||||
| //:: 00_S0_LARLDRAIN | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|  | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Yaballa | ||||
| //:: Created On: 7/9/2003 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "NW_I0_SPELLS" | ||||
| #include "pg_spell_CONST" | ||||
| #include "x2_inc_spellhook" | ||||
| #include "prc_inc_spells" | ||||
|  | ||||
| void main() | ||||
| { | ||||
|  | ||||
|     /* | ||||
|       Spellcast Hook Code | ||||
|       Added 2003-07-07 by Georg Zoeller | ||||
|       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 | ||||
|  | ||||
|  | ||||
|     object oTarget = PRCGetSpellTargetObject(); | ||||
|     int nMetaMagic = PRCGetMetaMagicFeat(); | ||||
|     int nDamage = d4(); | ||||
|  | ||||
|     if(nMetaMagic == METAMAGIC_MAXIMIZE) { | ||||
|         nDamage = 4; } | ||||
|     else if(nMetaMagic == METAMAGIC_EMPOWER) { | ||||
|         nDamage = nDamage + (nDamage/2); } | ||||
|     effect eHeal = EffectTemporaryHitpoints(nDamage); | ||||
|     effect eRay = EffectBeam(VFX_BEAM_EVIL, OBJECT_SELF, BODY_NODE_HAND); | ||||
|  | ||||
|     if(!GetIsReactionTypeFriendly(oTarget)) | ||||
|     { | ||||
|         SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_LARLOCHS_MINOR_DRAIN)); | ||||
|         if(!PRCDoResistSpell(OBJECT_SELF, oTarget, 1)) | ||||
|         { | ||||
|             effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); | ||||
|             DelayCommand(1.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); | ||||
|             DelayCommand(1.0f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHeal, OBJECT_SELF, HoursToSeconds(1))); | ||||
|             DelayCommand(1.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HEAD_EVIL), oTarget)); | ||||
|             DelayCommand(1.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HEAD_HEAL), OBJECT_SELF)); | ||||
|         } | ||||
|     } | ||||
|     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRay, oTarget, 1.7f); | ||||
| } | ||||
|  | ||||
							
								
								
									
										46
									
								
								Notes/future spells/pg_s0_regcw.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								Notes/future spells/pg_s0_regcw.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Sihlbrane's Grove | ||||
| //:: Regenerate Critical Wounds | ||||
| //:: 00_S0_REGCW | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|     Regenerate 4 HP per round for 10 rounds + | ||||
|     caster level. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Yaballa | ||||
| //:: Created On: 7/9/2003 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "pg_ss_spelltwk" | ||||
| #include "x2_inc_spellhook" | ||||
| //#include "x0_i0_spells" | ||||
| #include "prc_inc_spells" | ||||
|  | ||||
| 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 | ||||
|  | ||||
|     object oTarget = PRCGetSpellTargetObject(); | ||||
|     int nRace = MyPRCGetRacialType(oTarget); | ||||
|     int nMetamagic = PRCGetMetaMagicFeat(); | ||||
|     if((nRace != RACIAL_TYPE_CONSTRUCT) || (nRace != RACIAL_TYPE_UNDEAD)) | ||||
|     { | ||||
|         PRCRemoveEffectsFromSpell(oTarget, GetSpellId()); | ||||
|         RegenerateWounds(4, oTarget, nMetamagic); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										46
									
								
								Notes/future spells/pg_s0_reglw.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								Notes/future spells/pg_s0_reglw.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Sihlbrane's Grove | ||||
| //:: Regenerate Light Wounds | ||||
| //:: 00_S0_REGLW | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|     Regenerate 1 HP per round for 10 rounds + | ||||
|     caster level. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Yaballa | ||||
| //:: Created On: 7/9/2003 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "pg_ss_spelltwk" | ||||
| #include "x2_inc_spellhook" | ||||
| //#include "x0_i0_spells" | ||||
| #include "prc_inc_spells" | ||||
|  | ||||
| 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 | ||||
|  | ||||
|     object oTarget = PRCGetSpellTargetObject(); | ||||
|     int nRace = MyPRCGetRacialType(oTarget); | ||||
|     int nMetamagic = PRCGetMetaMagicFeat(); | ||||
|     if((nRace != RACIAL_TYPE_CONSTRUCT) || (nRace != RACIAL_TYPE_UNDEAD)) | ||||
|     { | ||||
|         PRCRemoveEffectsFromSpell(oTarget, GetSpellId()); | ||||
|         RegenerateWounds(1, oTarget, nMetamagic); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										46
									
								
								Notes/future spells/pg_s0_regmw.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								Notes/future spells/pg_s0_regmw.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Sihlbrane's Grove | ||||
| //:: Regenerate Moderate Wounds | ||||
| //:: 00_S0_REGMW | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|     Regenerate 2 HP per round for 10 rounds + | ||||
|     caster level. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Yaballa | ||||
| //:: Created On: 7/9/2003 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "pg_ss_spelltwk" | ||||
| #include "x2_inc_spellhook" | ||||
| //#include "x0_i0_spells" | ||||
| #include "prc_inc_spells" | ||||
|  | ||||
| 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 | ||||
|  | ||||
|     object oTarget = PRCGetSpellTargetObject(); | ||||
|     int nRace = MyPRCGetRacialType(oTarget); | ||||
|     int nMetamagic = PRCGetMetaMagicFeat(); | ||||
|     if((nRace != RACIAL_TYPE_CONSTRUCT) || (nRace != RACIAL_TYPE_UNDEAD)) | ||||
|     { | ||||
|         PRCRemoveEffectsFromSpell(oTarget, GetSpellId()); | ||||
|         RegenerateWounds(2, oTarget, nMetamagic); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										46
									
								
								Notes/future spells/pg_s0_regsw.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								Notes/future spells/pg_s0_regsw.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Sihlbrane's Grove | ||||
| //:: Regenerate Moderate Wounds | ||||
| //:: 00_S0_REGSW | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|     Regenerate 3 HP per round for 10 rounds + | ||||
|     caster level. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Yaballa | ||||
| //:: Created On: 7/9/2003 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "pg_ss_spelltwk" | ||||
| #include "x2_inc_spellhook" | ||||
| //#include "x0_i0_spells" | ||||
| #include "prc_inc_spells" | ||||
|  | ||||
| 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 | ||||
|  | ||||
|     object oTarget = PRCGetSpellTargetObject(); | ||||
|     int nRace = MyPRCGetRacialType(oTarget); | ||||
|     int nMetamagic = PRCGetMetaMagicFeat(); | ||||
|     if((nRace != RACIAL_TYPE_CONSTRUCT) || (nRace != RACIAL_TYPE_UNDEAD)) | ||||
|     { | ||||
|         PRCRemoveEffectsFromSpell(oTarget, GetSpellId()); | ||||
|         RegenerateWounds(3, oTarget, nMetamagic); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										68
									
								
								Notes/future spells/pg_s0_speedwind.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								Notes/future spells/pg_s0_speedwind.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,68 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Sihlbrane's Grove | ||||
| //:: Speed of the Wind | ||||
| //:: 00_S0_SPEEDWIND | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|     Caster gains +4 Dex and -2 Con for 10 turns | ||||
|     per level. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Yaballa | ||||
| //:: Created On: 7/9/2003 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "x2_inc_spellhook" | ||||
| #include "prc_inc_spells" | ||||
|  | ||||
| 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 | ||||
|  | ||||
|     object oTarget = PRCGetSpellTargetObject(); | ||||
|  | ||||
|     //-------------------------------------------------------------------------- | ||||
|     // This spell no longer stacks. If there is one of that type, thats ok | ||||
|     //-------------------------------------------------------------------------- | ||||
|     if (GetHasSpellEffect(GetSpellId(), oTarget)) | ||||
|     { | ||||
|         FloatingTextStrRefOnCreature(100775, OBJECT_SELF, FALSE); | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|     effect eDex = EffectAbilityIncrease(ABILITY_DEXTERITY, 4); | ||||
|     effect eCon = EffectAbilityDecrease(ABILITY_CONSTITUTION, 2); | ||||
|     effect eVis1 = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE); | ||||
|     effect eVis2 = EffectVisualEffect(VFX_IMP_HEAD_EVIL); | ||||
|     effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEUTRAL); | ||||
|     effect eLink = EffectLinkEffects(eDex, eCon); | ||||
|     eLink = EffectLinkEffects(eLink, eDur); | ||||
|  | ||||
|     int nRace = MyPRCGetRacialType(oTarget); | ||||
|     int nDuration = PRCGetCasterLevel(OBJECT_SELF) * 10; | ||||
|     int nMetaMagic = PRCGetMetaMagicFeat(); | ||||
|  | ||||
|     if(nMetaMagic == METAMAGIC_EXTEND) { | ||||
|         nDuration = nDuration * 2; } | ||||
|     if((nRace != RACIAL_TYPE_CONSTRUCT) || (nRace != RACIAL_TYPE_UNDEAD)) | ||||
|     { | ||||
|         ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration)); | ||||
|         ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis1, oTarget); | ||||
|         ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										44
									
								
								Notes/future spells/pg_s0_spiro.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								Notes/future spells/pg_s0_spiro.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,44 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Sihlbrane's Grove | ||||
| //:: Spiritual Hammer | ||||
| //:: 00_S0_SPIRO | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|  | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Yaballa | ||||
| //:: Created On: 7/9/2003 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "x2_inc_spellhook" | ||||
| #include "prc_inc_spells" | ||||
|  | ||||
| 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 nMetaMagic = PRCGetMetaMagicFeat(); | ||||
|     int nDuration = PRCGetCasterLevel(OBJECT_SELF); | ||||
|     int nAttack = GetBaseAttackBonus(OBJECT_SELF); | ||||
|     effect eSummon = EffectSummonCreature("pg_spiritweap", VFX_FNF_SUMMON_MONSTER_1); | ||||
|     if(nMetaMagic == METAMAGIC_EXTEND) { | ||||
|         nDuration = nDuration * 2; } | ||||
|     ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration)); | ||||
|     DelayCommand(1.5f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectAttackIncrease(nAttack - 1), GetAssociate(ASSOCIATE_TYPE_SUMMONED), RoundsToSeconds(nDuration))); | ||||
| } | ||||
							
								
								
									
										67
									
								
								Notes/future spells/pg_s0_tortshell.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								Notes/future spells/pg_s0_tortshell.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,67 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Sihlbrane's Grove | ||||
| //:: Tortoise Shell | ||||
| //:: 00_S0_TORTSHELL | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|     Caster gains 100 temporary HP and DR 10/- | ||||
|     against physical damage for one round/level. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Yaballa | ||||
| //:: Created On: 7/9/2003 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "x2_inc_spellhook" | ||||
| #include "prc_inc_spells" | ||||
|  | ||||
| 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 | ||||
|  | ||||
|     //-------------------------------------------------------------------------- | ||||
|     // This spell no longer stacks. If there is one of that type, thats ok | ||||
|     //-------------------------------------------------------------------------- | ||||
|     if (GetHasSpellEffect(GetSpellId(), OBJECT_SELF)) | ||||
|     { | ||||
|         FloatingTextStrRefOnCreature(100775, OBJECT_SELF, FALSE); | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|     int nDuration = PRCGetCasterLevel(OBJECT_SELF); | ||||
|     int nMetaMagic = PRCGetMetaMagicFeat(); | ||||
|     effect eTemp = EffectTemporaryHitpoints(100); | ||||
|     effect eDamage1 = EffectDamageResistance(DAMAGE_TYPE_BLUDGEONING, 10); | ||||
|     effect eDamage2 = EffectDamageResistance(DAMAGE_TYPE_PIERCING, 10); | ||||
|     effect eDamage3 = EffectDamageResistance(DAMAGE_TYPE_SLASHING, 10); | ||||
|     effect eVis = EffectVisualEffect(VFX_IMP_SPELL_MANTLE_USE); | ||||
|     effect eShell = EffectVisualEffect(VFX_DUR_PROT_BARKSKIN); | ||||
|     effect eDur = EffectVisualEffect(VFX_DUR_SANCTUARY); | ||||
|  | ||||
|     effect eLink = EffectLinkEffects(eTemp, eDamage1); | ||||
|     eLink = EffectLinkEffects(eLink, eDamage2); | ||||
|     eLink = EffectLinkEffects(eLink, eDamage3); | ||||
|     eLink = EffectLinkEffects(eLink, eDur); | ||||
|     eLink = EffectLinkEffects(eLink, eShell); | ||||
|  | ||||
|     if(nMetaMagic == METAMAGIC_EXTEND) { | ||||
|          nDuration = nDuration * 2; } | ||||
|  | ||||
|     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, RoundsToSeconds(nDuration)); | ||||
|     ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF); | ||||
| } | ||||
							
								
								
									
										185
									
								
								Notes/future spells/pg_s0_worm.nss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										185
									
								
								Notes/future spells/pg_s0_worm.nss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,185 @@ | ||||
| //:://///////////////////////////////////////////// | ||||
| //:: Sihlbrane's Grove | ||||
| //:: Spirit Worm | ||||
| //:: 00_S0_WORM | ||||
| //::////////////////////////////////////////////// | ||||
| /* | ||||
|     You create a lingering decay in the spirit and | ||||
|     body of the target. If the target fails its saving | ||||
|     throw, it takes 1 point of temporary Constitution | ||||
|     damage each round while the spell lasts (maximum | ||||
|     5 points of Constitution). If it makes its save, | ||||
|     it does not lose any Constitution but take 1d2 | ||||
|     points of damage each round while the spell | ||||
|     lasts (maximum 5). | ||||
|  | ||||
|     31.12 - Updated to reflect new scirpting. | ||||
|     See melf's acid arrow for details. | ||||
| */ | ||||
| //::////////////////////////////////////////////// | ||||
| //:: Created By: Yaballa | ||||
| //:: Created On: 6/9/2003 | ||||
| //::////////////////////////////////////////////// | ||||
|  | ||||
| #include "pg_spell_CONST" | ||||
| #include "x2_inc_spellhook" | ||||
| //#include "x2_i0_spells" | ||||
| #include "prc_inc_spells" | ||||
|  | ||||
| const int nSpellID = 1501; | ||||
|  | ||||
| void RunConImpact(object oTarget, object oCaster); | ||||
| void RunDamImpact(object oTarget, object oCaster, int nMetamagic); | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     object oTarget = GetSpellTargetObject(); | ||||
|  | ||||
|     //-------------------------------------------------------------------------- | ||||
|     // 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()) { | ||||
|         return; } | ||||
|     // End of Spell Cast Hook | ||||
|  | ||||
|     //-------------------------------------------------------------------------- | ||||
|     // This spell no longer stacks. If there is one of that type, thats ok | ||||
|     //-------------------------------------------------------------------------- | ||||
|     if (GetHasSpellEffect(GetSpellId(), oTarget)) | ||||
|     { | ||||
|         FloatingTextStrRefOnCreature(100775, OBJECT_SELF, FALSE); | ||||
|         return; | ||||
|     } | ||||
|     //-------------------------------------------------------------------------- | ||||
|     // Calculate the duration | ||||
|     //-------------------------------------------------------------------------- | ||||
|     int nMetaMagic = PRCGetMetaMagicFeat(); | ||||
|     int nDuration = PRCGetCasterLevel(OBJECT_SELF); | ||||
|     int nTouch = TouchAttackMelee(oTarget); | ||||
|  | ||||
|     if(nDuration < 1) { | ||||
|         nDuration = 1; } | ||||
|     if(nDuration > 5) { | ||||
|         nDuration = 5; } | ||||
|  | ||||
|     if(nMetaMagic == METAMAGIC_EXTEND) { | ||||
|        nDuration = nDuration * 2; } | ||||
|     //-------------------------------------------------------------------------- | ||||
|     // Setup VFX | ||||
|     //-------------------------------------------------------------------------- | ||||
|     effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); | ||||
|     effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); | ||||
|     //-------------------------------------------------------------------------- | ||||
|     // Set the VFX to be non dispelable | ||||
|     //-------------------------------------------------------------------------- | ||||
|     eDur = ExtraordinaryEffect(eDur); | ||||
|  | ||||
|     if(!GetIsReactionTypeFriendly(oTarget)) | ||||
|     { | ||||
|         SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); | ||||
|         if(nTouch > 0) | ||||
|         { | ||||
|             if(!PRCDoResistSpell(OBJECT_SELF, oTarget)) | ||||
|             { | ||||
|                 SetLocalInt(oTarget, "XP2_L_SPELL_SAVE_DC_" + IntToString(nSpellID), GetSpellSaveDC()); | ||||
|                 int nDC = GetLocalInt(oTarget, "XP2_L_SPELL_SAVE_DC_" + IntToString(nSpellID)); | ||||
|                 if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC)) | ||||
|                 { | ||||
|                     //---------------------------------------------------------------------- | ||||
|                     // Con decrease | ||||
|                     //---------------------------------------------------------------------- | ||||
|                     effect eCon = EffectAbilityDecrease(ABILITY_CONSTITUTION, 1); | ||||
|                     ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); | ||||
|                     ApplyEffectToObject(DURATION_TYPE_INSTANT, eCon, oTarget); | ||||
|                     //---------------------------------------------------------------------- | ||||
|                     // Apply the VFX that is used to track the spells duration | ||||
|                     //---------------------------------------------------------------------- | ||||
|                     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, oTarget, RoundsToSeconds(nDuration)); | ||||
|                     object oSelf = OBJECT_SELF; // because OBJECT_SELF is a function | ||||
|                     DelayCommand(6.0f, RunConImpact(oTarget, oSelf)); | ||||
|                 } | ||||
|                 //----------------------------------- | ||||
|                 // Magical damage | ||||
|                 //----------------------------------- | ||||
|                 else | ||||
|                 { | ||||
|                     int nDam = d2(); | ||||
|                     //----------------------------------- | ||||
|                     //max damage on critical hit, only once | ||||
|                     //----------------------------------- | ||||
|                     if(nTouch == 2) { | ||||
|                         nDam = 2; } | ||||
|                     effect eDam = EffectDamage(nDam); | ||||
|                     //----------------------------------- | ||||
|                     //update VFX | ||||
|                     //----------------------------------- | ||||
|                     eVis = EffectVisualEffect(VFX_IMP_MAGBLUE); | ||||
|                     ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); | ||||
|                     ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); | ||||
|                     //---------------------------------------------------------------------- | ||||
|                     // Apply the VFX that is used to track the spells duration | ||||
|                     //---------------------------------------------------------------------- | ||||
|                     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, oTarget, RoundsToSeconds(nDuration)); | ||||
|                     object oSelf = OBJECT_SELF; // because OBJECT_SELF is a function | ||||
|                     DelayCommand(6.0f, RunDamImpact(oTarget, oSelf, nMetaMagic)); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| void RunDamImpact(object oTarget, object oCaster, int nMetaMagic) | ||||
| { | ||||
|     if(!GetIsEnemy(oTarget, oCaster)){return;} | ||||
|     //-------------------------------------------------------------------------- | ||||
|     // Check if the spell has expired (check also removes effects) | ||||
|     //-------------------------------------------------------------------------- | ||||
|     if(PRCGetDelayedSpellEffectsExpired(SPELL_SPIRIT_WORM, oTarget, oCaster)) { | ||||
|         return; } | ||||
|  | ||||
|     if(GetIsDead(oTarget) == FALSE) | ||||
|     { | ||||
|         int nDC = GetLocalInt(oTarget, "XP2_L_SPELL_SAVE_DC_" + IntToString(nSpellID)); | ||||
|         if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC)) | ||||
|         { | ||||
|             //---------------------------------------------------------------------- | ||||
|             // Calculate Damage | ||||
|             //---------------------------------------------------------------------- | ||||
|             int nDamage = PRCMaximizeOrEmpower(2, 1, nMetaMagic); | ||||
|             effect eDam = EffectDamage(nDamage); | ||||
|             effect eVis = EffectVisualEffect(VFX_IMP_MAGBLUE); | ||||
|             eDam = EffectLinkEffects(eVis, eDam); // flare up | ||||
|             ApplyEffectToObject (DURATION_TYPE_INSTANT, eDam, oTarget); | ||||
|             DelayCommand(6.0f, RunDamImpact(oTarget, oCaster, nMetaMagic)); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| void RunConImpact(object oTarget, object oCaster) | ||||
| { | ||||
|     if(!GetIsEnemy(oTarget, oCaster)){return;} | ||||
|     //-------------------------------------------------------------------------- | ||||
|     // Check if the spell has expired (check also removes effects) | ||||
|     //-------------------------------------------------------------------------- | ||||
|     if(PRCGetDelayedSpellEffectsExpired(SPELL_SPIRIT_WORM, oTarget, oCaster)) { | ||||
|         return; } | ||||
|  | ||||
|     if(GetIsDead(oTarget) == FALSE) | ||||
|     { | ||||
|         int nDC = GetLocalInt(oTarget, "XP2_L_SPELL_SAVE_DC_" + IntToString(nSpellID)); | ||||
|         if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC)) | ||||
|         { | ||||
|             //---------------------------------------------------------------------- | ||||
|             // Calculate Damage | ||||
|             //---------------------------------------------------------------------- | ||||
|             effect eCon = EffectAbilityDecrease(ABILITY_CONSTITUTION, 1); | ||||
|             effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); | ||||
|             eCon = EffectLinkEffects(eVis, eCon); // flare up | ||||
|             ApplyEffectToObject (DURATION_TYPE_INSTANT, eCon, oTarget); | ||||
|             DelayCommand(6.0f, RunConImpact(oTarget, oCaster)); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user