Initial upload.
Adding base PRC 4.19a files to repository.
This commit is contained in:
82
trunk/spells/x0_s0_stoflesh.nss
Normal file
82
trunk/spells/x0_s0_stoflesh.nss
Normal file
@@ -0,0 +1,82 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Stone To Flesh
|
||||
//:: x0_s0_stoflesh
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The target is freed of any petrify effect
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent
|
||||
//:: Created On: Oct 16 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By:
|
||||
|
||||
//UPDATE - Do a check to make sure that the creature being cast on
|
||||
// has not been set up to be a permanent statue.
|
||||
|
||||
//:: altered by mr_bumpkin Dec 4, 2003 for prc stuff
|
||||
#include "prc_inc_spells"
|
||||
|
||||
#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 oTarget = PRCGetSpellTargetObject();
|
||||
|
||||
//Check to make sure the creature has not been set up to be a statue.
|
||||
if (GetLocalInt(oTarget, "NW_STATUE") != 1)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 486, FALSE));
|
||||
|
||||
//Search for and remove the above negative effects
|
||||
effect eLook = GetFirstEffect(oTarget);
|
||||
int bDone = FALSE;
|
||||
while(GetIsEffectValid(eLook))
|
||||
{
|
||||
if(GetEffectType(eLook) == EFFECT_TYPE_PETRIFY)
|
||||
{
|
||||
SetCommandable(TRUE, oTarget);
|
||||
RemoveEffect(oTarget, eLook);
|
||||
bDone = TRUE;
|
||||
}
|
||||
eLook = GetNextEffect(oTarget);
|
||||
}
|
||||
if(bDone && (GetGameDifficulty() == GAME_DIFFICULTY_CORE_RULES
|
||||
|| GetGameDifficulty() == GAME_DIFFICULTY_DIFFICULT))
|
||||
{
|
||||
ExecuteScript("prc_pw_unpetrif", oTarget);
|
||||
}
|
||||
|
||||
//Apply Linked Effect
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DISPEL), oTarget);
|
||||
}
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Erasing the variable used to store the spell's spell school
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user