generated from Jaysyn/ModuleTemplate
2025/08/24 Early Update
Updated for PRC8 updates.
This commit is contained in:
parent
ea8d885032
commit
e44b9e9132
10
nasher.cfg
10
nasher.cfg
@ -232,6 +232,10 @@ description = "PRC8 version of World of Greyhawk."
|
|||||||
filter = "prc_nui_scd_inc.nss"
|
filter = "prc_nui_scd_inc.nss"
|
||||||
filter = "prc_nui_consts.nss"
|
filter = "prc_nui_consts.nss"
|
||||||
filter = "nw_inc_nui"
|
filter = "nw_inc_nui"
|
||||||
|
filter = "nw_inc_nui"
|
||||||
|
filter = "inc_infusion.nss"
|
||||||
|
filter = "nw_inc_gff.nss"
|
||||||
|
filter = "prc_inc_json.nss"
|
||||||
filter = "xchst_inc.nss"
|
filter = "xchst_inc.nss"
|
||||||
|
|
||||||
[target.rules]
|
[target.rules]
|
||||||
@ -456,7 +460,11 @@ description = "PRC8 merge hakpak for PRC8 version of World of Greyhawk."
|
|||||||
filter = "prc_nui_scd_inc.nss"
|
filter = "prc_nui_scd_inc.nss"
|
||||||
filter = "prc_nui_consts.nss"
|
filter = "prc_nui_consts.nss"
|
||||||
filter = "nw_inc_nui"
|
filter = "nw_inc_nui"
|
||||||
filter = "xchst_inc.nss"
|
filter = "nw_inc_nui"
|
||||||
|
filter = "inc_infusion.nss"
|
||||||
|
filter = "nw_inc_gff.nss"
|
||||||
|
filter = "prc_inc_json.nss"
|
||||||
|
filter = "xchst_inc.nss"
|
||||||
|
|
||||||
[target.rules]
|
[target.rules]
|
||||||
"*" = "src/hakpak/wog_prc8_top/$ext"
|
"*" = "src/hakpak/wog_prc8_top/$ext"
|
1564
src/_removed/itempropnew.nss
Normal file
1564
src/_removed/itempropnew.nss
Normal file
File diff suppressed because it is too large
Load Diff
228
src/_removed/nw_ch_ac1.nss
Normal file
228
src/_removed/nw_ch_ac1.nss
Normal file
@ -0,0 +1,228 @@
|
|||||||
|
// HCR v3.0.3 - 18th May, 2005 - SE
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//:: FileName: NW_CH_AC1
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Added toggle for 1/2 hp's - 9th January, Sir Elric
|
||||||
|
Move towards master or wait for him.
|
||||||
|
*/
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Nov 21, 2001
|
||||||
|
//:: Updated On: Jul 25, 2003 - Georg Zoeller
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
#include "X0_INC_HENAI"
|
||||||
|
#include "X2_INC_SUMMSCALE"
|
||||||
|
#include "X2_INC_SPELLHOOK"
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
//SpawnScriptDebugger();
|
||||||
|
|
||||||
|
// GZ: Fallback for timing issue sometimes preventing epic summoned
|
||||||
|
// creatures from leveling up to their master's level. There is a timing
|
||||||
|
// issue with the GetMaster() function not returning the master of a
|
||||||
|
// creature immediately after spawn. Some code which might appear to make no
|
||||||
|
// sense has been added to the nw_ch_ac1 and x2_inc_summon files to work
|
||||||
|
// around this. This code is only run on the first hearbeat.
|
||||||
|
int nLevel = SSMGetSummonFailedLevelUp(OBJECT_SELF);
|
||||||
|
if (nLevel != 0)
|
||||||
|
{
|
||||||
|
int nRet;
|
||||||
|
if (nLevel == -1)// Special Shadow Lord treatment.
|
||||||
|
{
|
||||||
|
SSMScaleEpicShadowLord(OBJECT_SELF);
|
||||||
|
}
|
||||||
|
else if (nLevel == -2)
|
||||||
|
{
|
||||||
|
SSMScaleEpicFiendishServant(OBJECT_SELF);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nRet = SSMLevelUpCreature(OBJECT_SELF, nLevel, CLASS_TYPE_INVALID);
|
||||||
|
if (nRet == FALSE)
|
||||||
|
WriteTimestampedLogEntry("WARNING - nw_ch_ac1:: could not level up " + GetTag(OBJECT_SELF) + "!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Regardless if the actual levelup worked, we give up here, because we do
|
||||||
|
// not want to run through this script more than once.
|
||||||
|
SSMSetSummonLevelUpOK(OBJECT_SELF);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if concentration is required to maintain this creature.
|
||||||
|
X2DoBreakConcentrationCheck();
|
||||||
|
|
||||||
|
object oMod = GetModule();
|
||||||
|
object oMaster = GetMaster();
|
||||||
|
|
||||||
|
// HCR - Remark out the following "if" block of code if you want to use the
|
||||||
|
// alternative method below.
|
||||||
|
|
||||||
|
// *** Start original Real Familiar code. ***
|
||||||
|
if (GetLocalInt(oMod, "REALFAM") && GetLocalInt(oMod, "REALFAMHP"))
|
||||||
|
{
|
||||||
|
if (GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oMaster) == OBJECT_SELF)
|
||||||
|
{
|
||||||
|
// Check to see if critter is a familiar.
|
||||||
|
// If so, limit it to 1/2 hp of master per PHB.
|
||||||
|
if (GetIsObjectValid(oMaster))
|
||||||
|
{
|
||||||
|
int nMHP = GetMaxHitPoints();
|
||||||
|
int nCHP = GetCurrentHitPoints();
|
||||||
|
int nMax = (GetMaxHitPoints(oMaster)/2);
|
||||||
|
if ((nMHP - nCHP) >= nMax)
|
||||||
|
{
|
||||||
|
effect eDeath = EffectDeath(FALSE, FALSE);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, OBJECT_SELF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// *** End original Real Familiar code. ***
|
||||||
|
|
||||||
|
// HCR - Unremark this "if" block of code and remark out the above code for
|
||||||
|
// alternative Familiar hit points.
|
||||||
|
/*
|
||||||
|
// *** Start alternate Real Familiar code. ***
|
||||||
|
if (GetLocalInt(oMod, "REALFAM"))
|
||||||
|
{
|
||||||
|
if (GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oMaster) == OBJECT_SELF)
|
||||||
|
{
|
||||||
|
// Check to see if critter is a familiar.
|
||||||
|
// If so, limit it to 1/2 hp of master per PHB.
|
||||||
|
if (GetIsObjectValid(oMaster))
|
||||||
|
{
|
||||||
|
if (!GetIsResting(oMaster))
|
||||||
|
{
|
||||||
|
int nMHP = GetMaxHitPoints();
|
||||||
|
int nCHP = GetCurrentHitPoints();
|
||||||
|
int nMax = (GetMaxHitPoints(oMaster)/2);
|
||||||
|
if (nCHP > nMax)
|
||||||
|
{
|
||||||
|
int nDam = (nCHP - nMax);
|
||||||
|
effect eDam = EffectDamage(nDam);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, OBJECT_SELF);
|
||||||
|
|
||||||
|
if (!GetLocalInt(OBJECT_SELF, "FAMMSG"))
|
||||||
|
{
|
||||||
|
SendMessageToPC(oMaster, "Familiar's Hit Points adjusted to 1/2 of master's in accordance with 3rd edition rules.");
|
||||||
|
SetLocalInt(OBJECT_SELF, "FAMMSG", TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// *** End alternate Real Familiar code. ***
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!GetAssociateState(NW_ASC_IS_BUSY))
|
||||||
|
{
|
||||||
|
// Seek out and disable undisabled traps.
|
||||||
|
object oTrap = GetNearestTrapToObject();
|
||||||
|
if (bkAttemptToDisarmTrap(oTrap) == TRUE)
|
||||||
|
return;// Succesful trap found and disarmed.
|
||||||
|
|
||||||
|
if (GetIsObjectValid(oMaster) &&
|
||||||
|
GetCurrentAction() != ACTION_FOLLOW &&
|
||||||
|
GetCurrentAction() != ACTION_DISABLETRAP &&
|
||||||
|
GetCurrentAction() != ACTION_OPENLOCK &&
|
||||||
|
GetCurrentAction() != ACTION_REST &&
|
||||||
|
GetCurrentAction() != ACTION_ATTACKOBJECT)
|
||||||
|
{
|
||||||
|
if (!GetIsObjectValid(GetAttackTarget()) &&
|
||||||
|
!GetIsObjectValid(GetAttemptedSpellTarget()) &&
|
||||||
|
!GetIsObjectValid(GetAttemptedAttackTarget()) &&
|
||||||
|
!GetIsObjectValid(GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN)))
|
||||||
|
{
|
||||||
|
if (GetIsObjectValid(oMaster) == TRUE)
|
||||||
|
{
|
||||||
|
if (GetDistanceToObject(oMaster) > 6.0)
|
||||||
|
{
|
||||||
|
if (GetAssociateState(NW_ASC_HAVE_MASTER))
|
||||||
|
{
|
||||||
|
if (!GetIsFighting(OBJECT_SELF))
|
||||||
|
{
|
||||||
|
if (!GetAssociateState(NW_ASC_MODE_STAND_GROUND))
|
||||||
|
{
|
||||||
|
if (GetDistanceToObject(oMaster) > GetFollowDistance())
|
||||||
|
{
|
||||||
|
ClearActions(CLEAR_NW_CH_AC1_49);
|
||||||
|
|
||||||
|
if (GetAssociateState(NW_ASC_AGGRESSIVE_STEALTH) ||
|
||||||
|
GetAssociateState(NW_ASC_AGGRESSIVE_SEARCH))
|
||||||
|
{
|
||||||
|
if (GetAssociateState(NW_ASC_AGGRESSIVE_STEALTH))
|
||||||
|
{
|
||||||
|
//ActionUseSkill(SKILL_HIDE, OBJECT_SELF);
|
||||||
|
//ActionUseSkill(SKILL_MOVE_SILENTLY,OBJECT_SELF);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GetAssociateState(NW_ASC_AGGRESSIVE_SEARCH))
|
||||||
|
ActionUseSkill(SKILL_SEARCH, OBJECT_SELF);
|
||||||
|
|
||||||
|
MyPrintString("GENERIC SCRIPT DEBUG STRING ********** " + "Assigning Force Follow Command with Search and/or Stealth");
|
||||||
|
ActionForceFollowObject(oMaster, GetFollowDistance());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MyPrintString("GENERIC SCRIPT DEBUG STRING ********** " + "Assigning Force Follow Normal");
|
||||||
|
ActionForceFollowObject(oMaster, GetFollowDistance());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!GetAssociateState(NW_ASC_MODE_STAND_GROUND))
|
||||||
|
{
|
||||||
|
if (GetIsObjectValid(oMaster))
|
||||||
|
{
|
||||||
|
if (GetCurrentAction(oMaster) != ACTION_REST)
|
||||||
|
{
|
||||||
|
ClearActions(CLEAR_NW_CH_AC1_81);
|
||||||
|
|
||||||
|
if (GetAssociateState(NW_ASC_AGGRESSIVE_STEALTH) ||
|
||||||
|
GetAssociateState(NW_ASC_AGGRESSIVE_SEARCH))
|
||||||
|
{
|
||||||
|
if (GetAssociateState(NW_ASC_AGGRESSIVE_STEALTH))
|
||||||
|
{
|
||||||
|
//ActionUseSkill(SKILL_HIDE, OBJECT_SELF);
|
||||||
|
//ActionUseSkill(SKILL_MOVE_SILENTLY,OBJECT_SELF);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GetAssociateState(NW_ASC_AGGRESSIVE_SEARCH))
|
||||||
|
ActionUseSkill(SKILL_SEARCH, OBJECT_SELF);
|
||||||
|
|
||||||
|
MyPrintString("GENERIC SCRIPT DEBUG STRING ********** " + "Assigning Force Follow Command with Search and/or Stealth");
|
||||||
|
ActionForceFollowObject(oMaster, GetFollowDistance());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MyPrintString("GENERIC SCRIPT DEBUG STRING ********** " + "Assigning Force Follow Normal");
|
||||||
|
ActionForceFollowObject(oMaster, GetFollowDistance());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!GetIsObjectValid(GetAttackTarget()) &&
|
||||||
|
!GetIsObjectValid(GetAttemptedSpellTarget()) &&
|
||||||
|
!GetIsObjectValid(GetAttemptedAttackTarget()) &&
|
||||||
|
!GetAssociateState(NW_ASC_MODE_STAND_GROUND))
|
||||||
|
{
|
||||||
|
//DetermineCombatRound();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// * If I am dominated, ask for some help.
|
||||||
|
if (GetHasEffect(EFFECT_TYPE_DOMINATED, OBJECT_SELF) == TRUE &&
|
||||||
|
GetIsEncounterCreature(OBJECT_SELF) == FALSE)
|
||||||
|
SendForHelp();
|
||||||
|
|
||||||
|
if (GetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT))
|
||||||
|
SignalEvent(OBJECT_SELF, EventUserDefined(1001));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
86
src/_removed/nw_ch_ac2.nss
Normal file
86
src/_removed/nw_ch_ac2.nss
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Associate: On Percieve
|
||||||
|
//:: NW_CH_AC2
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Nov 19, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Overhauled for WoG's AI -- The Krit, August 2012
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "hench_i0_ai"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
// Petrification blocks reactions.
|
||||||
|
if ( GetHasEffect(EFFECT_TYPE_PETRIFY) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
object oLastPerceived = GetLastPerceived();
|
||||||
|
int bSeen = GetLastPerceptionSeen();
|
||||||
|
|
||||||
|
|
||||||
|
// This is the equivalent of a force conversation bubble, should only be used
|
||||||
|
// if you want an NPC to say something while he is already engaged in combat.
|
||||||
|
if ( bSeen && GetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION) )
|
||||||
|
SpeakOneLinerConversation();
|
||||||
|
|
||||||
|
|
||||||
|
// Do not needlessly interupt combat.
|
||||||
|
object oLastTarget = GetAttemptedAttackTarget();
|
||||||
|
if ( !GetIsObjectValid(oLastTarget) )
|
||||||
|
oLastTarget = GetAttackTarget();
|
||||||
|
if ( !GetIsObjectValid(oLastTarget) )
|
||||||
|
oLastTarget = GetAttemptedSpellTarget();
|
||||||
|
if ( GetIsObjectValid(oLastTarget) && oLastTarget != oLastPerceived )
|
||||||
|
{ } // Do nothing
|
||||||
|
|
||||||
|
else if ( bSeen )
|
||||||
|
{
|
||||||
|
// Cannot see while sleeping.
|
||||||
|
if ( GetHasEffect(EFFECT_TYPE_SLEEP) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL) )
|
||||||
|
HenchDetermineSpecialBehavior();
|
||||||
|
else if ( GetIsEnemy(oLastPerceived) && !GetIsDead(oLastPerceived) )
|
||||||
|
{
|
||||||
|
if ( !GetAssociateState(NW_ASC_MODE_STAND_GROUND) &&
|
||||||
|
!GetActionMode(OBJECT_SELF, ACTION_MODE_STEALTH) )
|
||||||
|
{
|
||||||
|
SetFacingPoint(GetPosition(oLastPerceived));
|
||||||
|
HenchDetermineCombatRound(oLastPerceived);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Linked up to the special conversation check to initiate a special
|
||||||
|
// one-off conversation to get the PC's attention.
|
||||||
|
else if ( GetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION) &&
|
||||||
|
GetIsPC(oLastPerceived) && !GetIsDMPossessed(oLastPerceived) )
|
||||||
|
{
|
||||||
|
ActionStartConversation(OBJECT_SELF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Maybe trigger search mode?
|
||||||
|
else if ( GetLastPerceptionVanished() || GetLastPerceptionInaudible() )
|
||||||
|
{
|
||||||
|
if ( !GetObjectSeen(oLastPerceived) && !GetObjectHeard(oLastPerceived) &&
|
||||||
|
!GetIsDead(oLastPerceived) && GetArea(oLastPerceived) == GetArea(OBJECT_SELF) &&
|
||||||
|
GetIsEnemy(oLastPerceived) )
|
||||||
|
{
|
||||||
|
SetEnemyLocation(oLastPerceived);
|
||||||
|
// add check if target - prevents creature from following the target
|
||||||
|
// due to ActionAttack without actually perceiving them
|
||||||
|
if ( GetLocalObject(OBJECT_SELF, "LastTarget") == oLastPerceived )
|
||||||
|
{
|
||||||
|
DeleteLocalObject(OBJECT_SELF, "LastTarget");
|
||||||
|
HenchDetermineCombatRound(oLastPerceived, TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( bSeen && GetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT) )
|
||||||
|
SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_PERCEIVE));
|
||||||
|
}
|
||||||
|
|
47
src/_removed/nw_ch_ac3.nss
Normal file
47
src/_removed/nw_ch_ac3.nss
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Associate: End of Combat End
|
||||||
|
//:: NW_CH_AC3
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Calls the end of combat script every round
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Oct 16, 2001
|
||||||
|
//:: Modified By: Deva Winblood
|
||||||
|
//:: Modified On: Jan 4th, 2008
|
||||||
|
//:: Added Support for Mounted Combat Feat Support
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Adapted for WoG's AI -- The Krit, August 2012
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
#include "hench_i0_ai"
|
||||||
|
#include "X2_inc_spellhook"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
DeleteLocalInt(OBJECT_SELF, "AIIntruder");
|
||||||
|
|
||||||
|
if ( !GetLocalInt(GetModule(), "X3_NO_MOUNTED_COMBAT_FEAT") )
|
||||||
|
{ // Delete variables on target for mounted combat
|
||||||
|
DeleteLocalInt(OBJECT_SELF, "bX3_LAST_ATTACK_PHYSICAL");
|
||||||
|
DeleteLocalInt(OBJECT_SELF, "nX3_HP_BEFORE");
|
||||||
|
DeleteLocalInt(OBJECT_SELF, "bX3_ALREADY_MOUNTED_COMBAT");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL) )
|
||||||
|
HenchDetermineSpecialBehavior();
|
||||||
|
else if ( !GetSpawnInCondition(NW_FLAG_SET_WARNINGS) )
|
||||||
|
HenchmenCombatRound();
|
||||||
|
|
||||||
|
|
||||||
|
if(GetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT))
|
||||||
|
SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_END_COMBAT_ROUND));
|
||||||
|
|
||||||
|
// Check if concentration is required to maintain this creature
|
||||||
|
X2DoBreakConcentrationCheck();
|
||||||
|
}
|
||||||
|
|
82
src/_removed/nw_ch_ac4.nss
Normal file
82
src/_removed/nw_ch_ac4.nss
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Associate: On Dialogue
|
||||||
|
//:: NW_CH_AC4
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Determines the course of action to be taken
|
||||||
|
by the generic script after dialogue or a
|
||||||
|
shout is initiated.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Oct 24, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Adapted for WoG's AI -- The Krit, August 2012
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
#include "hench_i0_hensho"
|
||||||
|
|
||||||
|
|
||||||
|
// This function checks to make sure no dehibilating effects are on the
|
||||||
|
// caller that should block talking.
|
||||||
|
int AbleToTalk();
|
||||||
|
int AbleToTalk()
|
||||||
|
{
|
||||||
|
// A fast check, but sometimes gives false negatives.
|
||||||
|
// (The dying system will sometimes leave a player in a noncommandable state?)
|
||||||
|
if ( GetCommandable() )
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
// Not commandable, so check for the specific effects that block talking.
|
||||||
|
return !GetIsDead(OBJECT_SELF) &&
|
||||||
|
!GetHasEffect(EFFECT_TYPE_CONFUSED) &&
|
||||||
|
!GetHasEffect(EFFECT_TYPE_DOMINATED) &&
|
||||||
|
!GetHasEffect(EFFECT_TYPE_PETRIFY) &&
|
||||||
|
!GetHasEffect(EFFECT_TYPE_PARALYZE) &&
|
||||||
|
!GetHasEffect(EFFECT_TYPE_STUNNED) &&
|
||||||
|
!GetHasEffect(EFFECT_TYPE_FRIGHTENED);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
object oShouter = GetLastSpeaker();
|
||||||
|
|
||||||
|
|
||||||
|
//DMFI CODE ADDITIONS BEGIN HERE
|
||||||
|
if ( GetIsPC(oShouter) && !GetIsInCombat() )
|
||||||
|
ExecuteScript("dmfi_voice_exe", OBJECT_SELF);
|
||||||
|
//DMFI CODE ADDITIONS END HERE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Abort if we cannot respond to shouts.
|
||||||
|
if ( !AbleToTalk() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
int nMatch = GetListenPatternNumber();
|
||||||
|
if ( nMatch != -1 )
|
||||||
|
{
|
||||||
|
// listening pattern matched
|
||||||
|
object oMaster = GetMaster();
|
||||||
|
if ( oMaster != OBJECT_INVALID && oMaster == oShouter )
|
||||||
|
{
|
||||||
|
SetCommandable(TRUE);
|
||||||
|
HenchChRespondToShout(oShouter, nMatch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( GetCurrentAction() != ACTION_OPENLOCK )
|
||||||
|
{
|
||||||
|
ClearAllActions();
|
||||||
|
BeginConversation();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Signal user-defined event
|
||||||
|
if ( GetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT) )
|
||||||
|
SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_DIALOGUE));
|
||||||
|
}
|
||||||
|
|
63
src/_removed/nw_ch_ac5.nss
Normal file
63
src/_removed/nw_ch_ac5.nss
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Associate On Attacked
|
||||||
|
//:: NW_CH_AC5
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
If already fighting then ignore, else determine
|
||||||
|
combat round
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Oct 16, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Modified By: Deva Winblood
|
||||||
|
//:: Modified On: Jan 4th, 2008
|
||||||
|
//:: Added Support for Mounted Combat Feat Support
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "hench_i0_ai"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
if ( !GetLocalInt(GetModule(),"X3_NO_MOUNTED_COMBAT_FEAT") )
|
||||||
|
{ // set variables on target for mounted combat
|
||||||
|
SetLocalInt(OBJECT_SELF, "bX3_LAST_ATTACK_PHYSICAL", TRUE);
|
||||||
|
SetLocalInt(OBJECT_SELF, "nX3_HP_BEFORE", GetCurrentHitPoints(OBJECT_SELF));
|
||||||
|
}
|
||||||
|
|
||||||
|
object oAttacker = GetLastAttacker();
|
||||||
|
if ( !GetIsObjectValid(oAttacker) ||
|
||||||
|
GetArea(oAttacker) != GetArea(OBJECT_SELF) )
|
||||||
|
{
|
||||||
|
// Don't do anything; invalid attacker.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
SpeakString("NW_I_WAS_ATTACKED", TALKVOLUME_SILENT_TALK);
|
||||||
|
|
||||||
|
if ( !GetAssociateState(NW_ASC_IS_BUSY) && !GetIsFighting(OBJECT_SELF) )
|
||||||
|
if ( !GetAssociateState(NW_ASC_MODE_STAND_GROUND) )
|
||||||
|
{
|
||||||
|
SetCommandable(TRUE);
|
||||||
|
|
||||||
|
// Our cover is blown, so don't bother with stealth.
|
||||||
|
if ( GetActionMode(OBJECT_SELF, ACTION_MODE_STEALTH) )
|
||||||
|
SetActionMode(OBJECT_SELF, ACTION_MODE_STEALTH, FALSE);
|
||||||
|
|
||||||
|
if ( GetAssociateState(NW_ASC_MODE_DEFEND_MASTER))
|
||||||
|
{
|
||||||
|
object oTarget = GetLastAttacker(GetMaster());
|
||||||
|
if ( GetIsObjectValid(oTarget) )
|
||||||
|
oAttacker = oTarget;
|
||||||
|
}
|
||||||
|
|
||||||
|
DetermineCombatRound(oAttacker);
|
||||||
|
HenchDetermineCombatRound(oAttacker);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( GetSpawnInCondition(NW_FLAG_ATTACK_EVENT) )
|
||||||
|
SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_ATTACKED));
|
||||||
|
}
|
||||||
|
|
107
src/_removed/nw_ch_ac6.nss
Normal file
107
src/_removed/nw_ch_ac6.nss
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Associate: On Damaged
|
||||||
|
//:: NW_CH_AC6
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
If already fighting then ignore, else determine
|
||||||
|
combat round
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Nov 19, 2001
|
||||||
|
//:: Modified By: Deva Winblood
|
||||||
|
//:: Modified On: Jan 17th, 2008
|
||||||
|
//:: Added Support for Mounted Combat Feat Support
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Adapted for WoG's AI -- The Krit, August 2012
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "hench_i0_ai"
|
||||||
|
#include "x3_inc_horse"
|
||||||
|
|
||||||
|
// Determine whether to switch to new attacker
|
||||||
|
int SwitchTargets(object oCurTarget, object oNewEnemy);
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
object oTarget = GetAttackTarget();
|
||||||
|
object oDamager = GetLastDamager();
|
||||||
|
object oMe = OBJECT_SELF;
|
||||||
|
|
||||||
|
if ( !GetIsObjectValid(oDamager) )
|
||||||
|
// Don't do anything; we don't have a valid damager.
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
if ( !GetLocalInt(GetModule(),"X3_NO_MOUNTED_COMBAT_FEAT") &&
|
||||||
|
GetHasFeat(FEAT_MOUNTED_COMBAT) && HorseGetIsMounted(oMe) )
|
||||||
|
{ // see if can negate some damage
|
||||||
|
if ( GetLocalInt(oMe, "bX3_LAST_ATTACK_PHYSICAL") )
|
||||||
|
{ // last attack was physical
|
||||||
|
int nHPBefore=GetLocalInt(oMe,"nX3_HP_BEFORE");
|
||||||
|
if (!GetLocalInt(oMe, "bX3_ALREADY_MOUNTED_COMBAT"))
|
||||||
|
{ // haven't already had a chance to use this for the round
|
||||||
|
SetLocalInt(oMe, "bX3_ALREADY_MOUNTED_COMBAT", TRUE);
|
||||||
|
int nAttackRoll=GetBaseAttackBonus(oDamager)+d20();
|
||||||
|
int nRideCheck=GetSkillRank(SKILL_RIDE,oMe)+d20();
|
||||||
|
if (nRideCheck>=nAttackRoll&&!GetIsDead(oMe))
|
||||||
|
{ // averted attack
|
||||||
|
if (GetIsPC(oDamager)) SendMessageToPC(oDamager,GetName(oMe)+GetStringByStrRef(111991));
|
||||||
|
//if (GetIsPC(oMe)) SendMessageToPCByStrRef(oMe,111992);
|
||||||
|
if (GetCurrentHitPoints(oMe)<nHPBefore)
|
||||||
|
{ // heal
|
||||||
|
effect eHeal=EffectHeal(nHPBefore-GetCurrentHitPoints(oMe));
|
||||||
|
AssignCommand(GetModule(),ApplyEffectToObject(DURATION_TYPE_INSTANT,eHeal,oMe));
|
||||||
|
} // heal
|
||||||
|
} // averted attack
|
||||||
|
} // haven't already had a chance to use this for the round
|
||||||
|
} // last attack was physical
|
||||||
|
} // see if can negate some damage
|
||||||
|
|
||||||
|
|
||||||
|
// UNINTERRUPTIBLE ACTIONS
|
||||||
|
if ( GetAssociateState(NW_ASC_IS_BUSY) ||
|
||||||
|
GetAssociateState(NW_ASC_MODE_STAND_GROUND) ||
|
||||||
|
GetCurrentAction() == ACTION_FOLLOW )
|
||||||
|
{
|
||||||
|
// We're busy, don't do anything
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// DEFEND MASTER: Priority is to protect our master
|
||||||
|
object oMasterEnemy = GetLastHostileActor(GetMaster());
|
||||||
|
if ( GetAssociateState(NW_ASC_MODE_DEFEND_MASTER) &&
|
||||||
|
GetIsObjectValid(oMasterEnemy) )
|
||||||
|
{
|
||||||
|
oDamager = oMasterEnemy;
|
||||||
|
}
|
||||||
|
else if ( !SwitchTargets(oTarget, oDamager) )
|
||||||
|
// Our current target is the more dangerous attacker.
|
||||||
|
oDamager = oTarget;
|
||||||
|
|
||||||
|
// Did we pick a new target?
|
||||||
|
if ( oTarget != oDamager )
|
||||||
|
{
|
||||||
|
if ( GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL) )
|
||||||
|
HenchDetermineSpecialBehavior(oDamager);
|
||||||
|
else
|
||||||
|
HenchDetermineCombatRound(oDamager);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Signal the user-defined event
|
||||||
|
if ( GetSpawnInCondition(NW_FLAG_DAMAGED_EVENT) )
|
||||||
|
SignalEvent(oMe, EventUserDefined(EVENT_DAMAGED));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Determine whether to switch to new attacker
|
||||||
|
int SwitchTargets(object oCurTarget, object oNewEnemy)
|
||||||
|
{
|
||||||
|
return GetIsObjectValid(oNewEnemy) && oCurTarget != oNewEnemy &&
|
||||||
|
!GetFactionEqual(oNewEnemy) && // Ignore faction members since it was probably "accidental" damage.
|
||||||
|
(GetHitDice(oNewEnemy) > GetHitDice(oCurTarget) || // The new enemy is of a higher level, or
|
||||||
|
GetTotalDamageDealt() > GetMaxHitPoints(OBJECT_SELF)/4); // we just received more than 25% of our hp in damage
|
||||||
|
}
|
||||||
|
|
94
src/_removed/nw_ch_ac7.nss
Normal file
94
src/_removed/nw_ch_ac7.nss
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
// HCR v3.0.3 - 18th May, 2005 - SE
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//:: FileName: NW_CH_AC7
|
||||||
|
//:: OnDeath handler for summons, familiars, animal companions, and henchmen.
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
REALFAM is the XP penalty set in hc_defaults, 200 by default - SE
|
||||||
|
*/
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// The Krit, 2008-01-11
|
||||||
|
// Deleting henchmen-specific stuff so the code is easier to manage on WoG.
|
||||||
|
// (There are no henchmen on this persistent world.)
|
||||||
|
// Rest of the code has been simplified.
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "HC_Inc"
|
||||||
|
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// Enforces the XP penalty when oMaster's familiar was killed.
|
||||||
|
// nXPPen is the amount of XP to lose per sorcerer/wizard level.
|
||||||
|
void FamiliarXPHit(object oMaster, int nXPPen)
|
||||||
|
{
|
||||||
|
// Clean up a local integer. (See nw_ch_ac1 for its purpose.)
|
||||||
|
DeleteLocalInt(OBJECT_SELF, "FAMMSG");
|
||||||
|
|
||||||
|
// Set the death local on the module.
|
||||||
|
SetLocalInt(GetModule(), "FAMDIED" + GetPlayerID(oMaster), 1);
|
||||||
|
|
||||||
|
// Determine amount of XP penalty set in hc_defaults - 9th Jan, Sir Elric
|
||||||
|
// Should be per wizard/sorcerer (combined) level -- TK.
|
||||||
|
nXPPen *= GetLevelByClass(CLASS_TYPE_WIZARD, oMaster) +
|
||||||
|
GetLevelByClass(CLASS_TYPE_SORCERER, oMaster);
|
||||||
|
// Halve the penalty on a successful fortitude save.
|
||||||
|
if ( FortitudeSave(oMaster, 15) > 0 )
|
||||||
|
nXPPen /= 2;
|
||||||
|
|
||||||
|
// Apply the XP penalty via the HC script.
|
||||||
|
SetLocalInt(oMaster, "TAKEXP", nXPPen);
|
||||||
|
ExecuteScript("hc_takexp", oMaster);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// Enforces the HP penalty when oMaster's familiar was killed.
|
||||||
|
void FamiliarHPHit(object oMaster)
|
||||||
|
{
|
||||||
|
// Damage is nominally 1d6.
|
||||||
|
int nDamage = d6();
|
||||||
|
|
||||||
|
// However, familiar death can never kill the PC, only wound them.
|
||||||
|
int nCurrentHP = GetCurrentHitPoints(oMaster);
|
||||||
|
if ( nDamage >= nCurrentHP )
|
||||||
|
nDamage = nCurrentHP - 1;
|
||||||
|
|
||||||
|
// Apply the hitpoint damage.
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oMaster);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
object oMaster = GetMaster();
|
||||||
|
|
||||||
|
// There is only special handling for the death of a PC's associates.
|
||||||
|
if ( GetIsPC(oMaster) && !GetIsDM(oMaster) && !GetIsDMPossessed(oMaster) )
|
||||||
|
{
|
||||||
|
// IMPORTANT: If special handling is allowed for associates of NPC's,
|
||||||
|
// then the next check needs to be more involved. This is because an
|
||||||
|
// NPC's familiar and/or animal companion is officially a henchman, as
|
||||||
|
// far as the game engine is concerned. (By-product of the AI.)
|
||||||
|
|
||||||
|
// There is only special handling for familiars.
|
||||||
|
if ( GetAssociateType(OBJECT_SELF) == ASSOCIATE_TYPE_FAMILIAR )
|
||||||
|
{
|
||||||
|
// Give the PC some feedback regarding the familiar's death.
|
||||||
|
FloatingTextStrRefOnCreature(63489, oMaster, FALSE);
|
||||||
|
|
||||||
|
// Familiar death hurts the master.
|
||||||
|
// See whether the penalty is XP or HP.
|
||||||
|
int nXPPen = GetLocalInt(GetModule(), "REALFAM");
|
||||||
|
if ( nXPPen > 0 )
|
||||||
|
FamiliarXPHit(oMaster, nXPPen);
|
||||||
|
else
|
||||||
|
FamiliarHPHit(oMaster);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
34
src/_removed/nw_ch_ac8.nss
Normal file
34
src/_removed/nw_ch_ac8.nss
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Henchmen: On Disturbed
|
||||||
|
//:: NW_C2_AC8
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Determine Combat Round on disturbed.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Oct 16, 2001
|
||||||
|
//::///////////////////////////////////////////
|
||||||
|
|
||||||
|
// * Make me hostile the faction of my last attacker (TEMP)
|
||||||
|
// AdjustReputation(OBJECT_SELF,GetFaction(GetLastAttacker()),-100);
|
||||||
|
// * Determined Combat Round
|
||||||
|
|
||||||
|
#include "hench_i0_ai"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
object oTarget = GetLastDisturbed();
|
||||||
|
|
||||||
|
if ( !GetIsObjectValid(GetAttemptedAttackTarget()) &&
|
||||||
|
!GetIsObjectValid(GetAttemptedSpellTarget()) )
|
||||||
|
{
|
||||||
|
if ( GetIsObjectValid(oTarget) )
|
||||||
|
HenchDetermineCombatRound(oTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( GetSpawnInCondition(NW_FLAG_DISTURBED_EVENT) )
|
||||||
|
SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_DISTURBED));
|
||||||
|
}
|
||||||
|
|
81
src/_removed/nw_ch_ac9.nss
Normal file
81
src/_removed/nw_ch_ac9.nss
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Associate: On Spawn In
|
||||||
|
//:: NW_CH_AC9
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Nov 19, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "dmfi_db_inc"
|
||||||
|
#include "X0_INC_HENAI"
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SetAssociateListenPatterns();//Sets up the special henchmen listening patterns
|
||||||
|
|
||||||
|
bkSetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
|
||||||
|
|
||||||
|
SetAssociateState(NW_ASC_POWER_CASTING);
|
||||||
|
SetAssociateState(NW_ASC_HEAL_AT_50);
|
||||||
|
SetAssociateState(NW_ASC_RETRY_OPEN_LOCKS);
|
||||||
|
SetAssociateState(NW_ASC_DISARM_TRAPS);
|
||||||
|
SetAssociateState(NW_ASC_MODE_DEFEND_MASTER, FALSE);
|
||||||
|
SetAssociateState(NW_ASC_USE_RANGED_WEAPON, FALSE); //User ranged weapons by default if true.
|
||||||
|
SetAssociateState(NW_ASC_DISTANCE_2_METERS);
|
||||||
|
|
||||||
|
// April 2002: Summoned monsters, associates and familiars need to stay
|
||||||
|
// further back due to their size.
|
||||||
|
int nType = GetAssociateType(OBJECT_SELF);
|
||||||
|
switch (nType)
|
||||||
|
{
|
||||||
|
case ASSOCIATE_TYPE_ANIMALCOMPANION:
|
||||||
|
case ASSOCIATE_TYPE_DOMINATED:
|
||||||
|
case ASSOCIATE_TYPE_FAMILIAR:
|
||||||
|
case ASSOCIATE_TYPE_SUMMONED:
|
||||||
|
SetAssociateState(NW_ASC_DISTANCE_4_METERS);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if (GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, GetMaster()) == OBJECT_SELF ||
|
||||||
|
GetAssociate(ASSOCIATE_TYPE_DOMINATED, GetMaster()) == OBJECT_SELF ||
|
||||||
|
GetAssociate(ASSOCIATE_TYPE_FAMILIAR, GetMaster()) == OBJECT_SELF ||
|
||||||
|
GetAssociate(ASSOCIATE_TYPE_SUMMONED, GetMaster()) == OBJECT_SELF)
|
||||||
|
{
|
||||||
|
SetAssociateState(NW_ASC_DISTANCE_4_METERS);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
// * Feb 2003: Set official campaign henchmen to have no inventory
|
||||||
|
SetLocalInt(OBJECT_SELF, "X0_L_NOTALLOWEDTOHAVEINVENTORY", 10) ;
|
||||||
|
|
||||||
|
//SetAssociateState(NW_ASC_MODE_DEFEND_MASTER);
|
||||||
|
SetAssociateStartLocation();
|
||||||
|
// SPECIAL CONVERSATION SETTTINGS
|
||||||
|
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
|
||||||
|
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
|
||||||
|
// This causes the creature to say a special greeting in their conversation file
|
||||||
|
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
|
||||||
|
// greeting in order to designate it. As the creature is actually saying this to
|
||||||
|
// himself, don't attach any player responses to the greeting.
|
||||||
|
|
||||||
|
|
||||||
|
// CUSTOM USER DEFINED EVENTS
|
||||||
|
/*
|
||||||
|
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
|
||||||
|
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
|
||||||
|
events user 1000 - 1010
|
||||||
|
*/
|
||||||
|
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
|
||||||
|
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
|
||||||
|
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
|
||||||
|
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
|
||||||
|
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
|
||||||
|
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
|
||||||
|
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 //DMFI CODE ADDITIONS BEGIN HERE
|
||||||
|
SetListening(OBJECT_SELF, TRUE);
|
||||||
|
SetListenPattern(OBJECT_SELF, "**", LISTEN_PATTERN); //listen to all text
|
||||||
|
SetLocalInt(OBJECT_SELF, "hls_Listening", 1); //listen to all text
|
||||||
|
|
||||||
|
//DMFI CODE ADDITIONS END HERE
|
||||||
|
}
|
20
src/_removed/nw_ch_aca.nss
Normal file
20
src/_removed/nw_ch_aca.nss
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Default: On Rested
|
||||||
|
//:: NW_C2_DEFAULTA
|
||||||
|
//:: Copyright (c) 2002 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Determines the course of action to be taken
|
||||||
|
after having just rested.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Don Moar
|
||||||
|
//:: Created On: April 28, 2002
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
// enter desired behaviour here
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
144
src/_removed/nw_ch_acb.nss
Normal file
144
src/_removed/nw_ch_acb.nss
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Henchmen: On Spell Cast At
|
||||||
|
//:: NW_CH_ACB
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
This determines if the spell just cast at the
|
||||||
|
target is harmful or not.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Dec 6, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Modified By: Deva Winblood
|
||||||
|
//:: Modified On: Jan 4th, 2008
|
||||||
|
//:: Added Support for Mounted Combat Feat Support
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "hench_i0_ai"
|
||||||
|
#include "x2_i0_spells"
|
||||||
|
|
||||||
|
|
||||||
|
// Wrapper for initiating combat.
|
||||||
|
void DoCombat(object oTarget = OBJECT_INVALID);
|
||||||
|
// Returns TRUE if the caller has been told how to deal with this area of effect.
|
||||||
|
int HandleAOE(int nSpell, object oCaster);
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
if( GetLastSpellHarmful() )
|
||||||
|
{
|
||||||
|
if ( !GetLocalInt(GetModule(), "X3_NO_MOUNTED_COMBAT_FEAT") )
|
||||||
|
{ // set variables on target for mounted combat
|
||||||
|
DeleteLocalInt(OBJECT_SELF, "bX3_LAST_ATTACK_PHYSICAL");
|
||||||
|
} // set variables on target for mounted combat
|
||||||
|
|
||||||
|
|
||||||
|
object oCaster = GetLastSpellCaster();
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
// If I was hurt by someone in my own faction
|
||||||
|
// Then clear any hostile feelings I have against them
|
||||||
|
// After all, we're all just trying to do our job here
|
||||||
|
// if we singe some eyebrow hair, oh well.
|
||||||
|
if ( GetFactionEqual(oCaster) )
|
||||||
|
{
|
||||||
|
ClearPersonalReputation(oCaster, OBJECT_SELF);
|
||||||
|
ClearAllActions(TRUE);
|
||||||
|
DelayCommand(1.2, ActionDoCommand(HenchDetermineCombatRound()));
|
||||||
|
}
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Set this to TRUE once we've decided how to react.
|
||||||
|
int bReacted = FALSE;
|
||||||
|
|
||||||
|
int nSpell = GetLastSpell();
|
||||||
|
if ( MatchAreaOfEffectSpell(nSpell) )
|
||||||
|
bReacted = HandleAOE(nSpell, oCaster);
|
||||||
|
|
||||||
|
else if ( GetArea(oCaster) != GetArea(OBJECT_SELF) )
|
||||||
|
// Do not react.
|
||||||
|
bReacted = TRUE;
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Our cover's been blown.
|
||||||
|
if ( GetActionMode(OBJECT_SELF, ACTION_MODE_STEALTH) )
|
||||||
|
SetActionMode(OBJECT_SELF, ACTION_MODE_STEALTH, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Attack, but only if we are not already fighting.
|
||||||
|
if ( !bReacted && !GetIsFighting(OBJECT_SELF) )
|
||||||
|
DoCombat(oCaster);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( GetSpawnInCondition(NW_FLAG_SPELL_CAST_AT_EVENT) )
|
||||||
|
SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_SPELL_CAST_AT));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
// Wrapper for initiating combat.
|
||||||
|
void DoCombat(object oTarget = OBJECT_INVALID)
|
||||||
|
{
|
||||||
|
if ( GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL) )
|
||||||
|
HenchDetermineSpecialBehavior(oTarget);
|
||||||
|
else
|
||||||
|
HenchDetermineCombatRound(oTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns TRUE if the caller has been told how to deal with this area of effect.
|
||||||
|
int HandleAOE(int nSpell, object oCaster)
|
||||||
|
{
|
||||||
|
int nAI = GetBestAOEBehavior(nSpell);
|
||||||
|
switch ( nAI )
|
||||||
|
{
|
||||||
|
case X2_SPELL_AOEBEHAVIOR_DISPEL_L:
|
||||||
|
case X2_SPELL_AOEBEHAVIOR_DISPEL_N:
|
||||||
|
case X2_SPELL_AOEBEHAVIOR_DISPEL_M:
|
||||||
|
case X2_SPELL_AOEBEHAVIOR_DISPEL_G:
|
||||||
|
case X2_SPELL_AOEBEHAVIOR_DISPEL_C:
|
||||||
|
if ( GetCommandable() )
|
||||||
|
{
|
||||||
|
ActionCastSpellAtLocation(nAI, GetLocation(OBJECT_SELF));
|
||||||
|
ActionDoCommand(SetCommandable(TRUE));
|
||||||
|
ActionDoCommand(DoCombat());
|
||||||
|
SetCommandable(FALSE);
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
case X2_SPELL_AOEBEHAVIOR_FLEE:
|
||||||
|
ClearAllActions();
|
||||||
|
if ( GetIsObjectValid(oCaster) )
|
||||||
|
ActionForceMoveToObject(oCaster, TRUE, 2.0);
|
||||||
|
else
|
||||||
|
ActionMoveToObject(GetMaster(), TRUE, 1.1);
|
||||||
|
ActionDoCommand(DoCombat());
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
case X2_SPELL_AOEBEHAVIOR_IGNORE:
|
||||||
|
// well ... do nothing
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
case X2_SPELL_AOEBEHAVIOR_GUST:
|
||||||
|
if ( GetCommandable() )
|
||||||
|
{
|
||||||
|
ActionCastSpellAtLocation(SPELL_GUST_OF_WIND, GetLocation(OBJECT_SELF));
|
||||||
|
ActionDoCommand(SetCommandable(TRUE));
|
||||||
|
ActionDoCommand(DoCombat());
|
||||||
|
SetCommandable(FALSE);
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we make it to here, we do not know what to do.
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
80
src/_removed/nw_s0_animdead.nss
Normal file
80
src/_removed/nw_s0_animdead.nss
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Animate Dead
|
||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Animate Dead
|
||||||
|
//:: NW_S0_AnimDead.nss
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Summons a powerful skeleton or zombie depending
|
||||||
|
on caster level.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||||
|
nDuration = 24;
|
||||||
|
//effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
|
||||||
|
|
||||||
|
//Metamagic extension if needed
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration * 2; //Duration is +100%
|
||||||
|
}
|
||||||
|
string sResRef = "";
|
||||||
|
object oBook = GetItemPossessedBy(OBJECT_SELF, "libramofnecroman");
|
||||||
|
if ( oBook != OBJECT_INVALID )
|
||||||
|
{
|
||||||
|
sResRef = GetLocalString(oBook, "undead1");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sResRef == "" )
|
||||||
|
{
|
||||||
|
//Summon the appropriate creature based on the summoner level
|
||||||
|
if (nCasterLevel <= 5)
|
||||||
|
{
|
||||||
|
//Tyrant Fog Zombie
|
||||||
|
sResRef = "wogsumzombtyr001";
|
||||||
|
}
|
||||||
|
else if ((nCasterLevel >= 6) && (nCasterLevel <= 9))
|
||||||
|
{
|
||||||
|
//Skeleton Warrior
|
||||||
|
sResRef = "wogsumskelwar002";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Skeleton Chieftain
|
||||||
|
sResRef = "wogsumskelchief1";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Apply the summon visual and summon the two undead.
|
||||||
|
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
|
||||||
|
effect eSummon = EffectSummonCreature(sResRef);
|
||||||
|
//Apply the VFX impact and summon effect
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration));
|
||||||
|
}
|
||||||
|
|
100
src/_removed/nw_s0_bless.nss
Normal file
100
src/_removed/nw_s0_bless.nss
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Bless
|
||||||
|
//:: NW_S0_Bless.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
All allies within 30ft of the caster gain a
|
||||||
|
+1 attack bonus and a +1 save bonus vs fear
|
||||||
|
effects
|
||||||
|
|
||||||
|
also can be cast on crossbow bolts to bless them
|
||||||
|
in order to slay rakshasa
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: July 24, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||||
|
//:: Added Bless item ability: Georg Z, On: June 20, 2001
|
||||||
|
#include "NW_I0_SPELLS"
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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 = GetSpellTargetObject();
|
||||||
|
int nDuration = 1 + GetCasterLevel(OBJECT_SELF);
|
||||||
|
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_HOLY);
|
||||||
|
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||||
|
// ---------------- TARGETED ON BOLT -------------------
|
||||||
|
if(GetIsObjectValid(oTarget) && GetObjectType(oTarget) == OBJECT_TYPE_ITEM)
|
||||||
|
{
|
||||||
|
// special handling for blessing crossbow bolts that can slay rakshasa's
|
||||||
|
if (GetBaseItemType(oTarget) == BASE_ITEM_BOLT)
|
||||||
|
{
|
||||||
|
SignalEvent(GetItemPossessor(oTarget), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
|
||||||
|
IPSafeAddItemProperty(oTarget, ItemPropertyOnHitCastSpell(123,1), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING );
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oTarget));
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oTarget), TurnsToSeconds(nDuration));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_HOLY_30);
|
||||||
|
effect eAttack = EffectAttackIncrease(1);
|
||||||
|
effect eSave = EffectSavingThrowIncrease(SAVING_THROW_ALL, 1, SAVING_THROW_TYPE_FEAR);
|
||||||
|
|
||||||
|
effect eLink = EffectLinkEffects(eAttack, eSave);
|
||||||
|
eLink = EffectLinkEffects(eLink, eDur);
|
||||||
|
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
float fDelay;
|
||||||
|
//Metamagic duration check
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
|
||||||
|
//Apply Impact
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation());
|
||||||
|
|
||||||
|
//Get the first target in the radius around the caster
|
||||||
|
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||||
|
while(GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
if(GetIsReactionTypeFriendly(oTarget) || GetFactionEqual(oTarget))
|
||||||
|
{
|
||||||
|
fDelay = GetRandomDelay(0.4, 1.1);
|
||||||
|
//Fire spell cast at event for target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_BLESS, FALSE));
|
||||||
|
//Apply VFX impact and bonus effects
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration)));
|
||||||
|
}
|
||||||
|
//Get the next target in the specified area around the caster
|
||||||
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
124
src/_removed/nw_s0_calllghtn.nss
Normal file
124
src/_removed/nw_s0_calllghtn.nss
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Call Lightning
|
||||||
|
//:: NW_S0_CallLghtn.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
This spells smites an area around the caster
|
||||||
|
with bolts of lightning which strike all enemies.
|
||||||
|
Bolts do 1d10 per level up 10d10
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: May 22, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
|
|
||||||
|
//Declare major variables
|
||||||
|
object oCaster = OBJECT_SELF;
|
||||||
|
object oArea = GetArea(oCaster);
|
||||||
|
int nCasterLvl = GetCasterLevel(oCaster);
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nDamage;
|
||||||
|
float fDelay;
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
|
||||||
|
effect eDam;
|
||||||
|
//Get the spell target location as opposed to the spell target.
|
||||||
|
location lTarget = GetSpellTargetLocation();
|
||||||
|
//Limit Caster level for the purposes of damage
|
||||||
|
if (nCasterLvl > 10)
|
||||||
|
{
|
||||||
|
nCasterLvl = 10;
|
||||||
|
}
|
||||||
|
//Declare the spell shape, size and the location. Capture the first target object in the shape.
|
||||||
|
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||||
|
//Cycle through the targets within the spell shape until an invalid object is captured.
|
||||||
|
while (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF))
|
||||||
|
{
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CALL_LIGHTNING));
|
||||||
|
//Get the distance between the explosion and the target to calculate delay
|
||||||
|
fDelay = GetRandomDelay(0.4, 1.75);
|
||||||
|
if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay))
|
||||||
|
{
|
||||||
|
if(GetWeather(oArea) == WEATHER_CLEAR) {
|
||||||
|
//Roll damage for each target
|
||||||
|
nDamage = d6(nCasterLvl);
|
||||||
|
//Resolve metamagic
|
||||||
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||||
|
{
|
||||||
|
nDamage = 6 * nCasterLvl;
|
||||||
|
}
|
||||||
|
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||||
|
{
|
||||||
|
nDamage = nDamage + nDamage / 2;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//Roll damage for each target
|
||||||
|
nDamage = d10(nCasterLvl);
|
||||||
|
//Resolve metamagic
|
||||||
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||||
|
{
|
||||||
|
nDamage = 10 * nCasterLvl;
|
||||||
|
}
|
||||||
|
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||||
|
{
|
||||||
|
nDamage = nDamage + nDamage / 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(GetIsAreaInterior(oArea) == TRUE)
|
||||||
|
{
|
||||||
|
nDamage = d6(nCasterLvl);
|
||||||
|
//Resolve metamagic
|
||||||
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||||
|
{
|
||||||
|
nDamage = 6 * nCasterLvl;
|
||||||
|
}
|
||||||
|
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||||
|
{
|
||||||
|
nDamage = nDamage + nDamage / 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||||
|
nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY);
|
||||||
|
//Set the damage effect
|
||||||
|
eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL);
|
||||||
|
if(nDamage > 0)
|
||||||
|
{
|
||||||
|
// Apply effects to the currently selected target.
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||||
|
//This visual effect is applied to the target object not the location as above. This visual effect
|
||||||
|
//represents the flame that erupts on the target not on the ground.
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Select the next target within the spell shape.
|
||||||
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||||
|
}
|
||||||
|
}
|
46
src/_removed/nw_s0_circevilb.nss
Normal file
46
src/_removed/nw_s0_circevilb.nss
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Magic Cirle Against Evil
|
||||||
|
//:: NW_S0_CircEvilB
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Remove basic protection from evil effects from
|
||||||
|
exiting creatures.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Nov 20, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
#include "NW_I0_SPELLS"
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
//Declare major variables
|
||||||
|
//Get the object that is exiting the AOE
|
||||||
|
object oTarget = GetExitingObject();
|
||||||
|
int bValid = FALSE;
|
||||||
|
//Search through the valid effects on the target.
|
||||||
|
effect eAOE = GetFirstEffect(oTarget);
|
||||||
|
if(GetHasSpellEffect(SPELL_MAGIC_CIRCLE_AGAINST_EVIL, oTarget))
|
||||||
|
{
|
||||||
|
while (GetIsEffectValid(eAOE))
|
||||||
|
{
|
||||||
|
if (GetEffectCreator(eAOE) == GetAreaOfEffectCreator())
|
||||||
|
{
|
||||||
|
//If the effect was created by the AOE then remove it
|
||||||
|
if(GetEffectSpellId(eAOE) == SPELL_MAGIC_CIRCLE_AGAINST_EVIL)
|
||||||
|
{
|
||||||
|
//Protection is permanent, circle is temporay effect
|
||||||
|
if(GetEffectDurationType(eAOE) == DURATION_TYPE_PERMANENT)
|
||||||
|
{
|
||||||
|
RemoveEffect(oTarget, eAOE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Get next effect on the target
|
||||||
|
eAOE = GetNextEffect(oTarget);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
47
src/_removed/nw_s0_circgoodb.nss
Normal file
47
src/_removed/nw_s0_circgoodb.nss
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Magic Cirle Against Good
|
||||||
|
//:: NW_S0_CircGoodB
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Remove basic protection from good effects from
|
||||||
|
exiting creatures.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Nov 20, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
#include "NW_I0_SPELLS"
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
//Declare major variables
|
||||||
|
//Get the object that is exiting the AOE
|
||||||
|
object oTarget = GetExitingObject();
|
||||||
|
int bValid = FALSE;
|
||||||
|
effect eAOE;
|
||||||
|
if(GetHasSpellEffect(SPELL_MAGIC_CIRCLE_AGAINST_GOOD, oTarget))
|
||||||
|
{
|
||||||
|
//Search through the valid effects on the target.
|
||||||
|
eAOE = GetFirstEffect(oTarget);
|
||||||
|
while (GetIsEffectValid(eAOE))
|
||||||
|
{
|
||||||
|
if (GetEffectCreator(eAOE) == GetAreaOfEffectCreator())
|
||||||
|
{
|
||||||
|
//If the effect was created by the AOE then remove it
|
||||||
|
if(GetEffectSpellId(eAOE) == SPELL_MAGIC_CIRCLE_AGAINST_GOOD)
|
||||||
|
{
|
||||||
|
//Protection is permanent, circle is temporay effect
|
||||||
|
if(GetEffectDurationType(eAOE) == DURATION_TYPE_PERMANENT)
|
||||||
|
{
|
||||||
|
RemoveEffect(oTarget, eAOE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Get next effect on the target
|
||||||
|
eAOE = GetNextEffect(oTarget);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
83
src/_removed/nw_s0_crgrund.nss
Normal file
83
src/_removed/nw_s0_crgrund.nss
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Create Greater Undead
|
||||||
|
//:: NW_S0_CrGrUnd.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Summons an undead type pegged to the character's
|
||||||
|
level.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: April 12, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nDuration = nCasterLevel;
|
||||||
|
nDuration = 24;
|
||||||
|
//effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
|
||||||
|
//Make metamagic extend check
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
string sResRef = "";
|
||||||
|
object oBook = GetItemPossessedBy(OBJECT_SELF, "libramofnecroman");
|
||||||
|
if ( oBook != OBJECT_INVALID )
|
||||||
|
{
|
||||||
|
sResRef = GetLocalString(oBook, "undead3");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sResRef == "" )
|
||||||
|
{
|
||||||
|
//Determine undead to summon based on level
|
||||||
|
if (nCasterLevel <= 15)
|
||||||
|
{
|
||||||
|
sResRef = "wogsumvampire001";
|
||||||
|
}
|
||||||
|
else if ((nCasterLevel >= 16) && (nCasterLevel <= 17))
|
||||||
|
{
|
||||||
|
sResRef = "wogsumdoomkght01";
|
||||||
|
}
|
||||||
|
else if ((nCasterLevel >= 18) && (nCasterLevel <= 19))
|
||||||
|
{
|
||||||
|
sResRef = "wogsumlich004";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sResRef = "wogsummumcleric1";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Apply the summon visual and summon the two undead.
|
||||||
|
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
|
||||||
|
effect eSummon = EffectSummonCreature(sResRef);
|
||||||
|
//Apply the VFX impact and summon effect
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration));
|
||||||
|
}
|
||||||
|
|
84
src/_removed/nw_s0_crundead.nss
Normal file
84
src/_removed/nw_s0_crundead.nss
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Create Undead
|
||||||
|
//:: NW_S0_CrUndead.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Spell summons a Ghoul, Shadow, Ghast, Wight or
|
||||||
|
Wraith
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: April 12, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nDuration = nCasterLevel;
|
||||||
|
nDuration = 24;
|
||||||
|
|
||||||
|
//effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
|
||||||
|
//Check for metamagic extend
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
string sResRef = "";
|
||||||
|
object oBook = GetItemPossessedBy(OBJECT_SELF, "libramofnecroman");
|
||||||
|
if ( oBook != OBJECT_INVALID )
|
||||||
|
{
|
||||||
|
sResRef = GetLocalString(oBook, "undead2");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sResRef == "" )
|
||||||
|
{
|
||||||
|
//Set the summoned undead to the appropriate template based on the caster level
|
||||||
|
if (nCasterLevel <= 11)
|
||||||
|
{
|
||||||
|
sResRef = "sogsumghoul001";
|
||||||
|
}
|
||||||
|
else if ((nCasterLevel >= 12) && (nCasterLevel <= 13))
|
||||||
|
{
|
||||||
|
sResRef = "wogsumghoul001";
|
||||||
|
}
|
||||||
|
else if ((nCasterLevel >= 14) && (nCasterLevel <= 15))
|
||||||
|
{
|
||||||
|
sResRef = "wogsumwight002"; // change later
|
||||||
|
}
|
||||||
|
else if ((nCasterLevel >= 16))
|
||||||
|
{
|
||||||
|
sResRef = "wogsumspectre001";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Apply the summon visual and summon the two undead.
|
||||||
|
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
|
||||||
|
effect eSummon = EffectSummonCreature(sResRef);
|
||||||
|
//Apply the VFX impact and summon effect
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration));
|
||||||
|
}
|
||||||
|
|
43
src/_removed/nw_s0_curminw.nss
Normal file
43
src/_removed/nw_s0_curminw.nss
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Cure Minor Wounds
|
||||||
|
//:: NW_S0_CurMinW
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
// As cure light wounds, except cure minor wounds
|
||||||
|
// cures only 1 point of damage
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Noel Borstad
|
||||||
|
//:: Created On: Oct 18, 2000
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Last Updated By: Preston Watamaniuk, On: Feb 22, 2001
|
||||||
|
//:: Last Updated By: Preston Watamaniuk, On: April 6, 2001
|
||||||
|
|
||||||
|
|
||||||
|
#include "NW_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
|
||||||
|
|
||||||
|
|
||||||
|
spellsCure(d4(1), 0, 4, VFX_IMP_SUNSTRIKE, VFX_IMP_HEAD_HEAL, GetSpellId());
|
||||||
|
}
|
||||||
|
|
42
src/_removed/nw_s0_curserw.nss
Normal file
42
src/_removed/nw_s0_curserw.nss
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Cure Serious Wounds
|
||||||
|
//:: NW_S0_CurSerW
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
// As cure light wounds, except cure moderate wounds
|
||||||
|
// cures 3d8 points of damage plus 1 point per caster
|
||||||
|
// level (up to +15).
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Noel Borstad
|
||||||
|
//:: Created On: Oct 18, 2000
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Update Pass By: Preston W, On: July 25, 2001
|
||||||
|
|
||||||
|
#include "NW_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
|
||||||
|
|
||||||
|
|
||||||
|
spellsCure(d8(3), 15, 24, VFX_IMP_SUNSTRIKE, VFX_IMP_HEALING_L, GetSpellId());
|
||||||
|
}
|
||||||
|
|
93
src/_removed/nw_s0_delfirea.nss
Normal file
93
src/_removed/nw_s0_delfirea.nss
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Delayed Blast Fireball: On Enter
|
||||||
|
//:: NW_S0_DelFireA.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
The caster creates a trapped area which detects
|
||||||
|
the entrance of enemy creatures into 3 m area
|
||||||
|
around the spell location. When tripped it
|
||||||
|
causes a fiery explosion that does 1d6 per
|
||||||
|
caster level up to a max of 20d6 damage.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Georg: Removed Spellhook, fixed damage cap
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: July 27, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "X0_I0_SPELLS"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
//Declare major variables
|
||||||
|
object oSelf = OBJECT_SELF;
|
||||||
|
object oTarget = GetEnteringObject();
|
||||||
|
object oCaster = GetAreaOfEffectCreator(oSelf);
|
||||||
|
location lTarget = GetLocation(oSelf);
|
||||||
|
int nDamage;
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nCasterLevel = GetCasterLevel(oCaster);
|
||||||
|
int nFire = GetLocalInt(oSelf, "NW_SPELL_DELAY_BLAST_FIREBALL");
|
||||||
|
//Limit caster level
|
||||||
|
if (nCasterLevel > 20)
|
||||||
|
{
|
||||||
|
nCasterLevel = 20;
|
||||||
|
}
|
||||||
|
effect eDam;
|
||||||
|
effect eExplode = EffectVisualEffect(VFX_FNF_FIREBALL);
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
|
||||||
|
//Check the faction of the entering object to make sure the entering object is not in the casters faction
|
||||||
|
if(nFire == 0)
|
||||||
|
{
|
||||||
|
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oSelf))
|
||||||
|
{
|
||||||
|
// WoG special hook -- support for GToI dungeon level.
|
||||||
|
SetLocalInt(oSelf, "Delayed_spellhook", TRUE);
|
||||||
|
ExecuteScript(GetLocalString(GetArea(oSelf), "DELAYED_SPELLHOOK_SCRIPT"), oSelf);
|
||||||
|
SetLocalInt(oSelf, "Delayed_spellhook", FALSE);
|
||||||
|
|
||||||
|
// Flag that an explosion has ocurred.
|
||||||
|
SetLocalInt(oSelf, "NW_SPELL_DELAY_BLAST_FIREBALL", TRUE);
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget);
|
||||||
|
//Cycle through the targets in the explosion area
|
||||||
|
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||||
|
while(GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oSelf))
|
||||||
|
{
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_DELAYED_BLAST_FIREBALL));
|
||||||
|
//Make SR check
|
||||||
|
if (!MyResistSpell(oCaster, oTarget))
|
||||||
|
{
|
||||||
|
nDamage = d6(nCasterLevel);
|
||||||
|
//Enter Metamagic conditions
|
||||||
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||||
|
{
|
||||||
|
nDamage = 6 * nCasterLevel;//Damage is at max
|
||||||
|
}
|
||||||
|
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||||
|
{
|
||||||
|
nDamage = nDamage + (nDamage/2);//Damage/Healing is +50%
|
||||||
|
}
|
||||||
|
//Change damage according to Reflex, Evasion and Improved Evasion
|
||||||
|
nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_FIRE, oCaster);
|
||||||
|
if(nDamage > 0)
|
||||||
|
{
|
||||||
|
//Set up the damage effect
|
||||||
|
eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE);
|
||||||
|
//Apply VFX impact and damage effect
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||||
|
DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Get next target in the sequence
|
||||||
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||||
|
}
|
||||||
|
DestroyObject(oSelf, 1.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
89
src/_removed/nw_s0_dismagic.nss
Normal file
89
src/_removed/nw_s0_dismagic.nss
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Dispel Magic
|
||||||
|
//:: NW_S0_DisMagic.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Attempts to dispel all magic on a targeted
|
||||||
|
//:: object, or simply the most powerful that it
|
||||||
|
//:: can on every object in an area if no target
|
||||||
|
//:: specified.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Jan 7, 2002
|
||||||
|
//:: Updated On: Oct 20, 2003, Georg Zoeller
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#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())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// End of Spell Cast Hook
|
||||||
|
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_BREACH);
|
||||||
|
effect eImpact = EffectVisualEffect(VFX_FNF_DISPEL);
|
||||||
|
object oTarget = GetSpellTargetObject();
|
||||||
|
location lLocal = GetSpellTargetLocation();
|
||||||
|
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
// Dispel Magic is capped at caster level 10
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
if(nCasterLevel > 10)
|
||||||
|
{
|
||||||
|
nCasterLevel = 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// Targeted Dispel - Dispel all
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
spellsDispelMagic(oTarget, nCasterLevel, eVis, eImpact);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// Area of Effect - Only dispel best effect
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation());
|
||||||
|
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lLocal, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_AREA_OF_EFFECT | OBJECT_TYPE_PLACEABLE );
|
||||||
|
while (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
if(GetObjectType(oTarget) == OBJECT_TYPE_AREA_OF_EFFECT)
|
||||||
|
{
|
||||||
|
//--------------------------------------------------------------
|
||||||
|
// Handle Area of Effects
|
||||||
|
//--------------------------------------------------------------
|
||||||
|
spellsDispelAoE(oTarget, OBJECT_SELF, nCasterLevel);
|
||||||
|
}
|
||||||
|
else if (GetObjectType(oTarget) == OBJECT_TYPE_PLACEABLE)
|
||||||
|
{
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
spellsDispelMagic(oTarget, nCasterLevel, eVis, eImpact, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE,lLocal, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_AREA_OF_EFFECT | OBJECT_TYPE_PLACEABLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
75
src/_removed/nw_s0_dismissal.nss
Normal file
75
src/_removed/nw_s0_dismissal.nss
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Dismissal
|
||||||
|
//:: NW_S0_Dismissal.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
All summoned creatures within 30ft of caster
|
||||||
|
make a save and SR check or be banished
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Oct 22, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
|
//Declare major variables
|
||||||
|
object oMaster;
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_UNSUMMON);
|
||||||
|
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_EVIL_30);
|
||||||
|
location lTarget = GetSpellTargetLocation();
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, lTarget);
|
||||||
|
int nSpellDC;
|
||||||
|
//Get the first object in the are of effect
|
||||||
|
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget);
|
||||||
|
while(GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
//does the creature have a master.
|
||||||
|
oMaster = GetMaster(oTarget);
|
||||||
|
//Is that master valid and is he an enemy
|
||||||
|
if(GetIsObjectValid(oMaster) && spellsIsTarget(oMaster,SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF ))
|
||||||
|
{
|
||||||
|
//Is the creature a summoned associate
|
||||||
|
if(GetAssociate(ASSOCIATE_TYPE_SUMMONED, oMaster) == oTarget ||
|
||||||
|
GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oMaster) == oTarget ||
|
||||||
|
GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oMaster) == oTarget )
|
||||||
|
{
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DISMISSAL));
|
||||||
|
//Determine correct save
|
||||||
|
nSpellDC = GetSpellSaveDC()+6;
|
||||||
|
//Make SR and will save checks
|
||||||
|
if (!MyResistSpell(OBJECT_SELF, oTarget) && !MySavingThrow(SAVING_THROW_WILL, oTarget, nSpellDC))
|
||||||
|
{
|
||||||
|
//Apply the VFX and delay the destruction of the summoned monster so
|
||||||
|
//that the script and VFX can play.
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||||
|
DestroyObject(oTarget, 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Get next creature in the shape.
|
||||||
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
79
src/_removed/nw_s0_doom.nss
Normal file
79
src/_removed/nw_s0_doom.nss
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Doom
|
||||||
|
//:: NW_S0_Doom.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
If the target fails a save they recieve a -2
|
||||||
|
penalty to all saves, attack rolls, damage and
|
||||||
|
skill checks for the duration of the spell.
|
||||||
|
|
||||||
|
July 22 2002 (BK): Made it mind affecting.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Oct 22, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
#include "NW_I0_SPELLS"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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 = GetSpellTargetObject();
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_DOOM);
|
||||||
|
effect eLink = CreateDoomEffectsLink();
|
||||||
|
|
||||||
|
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
//Meta-Magic checks
|
||||||
|
if(nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nLevel *= 2;
|
||||||
|
}
|
||||||
|
if(!GetIsReactionTypeFriendly(oTarget))
|
||||||
|
{
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DOOM));
|
||||||
|
//Spell Resistance and Saving throw
|
||||||
|
|
||||||
|
//* GZ Engine fix for mind affecting spell
|
||||||
|
|
||||||
|
int nResult = WillSave(oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_MIND_SPELLS);
|
||||||
|
if (nResult == 2)
|
||||||
|
{
|
||||||
|
if (GetIsPC(OBJECT_SELF)) // only display immune feedback for PCs
|
||||||
|
{
|
||||||
|
FloatingTextStrRefOnCreature(84525, OBJECT_SELF, FALSE); // * Target Immune
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
nResult = (nResult || MyResistSpell(OBJECT_SELF, oTarget));
|
||||||
|
if (!nResult)
|
||||||
|
{
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink , oTarget, TurnsToSeconds(nLevel));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
58
src/_removed/nw_s0_eleswarm.nss
Normal file
58
src/_removed/nw_s0_eleswarm.nss
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Elemental Swarm
|
||||||
|
//:: NW_S0_EleSwarm.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
This spell creates a conduit from the caster
|
||||||
|
to the elemental planes. The first elemental
|
||||||
|
summoned is a 24 HD Air elemental. Whenever an
|
||||||
|
elemental dies it is replaced by the next
|
||||||
|
elemental in the chain Air, Earth, Water, Fire
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: April 12, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Update Pass By: Preston W, On: July 30, 2001
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||||
|
nDuration = 24;
|
||||||
|
effect eSummon;
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3);
|
||||||
|
//Check for metamagic duration
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration * 2; //Duration is +100%
|
||||||
|
}
|
||||||
|
//Set the summoning effect
|
||||||
|
eSummon = EffectSwarm(FALSE, "wog_s_airgreat2", "WoG_S_WATERGRT2","WoG_S_EARTHGRT2","WoG_S_FIREGREAT2");
|
||||||
|
//Apply the summon effect
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSummon, OBJECT_SELF, HoursToSeconds(nDuration));
|
||||||
|
}
|
||||||
|
|
150
src/_removed/nw_s0_evardsa.nss
Normal file
150
src/_removed/nw_s0_evardsa.nss
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Evards Black Tentacles: On Enter
|
||||||
|
//:: NW_S0_EvardsA
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Upon entering the mass of rubbery tentacles the
|
||||||
|
target is struck by 1d4 +1/lvl tentacles. Each
|
||||||
|
makes a grapple check. If it succeeds then
|
||||||
|
it does 1d6+4damage and the target must make
|
||||||
|
a Fortitude Save versus paralysis or be paralyzed
|
||||||
|
for 1 round.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Nov 23, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: GZ: Removed SR, its not there by the book
|
||||||
|
|
||||||
|
#include "X0_I0_SPELLS"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
object oTarget = GetEnteringObject();
|
||||||
|
effect eParal = EffectParalyze();
|
||||||
|
effect eDur = EffectVisualEffect(VFX_DUR_PARALYZED);
|
||||||
|
effect eLink = EffectLinkEffects(eDur, eParal);
|
||||||
|
effect eDam;
|
||||||
|
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nDamage = 0;
|
||||||
|
int nHits;
|
||||||
|
float fDelay;
|
||||||
|
int nNumberTargets = 0;
|
||||||
|
int nMinimumTargets = 2;
|
||||||
|
int nDieDam;
|
||||||
|
int nTargetSize;
|
||||||
|
int nTentacleGrappleCheck;
|
||||||
|
int nOpposedGrappleCheck;
|
||||||
|
int nOppossedGrappleCheckModifiers;
|
||||||
|
int nTentaclesPerTarget;
|
||||||
|
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
|
||||||
|
if ( GetCreatureSize(oTarget) < CREATURE_SIZE_MEDIUM )
|
||||||
|
{
|
||||||
|
// Some visual feedback that the spell doesn't affect creatures of this type.
|
||||||
|
effect eFail = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||||
|
fDelay = GetRandomDelay(0.75, 1.5);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFail, oTarget,fDelay);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( nCasterLevel > 20 )
|
||||||
|
{
|
||||||
|
nCasterLevel = 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
nTentaclesPerTarget = d4();
|
||||||
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||||
|
{
|
||||||
|
nTentaclesPerTarget = 4;
|
||||||
|
}
|
||||||
|
nTentaclesPerTarget = nTentaclesPerTarget + nCasterLevel;
|
||||||
|
if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||||
|
{
|
||||||
|
nTentaclesPerTarget = nTentaclesPerTarget + (nTentaclesPerTarget/2); //Number of variable tentacles is +50%
|
||||||
|
}
|
||||||
|
|
||||||
|
oTarget = GetFirstInPersistentObject();
|
||||||
|
while(GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
if ( GetCreatureSize(oTarget) >= CREATURE_SIZE_MEDIUM )
|
||||||
|
{
|
||||||
|
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator()))
|
||||||
|
{
|
||||||
|
nNumberTargets++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
oTarget = GetNextInPersistentObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
oTarget = GetEnteringObject();
|
||||||
|
if ( nNumberTargets >= 0 )
|
||||||
|
{
|
||||||
|
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator()))
|
||||||
|
{
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_EVARDS_BLACK_TENTACLES));
|
||||||
|
|
||||||
|
// Distribute the tentacle between all valid targets.
|
||||||
|
if ( nNumberTargets < nMinimumTargets )
|
||||||
|
{
|
||||||
|
// If there is only one target in the area, then only a portion of the tentacles should be able to reach them.
|
||||||
|
nTentaclesPerTarget = nTentaclesPerTarget/nMinimumTargets;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nTentaclesPerTarget = nTentaclesPerTarget/nNumberTargets;
|
||||||
|
}
|
||||||
|
|
||||||
|
nOppossedGrappleCheckModifiers = GetBaseAttackBonus(oTarget) + GetAbilityModifier(ABILITY_STRENGTH,oTarget);
|
||||||
|
nTargetSize = GetCreatureSize(oTarget);
|
||||||
|
if (nTargetSize == CREATURE_SIZE_LARGE )
|
||||||
|
{
|
||||||
|
nOppossedGrappleCheckModifiers = nOppossedGrappleCheckModifiers + 4;
|
||||||
|
}
|
||||||
|
else if ( nTargetSize == CREATURE_SIZE_HUGE )
|
||||||
|
{
|
||||||
|
nOppossedGrappleCheckModifiers = nOppossedGrappleCheckModifiers + 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (nHits = nTentaclesPerTarget; nHits > 0; nHits--)
|
||||||
|
{
|
||||||
|
// Grapple Check.
|
||||||
|
nTentacleGrappleCheck = d20() + nCasterLevel + 8; // Str(4) + Large Tentacle(4)
|
||||||
|
nOpposedGrappleCheck = d20() + nOppossedGrappleCheckModifiers;
|
||||||
|
|
||||||
|
if(nTentacleGrappleCheck >= nOpposedGrappleCheck)
|
||||||
|
{
|
||||||
|
nDieDam = d6() + 4;
|
||||||
|
//Enter Metamagic conditions
|
||||||
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||||
|
{
|
||||||
|
nDieDam = 10;//Damage is at max 6+4=10
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||||
|
{
|
||||||
|
nDieDam = nDieDam + (nDieDam/2); //Damage/Healing is +50%
|
||||||
|
}
|
||||||
|
nDamage = nDamage + nDieDam;
|
||||||
|
|
||||||
|
fDelay = GetRandomDelay(1.0, 2.2);
|
||||||
|
eDam = EffectDamage(nDieDam, DAMAGE_TYPE_BLUDGEONING, DAMAGE_POWER_PLUS_TWO);
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(nDamage > 0)
|
||||||
|
{
|
||||||
|
if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay))
|
||||||
|
{
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(1)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
158
src/_removed/nw_s0_evardsc.nss
Normal file
158
src/_removed/nw_s0_evardsc.nss
Normal file
@ -0,0 +1,158 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Evards Black Tentacles: Heartbeat
|
||||||
|
//:: NW_S0_EvardsB
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Upon remaining within the mass of rubbery tentacles the
|
||||||
|
target is struck by 1d4 + 1/lvl tentacles. Each
|
||||||
|
makes a grapple check. If it succeeds then
|
||||||
|
it does 1d6+4 damage and the target must make
|
||||||
|
a Fortitude Save versus paralysis or be paralyzed
|
||||||
|
for 1 round.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Nov 23, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: GZ: Removed SR, its not there by the book
|
||||||
|
|
||||||
|
|
||||||
|
#include "X0_I0_SPELLS"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
object oTarget;
|
||||||
|
effect eParal = EffectParalyze();
|
||||||
|
effect eDur = EffectVisualEffect(VFX_DUR_PARALYZED);
|
||||||
|
effect eLink = EffectLinkEffects(eDur, eParal);
|
||||||
|
effect eDam;
|
||||||
|
effect eFail = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||||
|
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nDamage;
|
||||||
|
int nDieDam;
|
||||||
|
float fDelay;
|
||||||
|
int nNumberTargets = 0;
|
||||||
|
int nTargetSize;
|
||||||
|
int nTentacleGrappleCheck;
|
||||||
|
int nOpposedGrappleCheck;
|
||||||
|
int nOppossedGrappleCheckModifiers;
|
||||||
|
int nHits;
|
||||||
|
int nMinimumTargets = 2;
|
||||||
|
int nTentaclesPerTarget;
|
||||||
|
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
|
||||||
|
if ( nCasterLevel > 20 )
|
||||||
|
{
|
||||||
|
nCasterLevel = 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
nTentaclesPerTarget = d4();
|
||||||
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||||
|
{
|
||||||
|
nTentaclesPerTarget = 4;
|
||||||
|
}
|
||||||
|
nTentaclesPerTarget = nTentaclesPerTarget + nCasterLevel;
|
||||||
|
if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||||
|
{
|
||||||
|
nTentaclesPerTarget = nTentaclesPerTarget + (nTentaclesPerTarget/2); //Number of variable tentacles is +50%
|
||||||
|
}
|
||||||
|
|
||||||
|
oTarget = GetFirstInPersistentObject();
|
||||||
|
while(GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
if ( GetCreatureSize(oTarget) >= CREATURE_SIZE_MEDIUM )
|
||||||
|
{
|
||||||
|
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator()))
|
||||||
|
{
|
||||||
|
nNumberTargets++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Some visual feedback that the spell doesn't affect creatures of this type.
|
||||||
|
fDelay = GetRandomDelay(0.75, 1.5);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFail, oTarget,fDelay);
|
||||||
|
}
|
||||||
|
oTarget = GetNextInPersistentObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( nNumberTargets > 0 )
|
||||||
|
{
|
||||||
|
// Distribute the tentacle between all valid targets.
|
||||||
|
if ( nNumberTargets < nMinimumTargets )
|
||||||
|
{
|
||||||
|
// If there is only one target in the area, then only a portion of the tentacles should be able to reach them.
|
||||||
|
nTentaclesPerTarget = nTentaclesPerTarget/nMinimumTargets;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nTentaclesPerTarget = nTentaclesPerTarget/nNumberTargets;
|
||||||
|
}
|
||||||
|
|
||||||
|
oTarget = GetFirstInPersistentObject();
|
||||||
|
while(GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
nDamage = 0;
|
||||||
|
nTargetSize = GetCreatureSize(oTarget);
|
||||||
|
if ( nTargetSize >= CREATURE_SIZE_MEDIUM )
|
||||||
|
{
|
||||||
|
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator()))
|
||||||
|
{
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_EVARDS_BLACK_TENTACLES));
|
||||||
|
|
||||||
|
nOppossedGrappleCheckModifiers = GetBaseAttackBonus(oTarget) + GetAbilityModifier(ABILITY_STRENGTH,oTarget);
|
||||||
|
if (nTargetSize == CREATURE_SIZE_LARGE )
|
||||||
|
{
|
||||||
|
nOppossedGrappleCheckModifiers = nOppossedGrappleCheckModifiers + 4;
|
||||||
|
}
|
||||||
|
else if ( nTargetSize == CREATURE_SIZE_HUGE )
|
||||||
|
{
|
||||||
|
nOppossedGrappleCheckModifiers = nOppossedGrappleCheckModifiers + 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (nHits = nTentaclesPerTarget; nHits > 0; nHits--)
|
||||||
|
{
|
||||||
|
// Grapple Check.
|
||||||
|
nTentacleGrappleCheck = d20() + nCasterLevel + 8; // Str(4) + Large Tentacle(4)
|
||||||
|
nOpposedGrappleCheck = d20() + nOppossedGrappleCheckModifiers;
|
||||||
|
|
||||||
|
if(nTentacleGrappleCheck >= nOpposedGrappleCheck)
|
||||||
|
{
|
||||||
|
nDieDam = d6() + 4;
|
||||||
|
//Enter Metamagic conditions
|
||||||
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||||
|
{
|
||||||
|
nDieDam = 10;//Damage is at max 6+4=10
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||||
|
{
|
||||||
|
nDieDam = nDieDam + (nDieDam/2); //Damage/Healing is +50%
|
||||||
|
}
|
||||||
|
nDamage = nDamage + nDieDam;
|
||||||
|
|
||||||
|
eDam = EffectDamage(nDieDam, DAMAGE_TYPE_BLUDGEONING, DAMAGE_POWER_PLUS_TWO);
|
||||||
|
fDelay = GetRandomDelay(0.75, 1.5);
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(nDamage > 0)
|
||||||
|
{
|
||||||
|
if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay))
|
||||||
|
{
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(1)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
oTarget = GetNextInPersistentObject();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
97
src/_removed/nw_s0_feebmind.nss
Normal file
97
src/_removed/nw_s0_feebmind.nss
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Feeblemind
|
||||||
|
//:: [NW_S0_FeebMind.nss]
|
||||||
|
//:: Copyright (c) 2000 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Target must make a Will save or take ability
|
||||||
|
//:: damage to Intelligence equaling 1d4 per 4 levels.
|
||||||
|
//:: Duration of 1 rounds per 2 levels.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Feb 2, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "NW_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
|
||||||
|
|
||||||
|
|
||||||
|
//Declare major variables
|
||||||
|
object oTarget = GetSpellTargetObject();
|
||||||
|
int nDuration = GetCasterLevel(OBJECT_SELF)/2;
|
||||||
|
int nLoss = GetCasterLevel(OBJECT_SELF)/4;
|
||||||
|
//Check to make at least 1d4 damage is done
|
||||||
|
if (nLoss < 1)
|
||||||
|
{
|
||||||
|
nLoss = 1;
|
||||||
|
}
|
||||||
|
nLoss = d4(nLoss);
|
||||||
|
//Check to make sure the duration is 1 or greater
|
||||||
|
if (nDuration < 1)
|
||||||
|
{
|
||||||
|
nDuration == 1;
|
||||||
|
}
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
effect eFeeb;
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||||
|
effect eRay = EffectBeam(VFX_BEAM_MIND, OBJECT_SELF, BODY_NODE_HAND);
|
||||||
|
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||||
|
|
||||||
|
if(!GetIsReactionTypeFriendly(oTarget))
|
||||||
|
{
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FEEBLEMIND));
|
||||||
|
//Make SR check
|
||||||
|
if (!MyResistSpell(OBJECT_SELF, oTarget))
|
||||||
|
{
|
||||||
|
//Make an will save
|
||||||
|
|
||||||
|
int nWillResult = WillSave(oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_MIND_SPELLS);
|
||||||
|
if (nWillResult == 0)
|
||||||
|
{
|
||||||
|
//Enter Metamagic conditions
|
||||||
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||||
|
{
|
||||||
|
nLoss = nLoss * 4;
|
||||||
|
}
|
||||||
|
if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||||
|
{
|
||||||
|
nLoss = nLoss + (nLoss/2);
|
||||||
|
}
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration * 2;
|
||||||
|
}
|
||||||
|
//Set the ability damage
|
||||||
|
eFeeb = EffectAbilityDecrease(ABILITY_INTELLIGENCE, nLoss);
|
||||||
|
effect eLink = EffectLinkEffects(eFeeb, eDur);
|
||||||
|
|
||||||
|
//Apply the VFX impact and ability damage effect.
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRay, oTarget, 1.0);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||||
|
} else if (GetIsPC(OBJECT_SELF))
|
||||||
|
{
|
||||||
|
FloatingTextStrRefOnCreature(84525, OBJECT_SELF, FALSE); // * Target Immune
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
101
src/_removed/nw_s0_findtrap.nss
Normal file
101
src/_removed/nw_s0_findtrap.nss
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//:: Find Traps
|
||||||
|
//:: NW_S0_FindTrap
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
- Finds and removes all traps within 30m.
|
||||||
|
- Caster level + d20 vs the trap disarm
|
||||||
|
|
||||||
|
Fail - Trap detected
|
||||||
|
Success - Trap disabled
|
||||||
|
*/
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//:: Created By : Preston Watamaniuk
|
||||||
|
//:: Created On : Oct 29, 2001
|
||||||
|
//:: Modified By: Sir Elric
|
||||||
|
//:: Modified On: 15th April, 2006
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_KNOCK);
|
||||||
|
int nCnt = 1;
|
||||||
|
object oTrap = GetNearestObject(OBJECT_TYPE_TRIGGER | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt);
|
||||||
|
while(GetIsObjectValid(oTrap) && GetDistanceToObject(oTrap) <= 30.0)
|
||||||
|
{
|
||||||
|
if(GetIsTrapped(oTrap))
|
||||||
|
{
|
||||||
|
SetTrapDetectedBy(oTrap, OBJECT_SELF);
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTrap));
|
||||||
|
|
||||||
|
object oCaster = OBJECT_SELF;
|
||||||
|
int nDC = GetTrapDisarmDC(oTrap);
|
||||||
|
int nLevel = GetCasterLevel(oCaster);
|
||||||
|
int nRandom = d20()+ nLevel;
|
||||||
|
string sTrap = GetName(oTrap);
|
||||||
|
|
||||||
|
if(nRandom >= nDC)
|
||||||
|
{
|
||||||
|
if(GetObjectType(oTrap) == OBJECT_TYPE_TRIGGER)
|
||||||
|
SendMessageToPC(oCaster, "You have successfully disabled the " + sTrap + "");
|
||||||
|
else
|
||||||
|
SendMessageToPC(oCaster, "You have successfully disabled the trap on the " + sTrap + "");
|
||||||
|
|
||||||
|
// For respawning trap code...
|
||||||
|
SetLocalInt(oTrap, "DISARMED_BY_SPELL", TRUE);
|
||||||
|
DelayCommand(2.0, SetTrapDisabled(oTrap));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(GetObjectType(oTrap) == OBJECT_TYPE_TRIGGER)
|
||||||
|
SendMessageToPC(oCaster, "You have detected " + sTrap + " but are unable to disable it");
|
||||||
|
else
|
||||||
|
SendMessageToPC(oCaster, "You have detected the trap on the " + sTrap + " but are unable to disable it");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
nCnt++;
|
||||||
|
oTrap = GetNearestObject(OBJECT_TYPE_TRIGGER | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt);
|
||||||
|
}
|
||||||
|
//Declare major variables
|
||||||
|
object oTarget = GetSpellTargetObject();
|
||||||
|
effect eVis2 = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE);
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
|
||||||
|
effect eSearch = EffectSkillIncrease(SKILL_SEARCH, 10);
|
||||||
|
|
||||||
|
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||||
|
effect eLink = EffectLinkEffects(eSearch, eDur);
|
||||||
|
|
||||||
|
int nDuration = (GetCasterLevel(OBJECT_SELF)/2); // * Duration 1 turn/level
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND) //Duration is +100%
|
||||||
|
{
|
||||||
|
nDuration = nDuration * 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Fire spell cast at event for target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_AMPLIFY, FALSE));
|
||||||
|
//Apply VFX impact and bonus effects
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration));
|
||||||
|
}
|
69
src/_removed/nw_s0_gate.nss
Normal file
69
src/_removed/nw_s0_gate.nss
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Gate
|
||||||
|
//:: NW_S0_Gate.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Summons a Balor to fight for the caster.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: April 12, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
void CreateBalor();
|
||||||
|
#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
|
||||||
|
|
||||||
|
DelayCommand(3.0, CreateBalor());
|
||||||
|
}
|
||||||
|
|
||||||
|
void CreateBalor()
|
||||||
|
{
|
||||||
|
//Declare major variables
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||||
|
effect eSummon;
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_GATE);
|
||||||
|
//Make metamagic extend check
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
//Summon the Balor and apply the VFX impact
|
||||||
|
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
|
||||||
|
location lSpellTargetLOC = GetSpellTargetLocation();
|
||||||
|
if(GetHasSpellEffect(SPELL_PROTECTION_FROM_EVIL) ||
|
||||||
|
GetHasSpellEffect(SPELL_MAGIC_CIRCLE_AGAINST_EVIL) ||
|
||||||
|
GetHasSpellEffect(SPELL_HOLY_AURA))
|
||||||
|
{
|
||||||
|
eSummon = EffectSummonCreature("demon001",VFX_FNF_SUMMON_GATE,3.0);
|
||||||
|
float fSeconds = RoundsToSeconds(nDuration);
|
||||||
|
if(GetLocalInt(OBJECT_SELF, "DW_FLAG_PLANAR") == 0)
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, lSpellTargetLOC, fSeconds);
|
||||||
|
SetLocalInt(OBJECT_SELF, "DW_FLAG_PLANAR", 1);
|
||||||
|
DelayCommand(3.0, DeleteLocalInt(OBJECT_SELF, "DW_FLAG_PLANAR"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lSpellTargetLOC);
|
||||||
|
CreateObject(OBJECT_TYPE_CREATURE, "NW_S_BALOR_EVIL", GetSpellTargetLocation());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
79
src/_removed/nw_s0_grdispel.nss
Normal file
79
src/_removed/nw_s0_grdispel.nss
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Greater Dispelling
|
||||||
|
//:: NW_S0_GrDispel.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Jan 7, 2002
|
||||||
|
//:: Updated On: Oct 20, 2003, Georg Zoeller
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
#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())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// End of Spell Cast Hook
|
||||||
|
|
||||||
|
effect eVis = EffectVisualEffect( VFX_IMP_BREACH );
|
||||||
|
effect eImpact = EffectVisualEffect( VFX_FNF_DISPEL_GREATER );
|
||||||
|
int nCasterLevel = GetCasterLevel( OBJECT_SELF );
|
||||||
|
object oTarget = GetSpellTargetObject();
|
||||||
|
location lLocal = GetSpellTargetLocation();
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
// Dispel Magic is capped at caster level 10
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
if(nCasterLevel >15 )
|
||||||
|
{
|
||||||
|
nCasterLevel = 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// Targeted Dispel - Dispel all
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
spellsDispelMagic(oTarget, nCasterLevel, eVis, eImpact);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// Area of Effect - Only dispel best effect
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation());
|
||||||
|
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lLocal, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_AREA_OF_EFFECT | OBJECT_TYPE_PLACEABLE);
|
||||||
|
while (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
if(GetObjectType(oTarget) == OBJECT_TYPE_AREA_OF_EFFECT)
|
||||||
|
{
|
||||||
|
//--------------------------------------------------------------
|
||||||
|
// Handle Area of Effects
|
||||||
|
//--------------------------------------------------------------
|
||||||
|
spellsDispelAoE(oTarget, OBJECT_SELF, nCasterLevel);
|
||||||
|
}
|
||||||
|
else if (GetObjectType(oTarget) == OBJECT_TYPE_PLACEABLE)
|
||||||
|
{
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
spellsDispelMagic(oTarget, nCasterLevel, eVis, eImpact, FALSE);
|
||||||
|
}
|
||||||
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE,lLocal, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_AREA_OF_EFFECT | OBJECT_TYPE_PLACEABLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
104
src/_removed/nw_s0_grplanar.nss
Normal file
104
src/_removed/nw_s0_grplanar.nss
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Greater Planar Binding
|
||||||
|
//:: NW_S0_GrPlanar.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Summons an outsider dependant on alignment, or
|
||||||
|
holds an outsider if the creature fails a save.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: April 12, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
#include "NW_I0_SPELLS"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||||
|
effect eSummon;
|
||||||
|
effect eGate;
|
||||||
|
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||||
|
effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED);
|
||||||
|
effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD);
|
||||||
|
|
||||||
|
effect eLink = EffectLinkEffects(eDur, EffectParalyze());
|
||||||
|
eLink = EffectLinkEffects(eLink, eDur2);
|
||||||
|
eLink = EffectLinkEffects(eLink, eDur3);
|
||||||
|
|
||||||
|
object oTarget = GetSpellTargetObject();
|
||||||
|
int nRacial = GetRacialType(oTarget);
|
||||||
|
//Check for metamagic extend
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
//Check to see if a valid target has been chosen
|
||||||
|
if (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
if(!GetIsReactionTypeFriendly(oTarget))
|
||||||
|
{
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_GREATER_PLANAR_BINDING));
|
||||||
|
//Check for racial type
|
||||||
|
if(nRacial == RACIAL_TYPE_OUTSIDER)
|
||||||
|
{
|
||||||
|
//Allow will save to negate hold effect
|
||||||
|
if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC()+5))
|
||||||
|
{
|
||||||
|
//Apply the hold effect
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration/2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(GetLocalInt(OBJECT_SELF, "DW_FLAG_PLANAR") == 0)
|
||||||
|
{
|
||||||
|
//If the ground was clicked on summon an outsider based on alignment
|
||||||
|
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
|
||||||
|
float fDelay = 3.0;
|
||||||
|
switch (nAlign)
|
||||||
|
{
|
||||||
|
case ALIGNMENT_EVIL:
|
||||||
|
eSummon = EffectSummonCreature("wogsumvrock001", VFX_FNF_SUMMON_GATE, 3.0);
|
||||||
|
//eGate = EffectVisualEffect(VFX_FNF_SUMMON_GATE);
|
||||||
|
break;
|
||||||
|
case ALIGNMENT_GOOD:
|
||||||
|
eSummon = EffectSummonCreature("ctrumpet001", VFX_FNF_SUMMON_CELESTIAL, 3.0);
|
||||||
|
//eGate = EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL);
|
||||||
|
break;
|
||||||
|
case ALIGNMENT_NEUTRAL:
|
||||||
|
eSummon = EffectSummonCreature("slaaddeth001", VFX_FNF_SUMMON_MONSTER_3, 1.0);
|
||||||
|
//eGate = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3);
|
||||||
|
fDelay = 1.0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//Apply the VFX impact and summon effect
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration));
|
||||||
|
SetLocalInt(OBJECT_SELF, "DW_FLAG_PLANAR", 1);
|
||||||
|
DelayCommand(3.0, DeleteLocalInt(OBJECT_SELF, "DW_FLAG_PLANAR"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
104
src/_removed/nw_s0_grrestore.nss
Normal file
104
src/_removed/nw_s0_grrestore.nss
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Greater Restoration
|
||||||
|
//:: NW_S0_GrRestore.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Removes all negative effects of a temporary nature
|
||||||
|
and all permanent effects of a supernatural nature
|
||||||
|
from the character. Does not remove the effects
|
||||||
|
relating to Mind-Affecting spells or movement alteration.
|
||||||
|
Heals target for 5d8 + 1 point per caster level.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Jan 7, 2002
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||||
|
|
||||||
|
#include "nw_i0_spells"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
#include "wog_horse_inc"
|
||||||
|
|
||||||
|
// return TRUE if the effect created by a supernatural force and can't be dispelled by spells
|
||||||
|
int GetIsSupernaturalCurse(effect eEff);
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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 = GetSpellTargetObject();
|
||||||
|
effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION_GREATER);
|
||||||
|
|
||||||
|
effect eBad = GetFirstEffect(oTarget);
|
||||||
|
//Search for negative effects
|
||||||
|
while(GetIsEffectValid(eBad))
|
||||||
|
{
|
||||||
|
if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_DEAF ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_CURSE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_DISEASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_POISON ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_CHARMED ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_DOMINATED ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_DAZED ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_CONFUSED ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_FRIGHTENED ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_SLOW ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_STUNNED)
|
||||||
|
{
|
||||||
|
//Remove effect if it is negative.
|
||||||
|
if(!GetIsSupernaturalCurse(eBad))
|
||||||
|
RemoveEffect(oTarget, eBad);
|
||||||
|
}
|
||||||
|
eBad = GetNextEffect(oTarget);
|
||||||
|
}
|
||||||
|
if(GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
|
||||||
|
{
|
||||||
|
//Apply the VFX impact and effects
|
||||||
|
spellsCure(d8(10), 40, 80, VFX_IMP_SUNSTRIKE, VFX_NONE, GetSpellId());
|
||||||
|
}
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_GREATER_RESTORATION, FALSE));
|
||||||
|
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
int GetIsSupernaturalCurse(effect eEff)
|
||||||
|
{
|
||||||
|
object oCreator = GetEffectCreator(eEff);
|
||||||
|
if(GetTag(oCreator) == "q6e_ShaorisFellTemple")
|
||||||
|
return TRUE;
|
||||||
|
object horseEffects = GetEffectCreatorObject(WOG_HORSE_EFFECT);
|
||||||
|
if (oCreator == horseEffects)
|
||||||
|
return TRUE;
|
||||||
|
return FALSE;
|
||||||
|
}
|
40
src/_removed/nw_s0_grspbrch.nss
Normal file
40
src/_removed/nw_s0_grspbrch.nss
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Greater Spell Breach
|
||||||
|
//:: NW_S0_GrSpBrch.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Removes 4 spell defenses from an enemy mage.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Jan 7, 2002
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
#include "NW_I0_SPELLS"
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
DoSpellBreach(GetSpellTargetObject(), 4, 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
90
src/_removed/nw_s0_harm.nss
Normal file
90
src/_removed/nw_s0_harm.nss
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: [Harm]
|
||||||
|
//:: [NW_S0_Harm.nss]
|
||||||
|
//:: Copyright (c) 2000 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Reduces target to 1d4 HP on successful touch
|
||||||
|
//:: attack. If the target is undead it is healed.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Keith Soleski
|
||||||
|
//:: Created On: Jan 18, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||||
|
//:: Update Pass By: Preston W, On: Aug 1, 2001
|
||||||
|
//:: Last Update: Georg Zoeller On: Oct 10, 2004
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "NW_I0_SPELLS"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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 = GetSpellTargetObject();
|
||||||
|
int nDamage, nHeal;
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nTouch = TouchAttackMelee(oTarget);
|
||||||
|
effect eVis = EffectVisualEffect(246);
|
||||||
|
effect eVis2 = EffectVisualEffect(VFX_IMP_HEALING_G);
|
||||||
|
effect eHeal, eDam;
|
||||||
|
//Check that the target is undead
|
||||||
|
if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
|
||||||
|
{
|
||||||
|
//Figure out the amount of damage to heal
|
||||||
|
nHeal = GetMaxHitPoints(oTarget) - GetCurrentHitPoints(oTarget);
|
||||||
|
if (nHeal > 250)
|
||||||
|
{
|
||||||
|
nHeal = 250;
|
||||||
|
}
|
||||||
|
//Set the heal effect
|
||||||
|
eHeal = EffectHeal(nHeal);
|
||||||
|
//Apply heal effect and VFX impact
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget);
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HARM, FALSE));
|
||||||
|
}
|
||||||
|
else if (nTouch != FALSE) //GZ: Fixed boolean check to work in NWScript. 1 or 2 are valid return numbers from TouchAttackMelee
|
||||||
|
{
|
||||||
|
if(!GetIsReactionTypeFriendly(oTarget))
|
||||||
|
{
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HARM));
|
||||||
|
if (!MyResistSpell(OBJECT_SELF, oTarget))
|
||||||
|
{
|
||||||
|
nDamage = GetCurrentHitPoints(oTarget) - d4(1);
|
||||||
|
//Check for metamagic
|
||||||
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||||
|
{
|
||||||
|
nDamage = GetCurrentHitPoints(oTarget) - 1;
|
||||||
|
}
|
||||||
|
if (nDamage > 250)
|
||||||
|
{
|
||||||
|
nDamage = 250;
|
||||||
|
}
|
||||||
|
eDam = EffectDamage(nDamage,DAMAGE_TYPE_NEGATIVE);
|
||||||
|
//Apply the VFX impact and effects
|
||||||
|
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
98
src/_removed/nw_s0_heal.nss
Normal file
98
src/_removed/nw_s0_heal.nss
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
// HCR v3.2.0 - Removed Wild Magic. Added spell hook and HOTU code.
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//:: FileName: NW_S0_Heal
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Heals the target to full unless they are undead. If undead, they are reduced
|
||||||
|
to 1d4 HP.
|
||||||
|
*/
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Jan 12, 2001
|
||||||
|
//:: Updated On: Aug 1, 2001 - Preston W.
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
#include "NW_I0_SPELLS"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (GetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code. Added 2003-06-23 by GeorgZ. If you want to make changes
|
||||||
|
to all spells, check x2_inc_spellhook.nss to find out more.
|
||||||
|
*/
|
||||||
|
// If code within the PreSpellCastHook reports FALSE, do not run this spell.
|
||||||
|
if (!X2PreSpellCastCode()) { return; }
|
||||||
|
// End of Spell Cast Hook.
|
||||||
|
|
||||||
|
// Check to see if the target is an undead.
|
||||||
|
object oTarget = GetSpellTargetObject();
|
||||||
|
int nCHP = GetCurrentHitPoints(oTarget);
|
||||||
|
if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
|
||||||
|
{
|
||||||
|
if (!GetIsReactionTypeFriendly(oTarget))
|
||||||
|
{
|
||||||
|
// Fire cast spell at event for the specified target.
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEAL));
|
||||||
|
|
||||||
|
// Make a touch attack.
|
||||||
|
if (TouchAttackMelee(oTarget) > 0)
|
||||||
|
{
|
||||||
|
// Make SR check.
|
||||||
|
if (!MyResistSpell(OBJECT_SELF, oTarget))
|
||||||
|
{
|
||||||
|
// Determine the amount of damage to inflict.
|
||||||
|
int nModify;
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||||
|
{ nModify = 1; }
|
||||||
|
else
|
||||||
|
{ nModify = d4(); }
|
||||||
|
int nDam = (nCHP - nModify);
|
||||||
|
if (nDam > 250)
|
||||||
|
{
|
||||||
|
nDam = 250;
|
||||||
|
}
|
||||||
|
// Set the damage visual and effect.
|
||||||
|
effect eVis1 = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
||||||
|
effect eKill = EffectDamage(nDam, DAMAGE_TYPE_POSITIVE);
|
||||||
|
|
||||||
|
// Apply the damage visual and effect.
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis1, oTarget);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eKill, oTarget);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Fire cast spell at event for the specified target.
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEAL, FALSE));
|
||||||
|
|
||||||
|
// Figure out how much to heal.
|
||||||
|
int nHeal;
|
||||||
|
int nMHP = GetMaxHitPoints(oTarget);
|
||||||
|
if (nCHP < 0)
|
||||||
|
{ nHeal = (abs(nCHP) + nMHP); }
|
||||||
|
else
|
||||||
|
{ nHeal = (nMHP - nCHP); }
|
||||||
|
if (nHeal > 250)
|
||||||
|
{
|
||||||
|
nHeal = 250;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the heal visual and effect.
|
||||||
|
effect eVis2 = EffectVisualEffect(VFX_IMP_HEALING_X);
|
||||||
|
effect eHeal = EffectHeal(nHeal);
|
||||||
|
|
||||||
|
// Apply the heal visual and effect.
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
116
src/_removed/nw_s0_healcirc.nss
Normal file
116
src/_removed/nw_s0_healcirc.nss
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
// sr 5.5.1
|
||||||
|
// took out unnecessary include script.
|
||||||
|
// sr 5.5
|
||||||
|
// added stable heal code.
|
||||||
|
|
||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Healing Circle
|
||||||
|
//:: NW_S0_HealCirc
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
// Positive energy spreads out in all directions
|
||||||
|
// from the point of origin, curing 1d8 points of
|
||||||
|
// damage plus 1 point per caster level (maximum +20)
|
||||||
|
// to nearby living allies.
|
||||||
|
//
|
||||||
|
// Like cure spells, healing circle damages undead in
|
||||||
|
// its area rather than curing them.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Noel Borstad
|
||||||
|
//:: Created On: Oct 18,2000
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||||
|
//:: Update Pass By: Preston W, On: Aug 1, 2001
|
||||||
|
|
||||||
|
#include "hc_text_health"
|
||||||
|
#include "wm_include"
|
||||||
|
#include "NW_I0_SPELLS"
|
||||||
|
// 5.5 added heal include.
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
if (WildMagicOverride()) { return; }
|
||||||
|
//Declare major variables
|
||||||
|
object oTarget;
|
||||||
|
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nDamagen, nModify, nHurt, nHP;
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
effect eKill;
|
||||||
|
effect eHeal;
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
||||||
|
effect eVis2 = EffectVisualEffect(VFX_IMP_HEALING_M);
|
||||||
|
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_HOLY_20);
|
||||||
|
float fDelay;
|
||||||
|
//Limit caster level
|
||||||
|
if (nCasterLvl > 20)
|
||||||
|
{
|
||||||
|
nCasterLvl = 20;
|
||||||
|
}
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation());
|
||||||
|
//Get first target in shape
|
||||||
|
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetSpellTargetLocation());
|
||||||
|
while (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
fDelay = GetRandomDelay();
|
||||||
|
//Check if racial type is undead
|
||||||
|
if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD )
|
||||||
|
{
|
||||||
|
if(!GetIsReactionTypeFriendly(oTarget))
|
||||||
|
{
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEALING_CIRCLE));
|
||||||
|
//Make SR check
|
||||||
|
if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay))
|
||||||
|
{
|
||||||
|
nModify = d8() + nCasterLvl;
|
||||||
|
//Make metamagic check
|
||||||
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||||
|
{
|
||||||
|
nModify = 8 + nCasterLvl;
|
||||||
|
}
|
||||||
|
//Make Fort save
|
||||||
|
if (MySavingThrow(SAVING_THROW_FORT, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay))
|
||||||
|
{
|
||||||
|
nModify /= 2;
|
||||||
|
}
|
||||||
|
//Calculate damage
|
||||||
|
nHurt = nModify;
|
||||||
|
//Set damage effect
|
||||||
|
eKill = EffectDamage(nHurt, DAMAGE_TYPE_POSITIVE);
|
||||||
|
//Apply damage effect and VFX impact
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eKill, oTarget));
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(GetIsReactionTypeFriendly(oTarget) || GetFactionEqual(oTarget))
|
||||||
|
{
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEALING_CIRCLE, FALSE));
|
||||||
|
nHP = d8();
|
||||||
|
//Enter Metamagic conditions
|
||||||
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||||
|
{
|
||||||
|
nHP =8;//Damage is at max
|
||||||
|
}
|
||||||
|
if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||||
|
{
|
||||||
|
nHP = nHP + (nHP/2); //Damage/Healing is +50%
|
||||||
|
}
|
||||||
|
//Set healing effect
|
||||||
|
nHP = nHP + nCasterLvl;
|
||||||
|
// 5.5 heal code.
|
||||||
|
eHeal = EffectHeal(nHP);
|
||||||
|
//Apply heal effect and VFX impact
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Get next target in the shape
|
||||||
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetSpellTargetLocation());
|
||||||
|
}
|
||||||
|
}
|
84
src/_removed/nw_s0_lsdispel.nss
Normal file
84
src/_removed/nw_s0_lsdispel.nss
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Lesser Dispel
|
||||||
|
//:: NW_S0_LsDispel.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Jan 7, 2002
|
||||||
|
//:: Updated On: Oct 20, 2003, Georg Zoeller
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
#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())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// End of Spell Cast Hook
|
||||||
|
|
||||||
|
|
||||||
|
//Declare major variables
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_SONIC);
|
||||||
|
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_NORMAL_20);
|
||||||
|
object oTarget = GetSpellTargetObject();
|
||||||
|
location lLocal = GetSpellTargetLocation();
|
||||||
|
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
// Lesser Magic is capped at caster level 5
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
if(nCasterLevel > 5)
|
||||||
|
{
|
||||||
|
nCasterLevel = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// Targeted Dispel - Dispel all
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
spellsDispelMagic(oTarget, nCasterLevel, eVis, eImpact);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// Area of Effect - Only dispel best effect
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation());
|
||||||
|
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lLocal, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_AREA_OF_EFFECT | OBJECT_TYPE_PLACEABLE);
|
||||||
|
while (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
if(GetObjectType(oTarget) == OBJECT_TYPE_AREA_OF_EFFECT)
|
||||||
|
{
|
||||||
|
//--------------------------------------------------------------
|
||||||
|
// Handle Area of Effects
|
||||||
|
//--------------------------------------------------------------
|
||||||
|
spellsDispelAoE(oTarget, OBJECT_SELF,nCasterLevel);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (GetObjectType(oTarget) == OBJECT_TYPE_PLACEABLE)
|
||||||
|
{
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
spellsDispelMagic(oTarget, nCasterLevel, eVis, eImpact, FALSE);
|
||||||
|
}
|
||||||
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE,lLocal, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_AREA_OF_EFFECT | OBJECT_TYPE_PLACEABLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
116
src/_removed/nw_s0_lsplanar.nss
Normal file
116
src/_removed/nw_s0_lsplanar.nss
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Lesser Planar Binding
|
||||||
|
//:: NW_S0_LsPlanar.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Summons an outsider dependant on alignment, or
|
||||||
|
holds an outsider if the creature fails a save.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: April 12, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||||
|
effect eSummon;
|
||||||
|
effect eGate;
|
||||||
|
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||||
|
effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED);
|
||||||
|
effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD);
|
||||||
|
effect eLink = EffectLinkEffects(eDur, EffectParalyze());
|
||||||
|
eLink = EffectLinkEffects(eLink, eDur2);
|
||||||
|
eLink = EffectLinkEffects(eLink, eDur3);
|
||||||
|
|
||||||
|
object oTarget = GetSpellTargetObject();
|
||||||
|
int nRacial = GetRacialType(oTarget);
|
||||||
|
if(nDuration == 0)
|
||||||
|
{
|
||||||
|
nDuration = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Check for metamagic extend
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
//Check to see if the target is valid
|
||||||
|
if (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
if(!GetIsReactionTypeFriendly(oTarget))
|
||||||
|
{
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_LESSER_PLANAR_BINDING));
|
||||||
|
//Check to make sure the target is an outsider
|
||||||
|
if(nRacial == RACIAL_TYPE_OUTSIDER)
|
||||||
|
{
|
||||||
|
//Make a will save
|
||||||
|
if(!WillSave(oTarget, GetSpellSaveDC()))
|
||||||
|
{
|
||||||
|
//Apply the linked effect
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration/2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(GetLocalInt(OBJECT_SELF, "DW_FLAG_PLANAR") == 0)
|
||||||
|
{
|
||||||
|
//Get the alignment of the caster
|
||||||
|
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
|
||||||
|
float fDelay = 3.0;
|
||||||
|
switch (nAlign)
|
||||||
|
{
|
||||||
|
//Set the summon effect based on alignment
|
||||||
|
case ALIGNMENT_EVIL:
|
||||||
|
{
|
||||||
|
eSummon = EffectSummonCreature("wogsumimp",VFX_FNF_SUMMON_GATE , fDelay);
|
||||||
|
//eGate = EffectVisualEffect(VFX_FNF_SUMMON_GATE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ALIGNMENT_GOOD:
|
||||||
|
{
|
||||||
|
eSummon = EffectSummonCreature("wogsumlanarc", 219 ,fDelay);
|
||||||
|
//eGate = EffectVisualEffect(219);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ALIGNMENT_NEUTRAL:
|
||||||
|
{
|
||||||
|
eSummon = EffectSummonCreature("wogsumredslaad", VFX_FNF_SUMMON_MONSTER_3);
|
||||||
|
//eGate = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3, ,1.0);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//Apply the summon effect and the VFX impact
|
||||||
|
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eGate, GetSpellTargetLocation());
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration));
|
||||||
|
SetLocalInt(OBJECT_SELF, "DW_FLAG_PLANAR", 1);
|
||||||
|
DelayCommand(3.0, DeleteLocalInt(OBJECT_SELF, "DW_FLAG_PLANAR"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
79
src/_removed/nw_s0_lsrestor.nss
Normal file
79
src/_removed/nw_s0_lsrestor.nss
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Lesser Restoration
|
||||||
|
//:: NW_S0_LsRestor.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Removes all supernatural effects related to ability
|
||||||
|
damage, as well as AC, Damage,
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Jan 7, 2002
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
#include "wog_horse_inc"
|
||||||
|
|
||||||
|
// return TRUE if the effect created by a supernatural force and can't be dispelled by spells
|
||||||
|
int GetIsSupernaturalCurse(effect eEff);
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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 = GetSpellTargetObject();
|
||||||
|
effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION_LESSER);
|
||||||
|
effect eBad = GetFirstEffect(oTarget);
|
||||||
|
//Search for negative effects
|
||||||
|
while(GetIsEffectValid(eBad))
|
||||||
|
{
|
||||||
|
if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE)
|
||||||
|
{
|
||||||
|
//Remove effect if it is negative.
|
||||||
|
if(!GetIsSupernaturalCurse(eBad))
|
||||||
|
RemoveEffect(oTarget, eBad);
|
||||||
|
}
|
||||||
|
eBad = GetNextEffect(oTarget);
|
||||||
|
}
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_LESSER_RESTORATION, FALSE));
|
||||||
|
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
int GetIsSupernaturalCurse(effect eEff)
|
||||||
|
{
|
||||||
|
object oCreator = GetEffectCreator(eEff);
|
||||||
|
if(GetTag(oCreator) == "q6e_ShaorisFellTemple")
|
||||||
|
return TRUE;
|
||||||
|
object horseEffects = GetEffectCreatorObject(WOG_HORSE_EFFECT);
|
||||||
|
if (oCreator == horseEffects)
|
||||||
|
return TRUE;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
38
src/_removed/nw_s0_lsspbrch.nss
Normal file
38
src/_removed/nw_s0_lsspbrch.nss
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Lesser Spell Breach
|
||||||
|
//:: NW_S0_LsSpBrch.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Removes 2 spell protection from an enemy mage.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Jan 10, 2002
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
#include "NW_I0_SPELLS"
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
DoSpellBreach(GetSpellTargetObject(), 2, 3, GetSpellId());
|
||||||
|
}
|
113
src/_removed/nw_s0_masheal.nss
Normal file
113
src/_removed/nw_s0_masheal.nss
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
// HCR v3.2.0 - Removed Wild Magic include and function. Added spell hook code.
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//:: FileName: NW_S0_MasHeal
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Heals all friendly targets within 10ft to full unless they are undead. If
|
||||||
|
undead they are reduced to 1d4 HP.
|
||||||
|
*/
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: April 11, 2001
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
#include "NW_I0_SPELLS"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
// If code within the PreSpellCastHook reports FALSE, do not run this spell.
|
||||||
|
if (!X2PreSpellCastCode()) { return; }
|
||||||
|
|
||||||
|
if (GetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Declare major variables.
|
||||||
|
float fDelay;
|
||||||
|
effect eKill;
|
||||||
|
effect eHeal;
|
||||||
|
effect eVis1 = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
||||||
|
effect eVis2 = EffectVisualEffect(VFX_IMP_HEALING_G);
|
||||||
|
int nMHP, nCHP, nHeal, nDam, nMod;
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
|
||||||
|
// Apply VFX area impact.
|
||||||
|
effect eStrike = EffectVisualEffect(VFX_FNF_LOS_HOLY_10);
|
||||||
|
location lLoc = GetSpellTargetLocation();
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStrike, lLoc);
|
||||||
|
|
||||||
|
// Get first target in spell area.
|
||||||
|
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, lLoc);
|
||||||
|
while (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
fDelay = GetRandomDelay();
|
||||||
|
nCHP = GetCurrentHitPoints(oTarget);
|
||||||
|
|
||||||
|
// Check to see if the target is an undead.
|
||||||
|
if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD && !GetIsReactionTypeFriendly(oTarget))
|
||||||
|
{
|
||||||
|
// Fire cast spell at event for the specified target.
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_MASS_HEAL));
|
||||||
|
|
||||||
|
// Make a touch attack.
|
||||||
|
if (TouchAttackRanged(oTarget) > 0)
|
||||||
|
{
|
||||||
|
if (!GetIsReactionTypeFriendly(oTarget))
|
||||||
|
{
|
||||||
|
// Make an SR check.
|
||||||
|
if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay))
|
||||||
|
{
|
||||||
|
// Detemine the damage to inflict to the undead.
|
||||||
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||||
|
{ nMod = 1; }
|
||||||
|
else
|
||||||
|
{ nMod = d4(); }
|
||||||
|
nDam = (nCHP - nMod);
|
||||||
|
if (nDam > 250)
|
||||||
|
{
|
||||||
|
nDam = 250;
|
||||||
|
}
|
||||||
|
// Set the damage effect.
|
||||||
|
eKill = EffectDamage(nDam, DAMAGE_TYPE_POSITIVE);
|
||||||
|
|
||||||
|
// Apply the damage visual and effect.
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis1, oTarget));
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eKill, oTarget));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Make a faction check
|
||||||
|
if (GetIsFriend(oTarget) && GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
|
||||||
|
{
|
||||||
|
// Fire cast spell at event for the specified target.
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_MASS_HEAL, FALSE));
|
||||||
|
|
||||||
|
// Figure out how much to heal.
|
||||||
|
nMHP = GetMaxHitPoints(oTarget);
|
||||||
|
if (nCHP < 0)
|
||||||
|
{ nHeal = (abs(nCHP) + nMHP); }
|
||||||
|
else
|
||||||
|
{ nHeal = (nMHP - nCHP); }
|
||||||
|
if (nHeal > 250)
|
||||||
|
{
|
||||||
|
nHeal = 250;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the heal effect.
|
||||||
|
eHeal = EffectHeal(nHeal);
|
||||||
|
|
||||||
|
// Apply the heal visual and effect.
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget));
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get next target in the spell area.
|
||||||
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, lLoc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
96
src/_removed/nw_s0_morddisj.nss
Normal file
96
src/_removed/nw_s0_morddisj.nss
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Mordenkainen's Disjunction
|
||||||
|
//:: NW_S0_MordDisj.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Massive Dispel Magic and Spell Breach rolled into one
|
||||||
|
If the target is a general area of effect they lose
|
||||||
|
6 spell protections. If it is an area of effect everyone
|
||||||
|
in the area loses 2 spells protections.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Jan 7, 2002
|
||||||
|
//:: Updated On: Oct 20, 2003, Georg Zoeller
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
void StripEffects(int nNumber, object oTarget);
|
||||||
|
#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())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// End of Spell Cast Hook
|
||||||
|
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_ODD);
|
||||||
|
effect eImpact = EffectVisualEffect(VFX_FNF_DISPEL_DISJUNCTION);
|
||||||
|
object oTarget = GetSpellTargetObject();
|
||||||
|
location lLocal = GetSpellTargetLocation();
|
||||||
|
int nCasterLevel= GetCasterLevel(OBJECT_SELF);
|
||||||
|
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
// Mord's is not capped anymore as we can go past level 20 now
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
if(nCasterLevel > 20)
|
||||||
|
{
|
||||||
|
nCasterLevel = 20;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// Targeted Dispel - Dispel all
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
spellsDispelMagic(oTarget, nCasterLevel, eVis, eImpact,TRUE,TRUE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// Area of Effect - Only dispel best effect
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
//Apply the VFX impact and effects
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation());
|
||||||
|
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lLocal, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_AREA_OF_EFFECT | OBJECT_TYPE_PLACEABLE );
|
||||||
|
while (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
if(GetObjectType(oTarget) == OBJECT_TYPE_AREA_OF_EFFECT)
|
||||||
|
{
|
||||||
|
//--------------------------------------------------------------
|
||||||
|
// Handle Area of Effects
|
||||||
|
//--------------------------------------------------------------
|
||||||
|
spellsDispelAoE(oTarget, OBJECT_SELF,nCasterLevel);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (GetObjectType(oTarget) == OBJECT_TYPE_PLACEABLE)
|
||||||
|
{
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
spellsDispelMagic(oTarget, nCasterLevel, eVis, eImpact, FALSE,TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE,lLocal, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_AREA_OF_EFFECT | OBJECT_TYPE_PLACEABLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
18
src/_removed/nw_s0_mordswrd.nss
Normal file
18
src/_removed/nw_s0_mordswrd.nss
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
void main()
|
||||||
|
|
||||||
|
{
|
||||||
|
//Declare major variables
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||||
|
effect eSummon = EffectSummonCreature("mordenkainensswo");
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3);
|
||||||
|
//Make metamagic check for extend
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2;//Duration is +100%
|
||||||
|
}
|
||||||
|
//Apply the VFX impact and summon effect
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration));
|
||||||
|
}
|
109
src/_removed/nw_s0_planar.nss
Normal file
109
src/_removed/nw_s0_planar.nss
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Planar Binding
|
||||||
|
//:: NW_S0_Planar.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Summons an outsider dependant on alignment, or
|
||||||
|
holds an outsider if the creature fails a save.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: April 12, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
#include "NW_I0_SPELLS"
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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 = GetSpellTargetObject();
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||||
|
effect eSummon;
|
||||||
|
effect eGate;
|
||||||
|
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||||
|
effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED);
|
||||||
|
effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD);
|
||||||
|
effect eLink = EffectLinkEffects(eDur, EffectParalyze());
|
||||||
|
eLink = EffectLinkEffects(eLink, eDur2);
|
||||||
|
eLink = EffectLinkEffects(eLink, eDur3);
|
||||||
|
|
||||||
|
int nRacial = GetRacialType(oTarget);
|
||||||
|
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
|
||||||
|
if(nDuration == 0)
|
||||||
|
{
|
||||||
|
nDuration == 1;
|
||||||
|
}
|
||||||
|
//Check for metamagic extend
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
//Check to make sure a target was selected
|
||||||
|
if (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
//Check the racial type of the target
|
||||||
|
if(nRacial == RACIAL_TYPE_OUTSIDER)
|
||||||
|
{
|
||||||
|
if(!GetIsReactionTypeFriendly(oTarget))
|
||||||
|
{
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PLANAR_BINDING));
|
||||||
|
//Make a Will save
|
||||||
|
if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC()+2))
|
||||||
|
{
|
||||||
|
//Apply the linked effect
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration/2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(GetLocalInt(OBJECT_SELF, "DW_FLAG_PLANAR") == 0)
|
||||||
|
{
|
||||||
|
//Set the summon effect based on the alignment of the caster
|
||||||
|
float fDelay = 3.0;
|
||||||
|
switch (nAlign)
|
||||||
|
{
|
||||||
|
case ALIGNMENT_EVIL:
|
||||||
|
eSummon = EffectSummonCreature("wogsumsucubusa01",VFX_FNF_SUMMON_GATE, fDelay);
|
||||||
|
//eGate = EffectVisualEffect(VFX_FNF_SUMMON_GATE);
|
||||||
|
break;
|
||||||
|
case ALIGNMENT_GOOD:
|
||||||
|
eSummon = EffectSummonCreature("chound002", VFX_FNF_SUMMON_CELESTIAL, fDelay);
|
||||||
|
//eGate = EffectVisualEffect(219);
|
||||||
|
break;
|
||||||
|
case ALIGNMENT_NEUTRAL:
|
||||||
|
eSummon = EffectSummonCreature("slaadgrn001",VFX_FNF_SUMMON_MONSTER_3, 1.0);
|
||||||
|
//eGate = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3);
|
||||||
|
//fDelay = 1.0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//Apply the summon effect and VFX impact
|
||||||
|
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eGate, GetSpellTargetLocation());
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration));
|
||||||
|
SetLocalInt(OBJECT_SELF, "DW_FLAG_PLANAR", 1);
|
||||||
|
DelayCommand(3.0, DeleteLocalInt(OBJECT_SELF, "DW_FLAG_PLANAR"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
61
src/_removed/nw_s0_premo.nss
Normal file
61
src/_removed/nw_s0_premo.nss
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Premonition
|
||||||
|
//:: NW_S0_Premo
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Gives the gives the creature touched 30/+5
|
||||||
|
damage reduction. This lasts for 1 hour per
|
||||||
|
caster level or until 10 * Caster Level
|
||||||
|
is dealt to the person.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: March 16 , 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
|
||||||
|
#include "nw_i0_spells"
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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 = GetSpellTargetObject();
|
||||||
|
|
||||||
|
//Declare major variables
|
||||||
|
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nLimit = nDuration * 10;
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
effect eStone = EffectDamageReduction(30, DAMAGE_POWER_PLUS_SIX, nLimit);
|
||||||
|
effect eVis = EffectVisualEffect(VFX_DUR_PROT_PREMONITION);
|
||||||
|
//Link the visual and the damage reduction effect
|
||||||
|
effect eLink = EffectLinkEffects(eStone, eVis);
|
||||||
|
//Enter Metamagic conditions
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PREMONITION, FALSE));
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
|
||||||
|
RemoveEffectsFromSpell(oTarget, SPELL_PREMONITION);
|
||||||
|
//Apply the linked effect
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration));
|
||||||
|
}
|
320
src/_removed/nw_s0_raisdead.nss
Normal file
320
src/_removed/nw_s0_raisdead.nss
Normal file
@ -0,0 +1,320 @@
|
|||||||
|
// HCR 3.03 - 9th September, 2005 - SE
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// nw_s0_raisdead
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Spell script to bring a PC or an NPC back to life with full health.
|
||||||
|
|
||||||
|
In HCR, death has many variants:
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
- Death, Limbo: PC dies and is in due course transferred to limbo. In their
|
||||||
|
place a static Corpse NPC, an "invisible" DeathCorpse placeable and an PCT
|
||||||
|
(Player Corpse Token) item are created. A caster can use the DeathCorpse
|
||||||
|
to revive the PC. Currently if the caster tries to revive a PC before
|
||||||
|
they are transferred to limbo they will be informed that this is not
|
||||||
|
possible. The DeathCorpse can be used to revive a PC who is off-line.
|
||||||
|
|
||||||
|
- Death, No Limbo: PC dies and remains where they fell. At their location
|
||||||
|
the same 3 components are created (Corpse, DeathCorpse and PCT). A caster
|
||||||
|
can use the DeathCorpse to revive the PC or cast directly onto the PC. The
|
||||||
|
DeathCorpse can be used to revive a PC who is off-line.
|
||||||
|
|
||||||
|
- No Death, No Limbo: PC dies and remains where they fell. They have the
|
||||||
|
option to respawn however if they choose to wait for help a caster can
|
||||||
|
cast directly onto the PC to revive them.
|
||||||
|
|
||||||
|
- NPC: NPC dies and remains where they fell (depending on other options). A
|
||||||
|
Caster can cast directly onto the NPC to revive them.
|
||||||
|
|
||||||
|
|
||||||
|
HCR 3.02.05 - Unresolved Issues
|
||||||
|
-------------------------------
|
||||||
|
- NOTFUGUE is used to prevent a PC from being transfered to fugue while in
|
||||||
|
the process of being revived. The flag is checked by a delayed function
|
||||||
|
in hc_on_play_death which otherwise transfers the PC to fugue. However as
|
||||||
|
noted above MOVING pre-empts all attempts to revive a PC who has not yet
|
||||||
|
been transfered to Fugue. NOTFUGUE appears to have been rendered
|
||||||
|
redundant.
|
||||||
|
|
||||||
|
|
||||||
|
HCR 3.02.05 - TODO List
|
||||||
|
-----------------------
|
||||||
|
- replace literals with DEATH and REVIVAL constants when available
|
||||||
|
|
||||||
|
|
||||||
|
Original BW Notes
|
||||||
|
-----------------
|
||||||
|
When cast on placeables, you get a default error message.
|
||||||
|
* You can specify a different message in X2_L_RESURRECT_SPELL_MSG_RESREF
|
||||||
|
* You can turn off the message by setting the variable to -1
|
||||||
|
|
||||||
|
*/
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
HCR 3.02 - 06 September 2005 - Sir Elric
|
||||||
|
- bug fix not checking target is dead
|
||||||
|
|
||||||
|
HCR 3.02 - 05 August 2004 - Sunjammer
|
||||||
|
- modified for use with NPC Corpse system
|
||||||
|
|
||||||
|
HCR 3.02 - 21 March 2004 - Sunjammer
|
||||||
|
- rewritten
|
||||||
|
|
||||||
|
Credits:
|
||||||
|
- Georg Zeoller
|
||||||
|
- Preston Watamaniuk
|
||||||
|
*/
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
#include "hc_inc"
|
||||||
|
#include "hc_inc_dcorpse"
|
||||||
|
#include "hc_inc_npccorpse"
|
||||||
|
#include "hc_inc_rezpen"
|
||||||
|
#include "hc_text_activate"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
#include "wog_speed_inc"
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// MAIN
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
// if code within the PreSpellCastHook reports FALSE, do not run this spell
|
||||||
|
if (X2PreSpellCastCode() == FALSE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
object oMod = GetModule();
|
||||||
|
object oCaster = OBJECT_SELF;
|
||||||
|
object oTarget = GetSpellTargetObject();
|
||||||
|
object oCreature;
|
||||||
|
|
||||||
|
// get system being used
|
||||||
|
int bUsingDeath = GetLocalInt(oMod, "DEATHSYSTEM");
|
||||||
|
int bUsingCorpses = GetLocalInt(oMod, "NPCCORPSE");
|
||||||
|
int bUsingLimbo = GetLocalInt(oMod, "LIMBO");
|
||||||
|
int bUsingRezPenalty = GetLocalInt(oMod, "REZPENALTY");
|
||||||
|
|
||||||
|
// cast at DeathCorpse flag
|
||||||
|
int bCastAtDC = FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Part 1: find the creature to revive
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
int nType = GetObjectType(oTarget);
|
||||||
|
string sTag = GetTag(oTarget);
|
||||||
|
|
||||||
|
if(nType == OBJECT_TYPE_CREATURE && GetIsDead(oTarget))
|
||||||
|
{
|
||||||
|
// target is a PC or an NPC and hence the creature to revive
|
||||||
|
oCreature = oTarget;
|
||||||
|
}
|
||||||
|
else if(nType == OBJECT_TYPE_PLACEABLE)
|
||||||
|
{
|
||||||
|
// target is a DeathCorpse (requires Death System) or other placeable
|
||||||
|
if(bUsingDeath && sTag == "DeathCorpse")
|
||||||
|
{
|
||||||
|
// valid: get creature to revive and raise cast at DC flag
|
||||||
|
oCreature = GetLocalObject(oTarget, "Owner");
|
||||||
|
bCastAtDC = TRUE;
|
||||||
|
}
|
||||||
|
else if(bUsingCorpses && sTag == HC_TAG_NPCCORPSE_CORPSE)
|
||||||
|
{
|
||||||
|
// valid: get creature to revive
|
||||||
|
oCreature = GetLocalObject(oTarget, HC_VAR_NPCCORPSE_BODY);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// invalid: send "can't revive that" message to caster and abort
|
||||||
|
int nStrRef = GetLocalInt(oTarget, "X2_L_RESURRECT_SPELL_MSG_RESREF");
|
||||||
|
if(nStrRef == 0)
|
||||||
|
{
|
||||||
|
nStrRef = 83861;
|
||||||
|
}
|
||||||
|
if(nStrRef != -1)
|
||||||
|
{
|
||||||
|
// inform caster that they cannot revive this object
|
||||||
|
FloatingTextStrRefOnCreature(nStrRef, oCaster);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// target is invalid or an invalid type: abort
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pre-emptive abort if MOVING to LIMBO (see above)
|
||||||
|
if(bUsingLimbo && GetLocalInt(oCreature, "MOVING"))
|
||||||
|
{
|
||||||
|
SendMessageToPC(oCaster, NOTRAISE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Part 2: Revive the creature.
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
int bIsPC = GetIsPC(oCreature);
|
||||||
|
|
||||||
|
// raise/lower NOTFUGUE flag according to location (see above)
|
||||||
|
if(bUsingLimbo && GetTag(GetArea(oCreature)) == "FuguePlane")
|
||||||
|
DeleteLocalInt(oCreature, "NOTFUGUE");
|
||||||
|
else
|
||||||
|
SetLocalInt(oCreature, "NOTFUGUE", TRUE);
|
||||||
|
|
||||||
|
// visual revival
|
||||||
|
effect eVFX = EffectVisualEffect(VFX_IMP_RAISE_DEAD);
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVFX, GetLocation(oTarget));
|
||||||
|
|
||||||
|
// actual revival
|
||||||
|
if(bCastAtDC && GetIsObjectValid(oCreature) == FALSE)
|
||||||
|
{
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
// off-line revival can only occur when casting at a DeathCorpse
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
string sID = GetLocalString(oTarget, "Pkey");
|
||||||
|
|
||||||
|
// inform caster, store revival location
|
||||||
|
SendMessageToPC(oCaster, NOTONLINE);
|
||||||
|
HCRSetPersistentLocation(oMod, "RESLOC" + sID, GetLocation(oCaster));
|
||||||
|
|
||||||
|
// revive the off-line PC
|
||||||
|
if(GetIsDM(oCaster))
|
||||||
|
{
|
||||||
|
// DM provides a Raise Dead
|
||||||
|
// NOTE: this is left seperate to allow different state to be used
|
||||||
|
SPS(oCreature, PWS_PLAYER_STATE_RAISEDEAD);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// PC/NPC provides a Raise Dead
|
||||||
|
SPS(oCreature, PWS_PLAYER_STATE_RAISEDEAD);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
// on-line revival can occur when casting at a DeathCorpse or at a dead
|
||||||
|
// PC or NPC with various combinations of systems and targets
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
// 1: PC, bUsingDeath, bUsingLimbo, bCastAtDC
|
||||||
|
// - PC in fugue (MOVING)
|
||||||
|
// - manually jump to DC
|
||||||
|
// - existing Heal, RemEff & Ress (hc_on_play_death)
|
||||||
|
// - existing kill body, DC & PCT (hc_fugue_exit)
|
||||||
|
// - existing player state change (hc_fugue_exit)
|
||||||
|
// 2: PC, bUsingDeath, bCastAtDC
|
||||||
|
// - PC is anywhere, DC is target
|
||||||
|
// - manually jump to DC
|
||||||
|
// - manually kill body, DC & PCT
|
||||||
|
// - manually player state change
|
||||||
|
// - manually Heal, RemEff & Ress
|
||||||
|
// 3: PC, bUsingDeath
|
||||||
|
// - PC (wait for help) is target
|
||||||
|
// - manually kill body, DC & PCT
|
||||||
|
// - manually player state change
|
||||||
|
// - manually Heal, RemEff & Ress
|
||||||
|
// 4: PC
|
||||||
|
// - PC (wait for help) is target
|
||||||
|
// - manually Heal, RemEff & Ress
|
||||||
|
// 5: NPC
|
||||||
|
// - NPC is target
|
||||||
|
// - manually Heal, RemEff & Ress
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
string sID = GetPlayerID(oCreature);
|
||||||
|
|
||||||
|
// fire cast spell at event for the specified creature
|
||||||
|
SignalEvent(oCreature, EventSpellCastAt(oCaster, SPELL_RESURRECTION, FALSE));
|
||||||
|
|
||||||
|
// start reviving
|
||||||
|
if(bIsPC && bUsingDeath && bUsingLimbo && bCastAtDC)
|
||||||
|
{
|
||||||
|
// 1: requires a jump to the DeathCorpse, everything else is done
|
||||||
|
AssignCommand(oCreature, JumpToObject(oTarget));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 2-3: require the body, DeathCorpse and PCT to be destoyed and for
|
||||||
|
// the PC's player state to be updated
|
||||||
|
if(bIsPC && bUsingDeath)
|
||||||
|
{
|
||||||
|
// 2: requires a jump to the DeathCorpse
|
||||||
|
if(bCastAtDC)
|
||||||
|
{
|
||||||
|
AssignCommand(oCreature, JumpToObject(oTarget));
|
||||||
|
}
|
||||||
|
|
||||||
|
// destroy the cloned NPC corpse
|
||||||
|
DelayCommand(0.5, DestroyCorpse(oCreature));
|
||||||
|
|
||||||
|
// destroy DeathCorpse
|
||||||
|
DelayCommand(0.6, DestroyObject(oTarget));
|
||||||
|
|
||||||
|
// destoy the PlayerCorpseToken
|
||||||
|
object oPCT = GetLocalObject(oMod, "PlayerCorpse" + sID);
|
||||||
|
DestroyObject(oPCT);
|
||||||
|
|
||||||
|
// set PC's player state as alive
|
||||||
|
SPS(oCreature, PWS_PLAYER_STATE_ALIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2-5: require revival, healing and removal of effects
|
||||||
|
effect eRess = EffectResurrection();
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eRess, oCreature);
|
||||||
|
|
||||||
|
HC_SetCurrentHitPoints(oCreature, 1);
|
||||||
|
|
||||||
|
RemoveEffects(oCreature);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// added by Nocturne
|
||||||
|
if ( GetLocalInt(oMod, "SDEATHSYSTEM") )
|
||||||
|
{
|
||||||
|
if (bIsPC )
|
||||||
|
// set PC's player state as alive
|
||||||
|
SPS(oCreature, PWS_PLAYER_STATE_ALIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Part 3: post-revival common stuff and clean up
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if(bIsPC)
|
||||||
|
{
|
||||||
|
if(bUsingRezPenalty && GetIsDM(oCaster) == FALSE)
|
||||||
|
{
|
||||||
|
// apply RezPenalty if appropriate
|
||||||
|
DelayCommand(3.0, hcRezPenalty(oCreature));
|
||||||
|
}
|
||||||
|
|
||||||
|
// force any nearby hostiles to attack
|
||||||
|
DelayCommand(5.0, ExecuteScript("hc_attackpc" , oCreature));
|
||||||
|
|
||||||
|
// lower NOTFUGUE flag
|
||||||
|
DeleteLocalInt(oCreature, "NOTFUGUE");
|
||||||
|
|
||||||
|
// Re-apply racial and armor encumbrance, if they are in effect.
|
||||||
|
if ( GetLocalInt(oMod, "RACIALMOVEMENT") )
|
||||||
|
DelayCommand(1.0, HC_SetRacialMovementRate(oCreature));
|
||||||
|
if ( GetLocalInt(oMod, "ARMORENCUMBER") )
|
||||||
|
DelayCommand(1.1, HC_EffectArmorEncumbrance(oCreature));
|
||||||
|
|
||||||
|
// reapply boots of travel
|
||||||
|
DelayCommand(1.2, ApplyBootEffect(oCreature, FALSE));
|
||||||
|
|
||||||
|
DeleteLocalObject(oCreature, "ONDYING_MOUNT");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// NPC Corpse clean up
|
||||||
|
HC_NPCCorpse_CleanUp(oTarget);
|
||||||
|
DeleteLocalInt(oTarget, "DEAD");
|
||||||
|
}
|
||||||
|
}
|
169
src/_removed/nw_s0_remeffect.nss
Normal file
169
src/_removed/nw_s0_remeffect.nss
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Remove Effects
|
||||||
|
//:: NW_SO_RemEffect
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Takes the place of
|
||||||
|
Remove Disease
|
||||||
|
Neutralize Poison
|
||||||
|
Remove Paralysis
|
||||||
|
Remove Curse
|
||||||
|
Remove Blindness / Deafness
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Jan 8, 2002
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
//#include "NW_I0_SPELLS"
|
||||||
|
#include "X0_I0_SPELLS"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
|
||||||
|
// Allows equipped CURSED items to be unequipped.
|
||||||
|
// This is special handling for a custom flag supported by WoG's version of stopswap.
|
||||||
|
void DecurseItems(object oTarget);
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
//Declare major variables
|
||||||
|
int nSpellID = GetSpellId();
|
||||||
|
object oTarget = GetSpellTargetObject();
|
||||||
|
int nEffect1;
|
||||||
|
int nEffect2;
|
||||||
|
int nEffect3;
|
||||||
|
int bAreaOfEffect = FALSE;
|
||||||
|
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_REMOVE_CONDITION);
|
||||||
|
//Check for which removal spell is being cast.
|
||||||
|
if(nSpellID == SPELL_REMOVE_BLINDNESS_AND_DEAFNESS)
|
||||||
|
{
|
||||||
|
nEffect1 = EFFECT_TYPE_BLINDNESS;
|
||||||
|
nEffect2 = EFFECT_TYPE_DEAF;
|
||||||
|
bAreaOfEffect = TRUE;
|
||||||
|
}
|
||||||
|
else if(nSpellID == SPELL_REMOVE_CURSE)
|
||||||
|
{
|
||||||
|
nEffect1 = EFFECT_TYPE_CURSE;
|
||||||
|
}
|
||||||
|
else if(nSpellID == SPELL_REMOVE_DISEASE || nSpellID == SPELLABILITY_REMOVE_DISEASE)
|
||||||
|
{
|
||||||
|
nEffect1 = EFFECT_TYPE_DISEASE;
|
||||||
|
nEffect2 = EFFECT_TYPE_ABILITY_DECREASE;
|
||||||
|
}
|
||||||
|
else if(nSpellID == SPELL_NEUTRALIZE_POISON)
|
||||||
|
{
|
||||||
|
nEffect1 = EFFECT_TYPE_POISON;
|
||||||
|
nEffect2 = EFFECT_TYPE_DISEASE;
|
||||||
|
nEffect3 = EFFECT_TYPE_ABILITY_DECREASE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * March 2003. Remove blindness and deafness should be an area of effect spell
|
||||||
|
if (bAreaOfEffect == TRUE)
|
||||||
|
{
|
||||||
|
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_HOLY_30);
|
||||||
|
effect eLink;
|
||||||
|
|
||||||
|
spellsGenericAreaOfEffect(OBJECT_SELF, GetSpellTargetLocation(), SHAPE_SPHERE, RADIUS_SIZE_MEDIUM,
|
||||||
|
SPELL_REMOVE_BLINDNESS_AND_DEAFNESS, eImpact, eLink, eVis,
|
||||||
|
DURATION_TYPE_INSTANT, 0.0,
|
||||||
|
SPELL_TARGET_ALLALLIES, FALSE, TRUE, nEffect1, nEffect2);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, nSpellID, FALSE));
|
||||||
|
//Remove effects
|
||||||
|
RemoveSpecificEffect(nEffect1, oTarget);
|
||||||
|
if(nEffect2 != 0)
|
||||||
|
{
|
||||||
|
RemoveSpecificEffect(nEffect2, oTarget);
|
||||||
|
}
|
||||||
|
if(nEffect3 != 0)
|
||||||
|
{
|
||||||
|
RemoveSpecificEffect(nEffect3, oTarget);
|
||||||
|
}
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||||
|
|
||||||
|
|
||||||
|
// Support for CURSED items that cannot be unequipped (WoG & stopswap feature).
|
||||||
|
if ( nSpellID == SPELL_REMOVE_CURSE )
|
||||||
|
DecurseItems(oTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Unequips oItem if it is flagged as unable to be unequipped and nLevel meets
|
||||||
|
// or exceeds the required level for breaking this curse.
|
||||||
|
// Returns nLevel minus the required level if oItem was unequipped.
|
||||||
|
// Otherwise, returns nLevel.
|
||||||
|
int DecurseItem(object oItem, object oPossessor, int nLevel);
|
||||||
|
int DecurseItem(object oItem, object oPossessor, int nLevel)
|
||||||
|
{
|
||||||
|
int nRequired = GetLocalInt(oItem, "CURSED");
|
||||||
|
|
||||||
|
// See if this item gets unequipped.
|
||||||
|
// To be unequipped, the CURSED flag needs to be positive (negative indicates
|
||||||
|
// a curse that is not beaten by the remove curse spell), and nLevel must be
|
||||||
|
// at least the value of this flag.
|
||||||
|
if ( nRequired > 0 && nLevel >= nRequired )
|
||||||
|
{
|
||||||
|
// Unequip.
|
||||||
|
SetLocalInt(oItem, "CURSED", 0);
|
||||||
|
AssignCommand(oPossessor, ActionUnequipItem(oItem));
|
||||||
|
// Restore the flag. (The item is unequipped, but the curse is not broken.)
|
||||||
|
DelayCommand(2.0, SetLocalInt(oItem, "CURSED", nRequired));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
// Nothing going on with this item.
|
||||||
|
nRequired = 0;
|
||||||
|
|
||||||
|
// Done.
|
||||||
|
return nLevel - nRequired;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Allows equipped CURSED items to be unequipped.
|
||||||
|
// This is special handling for a custom flag supported by WoG's version of stopswap.
|
||||||
|
void DecurseItems(object oTarget)
|
||||||
|
{
|
||||||
|
int nSlot;
|
||||||
|
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
|
||||||
|
// Support casting on items as well as creatures.
|
||||||
|
switch ( GetObjectType(oTarget) )
|
||||||
|
{
|
||||||
|
case OBJECT_TYPE_ITEM:
|
||||||
|
// Try to unequip the target item.
|
||||||
|
DecurseItem(oTarget, GetItemPossessor(oTarget), nLevel);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OBJECT_TYPE_CREATURE:
|
||||||
|
// Loop through the target's inventory slots.
|
||||||
|
nSlot = NUM_INVENTORY_SLOTS - 4; // The number of non-creature inventory slots.
|
||||||
|
while ( nSlot-- > 0 && nLevel > 0 )
|
||||||
|
// Try to unequip the item in this slot.
|
||||||
|
nLevel = DecurseItem(GetItemInSlot(nSlot, oTarget), oTarget, nLevel);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
319
src/_removed/nw_s0_resserec.nss
Normal file
319
src/_removed/nw_s0_resserec.nss
Normal file
@ -0,0 +1,319 @@
|
|||||||
|
// HCR 3.03 - 9th September, 2005 - SE
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// nw_s0_ressurec
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Spell script to bring a PC or an NPC back to life with full health.
|
||||||
|
|
||||||
|
In HCR, death has many variants:
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
- Death, Limbo: PC dies and is in due course transferred to limbo. In their
|
||||||
|
place a static Corpse NPC, an "invisible" DeathCorpse placeable and an PCT
|
||||||
|
(Player Corpse Token) item are created. A caster can use the DeathCorpse
|
||||||
|
to revive the PC. Currently if the caster tries to revive a PC before
|
||||||
|
they are transferred to limbo they will be informed that this is not
|
||||||
|
possible. The DeathCorpse can be used to revive a PC who is off-line.
|
||||||
|
|
||||||
|
- Death, No Limbo: PC dies and remains where they fell. At their location
|
||||||
|
the same 3 components are created (Corpse, DeathCorpse and PCT). A caster
|
||||||
|
can use the DeathCorpse to revive the PC or cast directly onto the PC. The
|
||||||
|
DeathCorpse can be used to revive a PC who is off-line.
|
||||||
|
|
||||||
|
- No Death, No Limbo: PC dies and remains where they fell. They have the
|
||||||
|
option to respawn however if they choose to wait for help a caster can
|
||||||
|
cast directly onto the PC to revive them.
|
||||||
|
|
||||||
|
- NPC: NPC dies and remains where they fell (depending on other options). A
|
||||||
|
Caster can cast directly onto the NPC to revive them.
|
||||||
|
|
||||||
|
|
||||||
|
HCR 3.02.05 - Unresolved Issues
|
||||||
|
-------------------------------
|
||||||
|
- NOTFUGUE is used to prevent a PC from being transfered to fugue while in
|
||||||
|
the process of being revived. The flag is checked by a delayed function
|
||||||
|
in hc_on_play_death which otherwise transfers the PC to fugue. However as
|
||||||
|
noted above MOVING pre-empts all attempts to revive a PC who has not yet
|
||||||
|
been transfered to Fugue. NOTFUGUE appears to have been rendered
|
||||||
|
redundant.
|
||||||
|
|
||||||
|
|
||||||
|
HCR 3.02.05 - TODO List
|
||||||
|
-----------------------
|
||||||
|
- replace literals with DEATH and REVIVAL constants when available
|
||||||
|
|
||||||
|
|
||||||
|
Original BW Notes
|
||||||
|
-----------------
|
||||||
|
When cast on placeables, you get a default error message.
|
||||||
|
* You can specify a different message in X2_L_RESURRECT_SPELL_MSG_RESREF
|
||||||
|
* You can turn off the message by setting the variable to -1
|
||||||
|
|
||||||
|
*/
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
HCR 3.02 - 06 September 2005 - Sir Elric
|
||||||
|
- bug fix not checking target is dead
|
||||||
|
|
||||||
|
HCR 3.02 - 05 August 2004 - Sunjammer
|
||||||
|
- modified for use with NPC Corpse system
|
||||||
|
|
||||||
|
HCR 3.02 - 21 March 2004 - Sunjammer
|
||||||
|
- rewritten
|
||||||
|
|
||||||
|
Credits:
|
||||||
|
- Georg Zeoller
|
||||||
|
- Preston Watamaniuk
|
||||||
|
*/
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
#include "hc_inc"
|
||||||
|
#include "hc_inc_dcorpse"
|
||||||
|
#include "hc_inc_npccorpse"
|
||||||
|
#include "hc_inc_rezpen"
|
||||||
|
#include "hc_text_activate"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
#include "wog_speed_inc"
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// MAIN
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
// if code within the PreSpellCastHook reports FALSE, do not run this spell
|
||||||
|
if (X2PreSpellCastCode() == FALSE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
object oMod = GetModule();
|
||||||
|
object oCaster = OBJECT_SELF;
|
||||||
|
object oTarget = GetSpellTargetObject();
|
||||||
|
object oCreature;
|
||||||
|
|
||||||
|
// get system being used
|
||||||
|
int bUsingDeath = GetLocalInt(oMod, "DEATHSYSTEM");
|
||||||
|
int bUsingCorpses = GetLocalInt(oMod, "NPCCORPSE");
|
||||||
|
int bUsingLimbo = GetLocalInt(oMod, "LIMBO");
|
||||||
|
int bUsingRezPenalty = GetLocalInt(oMod, "REZPENALTY");
|
||||||
|
|
||||||
|
// cast at DeathCorpse flag
|
||||||
|
int bCastAtDC = FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Part 1: find the creature to revive
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
int nType = GetObjectType(oTarget);
|
||||||
|
string sTag = GetTag(oTarget);
|
||||||
|
|
||||||
|
if(nType == OBJECT_TYPE_CREATURE && GetIsDead(oTarget))
|
||||||
|
{
|
||||||
|
// target is a PC or an NPC and hence the creature to revive
|
||||||
|
oCreature = oTarget;
|
||||||
|
}
|
||||||
|
else if(nType == OBJECT_TYPE_PLACEABLE)
|
||||||
|
{
|
||||||
|
// target is a DeathCorpse (requires Death System) or other placeable
|
||||||
|
if(bUsingDeath && sTag == "DeathCorpse")
|
||||||
|
{
|
||||||
|
// valid: get creature to revive and raise cast at DC flag
|
||||||
|
oCreature = GetLocalObject(oTarget, "Owner");
|
||||||
|
bCastAtDC = TRUE;
|
||||||
|
}
|
||||||
|
else if(bUsingCorpses && sTag == HC_TAG_NPCCORPSE_CORPSE)
|
||||||
|
{
|
||||||
|
// valid: get creature to revive
|
||||||
|
oCreature = GetLocalObject(oTarget, HC_VAR_NPCCORPSE_BODY);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// invalid: send "can't revive that" message to caster and abort
|
||||||
|
int nStrRef = GetLocalInt(oTarget, "X2_L_RESURRECT_SPELL_MSG_RESREF");
|
||||||
|
if(nStrRef == 0)
|
||||||
|
{
|
||||||
|
nStrRef = 83861;
|
||||||
|
}
|
||||||
|
if(nStrRef != -1)
|
||||||
|
{
|
||||||
|
// inform caster that they cannot revive this object
|
||||||
|
FloatingTextStrRefOnCreature(nStrRef, oCaster);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// target is invalid or an invalid type: abort
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pre-emptive abort if MOVING to LIMBO (see above)
|
||||||
|
if(bUsingLimbo && GetLocalInt(oCreature, "MOVING"))
|
||||||
|
{
|
||||||
|
SendMessageToPC(oCaster, NOTRAISE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Part 2: Revive the creature.
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
int bIsPC = GetIsPC(oCreature);
|
||||||
|
|
||||||
|
// raise/lower NOTFUGUE flag according to location (see above)
|
||||||
|
if(bUsingLimbo && GetTag(GetArea(oCreature)) == "FuguePlane")
|
||||||
|
DeleteLocalInt(oCreature, "NOTFUGUE");
|
||||||
|
else
|
||||||
|
SetLocalInt(oCreature, "NOTFUGUE", TRUE);
|
||||||
|
|
||||||
|
// visual revival
|
||||||
|
effect eVFX = EffectVisualEffect(VFX_IMP_RAISE_DEAD);
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVFX, GetLocation(oTarget));
|
||||||
|
|
||||||
|
// actual revival
|
||||||
|
if(bCastAtDC && GetIsObjectValid(oCreature) == FALSE)
|
||||||
|
{
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
// off-line revival can only occur when casting at a DeathCorpse
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
string sID = GetLocalString(oTarget, "Pkey");
|
||||||
|
|
||||||
|
// inform caster, store revival location
|
||||||
|
SendMessageToPC(oCaster, NOTONLINE);
|
||||||
|
HCRSetPersistentLocation(oMod, "RESLOC" + sID, GetLocation(oCaster));
|
||||||
|
|
||||||
|
// revive the off-line PC
|
||||||
|
if(GetIsDM(oCaster))
|
||||||
|
{
|
||||||
|
// DM provides a True Resserection
|
||||||
|
SPS(oCreature, PWS_PLAYER_STATE_RESTRUE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// PC/NPC provides a Resserection
|
||||||
|
SPS(oCreature, PWS_PLAYER_STATE_RESURRECTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
// on-line revival can occur when casting at a DeathCorpse or at a dead
|
||||||
|
// PC or NPC with various combinations of systems and targets
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
// 1: PC, bUsingDeath, bUsingLimbo, bCastAtDC
|
||||||
|
// - PC in fugue (MOVING)
|
||||||
|
// - manually jump to DC
|
||||||
|
// - existing Heal, RemEff & Ress (hc_on_play_death)
|
||||||
|
// - existing kill body, DC & PCT (hc_fugue_exit)
|
||||||
|
// - existing player state change (hc_fugue_exit)
|
||||||
|
// 2: PC, bUsingDeath, bCastAtDC
|
||||||
|
// - PC is anywhere, DC is target
|
||||||
|
// - manually jump to DC
|
||||||
|
// - manually kill body, DC & PCT
|
||||||
|
// - manually player state change
|
||||||
|
// - manually Heal, RemEff & Ress
|
||||||
|
// 3: PC, bUsingDeath
|
||||||
|
// - PC (wait for help) is target
|
||||||
|
// - manually kill body, DC & PCT
|
||||||
|
// - manually player state change
|
||||||
|
// - manually Heal, RemEff & Ress
|
||||||
|
// 4: PC
|
||||||
|
// - PC (wait for help) is target
|
||||||
|
// - manually Heal, RemEff & Ress
|
||||||
|
// 5: NPC
|
||||||
|
// - NPC is target
|
||||||
|
// - manually Heal, RemEff & Ress
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
string sID = GetPlayerID(oCreature);
|
||||||
|
|
||||||
|
// fire cast spell at event for the specified creature
|
||||||
|
SignalEvent(oCreature, EventSpellCastAt(oCaster, SPELL_RESURRECTION, FALSE));
|
||||||
|
|
||||||
|
// start reviving
|
||||||
|
if(bIsPC && bUsingDeath && bUsingLimbo && bCastAtDC)
|
||||||
|
{
|
||||||
|
// 1: requires a jump to the DeathCorpse, everything else is done
|
||||||
|
AssignCommand(oCreature, JumpToObject(oTarget));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 2-3: require the body, DeathCorpse and PCT to be destoyed
|
||||||
|
// and for the PC's player state to be updated
|
||||||
|
if(bIsPC && bUsingDeath)
|
||||||
|
{
|
||||||
|
// 2: requires a jump to the DeathCorpse
|
||||||
|
if(bCastAtDC)
|
||||||
|
{
|
||||||
|
AssignCommand(oCreature, JumpToObject(oTarget));
|
||||||
|
}
|
||||||
|
|
||||||
|
// destroy the cloned NPC corpse
|
||||||
|
DelayCommand(0.5, DestroyCorpse(oCreature));
|
||||||
|
|
||||||
|
// destroy DeathCorpse
|
||||||
|
DelayCommand(0.6, DestroyObject(oTarget));
|
||||||
|
|
||||||
|
// destoy the PlayerCorpseToken
|
||||||
|
object oPCT = GetLocalObject(oMod, "PlayerCorpse" + sID);
|
||||||
|
DestroyObject(oPCT);
|
||||||
|
|
||||||
|
// set PC's player state as alive
|
||||||
|
SPS(oCreature, PWS_PLAYER_STATE_ALIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2-5: require revival, healing and removal of effects
|
||||||
|
effect eRess = EffectResurrection();
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eRess, oCreature);
|
||||||
|
|
||||||
|
HC_SetCurrentHitPoints(oCreature, GetMaxHitPoints(oCreature));
|
||||||
|
|
||||||
|
RemoveEffects(oCreature);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// added by Nocturne
|
||||||
|
if ( GetLocalInt(oMod, "SDEATHSYSTEM") )
|
||||||
|
{
|
||||||
|
if (bIsPC )
|
||||||
|
// set PC's player state as alive
|
||||||
|
SPS(oCreature, PWS_PLAYER_STATE_ALIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Part 3: post-revival common stuff and clean up
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if(bIsPC)
|
||||||
|
{
|
||||||
|
if(bUsingRezPenalty && GetIsDM(oCaster) == FALSE)
|
||||||
|
{
|
||||||
|
// apply RezPenalty if appropriate
|
||||||
|
DelayCommand(3.0, hcRezPenalty(oCreature));
|
||||||
|
}
|
||||||
|
|
||||||
|
// force any nearby hostiles to attack
|
||||||
|
DelayCommand(5.0, ExecuteScript("hc_attackpc" , oCreature));
|
||||||
|
|
||||||
|
// lower NOTFUGUE flag
|
||||||
|
DeleteLocalInt(oCreature, "NOTFUGUE");
|
||||||
|
|
||||||
|
// Re-apply racial and armor encumbrance, if they are in effect.
|
||||||
|
if ( GetLocalInt(oMod, "RACIALMOVEMENT") )
|
||||||
|
DelayCommand(1.0, HC_SetRacialMovementRate(oCreature));
|
||||||
|
if ( GetLocalInt(oMod, "ARMORENCUMBER") )
|
||||||
|
DelayCommand(1.1, HC_EffectArmorEncumbrance(oCreature));
|
||||||
|
|
||||||
|
// reapply boots of travel
|
||||||
|
DelayCommand(1.2, ApplyBootEffect(oCreature, FALSE));
|
||||||
|
|
||||||
|
DeleteLocalObject(oCreature, "ONDYING_MOUNT");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// NPC Corpse clean up
|
||||||
|
HC_NPCCorpse_CleanUp(oTarget);
|
||||||
|
DeleteLocalInt(oTarget, "DEAD");
|
||||||
|
}
|
||||||
|
}
|
85
src/_removed/nw_s0_restore.nss
Normal file
85
src/_removed/nw_s0_restore.nss
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Restoration
|
||||||
|
//:: NW_S0_Restore.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Removes all negative effects unless they come
|
||||||
|
from Poison, Disease or Curses.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Jan 7, 2002
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
#include "wog_horse_inc"
|
||||||
|
|
||||||
|
// return TRUE if the effect created by a supernatural force and can't be dispelled by spells
|
||||||
|
int GetIsSupernaturalCurse(effect eEff);
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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 = GetSpellTargetObject();
|
||||||
|
effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION);
|
||||||
|
int bValid;
|
||||||
|
|
||||||
|
effect eBad = GetFirstEffect(oTarget);
|
||||||
|
//Search for negative effects
|
||||||
|
while(GetIsEffectValid(eBad))
|
||||||
|
{
|
||||||
|
if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_DEAF ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
|
||||||
|
GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL)
|
||||||
|
{
|
||||||
|
//Remove effect if it is negative.
|
||||||
|
if(!GetIsSupernaturalCurse(eBad))
|
||||||
|
RemoveEffect(oTarget, eBad);
|
||||||
|
}
|
||||||
|
eBad = GetNextEffect(oTarget);
|
||||||
|
}
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RESTORATION, FALSE));
|
||||||
|
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
int GetIsSupernaturalCurse(effect eEff)
|
||||||
|
{
|
||||||
|
object oCreator = GetEffectCreator(eEff);
|
||||||
|
if(GetTag(oCreator) == "q6e_ShaorisFellTemple")
|
||||||
|
return TRUE;
|
||||||
|
object horseEffects = GetEffectCreatorObject(WOG_HORSE_EFFECT);
|
||||||
|
if (oCreator == horseEffects)
|
||||||
|
return TRUE;
|
||||||
|
return FALSE;
|
||||||
|
}
|
153
src/_removed/nw_s0_summon.nss
Normal file
153
src/_removed/nw_s0_summon.nss
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Summon Creature Series
|
||||||
|
//:: NW_S0_Summon
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Carries out the summoning of the appropriate
|
||||||
|
creature for the Summon Monster Series of spells
|
||||||
|
1 to 9
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Jan 8, 2002
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
effect GetSummonEffect(int nSpellID);
|
||||||
|
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
// If code within the PreSpellCastHook reports FALSE, do not run this spell.
|
||||||
|
if (!X2PreSpellCastCode()) { return; }
|
||||||
|
|
||||||
|
// Determine base duration.
|
||||||
|
object oMod = GetModule();
|
||||||
|
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nSummon = GetLocalInt(oMod, "SUMMONTIME");
|
||||||
|
int nDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ nDuration = (((nLevel * nSummon) + 2)+10); }
|
||||||
|
else
|
||||||
|
{ nDuration = 24; }
|
||||||
|
|
||||||
|
// Check for Meta-Magic extend.
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{ nDuration = (nDuration*2); }
|
||||||
|
|
||||||
|
// Apply the VFX impact and summon effect.
|
||||||
|
int nSpellID = GetSpellId();
|
||||||
|
effect eSummon = GetSummonEffect(nSpellID);
|
||||||
|
location lLoc = GetSpellTargetLocation();
|
||||||
|
float fDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ fDuration = RoundsToSeconds(nDuration); }
|
||||||
|
else
|
||||||
|
{ fDuration = HoursToSeconds(nDuration); }
|
||||||
|
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, lLoc, fDuration);
|
||||||
|
}
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
effect GetSummonEffect(int nSpellID)
|
||||||
|
{
|
||||||
|
// Set the visual effect constant based on the spell being cast.
|
||||||
|
int nFNF_Effect;
|
||||||
|
switch ( nSpellID )
|
||||||
|
{
|
||||||
|
case SPELL_SUMMON_CREATURE_I:
|
||||||
|
case SPELL_SUMMON_CREATURE_II:
|
||||||
|
case SPELL_SUMMON_CREATURE_III:
|
||||||
|
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SPELL_SUMMON_CREATURE_IV:
|
||||||
|
case SPELL_SUMMON_CREATURE_V:
|
||||||
|
case SPELL_SUMMON_CREATURE_VI:
|
||||||
|
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SPELL_SUMMON_CREATURE_VII:
|
||||||
|
case SPELL_SUMMON_CREATURE_VIII:
|
||||||
|
case SPELL_SUMMON_CREATURE_IX:
|
||||||
|
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Set the power level based on the spell ID.
|
||||||
|
int nPowerLevel;
|
||||||
|
switch ( nSpellID )
|
||||||
|
{
|
||||||
|
case SPELL_SUMMON_CREATURE_I: nPowerLevel = 1; break;
|
||||||
|
case SPELL_SUMMON_CREATURE_II: nPowerLevel = 2; break;
|
||||||
|
case SPELL_SUMMON_CREATURE_III: nPowerLevel = 3; break;
|
||||||
|
case SPELL_SUMMON_CREATURE_IV: nPowerLevel = 4; break;
|
||||||
|
case SPELL_SUMMON_CREATURE_V: nPowerLevel = 5; break;
|
||||||
|
case SPELL_SUMMON_CREATURE_VI: nPowerLevel = 6; break;
|
||||||
|
case SPELL_SUMMON_CREATURE_VII: nPowerLevel = 7; break;
|
||||||
|
case SPELL_SUMMON_CREATURE_VIII: nPowerLevel = 8; break;
|
||||||
|
case SPELL_SUMMON_CREATURE_IX: nPowerLevel = 9; break;
|
||||||
|
}
|
||||||
|
// Power level is increased for those with the animal domain.
|
||||||
|
if( GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)||GetHasFeat(FEAT_NATURE_SENSE))
|
||||||
|
nPowerLevel++;
|
||||||
|
|
||||||
|
|
||||||
|
// Set the ResRef of the creature to summon based on the power level.
|
||||||
|
string sResRef = "";
|
||||||
|
object oBook = GetItemPossessedBy(OBJECT_SELF, "bookofsummons");
|
||||||
|
|
||||||
|
// Try to get the resref from the Book of Summons.
|
||||||
|
if ( oBook != OBJECT_INVALID )
|
||||||
|
sResRef = GetLocalString(oBook, "summons" + IntToString(nPowerLevel));
|
||||||
|
|
||||||
|
if ( sResRef == "" )
|
||||||
|
// Either no Book of Summons, or variable not set.
|
||||||
|
switch ( nPowerLevel )
|
||||||
|
{
|
||||||
|
case 1: sResRef = "NW_S_BADGERDIRE"; break;
|
||||||
|
case 2: sResRef = "NW_S_BOARDIRE"; break;
|
||||||
|
case 3: sResRef = "NW_S_WOLFDIRE"; break;
|
||||||
|
case 4: sResRef = "wog_spidswrd001"; break;
|
||||||
|
case 5: sResRef = "wog_beardire001"; break;
|
||||||
|
case 6: sResRef = "WoG_DIRETIGER001"; break;
|
||||||
|
case 7: switch ( d4() )
|
||||||
|
{
|
||||||
|
case 1: sResRef = "wog_s_airhuge001"; break;
|
||||||
|
case 2: sResRef = "WoG_S_WATERHUGE"; break;
|
||||||
|
case 3: sResRef = "WoG_S_FIREHUGE"; break;
|
||||||
|
case 4: sResRef = "WoG_S_EARTHHUGE"; break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 8: switch ( d4() )
|
||||||
|
{
|
||||||
|
case 1: sResRef = "wog_airgreat001"; break;
|
||||||
|
case 2: sResRef = "wog_watergreat"; break;
|
||||||
|
case 3: sResRef = "wog_firegreat001"; break;
|
||||||
|
case 4: sResRef = "wog_earthgreat"; break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 9: switch ( d4() )
|
||||||
|
{
|
||||||
|
case 1: sResRef = "WoG_S_AIRELDER"; break;
|
||||||
|
case 2: sResRef = "WoG_S_WATELDER"; break;
|
||||||
|
case 3: sResRef = "WoG_S_FIREELDER"; break;
|
||||||
|
case 4: sResRef = "WoG_S_EARTHELD"; break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 10: switch ( d4() )
|
||||||
|
{
|
||||||
|
case 1: sResRef = "wog_s_airelder01"; break;
|
||||||
|
case 2: sResRef = "wog_s_waterpr001"; break;
|
||||||
|
case 3: sResRef = "wog_s_fireprn001"; break;
|
||||||
|
case 4: sResRef = "WoG_S_EARTHPRINCE"; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return EffectSummonCreature(sResRef, nFNF_Effect);
|
||||||
|
}
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
50
src/_removed/nw_s0_summon1.nss
Normal file
50
src/_removed/nw_s0_summon1.nss
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#include "wm_include"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
if (WildMagicOverride()) { return; }
|
||||||
|
//Declare major variables
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
object oMod = GetModule();
|
||||||
|
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nSummon = GetLocalInt(oMod, "SUMMONTIME");
|
||||||
|
int nDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ nDuration = ((nLevel * nSummon) + 10); }
|
||||||
|
else
|
||||||
|
{ nDuration = 24; }
|
||||||
|
string sResRef = ""; // ResRef of the creature to summon.
|
||||||
|
//Make metamagic check for extend
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
// Check for a Book of Summons
|
||||||
|
object oBook = GetItemPossessedBy(OBJECT_SELF, "bookofsummons");
|
||||||
|
if ( oBook != OBJECT_INVALID )
|
||||||
|
{
|
||||||
|
sResRef = GetLocalString(oBook, "summons1");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sResRef == "" )
|
||||||
|
{
|
||||||
|
// Either no Book of Summons, or variable not set.
|
||||||
|
// Go with the defaults.
|
||||||
|
if ( GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER) )
|
||||||
|
sResRef = "NW_S_BOARDIRE";
|
||||||
|
else
|
||||||
|
sResRef = "NW_S_badgerdire";
|
||||||
|
}
|
||||||
|
|
||||||
|
float fDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ fDuration = RoundsToSeconds(nDuration); }
|
||||||
|
else
|
||||||
|
{ fDuration = HoursToSeconds(nDuration); }
|
||||||
|
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
||||||
|
effect eSummon = EffectSummonCreature(sResRef);
|
||||||
|
//Apply the VFX impact and summon effect
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), fDuration);
|
||||||
|
}
|
53
src/_removed/nw_s0_summon2.nss
Normal file
53
src/_removed/nw_s0_summon2.nss
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Summon Monster II
|
||||||
|
//:: NW_S0_Summon2
|
||||||
|
#include "wm_include"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
if (WildMagicOverride()) { return; }
|
||||||
|
//Declare major variables
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
object oMod = GetModule();
|
||||||
|
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nSummon = GetLocalInt(oMod, "SUMMONTIME");
|
||||||
|
int nDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ nDuration = ((nLevel * nSummon) + 10); }
|
||||||
|
else
|
||||||
|
{ nDuration = 24; }
|
||||||
|
string sResRef = ""; // ResRef of the creature to summon.
|
||||||
|
//Make metamagic check for extend
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
// Check for a Book of Summons
|
||||||
|
object oBook = GetItemPossessedBy(OBJECT_SELF, "bookofsummons");
|
||||||
|
if ( oBook != OBJECT_INVALID )
|
||||||
|
{
|
||||||
|
sResRef = GetLocalString(oBook, "summons2");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sResRef == "" )
|
||||||
|
{
|
||||||
|
// Either no Book of Summons, or variable not set.
|
||||||
|
// Go with the defaults.
|
||||||
|
if ( GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER) )
|
||||||
|
sResRef = "NW_S_WOLFDIRE";
|
||||||
|
else
|
||||||
|
sResRef = "NW_S_BOARDIRE";
|
||||||
|
}
|
||||||
|
|
||||||
|
float fDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ fDuration = RoundsToSeconds(nDuration); }
|
||||||
|
else
|
||||||
|
{ fDuration = HoursToSeconds(nDuration); }
|
||||||
|
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
||||||
|
effect eSummon = EffectSummonCreature(sResRef);
|
||||||
|
//Apply the VFX impact and summon effect
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), fDuration);
|
||||||
|
}
|
66
src/_removed/nw_s0_summon3.nss
Normal file
66
src/_removed/nw_s0_summon3.nss
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Summon Monster III
|
||||||
|
//:: NW_S0_Summon3
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Summons a dire wolf to fight for the character
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Brenon Holmes
|
||||||
|
//:: Created On: Dec 10 , 2000
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Last Updated By: Preston Watamaniuk, On: April 12, 2001
|
||||||
|
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||||
|
|
||||||
|
#include "wm_include"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
if (WildMagicOverride()) { return; }
|
||||||
|
//Declare major variables
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
object oMod = GetModule();
|
||||||
|
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nSummon = GetLocalInt(oMod, "SUMMONTIME");
|
||||||
|
int nDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ nDuration = ((nLevel * nSummon) + 10); }
|
||||||
|
else
|
||||||
|
{ nDuration = 24; }
|
||||||
|
string sResRef = ""; // ResRef of the creature to summon.
|
||||||
|
//Make metamagic check for extend
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
// Check for a Book of Summons
|
||||||
|
object oBook = GetItemPossessedBy(OBJECT_SELF, "bookofsummons");
|
||||||
|
if ( oBook != OBJECT_INVALID )
|
||||||
|
{
|
||||||
|
sResRef = GetLocalString(oBook, "summons3");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sResRef == "" )
|
||||||
|
{
|
||||||
|
// Either no Book of Summons, or variable not set.
|
||||||
|
// Go with the defaults.
|
||||||
|
if ( GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER) )
|
||||||
|
sResRef = "wog_spidswrd001";
|
||||||
|
else
|
||||||
|
sResRef = "NW_S_WOLFDIRE";
|
||||||
|
}
|
||||||
|
|
||||||
|
float fDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ fDuration = RoundsToSeconds(nDuration); }
|
||||||
|
else
|
||||||
|
{ fDuration = HoursToSeconds(nDuration); }
|
||||||
|
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
||||||
|
effect eSummon = EffectSummonCreature(sResRef);
|
||||||
|
//Apply the VFX impact and summon effect
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), fDuration);
|
||||||
|
}
|
||||||
|
|
65
src/_removed/nw_s0_summon4.nss
Normal file
65
src/_removed/nw_s0_summon4.nss
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Summon Monster IV
|
||||||
|
//:: NW_S0_Summon4
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Summons a Sword Spider to fight for the character
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: April 12, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||||
|
|
||||||
|
#include "wm_include"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
if (WildMagicOverride()) { return; }
|
||||||
|
//Declare major variables
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
object oMod = GetModule();
|
||||||
|
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nSummon = GetLocalInt(oMod, "SUMMONTIME");
|
||||||
|
int nDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ nDuration = ((nLevel * nSummon) + 10); }
|
||||||
|
else
|
||||||
|
{ nDuration = 24; }
|
||||||
|
string sResRef = ""; // ResRef of the creature to summon.
|
||||||
|
//Make metamagic check for extend
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
// Check for a Book of Summons
|
||||||
|
object oBook = GetItemPossessedBy(OBJECT_SELF, "bookofsummons");
|
||||||
|
if ( oBook != OBJECT_INVALID )
|
||||||
|
{
|
||||||
|
sResRef = GetLocalString(oBook, "summons4");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sResRef == "" )
|
||||||
|
{
|
||||||
|
// Either no Book of Summons, or variable not set.
|
||||||
|
// Go with the defaults.
|
||||||
|
if ( GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER) )
|
||||||
|
sResRef = "wog_beardire001";
|
||||||
|
else
|
||||||
|
sResRef = "wog_spidswrd001";
|
||||||
|
}
|
||||||
|
|
||||||
|
float fDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ fDuration = RoundsToSeconds(nDuration); }
|
||||||
|
else
|
||||||
|
{ fDuration = HoursToSeconds(nDuration); }
|
||||||
|
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
||||||
|
effect eSummon = EffectSummonCreature(sResRef);
|
||||||
|
//Apply the VFX impact and summon effect
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), fDuration);
|
||||||
|
}
|
||||||
|
|
65
src/_removed/nw_s0_summon5.nss
Normal file
65
src/_removed/nw_s0_summon5.nss
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Summon Monster V
|
||||||
|
//:: NW_S0_Summon5
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Summons a dire bear to fight for the character
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: April 12 , 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||||
|
|
||||||
|
#include "wm_include"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
if (WildMagicOverride()) { return; }
|
||||||
|
//Declare major variables
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
object oMod = GetModule();
|
||||||
|
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nSummon = GetLocalInt(oMod, "SUMMONTIME");
|
||||||
|
int nDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ nDuration = ((nLevel * nSummon) + 10); }
|
||||||
|
else
|
||||||
|
{ nDuration = 24; }
|
||||||
|
string sResRef = ""; // ResRef of the creature to summon.
|
||||||
|
//Make metamagic check for extend
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
// Check for a Book of Summons
|
||||||
|
object oBook = GetItemPossessedBy(OBJECT_SELF, "bookofsummons");
|
||||||
|
if ( oBook != OBJECT_INVALID )
|
||||||
|
{
|
||||||
|
sResRef = GetLocalString(oBook, "summons5");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sResRef == "" )
|
||||||
|
{
|
||||||
|
// Either no Book of Summons, or variable not set.
|
||||||
|
// Go with the defaults.
|
||||||
|
if ( GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER) )
|
||||||
|
sResRef = "WoG_DIRETIGER001";
|
||||||
|
else
|
||||||
|
sResRef = "wog_beardire001";
|
||||||
|
}
|
||||||
|
|
||||||
|
float fDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ fDuration = RoundsToSeconds(nDuration); }
|
||||||
|
else
|
||||||
|
{ fDuration = HoursToSeconds(nDuration); }
|
||||||
|
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
||||||
|
effect eSummon = EffectSummonCreature(sResRef);
|
||||||
|
//Apply the VFX impact and summon effect
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), fDuration);
|
||||||
|
}
|
||||||
|
|
77
src/_removed/nw_s0_summon6.nss
Normal file
77
src/_removed/nw_s0_summon6.nss
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Summon Monster VI
|
||||||
|
//:: NW_S0_Summon6
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "wm_include"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
if (WildMagicOverride()) { return; }
|
||||||
|
//Declare major variables
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
object oMod = GetModule();
|
||||||
|
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nSummon = GetLocalInt(oMod, "SUMMONTIME");
|
||||||
|
int nDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ nDuration = ((nLevel * nSummon) + 10); }
|
||||||
|
else
|
||||||
|
{ nDuration = 24; }
|
||||||
|
string sResRef = ""; // ResRef of the creature to summon.
|
||||||
|
//Make metamagic check for extend
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
// Check for a Book of Summons
|
||||||
|
object oBook = GetItemPossessedBy(OBJECT_SELF, "bookofsummons");
|
||||||
|
if ( oBook != OBJECT_INVALID )
|
||||||
|
{
|
||||||
|
sResRef = GetLocalString(oBook, "summons6");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sResRef == "" )
|
||||||
|
{
|
||||||
|
// Either no Book of Summons, or variable not set.
|
||||||
|
// Go with the defaults.
|
||||||
|
if (GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER))
|
||||||
|
{
|
||||||
|
int nRoll = d4();
|
||||||
|
switch (nRoll)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
sResRef = "wog_s_airhuge001";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
sResRef = "WoG_S_WATERHUGE";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
sResRef = "WoG_S_EARTHHUGE";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
sResRef = "WoG_S_FIREHUGE";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
sResRef = "WoG_DIRETIGER001";
|
||||||
|
}
|
||||||
|
|
||||||
|
float fDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ fDuration = RoundsToSeconds(nDuration); }
|
||||||
|
else
|
||||||
|
{ fDuration = HoursToSeconds(nDuration); }
|
||||||
|
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
||||||
|
effect eSummon = EffectSummonCreature(sResRef);
|
||||||
|
//Apply the VFX impact and summon effect
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), fDuration);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
94
src/_removed/nw_s0_summon7.nss
Normal file
94
src/_removed/nw_s0_summon7.nss
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Summon Monster VII
|
||||||
|
//:: NW_S0_Summon7
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
#include "wm_include"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
if (WildMagicOverride()) { return; }
|
||||||
|
//Declare major variables
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
object oMod = GetModule();
|
||||||
|
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nSummon = GetLocalInt(oMod, "SUMMONTIME");
|
||||||
|
int nDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ nDuration = ((nLevel * nSummon) + 10); }
|
||||||
|
else
|
||||||
|
{ nDuration = 24; }
|
||||||
|
string sResRef = ""; // ResRef of the creature to summon.
|
||||||
|
//Make metamagic check for extend
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
// Check for a Book of Summons
|
||||||
|
object oBook = GetItemPossessedBy(OBJECT_SELF, "bookofsummons");
|
||||||
|
if ( oBook != OBJECT_INVALID )
|
||||||
|
{
|
||||||
|
sResRef = GetLocalString(oBook, "summons7");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sResRef == "" )
|
||||||
|
{
|
||||||
|
// Either no Book of Summons, or variable not set.
|
||||||
|
// Go with the defaults.
|
||||||
|
int nRoll = d4();
|
||||||
|
if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER))
|
||||||
|
{
|
||||||
|
switch (nRoll)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
sResRef = "wog_airgreat001";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
sResRef = "wog_watergreat";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
sResRef = "wog_earthgreat";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
sResRef = "wog_firegreat001";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (nRoll)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
sResRef = "wog_s_airhuge001";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
sResRef = "WoG_S_WATERHUGE";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
sResRef = "WoG_S_EARTHHUGE";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
sResRef = "WoG_S_FIREHUGE";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float fDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ fDuration = RoundsToSeconds(nDuration); }
|
||||||
|
else
|
||||||
|
{ fDuration = HoursToSeconds(nDuration); }
|
||||||
|
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
||||||
|
effect eSummon = EffectSummonCreature(sResRef);
|
||||||
|
//Apply the VFX impact and summon effect
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), fDuration);
|
||||||
|
}
|
||||||
|
|
94
src/_removed/nw_s0_summon8.nss
Normal file
94
src/_removed/nw_s0_summon8.nss
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Summon Monster VIII
|
||||||
|
//:: NW_S0_Summon8
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "wm_include"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
if (WildMagicOverride()) { return; }
|
||||||
|
//Declare major variables
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
object oMod = GetModule();
|
||||||
|
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nSummon = GetLocalInt(oMod, "SUMMONTIME");
|
||||||
|
int nDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ nDuration = ((nLevel * nSummon) + 10); }
|
||||||
|
else
|
||||||
|
{ nDuration = 24; }
|
||||||
|
string sResRef = ""; // ResRef of the creature to summon.
|
||||||
|
//Make metamagic check for extend
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
// Check for a Book of Summons
|
||||||
|
object oBook = GetItemPossessedBy(OBJECT_SELF, "bookofsummons");
|
||||||
|
if ( oBook != OBJECT_INVALID )
|
||||||
|
{
|
||||||
|
sResRef = GetLocalString(oBook, "summons8");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sResRef == "" )
|
||||||
|
{
|
||||||
|
// Either no Book of Summons, or variable not set.
|
||||||
|
// Go with the defaults.
|
||||||
|
int nRoll = d4();
|
||||||
|
if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER))
|
||||||
|
{
|
||||||
|
switch (nRoll)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
sResRef == "WoG_S_AIRELDER";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
sResRef == "WoG_S_WATELDER";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
sResRef == "WoG_S_EARTHELD";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
sResRef == "WoG_S_FIREELDER";
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (nRoll)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
sResRef = "wog_airgreat001";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
sResRef = "wog_watergreat";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
sResRef = "wog_earthgreat";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
sResRef = "wog_firegreat001";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
float fDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ fDuration = RoundsToSeconds(nDuration); }
|
||||||
|
else
|
||||||
|
{ fDuration = HoursToSeconds(nDuration); }
|
||||||
|
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
||||||
|
effect eSummon = EffectSummonCreature(sResRef);
|
||||||
|
//Apply the VFX impact and summon effect
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), fDuration);
|
||||||
|
}
|
95
src/_removed/nw_s0_summon9.nss
Normal file
95
src/_removed/nw_s0_summon9.nss
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Summon Monster IX
|
||||||
|
//:: NW_S0_Summon9
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "wm_include"
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
if (WildMagicOverride()) { return; }
|
||||||
|
//Declare major variables
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
object oMod = GetModule();
|
||||||
|
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nSummon = GetLocalInt(oMod, "SUMMONTIME");
|
||||||
|
int nDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ nDuration = ((nLevel * nSummon) + 10); }
|
||||||
|
else
|
||||||
|
{ nDuration = 24; }
|
||||||
|
string sResRef = ""; // ResRef of the creature to summon.
|
||||||
|
//Make metamagic check for extend
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
// Check for a Book of Summons
|
||||||
|
object oBook = GetItemPossessedBy(OBJECT_SELF, "bookofsummons");
|
||||||
|
if ( oBook != OBJECT_INVALID )
|
||||||
|
{
|
||||||
|
sResRef = GetLocalString(oBook, "summons9");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sResRef == "" )
|
||||||
|
{
|
||||||
|
// Either no Book of Summons, or variable not set.
|
||||||
|
// Go with the defaults.
|
||||||
|
int nRoll = d4();
|
||||||
|
if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER))
|
||||||
|
{
|
||||||
|
switch (nRoll)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
sResRef == "wog_s_airelder01";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
sResRef == "wog_s_waterpr001";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
sResRef == "WoG_S_EARTHPRINCE";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
sResRef == "wog_s_fireprn001";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (nRoll)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
sResRef == "WoG_S_AIRELDER";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
sResRef == "WoG_S_WATELDER";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
sResRef == "WoG_S_EARTHELD";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
sResRef == "WoG_S_FIREELDER";
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
float fDuration;
|
||||||
|
if (nSummon > 0)
|
||||||
|
{ fDuration = RoundsToSeconds(nDuration); }
|
||||||
|
else
|
||||||
|
{ fDuration = HoursToSeconds(nDuration); }
|
||||||
|
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
||||||
|
effect eSummon = EffectSummonCreature(sResRef);
|
||||||
|
//Apply the VFX impact and summon effect
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), fDuration);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
82
src/_removed/nw_s0_summshad.nss
Normal file
82
src/_removed/nw_s0_summshad.nss
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
// HCR v3.2.0 -
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//:: FileName: NW_S0_SummShad
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Spell calls a powerful ally from the shadow plane to battle for the wizard.
|
||||||
|
*/
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Oct 26, 2001
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
void HCR_RemoveSummonMonster(object oAC)
|
||||||
|
{
|
||||||
|
DestroyObject(oAC);
|
||||||
|
string sMsg = "The shadow returns to its home plane, it's ";
|
||||||
|
sMsg += "far too powerful for you to retain control.";
|
||||||
|
SendMessageToPC(OBJECT_SELF, sMsg);
|
||||||
|
}
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
void HCR_CheckSummonStrength()
|
||||||
|
{
|
||||||
|
object oAC = GetAssociate(ASSOCIATE_TYPE_SUMMONED);
|
||||||
|
if (GetIsObjectValid(oAC))
|
||||||
|
{
|
||||||
|
int nAHD = GetHitDice(oAC);
|
||||||
|
int nMCL = GetCasterLevel(OBJECT_SELF);
|
||||||
|
if ((nAHD > (nMCL+4)))
|
||||||
|
{ HCR_RemoveSummonMonster(oAC); }
|
||||||
|
else if (nAHD > nMCL)
|
||||||
|
{
|
||||||
|
float fDelay = IntToFloat(240-((nAHD-nMCL)*60));
|
||||||
|
DelayCommand(fDelay, HCR_RemoveSummonMonster(oAC));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
// If code within the PreSpellCastHook reports FALSE, do not run this spell.
|
||||||
|
if (!X2PreSpellCastCode()) { return; }
|
||||||
|
|
||||||
|
// Declare major variables.
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nLvl = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nDur = nLvl;
|
||||||
|
|
||||||
|
// Check for Meta-Magic extend.
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{ nDur = (nDur*2); }
|
||||||
|
|
||||||
|
// Set the summoned undead to the appropriate template based on the caster level.
|
||||||
|
effect eSum;
|
||||||
|
if (nLvl <= 7)
|
||||||
|
{ eSum = EffectSummonCreature("wogsumshadow002", VFX_FNF_SUMMON_UNDEAD); }
|
||||||
|
else if ((nLvl >= 8) && (nLvl <= 10))
|
||||||
|
{ eSum = EffectSummonCreature("wogsumshmast001", VFX_FNF_SUMMON_UNDEAD); }
|
||||||
|
else if ((nLvl >= 11) && (nLvl <= 14))
|
||||||
|
{ eSum = EffectSummonCreature("wogsumshfiend001", VFX_FNF_SUMMON_UNDEAD); }
|
||||||
|
else if ((nLvl >= 15))
|
||||||
|
{ eSum = EffectSummonCreature("wogsumshlord007", VFX_FNF_SUMMON_UNDEAD); }
|
||||||
|
|
||||||
|
// Apply VFX impact and summon effect.
|
||||||
|
//effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
|
||||||
|
location lLoc = GetSpellTargetLocation();
|
||||||
|
float fDur = HoursToSeconds(nDur);
|
||||||
|
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lLoc);
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSum, lLoc, fDur);
|
||||||
|
|
||||||
|
// If real familiars are used, compare the hitdice of the summoned creature to
|
||||||
|
// the caster of this spell. If the hitdie is too high, remove the summoned
|
||||||
|
// creature from service. Note: This only effects PC's, not NPC's or DM's.
|
||||||
|
if (GetLocalInt(GetModule(), "REALFAM") == TRUE)
|
||||||
|
{
|
||||||
|
if (GetIsPC(OBJECT_SELF) &&
|
||||||
|
!GetIsDM(OBJECT_SELF) &&
|
||||||
|
!GetIsDMPossessed(OBJECT_SELF))
|
||||||
|
{ HCR_CheckSummonStrength(); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
72
src/_removed/nw_s0_summshad02.nss
Normal file
72
src/_removed/nw_s0_summshad02.nss
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
// HCR v3.2.0 -
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//:: FileName: NW_S0_SummShad02
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Spell calls a powerful ally from the shadow plane to battle for the wizard.
|
||||||
|
*/
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Oct 26, 2001
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
void HCR_RemoveSummonMonster(object oAC)
|
||||||
|
{
|
||||||
|
DestroyObject(oAC);
|
||||||
|
string sMsg = "The shadow returns to its home plane, it's ";
|
||||||
|
sMsg += "far too powerful for you to retain control.";
|
||||||
|
SendMessageToPC(OBJECT_SELF, sMsg);
|
||||||
|
}
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
void HCR_CheckSummonStrength()
|
||||||
|
{
|
||||||
|
object oAC = GetAssociate(ASSOCIATE_TYPE_SUMMONED);
|
||||||
|
if (GetIsObjectValid(oAC))
|
||||||
|
{
|
||||||
|
int nAHD = GetHitDice(oAC);
|
||||||
|
int nMCL = GetCasterLevel(OBJECT_SELF);
|
||||||
|
if ((nAHD > (nMCL+4)))
|
||||||
|
{ HCR_RemoveSummonMonster(oAC); }
|
||||||
|
else if (nAHD > nMCL)
|
||||||
|
{
|
||||||
|
float fDelay = IntToFloat(240-((nAHD-nMCL)*60));
|
||||||
|
DelayCommand(fDelay, HCR_RemoveSummonMonster(oAC));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
// If code within the PreSpellCastHook reports FALSE, do not run this spell.
|
||||||
|
if (!X2PreSpellCastCode()) { return; }
|
||||||
|
|
||||||
|
// Set the summoned undead to the appropriate template based on the caster level.
|
||||||
|
effect eSum;
|
||||||
|
int nLvl = GetLevelByClass(CLASS_TYPE_CLERIC);
|
||||||
|
if (nLvl <= 7)
|
||||||
|
{ eSum = EffectSummonCreature("wogsumshadow002", VFX_FNF_SUMMON_UNDEAD); }
|
||||||
|
else if ((nLvl >= 8) && (nLvl <= 10))
|
||||||
|
{ eSum = EffectSummonCreature("wogsumshmast001", VFX_FNF_SUMMON_UNDEAD); }
|
||||||
|
else if ((nLvl >= 11) && (nLvl <= 14))
|
||||||
|
{ eSum = EffectSummonCreature("wogsumshfiend001", VFX_FNF_SUMMON_UNDEAD); }
|
||||||
|
else if ((nLvl >= 15))
|
||||||
|
{ eSum = EffectSummonCreature("wogsumshlord007", VFX_FNF_SUMMON_UNDEAD); }
|
||||||
|
|
||||||
|
// Apply VFX impact and summon effect.
|
||||||
|
location lLoc = GetSpellTargetLocation();
|
||||||
|
float fDur = HoursToSeconds(24);
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSum, lLoc, fDur);
|
||||||
|
|
||||||
|
// If real familiars are used, compare the hitdice of the summoned creature to
|
||||||
|
// the caster of this spell. If the hitdie is too high, remove the summoned
|
||||||
|
// creature from service. Note: This only effects PC's, not NPC's or DM's.
|
||||||
|
if (GetLocalInt(GetModule(), "REALFAM") == TRUE)
|
||||||
|
{
|
||||||
|
if (GetIsPC(OBJECT_SELF) &&
|
||||||
|
!GetIsDM(OBJECT_SELF) &&
|
||||||
|
!GetIsDMPossessed(OBJECT_SELF))
|
||||||
|
{ HCR_CheckSummonStrength(); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
123
src/_removed/nw_s0_sunbeam.nss
Normal file
123
src/_removed/nw_s0_sunbeam.nss
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
|
||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Sunbeam
|
||||||
|
//:: s_Sunbeam.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: All creatures in the beam are struck blind and suffer 3d6 points of damage.
|
||||||
|
//:: (A successful Reflex save negates the blindness and reduces the damage by
|
||||||
|
//:: half.)
|
||||||
|
//:: Creatures to whom sunlight is harmful or unnatural should suffer double
|
||||||
|
//:: damage, but there is no standard way to flag a creature as such.
|
||||||
|
//::
|
||||||
|
//:: Undead creatures caught within the ray are dealt 1d6 points of damage per
|
||||||
|
//:: caster level (maximum 20d6), or half damage if a Reflex save is successful.
|
||||||
|
//:: In addition, the ray should result in the total destruction of undead
|
||||||
|
//:: creatures specifically affected by sunlight if they fail their saves, but
|
||||||
|
//:: this was never implemented not mentioned in the in-game description.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Keith Soleski
|
||||||
|
//:: Created On: Feb 22, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Modified By: Keith Soleski, On: March 21, 2001
|
||||||
|
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Modified By: The Krit
|
||||||
|
//:: Modified On: September 1, 2008
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
#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 spellcast hook.
|
||||||
|
|
||||||
|
// Effect-related variables
|
||||||
|
effect eCreatureVFX = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
||||||
|
effect eAreaVFX = EffectVisualEffect(VFX_FNF_SUNBEAM);
|
||||||
|
effect eDamage; // Set for each target.
|
||||||
|
effect eBlind = EffectLinkEffects(EffectBlindness(),
|
||||||
|
EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE));
|
||||||
|
float fBlindDuration = RoundsToSeconds(3);
|
||||||
|
float fDelay; // Set for each target.
|
||||||
|
|
||||||
|
// Casting-related variables.
|
||||||
|
location lTarget = GetSpellTargetLocation();
|
||||||
|
int nDice;
|
||||||
|
int nDamage;
|
||||||
|
int nOrigDamage;
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
// Caster level is capped at 20.
|
||||||
|
if ( nCasterLevel > 20 )
|
||||||
|
nCasterLevel = 20;
|
||||||
|
// Just in case... undead should never take less damage than others. --TK
|
||||||
|
else if ( nCasterLevel < 3 )
|
||||||
|
nCasterLevel = 3;
|
||||||
|
|
||||||
|
// Apply the grand visual effect.
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eAreaVFX, lTarget);
|
||||||
|
|
||||||
|
// Cycle through the targets in the spell area.
|
||||||
|
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget);
|
||||||
|
while ( GetIsObjectValid(oTarget) )
|
||||||
|
{
|
||||||
|
// Make a faction check
|
||||||
|
if ( spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) )
|
||||||
|
{
|
||||||
|
fDelay = GetRandomDelay(1.0, 2.0);
|
||||||
|
// Fire the "spell cast at" event for the target.
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SUNBEAM));
|
||||||
|
// Make a SR check.
|
||||||
|
if ( !MyResistSpell(OBJECT_SELF, oTarget, 1.0) )
|
||||||
|
{
|
||||||
|
// Check if the target is undead.
|
||||||
|
if ( GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD )
|
||||||
|
// Full damage.
|
||||||
|
nDice = nCasterLevel;
|
||||||
|
else
|
||||||
|
// Limited damage.
|
||||||
|
nDice = 3;
|
||||||
|
|
||||||
|
// Roll the damage (with metamagic checks).
|
||||||
|
if ( nMetaMagic & METAMAGIC_MAXIMIZE )
|
||||||
|
nOrigDamage = 6 * nDice;
|
||||||
|
else
|
||||||
|
nOrigDamage = d6(nDice);
|
||||||
|
// Empower for +50%?
|
||||||
|
if ( nMetaMagic & METAMAGIC_EMPOWER )
|
||||||
|
nOrigDamage += nOrigDamage / 2;
|
||||||
|
|
||||||
|
// Get the adjusted damage due to reflex save and (improved) evasion.
|
||||||
|
nDamage = GetReflexAdjustedDamage(nOrigDamage, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_DIVINE);
|
||||||
|
|
||||||
|
// If the reflex save failed...
|
||||||
|
if ( nDamage == nOrigDamage ||
|
||||||
|
( nDamage > 0 && GetHasFeat(FEAT_IMPROVED_EVASION, oTarget) ) )
|
||||||
|
// ...apply blindness.
|
||||||
|
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBlind, oTarget, fBlindDuration));
|
||||||
|
|
||||||
|
// Apply the damage.
|
||||||
|
if( nDamage > 0 )
|
||||||
|
{
|
||||||
|
eDamage = EffectDamage(nDamage, DAMAGE_TYPE_DIVINE);
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCreatureVFX, oTarget));
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget));
|
||||||
|
}
|
||||||
|
}//if ( not resist spell )
|
||||||
|
}//if ( is target )
|
||||||
|
|
||||||
|
// Get the next target in the spell area.
|
||||||
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget);
|
||||||
|
}//while
|
||||||
|
}
|
169
src/_removed/nw_s0_tenstrans.nss
Normal file
169
src/_removed/nw_s0_tenstrans.nss
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Tensor's Transformation
|
||||||
|
//:: NW_S0_TensTrans.nss
|
||||||
|
//:: Originally hacked all to hell by: BitRaiser
|
||||||
|
//:: Additional refinements by: Alex Moskwa
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
PnP description:
|
||||||
|
Transmutation
|
||||||
|
Level: Sor/Wiz 6
|
||||||
|
Components: V, S, M
|
||||||
|
Casting Time: 1 action
|
||||||
|
Range: Personal
|
||||||
|
Target: The character
|
||||||
|
Duration: 1 round/level
|
||||||
|
The character gains 1d6 temporary hit points per caster level,
|
||||||
|
a +4 natural armor bonus to AC, a +2d4 Strength enhancement bonus,
|
||||||
|
a +2d4 Dexterity enhancement bonus,
|
||||||
|
a +1 base attack bonus per two caster levels
|
||||||
|
(which may give the character an extra attack),
|
||||||
|
a +5 competence bonus on Fortitude saves,
|
||||||
|
and proficiency with all simple and martial weapons.
|
||||||
|
The character attacks opponents with melee or ranged weapons if the character
|
||||||
|
can, even resorting to unarmed attacks if that’s all the character can do.
|
||||||
|
The character can’t cast spells, even from magic items.
|
||||||
|
Material Component: A potion of Strength,
|
||||||
|
which the character drinks (and whose effects are subsumed by the spell effects).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
#include "x2_inc_itemprop"
|
||||||
|
#include "x2_inc_shifter"
|
||||||
|
|
||||||
|
//The following function tells you how many attacks you have given a Base Attack Bonus Value.
|
||||||
|
int Attacks (int BAB)
|
||||||
|
{
|
||||||
|
if (BAB%5)
|
||||||
|
{
|
||||||
|
return BAB/5 + 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return BAB/5;;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// GZ, Nov 3, 2003
|
||||||
|
// There is a serious problems with creatures turning into unstoppable killer
|
||||||
|
// machines when affected by tensors transformation. NPC AI can't handle that
|
||||||
|
// spell anyway, so I added this code to disable the use of Tensors by any
|
||||||
|
// NPC.
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
if (!GetIsPC(OBJECT_SELF))
|
||||||
|
{
|
||||||
|
WriteTimestampedLogEntry(GetName(OBJECT_SELF) + "[" + GetTag (OBJECT_SELF) +"] tried to cast Tensors Transformation. Bad! Remove that spell from the creature");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
//Declare major variables
|
||||||
|
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nHP, nCnt, nDuration, nSTR, nDEX;
|
||||||
|
nDuration = GetCasterLevel(OBJECT_SELF);
|
||||||
|
nSTR = d4(2);
|
||||||
|
nDEX = d4(2);
|
||||||
|
//Determine bonus HP
|
||||||
|
nHP = d6(nLevel);
|
||||||
|
int nMeta = GetMetaMagicFeat();
|
||||||
|
//Metamagic
|
||||||
|
if(nMeta == METAMAGIC_MAXIMIZE)
|
||||||
|
{
|
||||||
|
nHP = nLevel * 6;
|
||||||
|
nSTR = 8;
|
||||||
|
nDEX = 8;
|
||||||
|
}
|
||||||
|
else if(nMeta == METAMAGIC_EMPOWER)
|
||||||
|
{
|
||||||
|
nHP = nHP + (nHP/2);
|
||||||
|
nSTR += nSTR/2;
|
||||||
|
nDEX += nDEX/2;
|
||||||
|
}
|
||||||
|
else if(nMeta == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration *= 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Add temporary proficiency feats to the currently equipped armor for Transformation
|
||||||
|
itemproperty ipAdd1 = ItemPropertyBonusFeat(IP_CONST_FEAT_WEAPON_PROF_SIMPLE);
|
||||||
|
itemproperty ipAdd2 = ItemPropertyBonusFeat(IP_CONST_FEAT_WEAPON_PROF_MARTIAL);
|
||||||
|
object oItem = GetItemInSlot(INVENTORY_SLOT_CHEST, OBJECT_SELF);
|
||||||
|
if (GetIsObjectValid(oItem)) {
|
||||||
|
IPSafeAddItemProperty(oItem, ipAdd1, RoundsToSeconds(nDuration));
|
||||||
|
IPSafeAddItemProperty(oItem, ipAdd2, RoundsToSeconds(nDuration));
|
||||||
|
}
|
||||||
|
|
||||||
|
//The following is the unfortunately rather involved logic it takes to add the proper number of attacks for the spell.
|
||||||
|
int oBAB, nBAB, AddAttacks, n, cLevel;
|
||||||
|
oBAB = GetBaseAttackBonus(OBJECT_SELF);
|
||||||
|
cLevel=0;
|
||||||
|
//Determine if the character is epic and adjust oBAB accordingly to determine # of attacks.
|
||||||
|
for (n = 1;n <= 3; n++) {
|
||||||
|
cLevel += GetLevelByPosition(n,OBJECT_SELF);
|
||||||
|
}
|
||||||
|
if (cLevel > 20) {
|
||||||
|
oBAB -= ((cLevel - 19)/2);
|
||||||
|
}
|
||||||
|
//Figure out your new spell modified BAB and derive how many extra attacks it should give you.
|
||||||
|
nBAB = oBAB + (nLevel/2);
|
||||||
|
if (nBAB>20)
|
||||||
|
AddAttacks = 4 - Attacks(oBAB);
|
||||||
|
else
|
||||||
|
AddAttacks = Attacks(nBAB) - Attacks(oBAB);
|
||||||
|
if (Attacks(oBAB)>=4) {
|
||||||
|
AddAttacks=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Declare effects
|
||||||
|
effect eSpellFail = EffectSpellFailure(100, SPELL_SCHOOL_GENERAL);
|
||||||
|
effect eAttack = EffectAttackIncrease(nLevel/2);
|
||||||
|
effect eSave = EffectSavingThrowIncrease(SAVING_THROW_FORT, 5);
|
||||||
|
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||||
|
effect eSwing = EffectModifyAttacks(AddAttacks);
|
||||||
|
effect eStr = EffectAbilityIncrease(ABILITY_STRENGTH, nSTR);
|
||||||
|
effect eDex = EffectAbilityIncrease(ABILITY_DEXTERITY, nDEX);
|
||||||
|
effect eAC = EffectACIncrease(4,AC_NATURAL_BONUS);
|
||||||
|
effect eDis = EffectSkillIncrease(SKILL_DISCIPLINE, (nLevel + 2));
|
||||||
|
//effect ePoly = EffectPolymorph(POLYMORPH_TYPE_HEURODIS);
|
||||||
|
//Link effects
|
||||||
|
effect eLink = EffectLinkEffects(eAttack, eSave);
|
||||||
|
eLink = EffectLinkEffects(eLink, eDis);
|
||||||
|
eLink = EffectLinkEffects(eLink, eDex);
|
||||||
|
eLink = EffectLinkEffects(eLink, eAC);
|
||||||
|
eLink = EffectLinkEffects(eLink, eStr);
|
||||||
|
eLink = EffectLinkEffects(eLink, eDur);
|
||||||
|
if (AddAttacks > 0)
|
||||||
|
eLink = EffectLinkEffects(eLink, eSwing);
|
||||||
|
eLink = EffectLinkEffects(eLink, eSpellFail);
|
||||||
|
//eLink = EffectLinkEffects(eLink, ePoly);
|
||||||
|
effect eHP = EffectTemporaryHitpoints(nHP);
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_SUPER_HEROISM);
|
||||||
|
//Signal Spell Event
|
||||||
|
SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TENSERS_TRANSFORMATION, FALSE));
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, OBJECT_SELF, RoundsToSeconds(nDuration));
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, RoundsToSeconds(nDuration));
|
||||||
|
|
||||||
|
}
|
83
src/_removed/nw_s0_timestop.nss
Normal file
83
src/_removed/nw_s0_timestop.nss
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Time Stop
|
||||||
|
//:: NW_S0_TimeStop.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
All persons in the Area are frozen in time
|
||||||
|
except the caster.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Jan 7, 2002
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
//#include "wm_include"
|
||||||
|
//void main()
|
||||||
|
//{
|
||||||
|
// if (WildMagicOverride()) { return; }
|
||||||
|
//Declare major variables
|
||||||
|
// location lTarget = GetSpellTargetLocation();
|
||||||
|
// effect eVis = EffectVisualEffect(VFX_FNF_TIME_STOP);
|
||||||
|
// effect eTime = EffectTimeStop();
|
||||||
|
// int nRoll = 1 + d4();
|
||||||
|
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
// SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP, FALSE));
|
||||||
|
|
||||||
|
//Apply the VFX impact and effects
|
||||||
|
// DelayCommand(0.75, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eTime, OBJECT_SELF, 9.0));
|
||||||
|
// ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lTarget);
|
||||||
|
//}
|
||||||
|
|
||||||
|
//GhostNWN - AoE Timestop script
|
||||||
|
#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
|
||||||
|
|
||||||
|
//Declare major variables
|
||||||
|
object oArea = GetArea(OBJECT_SELF);
|
||||||
|
object oLoop = GetFirstObjectInArea(oArea);
|
||||||
|
location lTarget = GetLocation(OBJECT_SELF);
|
||||||
|
effect eVis = EffectVisualEffect(VFX_FNF_TIME_STOP);
|
||||||
|
effect eVis2 =
|
||||||
|
SupernaturalEffect(EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION));
|
||||||
|
effect eHold = SupernaturalEffect(EffectCutsceneParalyze());
|
||||||
|
eHold = EffectLinkEffects(eVis2, eHold);
|
||||||
|
|
||||||
|
while (GetIsObjectValid(oLoop))
|
||||||
|
{
|
||||||
|
if (oLoop != OBJECT_SELF)
|
||||||
|
{
|
||||||
|
if (GetObjectType(oLoop) == OBJECT_TYPE_CREATURE)
|
||||||
|
{
|
||||||
|
DelayCommand(0.75, ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
|
||||||
|
eHold, oLoop, 12.0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
oLoop = GetNextObjectInArea(oArea);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP,
|
||||||
|
FALSE));
|
||||||
|
//Apply the VFX impact and effects
|
||||||
|
DelayCommand(0.75, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis,
|
||||||
|
lTarget));
|
||||||
|
}
|
||||||
|
|
72
src/_removed/nw_s0_truesee.nss
Normal file
72
src/_removed/nw_s0_truesee.nss
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: True Seeing
|
||||||
|
//:: NW_S0_TrueSee.nss
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
The creature can seen all invisible, sanctuared,
|
||||||
|
or hidden opponents.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: [date]
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "x2_inc_spellhook"
|
||||||
|
|
||||||
|
// modifed by DM Nocturne to not be 100% reliable against stealth:
|
||||||
|
// - see invisibility
|
||||||
|
// - ultravision
|
||||||
|
// - spot skill bonus +20
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcast Hook Code
|
||||||
|
Added 2003-06-23 by GeorgZ
|
||||||
|
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
|
||||||
|
int casterLevel = GetCasterLevel(OBJECT_SELF);
|
||||||
|
|
||||||
|
object oTarget = GetSpellTargetObject();
|
||||||
|
effect eVis = EffectVisualEffect(VFX_DUR_MAGICAL_SIGHT);
|
||||||
|
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||||
|
|
||||||
|
//effect eSight = EffectTrueSeeing();
|
||||||
|
//effect eLink = EffectLinkEffects(eVis, eSight);
|
||||||
|
effect seeInvis = EffectSeeInvisible();
|
||||||
|
effect ultraVis = EffectUltravision();
|
||||||
|
effect spotBonus = EffectSkillIncrease(SKILL_SPOT, 20);
|
||||||
|
effect eLink = EffectLinkEffects(eVis, seeInvis);
|
||||||
|
eLink = EffectLinkEffects(eLink, ultraVis);
|
||||||
|
eLink = EffectLinkEffects(eLink, spotBonus);
|
||||||
|
|
||||||
|
eLink = EffectLinkEffects(eLink, eDur);
|
||||||
|
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_TRUE_SEEING, FALSE));
|
||||||
|
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
//Enter Metamagic conditions
|
||||||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||||
|
{
|
||||||
|
nDuration = nDuration *2; //Duration is +100%
|
||||||
|
}
|
||||||
|
//Apply the VFX impact and effects
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration));
|
||||||
|
}
|
||||||
|
|
129
src/_removed/nw_s0_weird.nss
Normal file
129
src/_removed/nw_s0_weird.nss
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Weird
|
||||||
|
//:: NW_S0_Weird
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
All enemies in LOS of the spell must make 2 saves or die.
|
||||||
|
Even IF the fortitude save is succesful, they will still take
|
||||||
|
3d6 damage.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: DEc 14 , 2001
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Last Updated By: Preston Watamaniuk, On: April 10, 2001
|
||||||
|
//:: VFX Pass By: Preston W, On: June 27, 2001
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
|
|
||||||
|
//Declare major variables
|
||||||
|
object oTarget;
|
||||||
|
effect eDam;
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_SONIC);
|
||||||
|
effect eVis2 = EffectVisualEffect(VFX_IMP_DEATH);
|
||||||
|
effect eWeird = EffectVisualEffect(VFX_FNF_WEIRD);
|
||||||
|
effect eAbyss = EffectVisualEffect(VFX_DUR_ANTI_LIGHT_10);
|
||||||
|
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
|
||||||
|
int nMetaMagic = GetMetaMagicFeat();
|
||||||
|
int nDamage;
|
||||||
|
float fDelay;
|
||||||
|
|
||||||
|
//Apply the FNF VFX impact
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eWeird, GetSpellTargetLocation());
|
||||||
|
//Get the first target in the spell area
|
||||||
|
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetSpellTargetLocation(), TRUE);
|
||||||
|
while (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
//Make a faction check
|
||||||
|
if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF))
|
||||||
|
{
|
||||||
|
fDelay = GetRandomDelay(3.0, 4.0);
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_WEIRD));
|
||||||
|
//Make an SR Check
|
||||||
|
if(!MyResistSpell(OBJECT_SELF, oTarget, fDelay))
|
||||||
|
{
|
||||||
|
if ( !GetIsImmune(oTarget, IMMUNITY_TYPE_MIND_SPELLS,OBJECT_SELF) &&
|
||||||
|
!GetIsImmune(oTarget, IMMUNITY_TYPE_FEAR,OBJECT_SELF))
|
||||||
|
{
|
||||||
|
if(GetHitDice(oTarget) >= 4)
|
||||||
|
{
|
||||||
|
//Make a Will save against mind-affecting
|
||||||
|
if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_MIND_SPELLS, OBJECT_SELF, fDelay))
|
||||||
|
{
|
||||||
|
//Make a fortitude save against death
|
||||||
|
if(MySavingThrow(SAVING_THROW_FORT, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_DEATH, OBJECT_SELF, fDelay))
|
||||||
|
{
|
||||||
|
// * I made my saving throw but I still have to take the 3d6 damage
|
||||||
|
|
||||||
|
//Roll damage
|
||||||
|
nDamage = d6(10);
|
||||||
|
//Make metamagic check
|
||||||
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||||
|
{
|
||||||
|
nDamage = 60;
|
||||||
|
}
|
||||||
|
if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||||
|
{
|
||||||
|
nDamage = FloatToInt( IntToFloat(nDamage) * 1.5 );
|
||||||
|
}
|
||||||
|
//Set damage effect
|
||||||
|
eDam = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL);
|
||||||
|
//Apply VFX Impact and damage effect
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// * I failed BOTH saving throws. Now I die.
|
||||||
|
|
||||||
|
|
||||||
|
//Apply VFX impact and death effect
|
||||||
|
//DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget));
|
||||||
|
effect eDeath = EffectDeath();
|
||||||
|
// Need to make this supernatural, so that it ignores death immunity.
|
||||||
|
eDeath = SupernaturalEffect( eDeath );
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget));
|
||||||
|
}
|
||||||
|
} // Will save
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// * I have less than 4HD, I die.
|
||||||
|
|
||||||
|
//Apply VFX impact and death effect
|
||||||
|
//DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget));
|
||||||
|
effect eDeath = EffectDeath();
|
||||||
|
// Need to make this supernatural, so that it ignores death immunity.
|
||||||
|
eDeath = SupernaturalEffect( eDeath );
|
||||||
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Get next target in spell area
|
||||||
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetSpellTargetLocation(), TRUE);
|
||||||
|
}
|
||||||
|
}
|
427
src/_removed/nw_s2_bardsong.nss
Normal file
427
src/_removed/nw_s2_bardsong.nss
Normal file
@ -0,0 +1,427 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Bard Song
|
||||||
|
//:: NW_S2_BardSong
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
This spells applies bonuses to all of the
|
||||||
|
bard's allies within 30ft for a set duration of
|
||||||
|
10 rounds.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Feb 25, 2002
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Last Updated By: Georg Zoeller Oct 1, 2003
|
||||||
|
/*
|
||||||
|
bugfix by Kovi 2002.07.30
|
||||||
|
- loosing temporary hp resulted in loosing the other bonuses
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "tk_song_inc" // -- TK
|
||||||
|
#include "x0_i0_spells"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
if (GetHasEffect(EFFECT_TYPE_SILENCE,OBJECT_SELF))
|
||||||
|
{
|
||||||
|
FloatingTextStrRefOnCreature(85764,OBJECT_SELF); // not useable when silenced
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
string sTag = GetTag(OBJECT_SELF);
|
||||||
|
|
||||||
|
if (sTag == "x0_hen_dee" || sTag == "x2_hen_deekin")
|
||||||
|
{
|
||||||
|
// * Deekin has a chance of singing a doom song
|
||||||
|
// * same effect, better tune
|
||||||
|
if (Random(100) + 1 > 80)
|
||||||
|
{
|
||||||
|
// the Xp2 Deekin knows more than one doom song
|
||||||
|
if (d3() ==1 && sTag == "x2_hen_deekin")
|
||||||
|
{
|
||||||
|
DelayCommand(0.0, PlaySound("vs_nx2deekM_050"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DelayCommand(0.0, PlaySound("vs_nx0deekM_074"));
|
||||||
|
DelayCommand(5.0, PlaySound("vs_nx0deekM_074"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//Declare major variables
|
||||||
|
int nLevel = GetLevelByClass(CLASS_TYPE_BARD);
|
||||||
|
int nRanks = GetSkillRank(SKILL_PERFORM);
|
||||||
|
int nChr = GetAbilityModifier(ABILITY_CHARISMA);
|
||||||
|
int nPerform = nRanks;
|
||||||
|
int nDuration = 10; //+ nChr;
|
||||||
|
|
||||||
|
effect eAttack;
|
||||||
|
effect eDamage;
|
||||||
|
effect eWill;
|
||||||
|
effect eFort;
|
||||||
|
effect eReflex;
|
||||||
|
effect eHP;
|
||||||
|
effect eAC;
|
||||||
|
effect eSkill;
|
||||||
|
|
||||||
|
int nAttack;
|
||||||
|
int nDamage;
|
||||||
|
int nWill;
|
||||||
|
int nFort;
|
||||||
|
int nReflex;
|
||||||
|
int nHP;
|
||||||
|
int nAC;
|
||||||
|
int nSkill;
|
||||||
|
//Check to see if the caster has Lasting Impression and increase duration.
|
||||||
|
if(GetHasFeat(870))
|
||||||
|
{
|
||||||
|
nDuration *= 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
// lingering song
|
||||||
|
if(GetHasFeat(424)) // lingering song
|
||||||
|
{
|
||||||
|
nDuration += 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
//SpeakString("Level: " + IntToString(nLevel) + " Ranks: " + IntToString(nRanks));
|
||||||
|
|
||||||
|
if(nPerform >= 100 && nLevel >= 30)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 3;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 48;
|
||||||
|
nAC = 7;
|
||||||
|
nSkill = 19;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 95 && nLevel >= 29)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 3;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 46;
|
||||||
|
nAC = 6;
|
||||||
|
nSkill = 18;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 90 && nLevel >= 28)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 3;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 44;
|
||||||
|
nAC = 6;
|
||||||
|
nSkill = 17;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 85 && nLevel >= 27)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 3;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 42;
|
||||||
|
nAC = 6;
|
||||||
|
nSkill = 16;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 80 && nLevel >= 26)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 3;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 40;
|
||||||
|
nAC = 6;
|
||||||
|
nSkill = 15;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 75 && nLevel >= 25)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 3;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 38;
|
||||||
|
nAC = 6;
|
||||||
|
nSkill = 14;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 70 && nLevel >= 24)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 3;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 36;
|
||||||
|
nAC = 5;
|
||||||
|
nSkill = 13;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 65 && nLevel >= 23)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 3;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 34;
|
||||||
|
nAC = 5;
|
||||||
|
nSkill = 12;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 60 && nLevel >= 22)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 3;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 32;
|
||||||
|
nAC = 5;
|
||||||
|
nSkill = 11;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 55 && nLevel >= 21)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 3;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 30;
|
||||||
|
nAC = 5;
|
||||||
|
nSkill = 9;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 50 && nLevel >= 20)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 3;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 28;
|
||||||
|
nAC = 5;
|
||||||
|
nSkill = 8;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 45 && nLevel >= 19)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 3;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 26;
|
||||||
|
nAC = 5;
|
||||||
|
nSkill = 7;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 40 && nLevel >= 18)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 3;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 24;
|
||||||
|
nAC = 5;
|
||||||
|
nSkill = 6;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 35 && nLevel >= 17)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 3;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 22;
|
||||||
|
nAC = 5;
|
||||||
|
nSkill = 5;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 30 && nLevel >= 16)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 3;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 20;
|
||||||
|
nAC = 5;
|
||||||
|
nSkill = 4;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 24 && nLevel >= 15)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 2;
|
||||||
|
nFort = 2;
|
||||||
|
nReflex = 2;
|
||||||
|
nHP = 16;
|
||||||
|
nAC = 4;
|
||||||
|
nSkill = 3;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 21 && nLevel >= 14)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 3;
|
||||||
|
nWill = 1;
|
||||||
|
nFort = 1;
|
||||||
|
nReflex = 1;
|
||||||
|
nHP = 16;
|
||||||
|
nAC = 3;
|
||||||
|
nSkill = 2;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 18 && nLevel >= 11)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 2;
|
||||||
|
nWill = 1;
|
||||||
|
nFort = 1;
|
||||||
|
nReflex = 1;
|
||||||
|
nHP = 8;
|
||||||
|
nAC = 2;
|
||||||
|
nSkill = 2;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 15 && nLevel >= 8)
|
||||||
|
{
|
||||||
|
nAttack = 2;
|
||||||
|
nDamage = 2;
|
||||||
|
nWill = 1;
|
||||||
|
nFort = 1;
|
||||||
|
nReflex = 1;
|
||||||
|
nHP = 8;
|
||||||
|
nAC = 0;
|
||||||
|
nSkill = 1;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 12 && nLevel >= 6)
|
||||||
|
{
|
||||||
|
nAttack = 1;
|
||||||
|
nDamage = 2;
|
||||||
|
nWill = 1;
|
||||||
|
nFort = 1;
|
||||||
|
nReflex = 1;
|
||||||
|
nHP = 0;
|
||||||
|
nAC = 0;
|
||||||
|
nSkill = 1;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 9 && nLevel >= 3)
|
||||||
|
{
|
||||||
|
nAttack = 1;
|
||||||
|
nDamage = 2;
|
||||||
|
nWill = 1;
|
||||||
|
nFort = 1;
|
||||||
|
nReflex = 0;
|
||||||
|
nHP = 0;
|
||||||
|
nAC = 0;
|
||||||
|
nSkill = 0;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 6 && nLevel >= 2)
|
||||||
|
{
|
||||||
|
nAttack = 1;
|
||||||
|
nDamage = 1;
|
||||||
|
nWill = 1;
|
||||||
|
nFort = 0;
|
||||||
|
nReflex = 0;
|
||||||
|
nHP = 0;
|
||||||
|
nAC = 0;
|
||||||
|
nSkill = 0;
|
||||||
|
}
|
||||||
|
else if(nPerform >= 3 && nLevel >= 1)
|
||||||
|
{
|
||||||
|
nAttack = 1;
|
||||||
|
nDamage = 1;
|
||||||
|
nWill = 0;
|
||||||
|
nFort = 0;
|
||||||
|
nReflex = 0;
|
||||||
|
nHP = 0;
|
||||||
|
nAC = 0;
|
||||||
|
nSkill = 0;
|
||||||
|
}
|
||||||
|
effect eVis = EffectVisualEffect(VFX_DUR_BARD_SONG);
|
||||||
|
|
||||||
|
eAttack = EffectAttackIncrease(nAttack);
|
||||||
|
eDamage = EffectDamageIncrease(nDamage, DAMAGE_TYPE_BLUDGEONING);
|
||||||
|
effect eLink = EffectLinkEffects(eAttack, eDamage);
|
||||||
|
|
||||||
|
if(nWill > 0)
|
||||||
|
{
|
||||||
|
eWill = EffectSavingThrowIncrease(SAVING_THROW_WILL, nWill);
|
||||||
|
eLink = EffectLinkEffects(eLink, eWill);
|
||||||
|
}
|
||||||
|
if(nFort > 0)
|
||||||
|
{
|
||||||
|
eFort = EffectSavingThrowIncrease(SAVING_THROW_FORT, nFort);
|
||||||
|
eLink = EffectLinkEffects(eLink, eFort);
|
||||||
|
}
|
||||||
|
if(nReflex > 0)
|
||||||
|
{
|
||||||
|
eReflex = EffectSavingThrowIncrease(SAVING_THROW_REFLEX, nReflex);
|
||||||
|
eLink = EffectLinkEffects(eLink, eReflex);
|
||||||
|
}
|
||||||
|
if(nHP > 0)
|
||||||
|
{
|
||||||
|
//SpeakString("HP Bonus " + IntToString(nHP));
|
||||||
|
eHP = EffectTemporaryHitpoints(nHP);
|
||||||
|
// eLink = EffectLinkEffects(eLink, eHP);
|
||||||
|
}
|
||||||
|
if(nAC > 0)
|
||||||
|
{
|
||||||
|
eAC = EffectACIncrease(nAC, AC_DODGE_BONUS);
|
||||||
|
eLink = EffectLinkEffects(eLink, eAC);
|
||||||
|
}
|
||||||
|
if(nSkill > 0)
|
||||||
|
{
|
||||||
|
eSkill = EffectSkillIncrease(SKILL_ALL_SKILLS, nSkill);
|
||||||
|
eLink = EffectLinkEffects(eLink, eSkill);
|
||||||
|
}
|
||||||
|
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||||
|
eLink = EffectLinkEffects(eLink, eDur);
|
||||||
|
|
||||||
|
effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_SONIC);
|
||||||
|
effect eFNF = EffectVisualEffect(VFX_FNF_LOS_NORMAL_30);
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFNF, GetLocation(OBJECT_SELF));
|
||||||
|
|
||||||
|
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||||
|
|
||||||
|
eHP = ExtraordinaryEffect(eHP);
|
||||||
|
eLink = ExtraordinaryEffect(eLink);
|
||||||
|
|
||||||
|
while(GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
if(!GetHasFeatEffect(FEAT_BARD_SONGS, oTarget) && !GetHasSpellEffect(GetSpellId(),oTarget))
|
||||||
|
{
|
||||||
|
// * GZ Oct 2003: If we are silenced, we can not benefit from bard song
|
||||||
|
if (!GetHasEffect(EFFECT_TYPE_SILENCE,oTarget) && !GetHasEffect(EFFECT_TYPE_DEAF,oTarget))
|
||||||
|
{
|
||||||
|
if(oTarget == OBJECT_SELF)
|
||||||
|
{
|
||||||
|
effect eLinkBard = EffectLinkEffects(eLink, eVis);
|
||||||
|
eLinkBard = ExtraordinaryEffect(eLinkBard);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLinkBard, oTarget, RoundsToSeconds(nDuration));
|
||||||
|
if (nHP > 0)
|
||||||
|
{
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, oTarget, RoundsToSeconds(nDuration));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(GetIsFriend(oTarget))
|
||||||
|
{
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
|
||||||
|
if (nHP > 0)
|
||||||
|
{
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, oTarget, RoundsToSeconds(nDuration));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sing lyrics, if any. -- TK
|
||||||
|
StartLyrics(nDuration);
|
||||||
|
}
|
||||||
|
|
39
src/_removed/nw_s2_familiar.nss
Normal file
39
src/_removed/nw_s2_familiar.nss
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
// HCR v3.2.0 - Re-Added REALFAM code.
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//:: FileName: NW_S2_Familiar
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
This spell summons an Arcane caster's Familiar.
|
||||||
|
*/
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
//:: Created By: Preston Watamaniuk
|
||||||
|
//:: Created On: Sept 27, 2001
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
#include "HC_Inc"
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
object oMod = GetModule();
|
||||||
|
if (GetLocalInt(oMod, "REALFAM"))
|
||||||
|
{
|
||||||
|
if (GetIsPC(OBJECT_SELF) &&
|
||||||
|
!GetIsDM(OBJECT_SELF) &&
|
||||||
|
!GetIsDMPossessed(OBJECT_SELF))
|
||||||
|
{
|
||||||
|
string sID = GetPlayerID(OBJECT_SELF);
|
||||||
|
if (GetLocalInt(oMod, "FAMDIED" + sID))
|
||||||
|
{
|
||||||
|
if (GetGold(OBJECT_SELF) < 100)
|
||||||
|
{
|
||||||
|
string sMsg = "You need 100 gp's to pay for the materials.";
|
||||||
|
SendMessageToPC(OBJECT_SELF, sMsg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
TakeGoldFromCreature(100, OBJECT_SELF, TRUE);
|
||||||
|
DeleteLocalInt(oMod, "FAMDIED" + sID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SummonFamiliar();
|
||||||
|
}
|
||||||
|
//::////////////////////////////////////////////////////////////////////////////
|
949
src/_removed/nw_s2_turndead.nss
Normal file
949
src/_removed/nw_s2_turndead.nss
Normal file
@ -0,0 +1,949 @@
|
|||||||
|
//::///////////////////////////////////////////////
|
||||||
|
//:: Turn Undead
|
||||||
|
//:: NW_S2_TurnDead
|
||||||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
/*
|
||||||
|
Checks domain powers and class to determine
|
||||||
|
the proper turning abilities of the casting
|
||||||
|
character.
|
||||||
|
|
||||||
|
Changelog:
|
||||||
|
Note: The first section contains a summary of changes made. The second
|
||||||
|
section explains in greater detail about the changes.
|
||||||
|
|
||||||
|
Modified by : Slynderdale
|
||||||
|
on : April 15 , 2005
|
||||||
|
Changes:
|
||||||
|
- Added Rebuke Undead
|
||||||
|
- Turning is now a Supernatural effect
|
||||||
|
- Turning now skips creatures that were already turned/rebuked
|
||||||
|
- Turn undead checks both the creatures racial type and class
|
||||||
|
- Turned creatures have their movement speed decreased by half
|
||||||
|
- Cleric, Paladin, Blackguard and Champion of Torm levels now stack
|
||||||
|
- Turn undead Knocks over valid creatures
|
||||||
|
|
||||||
|
Modified by : Slynderdale
|
||||||
|
on : April 21 , 2005
|
||||||
|
Changes:
|
||||||
|
- Added function HasTurnedEffect
|
||||||
|
- Added function GetTurnModifier
|
||||||
|
- Added function GetIsAssociate
|
||||||
|
- Magical beasts are now turnable/rebukable
|
||||||
|
|
||||||
|
Modified by : Slynderdale
|
||||||
|
on : April 26 , 2005
|
||||||
|
Changes:
|
||||||
|
- Added more to the Turn Modifier function and Fixed it up a bit
|
||||||
|
- Fixed some errors and bugs in the code and made some code improvments
|
||||||
|
|
||||||
|
Modified by : Slynderdale
|
||||||
|
on : May 1 , 2005
|
||||||
|
Changes:
|
||||||
|
- Added support for the War Domain, Turned/Rebuked creatures will take divine damage.
|
||||||
|
- Added support for the Travel domain which adds to the turning range.
|
||||||
|
- Added more to the Trickery domain, Added rolling a lucky 7 or unlucky 13.
|
||||||
|
- Construct turn damage was changed from d3(nTurnLevel+nHDModifier) to d3(nTurnLevel)+nHDModifier
|
||||||
|
- Fixed some errors and bugs in the code and made some code improvments
|
||||||
|
|
||||||
|
Modified by : Slynderdale
|
||||||
|
on : June 3 , 2005
|
||||||
|
Changes:
|
||||||
|
- Added support for local integers on creatures
|
||||||
|
- Added function GetRacialCheck which now handles the racial checkings
|
||||||
|
- Fixed some errors and bugs in the code and made some code improvments
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
More Info:
|
||||||
|
- Added Rebuke Undead
|
||||||
|
Evil aligned players or those with the REBUKE_UNDEAD local int can
|
||||||
|
now rebuke undead. When you rebuke undead, instead of turning a creature,
|
||||||
|
you paralyze them. If your rebuking level is high enough, you have a chance
|
||||||
|
of dominating them and having them under your control for a duration.
|
||||||
|
|
||||||
|
- Turning is now a Supernatural effect
|
||||||
|
Made turning a Supernatural effect so the turning effects can not be dispelled.
|
||||||
|
|
||||||
|
- Turning now skips creatures that were already turned/rebuked
|
||||||
|
Turned creatures will not count against your turning count.
|
||||||
|
|
||||||
|
- Turn undead checks both the creatures racial type and class
|
||||||
|
If a creature was created and have an incorrectly set race but
|
||||||
|
have levels like Undead, it will be considered undead.
|
||||||
|
|
||||||
|
- Turned creatures have their movement speed decreased by half
|
||||||
|
If you're attacking something with a fear effect in NWN, the game
|
||||||
|
tends to move you close to the target, then stop you, then move the creature away,
|
||||||
|
so you never actually get to ATTACK it even if you're hasted and it's a zombie.
|
||||||
|
Even worse is that creatures that are knocked down magically spring up and run away,
|
||||||
|
and it's just SO annoying.
|
||||||
|
|
||||||
|
- Cleric, Paladin, Blackguard and Champion of Torm levels now stack
|
||||||
|
The turning level isn't decided on the class with the highest level.
|
||||||
|
Cleric levels now stack with Blackguard and Paladin levels but Paladin
|
||||||
|
and Blackguard levels don't stack with each other.
|
||||||
|
|
||||||
|
- Turn undead Knocks over valid creatures
|
||||||
|
This fixes a bug where sometimes turned/Rebuked undead still attack.
|
||||||
|
The other reason behind this is when you rebuke/turn undead. You
|
||||||
|
release a tremendous amount of (un)holy energy. This energy causing those
|
||||||
|
affected to be knocked off their feet.
|
||||||
|
|
||||||
|
- Added checks to see if a creature is turnable
|
||||||
|
HasTurnedEffect is called to check if the creature can be turned.
|
||||||
|
It checks to see if the creature is already turned, paralized,
|
||||||
|
petrified, frightened, stunned or dominated. This way creatures
|
||||||
|
who can't or shouldn't be turned won't use up HD turn counts.
|
||||||
|
|
||||||
|
- Added Associate Checking
|
||||||
|
I added a check so rebuke undead will not try to add associates
|
||||||
|
under your command, instead they will be paralized. Also when turning
|
||||||
|
a summoned creature, it will show an unsummon special effect.
|
||||||
|
|
||||||
|
- Magical beasts are now turnable/rebukable
|
||||||
|
If you have the magic domain, you can turn/rebuke magical beasts now.
|
||||||
|
|
||||||
|
- Several domains and feats affect your turn modifier
|
||||||
|
GetTurnModifier is used to get the modifier for the current target. The bigger the
|
||||||
|
modifier the better the chance you will turn the target and the longer the effects will last.
|
||||||
|
The modifier also effects the damage you do to constructs if you have the destruction domain.
|
||||||
|
This modifier take into account several domains that don't really get much use and also
|
||||||
|
focuses in necromancy adds to the modifier against undead. Also various domains and things
|
||||||
|
may subtract from your modifier.
|
||||||
|
*Evil Domain: If you try to turn a creature with an good alignment and you
|
||||||
|
have the evil domain power, you gain a +1 modifier. Unless you also have the
|
||||||
|
good domain, -1 is subtracted from the modifier versus evil.
|
||||||
|
*Good Domain: If you try to turn a creature with a evil alignment and you
|
||||||
|
have the good domain power, you gain a +1 modifier. Unless you also have the
|
||||||
|
good domain, -1 is subtracted from the modifier versus good.
|
||||||
|
*Sun Domain: You gain a +1 modifier to all checks.
|
||||||
|
*Knowledge Domain: You gain a modifier that is dependant on your wisdom bonus.
|
||||||
|
You gain one third of your wisdom bonus as a modifier. If your wisdom bonus is
|
||||||
|
equal to or smaller then 0, then the current wisdom bonus - 2 is subtracted
|
||||||
|
from the modifier.
|
||||||
|
*Strength Domain: Checks your strength bonus versus the targets strength bonus.
|
||||||
|
If your strength bonus is 2 or more times higher, then you gain +1 to the modifier.
|
||||||
|
If your strength is higher, then you gain +1 to the modifer.
|
||||||
|
If the targets strength is 2 or more times higher, then you lose -1 from the modifier.
|
||||||
|
If the targets strength is higher, then you lose -1 from the modifer.
|
||||||
|
These stack for a total of +2 or -2 to your modifier.
|
||||||
|
*Water/Fire/Air/Earth Domain: You gain +1 to your modifier versus the corresponding
|
||||||
|
elemental of the domain you have.
|
||||||
|
*Trickery Domain: The trickery can have a negative and positive effect to our modifier,
|
||||||
|
Theres a 50% chance it will have a positive effect and a 50% it will have a negative effect.
|
||||||
|
If you also have the luck domain, it becomes 80% for a positive effect and 20% for a negative
|
||||||
|
effect. If its positive, you gain 1-3 to your modifier. If its negative, you lose 1-3 from
|
||||||
|
your modifier. Also if it rolls a lucky 7 or a unluck 13, the results of the modifier are
|
||||||
|
doubled. So if you had a negative effect of -3 and roll an unlucky 13, it will become -6.
|
||||||
|
The same goes for the positive modifier with rolling a 7,
|
||||||
|
*Death Domain: You gain a +1 modifier versus undead.
|
||||||
|
Focuses in necromancy will add to your modifier against those considered undead.
|
||||||
|
*Spell Focus Necromancy: +2
|
||||||
|
*Greater Spell Focus Necromancy: +2
|
||||||
|
*Epic Spell Focus Necromancy: +2
|
||||||
|
The bonuses from the focuses stack for a total of +6 if you have all three.
|
||||||
|
The higher the modifier the easier it is to turn the creature. Also the
|
||||||
|
higher the modifier, the longer the rebuke/turn effects will last on the target.
|
||||||
|
The current duration is (nClassLevel + 5)*nTimeModifier rounds.
|
||||||
|
nClassLevel is the number of levels of cleric, paladin/blackguard and CoT you have.
|
||||||
|
nTimeModifier defaults to 1, so the duration is normal, but if your modifier is greater
|
||||||
|
then 1, the nTimeModifier is set to the current modifier.
|
||||||
|
The modifier is added to the dice roll when damaging constructs if you have the destruction
|
||||||
|
domain, so the damage is now d3(nTurnLevel)+nHDModifier.
|
||||||
|
|
||||||
|
- War Domain damages Turned/Rebuked creatures
|
||||||
|
If you have the War Domain and successfuly turn or rebuke a creature, they will take a small
|
||||||
|
ammount of Divine damage. This doesn't stack with the magic damage that is already done to
|
||||||
|
constructs. The damage done is d6(3)+nHDModifier.
|
||||||
|
|
||||||
|
- Travel Domain Extends Turning Range
|
||||||
|
Originally the turning range is 20m (65ft) but if you have the Travel Doamin this changes to
|
||||||
|
25m (80ft), adding another 5m tot he original distance. This way you can turn creatures which
|
||||||
|
are farther away then usual.
|
||||||
|
|
||||||
|
- Added support for local integers on creatures
|
||||||
|
Added support for several local integers on the creatures so builders have greater control how a
|
||||||
|
creature is turned or if they are immune to turning.
|
||||||
|
TurnImmunity: If TurnImmunity is set to True, the creature can not be turned.
|
||||||
|
IsTurnable: Is IsTurnable is set to true, the creatue can be turned no matter what it might be.
|
||||||
|
IsUndead: If IsUndead is set, the creature will be treated as an undead when turned.
|
||||||
|
IsVermin: If IsVermin is set, the creature will be treated as a vermin when turned.
|
||||||
|
IsElemental: If IsElemental is set, the creature will be treated as an elemenal when turned.
|
||||||
|
IsConstruct: If IsConstruct is set, the creature will be treated as a construct when turned.
|
||||||
|
IsOutsider: If IsOutsider is set, the creature will be treated as an outsider when turned.
|
||||||
|
IsMagicalBeast: If IsMagicalBeast is set, the creature will be treated as a magical beast when turned.
|
||||||
|
TurnHDOverride: If TurnHDOverride is set to anything greater then 0, the value set for TurnHDOverride
|
||||||
|
will override the creatures current HD and be used instead of their default one.
|
||||||
|
The new value will still be affected by the turn modifier as well.
|
||||||
|
You can specify is a creature can be turned with IsTurnable, if so, the creature can be turned like everything
|
||||||
|
else but it won't have a race type like undead or so on unless it has thatr ace already. The creature will have HD
|
||||||
|
equal to their HitDice plus their turn resistance. Also anyone with Turn Undead will be able to turn them without
|
||||||
|
any special feats or skills.
|
||||||
|
If you want to make a creature be set as turnable but give it a race or use a race check, use the more precise ones
|
||||||
|
such as IsOutsider. The creature will then be considered an outsider while being turned, using the outsider HD
|
||||||
|
calculations and also check if the player can turn outsiders.
|
||||||
|
**Note: IsTurnable overrides the other settings except for TurnImmunity. So if you have IsTurnable and IsOutsider, the
|
||||||
|
creature can still be turned even if the player can't turn outsiders.
|
||||||
|
|
||||||
|
- Added function GetRacialCheck which now handles the racial checkings
|
||||||
|
This function compares the given race against the targets race. This checks against the targets
|
||||||
|
racial type, if they have the racial class or if they have the racial local interget override set.
|
||||||
|
If true, it returns True, if False, it returns false. The first parameter is the race to check for
|
||||||
|
such as RACIAL_TYPE_UNDEAD. The second parameter is optional and specifies the target. The default
|
||||||
|
is OBJECT_SELF which is the PC using the script.
|
||||||
|
*/
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: Created By: Nov 2, 2001
|
||||||
|
//:: Created On: Preston Watamaniuk
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
//:: MODIFIED MARCH 5 2003 for Blackguards
|
||||||
|
//:://////////////////////////////////////////////
|
||||||
|
#include "NW_I0_GENERIC"
|
||||||
|
|
||||||
|
//This function is used to do a racial check against the target.
|
||||||
|
//This checks the creatures race, classes and also local integers that specify the race
|
||||||
|
int GetRacialCheck(int nRace, object oTarget = OBJECT_SELF)
|
||||||
|
{
|
||||||
|
if (!GetIsObjectValid(oTarget))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
int nRacial;
|
||||||
|
int nClassUndead, nClassVermin, nClassElemental, nClassConstruct, nClassOutsider, nClassMagicalBeast;
|
||||||
|
int nIsUndead, nIsVermin, nIsElemental, nIsConstruct, nIsOutsider, nIsMagicalBeast;
|
||||||
|
|
||||||
|
nRacial = GetRacialType(oTarget);
|
||||||
|
nClassUndead = GetLevelByClass(CLASS_TYPE_UNDEAD,oTarget);
|
||||||
|
nClassVermin = GetLevelByClass(CLASS_TYPE_VERMIN,oTarget);
|
||||||
|
nClassElemental = GetLevelByClass(CLASS_TYPE_ELEMENTAL,oTarget);
|
||||||
|
nClassConstruct = GetLevelByClass(CLASS_TYPE_CONSTRUCT,oTarget);
|
||||||
|
nClassOutsider = GetLevelByClass(CLASS_TYPE_OUTSIDER,oTarget);
|
||||||
|
nClassMagicalBeast = GetLevelByClass(CLASS_TYPE_MAGICAL_BEAST,oTarget);
|
||||||
|
|
||||||
|
nIsUndead=FALSE; nIsVermin=FALSE; nIsElemental=FALSE; nIsConstruct=FALSE; nIsOutsider=FALSE; nIsMagicalBeast=FALSE;
|
||||||
|
if(nRacial == RACIAL_TYPE_UNDEAD || nClassUndead > 0 || GetLocalInt(oTarget,"IsUndead")) nIsUndead = TRUE;
|
||||||
|
if(nRacial == RACIAL_TYPE_VERMIN || nClassVermin > 0 || GetLocalInt(oTarget,"IsVermin")) nIsVermin = TRUE;
|
||||||
|
if(nRacial == RACIAL_TYPE_ELEMENTAL || nClassElemental > 0 || GetLocalInt(oTarget,"IsElemental")) nIsElemental = TRUE;
|
||||||
|
if(nRacial == RACIAL_TYPE_CONSTRUCT || nClassConstruct > 0 || GetLocalInt(oTarget,"IsConstruct")) nIsConstruct = TRUE;
|
||||||
|
if(nRacial == RACIAL_TYPE_OUTSIDER || nClassOutsider > 0 || GetLocalInt(oTarget,"IsOutsider")) nIsOutsider = TRUE;
|
||||||
|
if(nRacial == RACIAL_TYPE_MAGICAL_BEAST || nClassMagicalBeast > 0 || GetLocalInt(oTarget,"IsMagicalBeast")) nIsMagicalBeast = TRUE;
|
||||||
|
|
||||||
|
if (nRace == RACIAL_TYPE_UNDEAD && nIsUndead ||
|
||||||
|
nRace == RACIAL_TYPE_VERMIN && nIsVermin ||
|
||||||
|
nRace == RACIAL_TYPE_ELEMENTAL && nIsElemental ||
|
||||||
|
nRace == RACIAL_TYPE_CONSTRUCT && nIsConstruct ||
|
||||||
|
nRace == RACIAL_TYPE_OUTSIDER && nIsOutsider ||
|
||||||
|
nRace == RACIAL_TYPE_MAGICAL_BEAST && nIsMagicalBeast)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
if (nRacial == nRace)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Get the modifer for Turn Undead. This effects how long the turn effects last and how well
|
||||||
|
//it will go against a creature.
|
||||||
|
int GetTurnModifier(object oTarget)
|
||||||
|
{
|
||||||
|
//Declare major variables
|
||||||
|
int nHDModifier = 0;
|
||||||
|
int nWisMod;
|
||||||
|
int nWisdomBonus = GetAbilityModifier(ABILITY_WISDOM);
|
||||||
|
int nStrengthBonus = GetAbilityModifier(ABILITY_STRENGTH);
|
||||||
|
int nAppearance = GetAppearanceType(oTarget);
|
||||||
|
int nAlign = GetAlignmentGoodEvil(oTarget);
|
||||||
|
int nRacial = GetRacialType(oTarget);
|
||||||
|
int nClassUndead = GetLevelByClass(CLASS_TYPE_UNDEAD,oTarget);
|
||||||
|
|
||||||
|
//Check to see if they have any focuses in Necromancy or the death domain
|
||||||
|
//If so, add them to the modifier which makes it easier to turn the undead
|
||||||
|
if(GetRacialCheck(RACIAL_TYPE_UNDEAD, oTarget))
|
||||||
|
{
|
||||||
|
if(GetHasFeat(FEAT_DEATH_DOMAIN_POWER))
|
||||||
|
nHDModifier = nHDModifier + 1;
|
||||||
|
if(GetHasFeat(FEAT_SPELL_FOCUS_NECROMANCY))
|
||||||
|
nHDModifier = nHDModifier + 2;
|
||||||
|
if(GetHasFeat(FEAT_GREATER_SPELL_FOCUS_NECROMANCY))
|
||||||
|
nHDModifier = nHDModifier + 2;
|
||||||
|
if(GetHasFeat(FEAT_EPIC_SPELL_FOCUS_NECROMANCY))
|
||||||
|
nHDModifier = nHDModifier + 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Check to see if the player has the Good or Evil domain
|
||||||
|
//If they do, check to see if the creature's alignment is good or evil
|
||||||
|
//If the alignment opposite the domain, add to the turning modifier if the
|
||||||
|
//alignment is the same, subtract from the modifier
|
||||||
|
if (GetHasFeat(FEAT_EVIL_DOMAIN_POWER))
|
||||||
|
{
|
||||||
|
if (nAlign == ALIGNMENT_GOOD)
|
||||||
|
nHDModifier = nHDModifier + 1;
|
||||||
|
if (nAlign == ALIGNMENT_EVIL && !GetHasFeat(FEAT_GOOD_DOMAIN_POWER))
|
||||||
|
nHDModifier = nHDModifier - 1;
|
||||||
|
}
|
||||||
|
if (GetHasFeat(FEAT_GOOD_DOMAIN_POWER))
|
||||||
|
{
|
||||||
|
if (nAlign == ALIGNMENT_EVIL)
|
||||||
|
nHDModifier = nHDModifier + 1;
|
||||||
|
if (nAlign == ALIGNMENT_GOOD && !GetHasFeat(FEAT_EVIL_DOMAIN_POWER))
|
||||||
|
nHDModifier = nHDModifier - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Check to see if the player has the knoledge domain power
|
||||||
|
//If so, add 1/3rd if their wisdom bonus to the modifier
|
||||||
|
//If their wisdom bonus is 0 or lower, then the modifier is
|
||||||
|
//their wisdom bonus minus 2.
|
||||||
|
if (GetHasFeat(FEAT_KNOWLEDGE_DOMAIN_POWER))
|
||||||
|
{
|
||||||
|
if (nWisdomBonus > 0)
|
||||||
|
{
|
||||||
|
nWisMod = nWisdomBonus / 3;
|
||||||
|
if (nWisMod > 0)
|
||||||
|
nHDModifier = nHDModifier + nWisMod;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nWisMod = nWisdomBonus - 2;
|
||||||
|
nHDModifier = nHDModifier + nWisMod;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Check your strength bonus versus the targets
|
||||||
|
//If your strength bonus is 2 or more times higher, then you gain +1 to the modifier
|
||||||
|
//If your strength is higher, then you gain +1 to the modifer
|
||||||
|
//If the targets strength is 2 or more times higher, then you lose -1 from the modifier
|
||||||
|
//If the targets strength is higher, then you lose -1 from the modifer
|
||||||
|
//These stack for a total of +2 or -2
|
||||||
|
if (GetHasFeat(FEAT_STRENGTH_DOMAIN_POWER))
|
||||||
|
{
|
||||||
|
int nTarStrengthBonus = GetAbilityModifier(ABILITY_STRENGTH,oTarget);
|
||||||
|
if ((nStrengthBonus*2) < nTarStrengthBonus)
|
||||||
|
nHDModifier = nHDModifier - 1;
|
||||||
|
if (nStrengthBonus < nTarStrengthBonus)
|
||||||
|
nHDModifier = nHDModifier - 1;
|
||||||
|
if (nStrengthBonus > (nTarStrengthBonus*2))
|
||||||
|
nHDModifier = nHDModifier + 1;
|
||||||
|
if (nStrengthBonus > nTarStrengthBonus)
|
||||||
|
nHDModifier = nHDModifier + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//If you have the air domain, make it easier to turn air elementals
|
||||||
|
if (GetHasFeat(FEAT_AIR_DOMAIN_POWER) &&
|
||||||
|
(nAppearance == APPEARANCE_TYPE_ELEMENTAL_AIR ||
|
||||||
|
nAppearance == APPEARANCE_TYPE_ELEMENTAL_AIR_ELDER))
|
||||||
|
{
|
||||||
|
nHDModifier = nHDModifier + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//If you have the earth domain, make it easier to turn earth elementals
|
||||||
|
if (GetHasFeat(FEAT_EARTH_DOMAIN_POWER) &&
|
||||||
|
(nAppearance == APPEARANCE_TYPE_ELEMENTAL_EARTH ||
|
||||||
|
nAppearance == APPEARANCE_TYPE_ELEMENTAL_EARTH_ELDER))
|
||||||
|
{
|
||||||
|
nHDModifier = nHDModifier + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//If you have the fire domain, make it easier to turn fire elementals
|
||||||
|
if (GetHasFeat(FEAT_FIRE_DOMAIN_POWER) &&
|
||||||
|
(nAppearance == APPEARANCE_TYPE_ELEMENTAL_FIRE ||
|
||||||
|
nAppearance == APPEARANCE_TYPE_ELEMENTAL_FIRE_ELDER))
|
||||||
|
{
|
||||||
|
nHDModifier = nHDModifier + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//If you have the water domain, make it easier to turn water elementals
|
||||||
|
if (GetHasFeat(FEAT_WATER_DOMAIN_POWER) &&
|
||||||
|
(nAppearance == APPEARANCE_TYPE_ELEMENTAL_WATER ||
|
||||||
|
nAppearance == APPEARANCE_TYPE_ELEMENTAL_WATER_ELDER))
|
||||||
|
{
|
||||||
|
nHDModifier = nHDModifier + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Checks to see if you have the Trickery domain and calculate the effects
|
||||||
|
//Theres a 50% chance for a positive effect and a 50% for a negative effect
|
||||||
|
//unless you have the luck domain feat, then theres only a 20% chance for a
|
||||||
|
//negative effect. Lucky 7 and Unlucky 13 doubles the results.
|
||||||
|
if (GetHasFeat(FEAT_TRICKERY_DOMAIN_POWER))
|
||||||
|
{
|
||||||
|
int nTrickMod;
|
||||||
|
int nTrick = d20();
|
||||||
|
if (GetHasFeat(FEAT_LUCK_DOMAIN_POWER))
|
||||||
|
nTrick = nTrick - 6;
|
||||||
|
if (nTrick <= 10)
|
||||||
|
{
|
||||||
|
nTrickMod = d3();
|
||||||
|
if (nTrick == 7) //Lucky 7
|
||||||
|
nTrickMod = nTrickMod * 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nTrickMod = d3()*-1;
|
||||||
|
if (nTrick == 13) //UnLucky 13
|
||||||
|
nTrickMod = nTrickMod * 2;
|
||||||
|
}
|
||||||
|
nHDModifier = nHDModifier + nTrickMod;
|
||||||
|
}
|
||||||
|
|
||||||
|
//The sun domain improves your turning modifier
|
||||||
|
if (GetHasFeat(FEAT_SUN_DOMAIN_POWER))
|
||||||
|
{
|
||||||
|
nHDModifier = nHDModifier + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GetTag(GetItemInSlot(INVENTORY_SLOT_LEFTHAND)) == "HolySymbol")
|
||||||
|
{
|
||||||
|
nHDModifier = nHDModifier + 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
return nHDModifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
//This function checks to see if the turned creature is an associate to another creature
|
||||||
|
//This way it won't try to rebuke associates of another player and also unsummon summons
|
||||||
|
int GetIsAssociate(object oTarget, int nCheckAll = FALSE)
|
||||||
|
{
|
||||||
|
if (GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
object oMaster = GetMaster(oTarget);
|
||||||
|
if (GetIsObjectValid(oMaster))
|
||||||
|
{
|
||||||
|
int nAssociate = GetAssociateType(oTarget);
|
||||||
|
if(nAssociate == ASSOCIATE_TYPE_SUMMONED ||
|
||||||
|
nAssociate == ASSOCIATE_TYPE_FAMILIAR ||
|
||||||
|
nAssociate == ASSOCIATE_TYPE_ANIMALCOMPANION)
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
if (nCheckAll &&
|
||||||
|
(nAssociate == ASSOCIATE_TYPE_DOMINATED ||
|
||||||
|
nAssociate == ASSOCIATE_TYPE_HENCHMAN))
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Check to see if the target is already turned, paralized,
|
||||||
|
//petrified, frightened, stunned and dominated. If so, return true.
|
||||||
|
int HasTurnedEffect(object oTarget)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
GetHasEffect(EFFECT_TYPE_TURNED, oTarget) ||
|
||||||
|
GetHasEffect(EFFECT_TYPE_FRIGHTENED, oTarget) ||
|
||||||
|
GetHasEffect(EFFECT_TYPE_PARALYZE, oTarget) ||
|
||||||
|
GetHasEffect(EFFECT_TYPE_CUTSCENE_PARALYZE, oTarget) ||
|
||||||
|
GetHasEffect(EFFECT_TYPE_PETRIFY, oTarget) ||
|
||||||
|
GetHasEffect(EFFECT_TYPE_STUNNED, oTarget) ||
|
||||||
|
GetHasEffect(EFFECT_TYPE_DOMINATED, oTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Checks to see if the player is able to command the creature depending
|
||||||
|
//On how many slots you have left and the target HD.
|
||||||
|
int CanCommand(int nClassLevel, int nTargetHD)
|
||||||
|
{
|
||||||
|
int nSlots = GetLocalInt(OBJECT_SELF, "wb_clr_comm_slots");
|
||||||
|
int nNew = nSlots + nTargetHD;
|
||||||
|
if(nClassLevel >= nNew)
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Add the creature under the player's command
|
||||||
|
void AddCommand(int nTargetHD)
|
||||||
|
{
|
||||||
|
int nSlots = GetLocalInt(OBJECT_SELF, "wb_clr_comm_slots");
|
||||||
|
SetLocalInt(OBJECT_SELF, "wb_clr_comm_slots", nSlots + nTargetHD);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Remove the creature from the players command
|
||||||
|
void SubCommand(int nTargetHD)
|
||||||
|
{
|
||||||
|
int nSlots = GetLocalInt(OBJECT_SELF, "wb_clr_comm_slots");
|
||||||
|
SetLocalInt(OBJECT_SELF, "wb_clr_comm_slots", nSlots - nTargetHD);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Gets all creatures in a 20m radius around the caster and rebukes them or not. If the creatures
|
||||||
|
//HD are 1/2 or less of the nClassLevel then the creature is commanded (dominated) or dismissed.
|
||||||
|
void RebukeUndead(int nTurnLevel, int nTurnHD, int nVermin, int nElemental, int nConstructs, int nGoodOrEvilDomain, int nPlanar, int nMagicDomain, int nClassLevel)
|
||||||
|
{
|
||||||
|
//Declare major variables
|
||||||
|
int nCnt = 1;
|
||||||
|
int nHDModifier = 0;
|
||||||
|
int nTimeModifier = 1;
|
||||||
|
int nIsUndead, nIsVermin, nIsElemental, nIsConstruct, nIsOutsider, nIsMagicalBeast;
|
||||||
|
int nHD, nHDCount, bValid, nDamage, nDuration;
|
||||||
|
nHDCount = 0;
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE);
|
||||||
|
effect eVisTurn = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DOMINATED);
|
||||||
|
effect eUnsummonVis = EffectVisualEffect(VFX_IMP_UNSUMMON);
|
||||||
|
effect eDamage;
|
||||||
|
effect eKnockdown = EffectKnockdown();
|
||||||
|
//Yes I know its rebuke undead, but turn then anyways so they don't count towards the HD score
|
||||||
|
effect eTurned = EffectTurned();
|
||||||
|
//Cutscene Paralyze sometimes fail if the target is immune to paralyzation.
|
||||||
|
//If thats the case, then immobilze them so they can't move.
|
||||||
|
//They won't attack because they are turned with EffectTurned. Hence another reason why I left it in.
|
||||||
|
effect eParalyze = EffectCutsceneParalyze();
|
||||||
|
effect eImmobilize = EffectCutsceneImmobilize();
|
||||||
|
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||||
|
effect eRebukeLink = EffectLinkEffects(eVisTurn, eTurned);
|
||||||
|
eRebukeLink = EffectLinkEffects(eRebukeLink, eParalyze);
|
||||||
|
eRebukeLink = EffectLinkEffects(eRebukeLink, eImmobilize);
|
||||||
|
eRebukeLink = EffectLinkEffects(eRebukeLink, eDur);
|
||||||
|
//Made it a supernatural effect so it can't be dispelled.
|
||||||
|
eRebukeLink = SupernaturalEffect(eRebukeLink);
|
||||||
|
|
||||||
|
effect eDeath = SupernaturalEffect(EffectDeath(TRUE));
|
||||||
|
|
||||||
|
effect eDominate = SupernaturalEffect(EffectCutsceneDominated());
|
||||||
|
effect eDominVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||||
|
effect eDominateLink = EffectLinkEffects(eDominate, eDominVis);
|
||||||
|
|
||||||
|
effect eImpactVis = EffectVisualEffect(VFX_FNF_LOS_EVIL_30);
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpactVis, GetLocation(OBJECT_SELF));
|
||||||
|
|
||||||
|
//Get nearest enemy within 20m (60ft)
|
||||||
|
//If you have the Travel domain get the nearest enemy within 25m (80ft)
|
||||||
|
float fDistance = 20.0;
|
||||||
|
if (GetHasFeat(FEAT_TRAVEL_DOMAIN_POWER))
|
||||||
|
fDistance = 25.0;
|
||||||
|
object oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE , OBJECT_SELF, nCnt,CREATURE_TYPE_PERCEPTION , PERCEPTION_SEEN);
|
||||||
|
while(GetIsObjectValid(oTarget) && nHDCount < nTurnHD && GetDistanceToObject(oTarget) <= fDistance)
|
||||||
|
{
|
||||||
|
//Check to see if the creature is can be turned or is friendly
|
||||||
|
//This will prevent creatures thata re already turned from using up HD slots
|
||||||
|
if(!GetIsFriend(oTarget) && !GetFactionEqual(oTarget) && !HasTurnedEffect(oTarget) && !GetLocalInt(oTarget,"TurnImmunity"))
|
||||||
|
{
|
||||||
|
//Check the racial type of the creature. This checks both the race and the classes they have
|
||||||
|
//So if a creature has an improperly set race but took undead levels, consider them undead
|
||||||
|
nIsUndead=FALSE; nIsVermin=FALSE; nIsElemental=FALSE; nIsConstruct=FALSE; nIsOutsider=FALSE; nIsMagicalBeast=FALSE;
|
||||||
|
if(GetRacialCheck(RACIAL_TYPE_UNDEAD, oTarget)) nIsUndead = TRUE;
|
||||||
|
if(GetRacialCheck(RACIAL_TYPE_VERMIN, oTarget)) nIsVermin = TRUE;
|
||||||
|
if(GetRacialCheck(RACIAL_TYPE_ELEMENTAL, oTarget)) nIsElemental = TRUE;
|
||||||
|
if(GetRacialCheck(RACIAL_TYPE_CONSTRUCT, oTarget)) nIsConstruct = TRUE;
|
||||||
|
if(GetRacialCheck(RACIAL_TYPE_OUTSIDER, oTarget)) nIsOutsider = TRUE;
|
||||||
|
if(GetRacialCheck(RACIAL_TYPE_MAGICAL_BEAST, oTarget)) nIsMagicalBeast = TRUE;
|
||||||
|
|
||||||
|
if (nIsOutsider)
|
||||||
|
{
|
||||||
|
if (nPlanar)
|
||||||
|
{
|
||||||
|
//Planar turning decreases spell resistance against turning by 1/2
|
||||||
|
nHD = GetHitDice(oTarget) + (GetSpellResistance(oTarget) /2) + GetTurnResistanceHD(oTarget);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nHD = GetHitDice(oTarget) + (GetSpellResistance(oTarget) + GetTurnResistanceHD(oTarget));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //(full turn resistance)
|
||||||
|
{
|
||||||
|
nHD = GetHitDice(oTarget) + GetTurnResistanceHD(oTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GetLocalInt(oTarget,"TurnHDOverride") > 0)
|
||||||
|
{
|
||||||
|
nHD = GetLocalInt(oTarget,"TurnHDOverride");
|
||||||
|
}
|
||||||
|
|
||||||
|
nHDModifier = GetTurnModifier(oTarget);
|
||||||
|
nHD = nHD - nHDModifier;
|
||||||
|
if(nHD < 1)
|
||||||
|
nHD = 1;
|
||||||
|
if(nHDModifier > 1)
|
||||||
|
nTimeModifier = nHDModifier;
|
||||||
|
|
||||||
|
if(nHD <= nTurnLevel && nHD <= (nTurnHD - nHDCount))
|
||||||
|
{
|
||||||
|
//Check the various domain turning types
|
||||||
|
if(nIsUndead)
|
||||||
|
{
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
else if (nIsVermin && nVermin > 0)
|
||||||
|
{
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
else if (nIsElemental && nElemental > 0)
|
||||||
|
{
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
else if (nIsConstruct && nConstructs > 0)
|
||||||
|
{
|
||||||
|
//The construct handling code below to prevent redundant code.
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
else if (nIsOutsider && (nGoodOrEvilDomain+nPlanar) > 0)
|
||||||
|
{
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
else if (nIsMagicalBeast && nMagicDomain > 0)
|
||||||
|
{
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
else if (GetLocalInt(oTarget,"IsTurnable"))
|
||||||
|
{
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
// * if wearing gauntlets of the lich,then can be turned
|
||||||
|
else if (GetIsObjectValid(GetItemPossessedBy(oTarget, "x2_gauntletlich")) == TRUE)
|
||||||
|
{
|
||||||
|
if (GetTag(GetItemInSlot(INVENTORY_SLOT_ARMS)) == "x2_gauntletlich")
|
||||||
|
{
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Apply results of the turn
|
||||||
|
if(bValid == TRUE)
|
||||||
|
{
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_TURN_UNDEAD));
|
||||||
|
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||||
|
//Added Knockdown to the target. The reason behind this is simple, when a cleric
|
||||||
|
//Paladin, ect uses Turn undead, they release a powerful blast of (un)holy energy that
|
||||||
|
//Knocks the creatures off their feet. Also fixes the bug were sometimes the creatures
|
||||||
|
//Still attacked when turned.
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKnockdown, oTarget, 3.0);
|
||||||
|
|
||||||
|
//The duration for the turning effect in Rounds
|
||||||
|
nDuration = (nClassLevel + 5)*nTimeModifier;
|
||||||
|
if (nIsConstruct)
|
||||||
|
{
|
||||||
|
//Handle the construct damage here
|
||||||
|
nDamage = d3(nTurnLevel)+nHDModifier;
|
||||||
|
if (nDamage < 1) nDamage = 1;
|
||||||
|
eDamage = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
|
||||||
|
}
|
||||||
|
else if((nClassLevel/2) >= nHD && !GetIsPC(oTarget) && !GetIsAssociate(oTarget, TRUE) && CanCommand(nClassLevel, nHD))
|
||||||
|
{
|
||||||
|
//Dominate the target
|
||||||
|
DelayCommand(0.1f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDominateLink, oTarget, RoundsToSeconds(nDuration)));
|
||||||
|
AssignCommand(oTarget, ClearAllActions());
|
||||||
|
SetIsTemporaryFriend(oTarget, OBJECT_SELF, TRUE, RoundsToSeconds(nDuration));
|
||||||
|
AddCommand(nHD);
|
||||||
|
DelayCommand(RoundsToSeconds(nDuration), SubCommand(nHD));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Damage the target if player has the War Domain
|
||||||
|
if (GetHasFeat(FEAT_WAR_DOMAIN_POWER))
|
||||||
|
{
|
||||||
|
nDamage = d6(3)+nHDModifier;
|
||||||
|
if (nDamage < 1) nDamage = 1;
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage, DAMAGE_TYPE_DIVINE), oTarget);
|
||||||
|
}
|
||||||
|
//Rebuke the target
|
||||||
|
AssignCommand(oTarget, ClearAllActions());
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRebukeLink, oTarget, RoundsToSeconds(nDuration));
|
||||||
|
}
|
||||||
|
nHDCount = nHDCount + nHD;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bValid = FALSE;
|
||||||
|
}
|
||||||
|
nCnt++;
|
||||||
|
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE , OBJECT_SELF, nCnt,CREATURE_TYPE_PERCEPTION , PERCEPTION_SEEN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Gets all creatures in a 20m radius around the caster and turns them or not. If the creatures
|
||||||
|
//HD are 1/2 or less of the nClassLevel then the creature is destroyed.
|
||||||
|
void TurnUndead(int nTurnLevel, int nTurnHD, int nVermin, int nElemental, int nConstructs, int nGoodOrEvilDomain, int nPlanar, int nMagicDomain, int nClassLevel)
|
||||||
|
{
|
||||||
|
//Declare major variables
|
||||||
|
int nCnt = 1;
|
||||||
|
int nHDModifier = 0;
|
||||||
|
int nTimeModifier = 1;
|
||||||
|
int nIsUndead, nIsVermin, nIsElemental, nIsConstruct, nIsOutsider, nIsMagicalBeast;
|
||||||
|
int nHD, nHDCount, bValid, nDamage, nDuration;
|
||||||
|
nHDCount = 0;
|
||||||
|
effect eVis = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
||||||
|
effect eVisTurn = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR);
|
||||||
|
effect eUnsummonVis = EffectVisualEffect(VFX_IMP_UNSUMMON);
|
||||||
|
effect eDamage;
|
||||||
|
effect eKnockdown = EffectKnockdown();
|
||||||
|
effect eTurned = EffectTurned();
|
||||||
|
//Decrease the creatures speed to fix an annoying bug. If you're attacking something with a fear effect in NWN,
|
||||||
|
//the game tends to move you close to the target, then stop you, then move the creature away,
|
||||||
|
//so you never actually get to ATTACK it even if you're hasted and it's a zombie.
|
||||||
|
//Even worse is that creatures that are knocked down magically spring up and run away, and it's just SO annoying.
|
||||||
|
effect eSlowDown = EffectMovementSpeedDecrease(50);
|
||||||
|
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||||
|
effect eTurnLink = EffectLinkEffects(eVisTurn, eTurned);
|
||||||
|
eTurnLink = EffectLinkEffects(eTurnLink, eSlowDown);
|
||||||
|
eTurnLink = EffectLinkEffects(eTurnLink, eDur);
|
||||||
|
//Made it a supernatural effect so it cant't be dispelled.
|
||||||
|
eTurnLink = SupernaturalEffect(eTurnLink);
|
||||||
|
|
||||||
|
effect eDeath = SupernaturalEffect(EffectDeath(TRUE));
|
||||||
|
|
||||||
|
effect eImpactVis = EffectVisualEffect(VFX_FNF_LOS_HOLY_30);
|
||||||
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpactVis, GetLocation(OBJECT_SELF));
|
||||||
|
|
||||||
|
//Get nearest enemy within 20m (65ft)
|
||||||
|
//If you have the Travel domain get the nearest enemy within 25m (80ft)
|
||||||
|
float fDistance = 20.0;
|
||||||
|
if (GetHasFeat(FEAT_TRAVEL_DOMAIN_POWER))
|
||||||
|
fDistance = 25.0;
|
||||||
|
object oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE , OBJECT_SELF, nCnt,CREATURE_TYPE_PERCEPTION , PERCEPTION_SEEN);
|
||||||
|
while(GetIsObjectValid(oTarget) && nHDCount < nTurnHD && GetDistanceToObject(oTarget) <= fDistance)
|
||||||
|
{
|
||||||
|
//Check to see if the creature is can be turned or is friendly
|
||||||
|
//This will prevent creatures thata re already turned from using up HD slots
|
||||||
|
if(!GetIsFriend(oTarget) && !GetFactionEqual(oTarget) && !HasTurnedEffect(oTarget) && !GetLocalInt(oTarget,"TurnImmunity"))
|
||||||
|
{
|
||||||
|
//Check the racial type of the creature. This checks both the race and the classes they have
|
||||||
|
//So if a creature has an improperly set race but took undead levels, consider them undead
|
||||||
|
nIsUndead=FALSE; nIsVermin=FALSE; nIsElemental=FALSE; nIsConstruct=FALSE; nIsOutsider=FALSE; nIsMagicalBeast=FALSE;
|
||||||
|
if(GetRacialCheck(RACIAL_TYPE_UNDEAD, oTarget)) nIsUndead = TRUE;
|
||||||
|
if(GetRacialCheck(RACIAL_TYPE_VERMIN, oTarget)) nIsVermin = TRUE;
|
||||||
|
if(GetRacialCheck(RACIAL_TYPE_ELEMENTAL, oTarget)) nIsElemental = TRUE;
|
||||||
|
if(GetRacialCheck(RACIAL_TYPE_CONSTRUCT, oTarget)) nIsConstruct = TRUE;
|
||||||
|
if(GetRacialCheck(RACIAL_TYPE_OUTSIDER, oTarget)) nIsOutsider = TRUE;
|
||||||
|
if(GetRacialCheck(RACIAL_TYPE_MAGICAL_BEAST, oTarget)) nIsMagicalBeast = TRUE;
|
||||||
|
|
||||||
|
if (nIsOutsider)
|
||||||
|
{
|
||||||
|
if (nPlanar)
|
||||||
|
{
|
||||||
|
//Planar turning decreases spell resistance against turning by 1/2
|
||||||
|
nHD = GetHitDice(oTarget) + (GetSpellResistance(oTarget) /2) + GetTurnResistanceHD(oTarget);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nHD = GetHitDice(oTarget) + (GetSpellResistance(oTarget) + GetTurnResistanceHD(oTarget));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //(full turn resistance)
|
||||||
|
{
|
||||||
|
nHD = GetHitDice(oTarget) + GetTurnResistanceHD(oTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GetLocalInt(oTarget,"TurnHDOverride") > 0)
|
||||||
|
{
|
||||||
|
nHD = GetLocalInt(oTarget,"TurnHDOverride");
|
||||||
|
}
|
||||||
|
|
||||||
|
nHDModifier = GetTurnModifier(oTarget);
|
||||||
|
nHD = nHD - nHDModifier;
|
||||||
|
if(nHD < 1)
|
||||||
|
nHD = 1;
|
||||||
|
if(nHDModifier > 1)
|
||||||
|
nTimeModifier = nHDModifier;
|
||||||
|
|
||||||
|
if(nHD <= nTurnLevel && nHD <= (nTurnHD - nHDCount))
|
||||||
|
{
|
||||||
|
//Check the various domain turning types
|
||||||
|
if(nIsUndead)
|
||||||
|
{
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
else if (nIsVermin && nVermin > 0)
|
||||||
|
{
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
else if (nIsElemental && nElemental > 0)
|
||||||
|
{
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
else if (nIsConstruct && nConstructs > 0)
|
||||||
|
{
|
||||||
|
//The construct handling code below to prevent redundant code.
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
else if (nIsOutsider && (nGoodOrEvilDomain+nPlanar) > 0)
|
||||||
|
{
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
else if (nIsMagicalBeast && nMagicDomain > 0)
|
||||||
|
{
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
else if (GetLocalInt(oTarget,"IsTurnable"))
|
||||||
|
{
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
// * if wearing gauntlets of the lich,then can be turned
|
||||||
|
else if (GetIsObjectValid(GetItemPossessedBy(oTarget, "x2_gauntletlich")) == TRUE)
|
||||||
|
{
|
||||||
|
if (GetTag(GetItemInSlot(INVENTORY_SLOT_ARMS)) == "x2_gauntletlich")
|
||||||
|
{
|
||||||
|
bValid = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Apply results of the turn
|
||||||
|
if(bValid == TRUE)
|
||||||
|
{
|
||||||
|
//Fire cast spell at event for the specified target
|
||||||
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_TURN_UNDEAD));
|
||||||
|
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||||
|
//Added Knockdown to the target. The reason behind this is simple, when a cleric
|
||||||
|
//Paladin, ect uses Turn undead, they release a powerful blast of (un)holy energy that
|
||||||
|
//Knocks the creatures off their feet. Also fixes the bug were sometimes the creatures
|
||||||
|
//Still attacked when turned.
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKnockdown, oTarget, 3.0);
|
||||||
|
|
||||||
|
//The duration for the turning effect in Rounds
|
||||||
|
nDuration = (nClassLevel + 5)*nTimeModifier;
|
||||||
|
if (nIsConstruct)
|
||||||
|
{
|
||||||
|
//Handle the construct damage here
|
||||||
|
nDamage = d3(nTurnLevel)+nHDModifier;
|
||||||
|
if (nDamage < 1) nDamage = 1;
|
||||||
|
eDamage = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
|
||||||
|
}
|
||||||
|
else if((nClassLevel/2) >= nHD)
|
||||||
|
{
|
||||||
|
if (nIsOutsider && (nGoodOrEvilDomain+nPlanar) > 0 || GetIsAssociate(oTarget))
|
||||||
|
{
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eUnsummonVis, oTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Destroy the target
|
||||||
|
DelayCommand(0.1f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Damage the target if player has the War Domain
|
||||||
|
if (GetHasFeat(FEAT_WAR_DOMAIN_POWER))
|
||||||
|
{
|
||||||
|
nDamage = d6(3)+nHDModifier;
|
||||||
|
if (nDamage < 1) nDamage = 1;
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage, DAMAGE_TYPE_DIVINE), oTarget);
|
||||||
|
}
|
||||||
|
//Turn the target
|
||||||
|
AssignCommand(oTarget, ClearAllActions());
|
||||||
|
AssignCommand(oTarget, ActionMoveAwayFromObject(OBJECT_SELF, TRUE));
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eTurnLink, oTarget, RoundsToSeconds(nDuration));
|
||||||
|
}
|
||||||
|
nHDCount = nHDCount + nHD;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bValid = FALSE;
|
||||||
|
}
|
||||||
|
nCnt++;
|
||||||
|
oTarget = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE , OBJECT_SELF, nCnt,CREATURE_TYPE_PERCEPTION , PERCEPTION_SEEN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
int nClericLevel = GetLevelByClass(CLASS_TYPE_CLERIC);
|
||||||
|
int nPaladinLevel = GetLevelByClass(CLASS_TYPE_PALADIN);
|
||||||
|
int nBlackguardlevel = GetLevelByClass(CLASS_TYPE_BLACKGUARD);
|
||||||
|
int nDivineChampionLevel = GetLevelByClass(CLASS_TYPE_DIVINECHAMPION);
|
||||||
|
int nTotalLevel = GetHitDice(OBJECT_SELF);
|
||||||
|
|
||||||
|
int nTurnLevel = nClericLevel;
|
||||||
|
int nClassLevel = nClericLevel;
|
||||||
|
|
||||||
|
// GZ: Since paladin levels stack when turning, blackguard levels should stack as well
|
||||||
|
// GZ: but not with the paladin levels (thus else if).
|
||||||
|
if((nBlackguardlevel - 2) > 0 && (nBlackguardlevel > nPaladinLevel))
|
||||||
|
{
|
||||||
|
nClassLevel += (nBlackguardlevel - 2);
|
||||||
|
nTurnLevel += (nBlackguardlevel - 2);
|
||||||
|
}
|
||||||
|
else if((nPaladinLevel - 2) > 0)
|
||||||
|
{
|
||||||
|
nClassLevel += (nPaladinLevel -2);
|
||||||
|
nTurnLevel += (nPaladinLevel - 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Added Divine Champion/Champion of Torm to the turning levels since they are similar to paladins.
|
||||||
|
if(nDivineChampionLevel > 0)
|
||||||
|
{
|
||||||
|
nClassLevel += nDivineChampionLevel;
|
||||||
|
nTurnLevel += nDivineChampionLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Flags for bonus turning types
|
||||||
|
int nElemental = GetHasFeat(FEAT_AIR_DOMAIN_POWER) + GetHasFeat(FEAT_EARTH_DOMAIN_POWER) + GetHasFeat(FEAT_FIRE_DOMAIN_POWER) + GetHasFeat(FEAT_WATER_DOMAIN_POWER);
|
||||||
|
int nVermin = GetHasFeat(FEAT_PLANT_DOMAIN_POWER) + GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER) + GetHasFeat(FEAT_ANIMAL_COMPANION);
|
||||||
|
int nConstructs = GetHasFeat(FEAT_DESTRUCTION_DOMAIN_POWER);
|
||||||
|
int nGoodOrEvilDomain = GetHasFeat(FEAT_GOOD_DOMAIN_POWER) + GetHasFeat(FEAT_EVIL_DOMAIN_POWER);
|
||||||
|
int nMagicDomain = GetHasFeat(FEAT_MAGIC_DOMAIN_POWER);
|
||||||
|
int nPlanar = GetHasFeat(854); //FEAT_EPIC_PLANAR_TURNING
|
||||||
|
|
||||||
|
//Flag for improved turning ability
|
||||||
|
int nSun = GetHasFeat(FEAT_SUN_DOMAIN_POWER);
|
||||||
|
|
||||||
|
//Make a turning check roll, modify if have the Sun Domain
|
||||||
|
int nChrMod = GetAbilityModifier(ABILITY_CHARISMA);
|
||||||
|
int nTurnCheck = d20() + nChrMod; //The roll to apply to the max HD of undead that can be turned --> nTurnLevel
|
||||||
|
int nTurnHD = d6(2) + nChrMod + nClassLevel; //The number of HD of undead that can be turned.
|
||||||
|
|
||||||
|
if(nSun == TRUE)
|
||||||
|
{
|
||||||
|
nTurnCheck += d4();
|
||||||
|
nTurnHD += d6();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Determine the maximum HD of the undead that can be turned.
|
||||||
|
if(nTurnCheck <= 0)
|
||||||
|
{
|
||||||
|
nTurnLevel -= 4;
|
||||||
|
}
|
||||||
|
else if(nTurnCheck >= 1 && nTurnCheck <= 3)
|
||||||
|
{
|
||||||
|
nTurnLevel -= 3;
|
||||||
|
}
|
||||||
|
else if(nTurnCheck >= 4 && nTurnCheck <= 6)
|
||||||
|
{
|
||||||
|
nTurnLevel -= 2;
|
||||||
|
}
|
||||||
|
else if(nTurnCheck >= 7 && nTurnCheck <= 9)
|
||||||
|
{
|
||||||
|
nTurnLevel -= 1;
|
||||||
|
}
|
||||||
|
else if(nTurnCheck >= 10 && nTurnCheck <= 12)
|
||||||
|
{
|
||||||
|
//Stays the same
|
||||||
|
}
|
||||||
|
else if(nTurnCheck >= 13 && nTurnCheck <= 15)
|
||||||
|
{
|
||||||
|
nTurnLevel += 1;
|
||||||
|
}
|
||||||
|
else if(nTurnCheck >= 16 && nTurnCheck <= 18)
|
||||||
|
{
|
||||||
|
nTurnLevel += 2;
|
||||||
|
}
|
||||||
|
else if(nTurnCheck >= 19 && nTurnCheck <= 21)
|
||||||
|
{
|
||||||
|
nTurnLevel += 3;
|
||||||
|
}
|
||||||
|
else if(nTurnCheck >= 22)
|
||||||
|
{
|
||||||
|
nTurnLevel += 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Make sure the character's Turning Level is never less than 1.
|
||||||
|
if (nTurnLevel < 1)
|
||||||
|
{
|
||||||
|
nTurnLevel = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Check to see if they are an Evil aligned Cleric or have the REBUKE_UNDEAD local int set to true.
|
||||||
|
//If so, use rebuke undead instead of turn undead.
|
||||||
|
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
|
||||||
|
if(nAlign == ALIGNMENT_EVIL || GetLocalInt(OBJECT_SELF, "REBUKE_UNDEAD") == TRUE)
|
||||||
|
{
|
||||||
|
RebukeUndead(nTurnLevel, nTurnHD, nVermin, nElemental, nConstructs, nGoodOrEvilDomain, nPlanar, nMagicDomain, nClassLevel);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TurnUndead(nTurnLevel, nTurnHD, nVermin, nElemental, nConstructs, nGoodOrEvilDomain, nPlanar, nMagicDomain, nClassLevel);
|
||||||
|
}
|
||||||
|
}
|
17
src/_removed/sei_at_setsubr02.nss
Normal file
17
src/_removed/sei_at_setsubr02.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace02
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'gold dwarf'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_DWARF_GOLD );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr03.nss
Normal file
17
src/_removed/sei_at_setsubr03.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace03
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'gray dwarf'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_DWARF_GRAY );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr04.nss
Normal file
17
src/_removed/sei_at_setsubr04.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace04
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'shield dwarf'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_DWARF_SHIELD );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr05.nss
Normal file
17
src/_removed/sei_at_setsubr05.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace05
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'dark elf'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_ELF_DARK );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr06.nss
Normal file
17
src/_removed/sei_at_setsubr06.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace06
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'moon elf'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_ELF_MOON );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr07.nss
Normal file
17
src/_removed/sei_at_setsubr07.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace07
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'sun elf'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_ELF_SUN );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr08.nss
Normal file
17
src/_removed/sei_at_setsubr08.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace08
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'wild elf'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_ELF_WILD );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr09.nss
Normal file
17
src/_removed/sei_at_setsubr09.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace09
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'wood elf'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_ELF_WOOD );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr10.nss
Normal file
17
src/_removed/sei_at_setsubr10.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace10
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'deep gnome'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_GNOME_DEEP );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr11.nss
Normal file
17
src/_removed/sei_at_setsubr11.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace11
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'rock gnome'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_GNOME_ROCK );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr12.nss
Normal file
17
src/_removed/sei_at_setsubr12.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace12
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'half-elf'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_HALFELF );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr13.nss
Normal file
17
src/_removed/sei_at_setsubr13.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace13
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'half-orc'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_HALFORC );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr14.nss
Normal file
17
src/_removed/sei_at_setsubr14.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace14
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'ghostwise halfling'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_HALFLING_GHOSTWISE );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr15.nss
Normal file
17
src/_removed/sei_at_setsubr15.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace15
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'lightfoot halfling'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_HALFLING_LIGHTFOOT );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr16.nss
Normal file
17
src/_removed/sei_at_setsubr16.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace16
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'strongheart halfling'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_HALFLING_STRONGHEART );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr17.nss
Normal file
17
src/_removed/sei_at_setsubr17.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace17
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'human'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_HUMAN );
|
||||||
|
}
|
||||||
|
|
17
src/_removed/sei_at_setsubr18.nss
Normal file
17
src/_removed/sei_at_setsubr18.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSetSubrace18
|
||||||
|
//
|
||||||
|
// Set the subrace of the conversing object to 'half-drow'
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_SetSubraceVar( OBJECT_SELF, SUBRACE_HALFDROW );
|
||||||
|
}
|
||||||
|
|
16
src/_removed/sei_endsubrdial.nss
Normal file
16
src/_removed/sei_endsubrdial.nss
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// NWEndSubraceDialog
|
||||||
|
//
|
||||||
|
// End the subrace dialog and complete initialization of the subrace.
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
SEI_FinishSubraceDialog( OBJECT_SELF );
|
||||||
|
}
|
||||||
|
|
37
src/_removed/sei_onpcrested.nss
Normal file
37
src/_removed/sei_onpcrested.nss
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
//
|
||||||
|
// NWOnPCRested
|
||||||
|
//
|
||||||
|
// When a PC finishes resting give them back the subrace items
|
||||||
|
// (if they've lost it).
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
object oPC = GetLastPCRested();
|
||||||
|
|
||||||
|
switch( GetLastRestEventType() )
|
||||||
|
{
|
||||||
|
|
||||||
|
case REST_EVENTTYPE_REST_FINISHED:
|
||||||
|
{
|
||||||
|
SEI_KeepSubraceItem( oPC );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case REST_EVENTTYPE_REST_STARTED:
|
||||||
|
case REST_EVENTTYPE_REST_CANCELLED:
|
||||||
|
case REST_EVENTTYPE_REST_INVALID:
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
|
||||||
|
} // End switch-case
|
||||||
|
|
||||||
|
} // End main
|
||||||
|
|
42
src/_removed/sei_subracedrop.nss
Normal file
42
src/_removed/sei_subracedrop.nss
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
//
|
||||||
|
// NWSubraceDrop
|
||||||
|
//
|
||||||
|
// Script for when a character drops a subrace item.
|
||||||
|
// Place in the OnUnAcquireItem module event.
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
// Get te item that was lost.
|
||||||
|
object oItem = GetModuleItemLost();
|
||||||
|
|
||||||
|
// Get the character who lost the item.
|
||||||
|
object oChar = GetModuleItemLostBy();
|
||||||
|
|
||||||
|
// SEI_Note: There seems to be a bug in GetModuleItemLostBy(), which
|
||||||
|
// returns the lost object, not the lost character holding the
|
||||||
|
// object. But strangely enough GetEnteringObject does return the
|
||||||
|
// character. Done like this for backwards compatibility if
|
||||||
|
// BioWare ever fixes the bug.
|
||||||
|
if( oChar == oItem )
|
||||||
|
{
|
||||||
|
oChar = GetEnteringObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if the item being dropped is a spell-like abilities item.
|
||||||
|
if( ! SEI_DropSubraceItem( oItem ) )
|
||||||
|
{
|
||||||
|
|
||||||
|
// SEI_NOTE: Here one could test for other items.
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} // End main
|
||||||
|
|
16
src/_removed/sei_subraceinit.nss
Normal file
16
src/_removed/sei_subraceinit.nss
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// NWSubraceInit
|
||||||
|
//
|
||||||
|
// Subrace initialization script.
|
||||||
|
// To be placed in the OnClientEnter event of the module.
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
Subraces_InitSubrace( GetEnteringObject() );
|
||||||
|
}
|
16
src/_removed/sei_subracelvlup.nss
Normal file
16
src/_removed/sei_subracelvlup.nss
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// NWSubraceLevelUp
|
||||||
|
//
|
||||||
|
// Subrace level up script.
|
||||||
|
// To be placed in the OnPlayerLevelUp event of the module.
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
Subraces_LevelUpSubrace( GetPCLevellingUp() );
|
||||||
|
}
|
BIN
src/_removed/sei_subraces.dlg
Normal file
BIN
src/_removed/sei_subraces.dlg
Normal file
Binary file not shown.
1464
src/_removed/sei_subraces.nss
Normal file
1464
src/_removed/sei_subraces.nss
Normal file
File diff suppressed because it is too large
Load Diff
19
src/_removed/sei_subracesinit.nss
Normal file
19
src/_removed/sei_subracesinit.nss
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// NWSubracesInit
|
||||||
|
//
|
||||||
|
// Initializes the subraces script.
|
||||||
|
// To be placed in the OnModuleLoad event of the module.
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
Subraces_InitSubraces();
|
||||||
|
Subraces_SetDefaultAreaSettings( AREA_DARK + AREA_UNDERGROUND );
|
||||||
|
}
|
||||||
|
|
542
src/_removed/sei_subraceslst.nss
Normal file
542
src/_removed/sei_subraceslst.nss
Normal file
@ -0,0 +1,542 @@
|
|||||||
|
// HCR 5.5 update by Lorinton
|
||||||
|
// Modified to reduce (hopefully eliminate) subrace effects being stripped by the game
|
||||||
|
// and other effects such as level drain being stripped by the subrace system.
|
||||||
|
//
|
||||||
|
// NWSubracesList
|
||||||
|
//
|
||||||
|
// Function that creates a list defining all available subraces.
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
// This file contains the data defining the subraces. In this way it is very
|
||||||
|
// easy to change existing subraces or add new ones. Below follows an
|
||||||
|
// explanation of the functions and fields available to set the subrace data.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// SEI_CreateSubrace( Subrace, Base race, Description )
|
||||||
|
//
|
||||||
|
// This function creates a new subrace. The first parameter must be a unique
|
||||||
|
// ID number to define the subrace (best would be to add to the SUBRACE_ enum
|
||||||
|
// list). The second parameter is the base race on which the subrace is based
|
||||||
|
// and the third parameter is a textual descriptive name for the subrace.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// SEI_AddFieldText( subrace struct, Text )
|
||||||
|
//
|
||||||
|
// This function adds a text that the subrace will recognize. When a character
|
||||||
|
// of the subrace's base race has this text somewhere in their "Subrace" field
|
||||||
|
// (on their character sheet) the character will be seen as a character of this
|
||||||
|
// subrace. Multiple texts can be added to allow for maximum compatibility.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// SEI_AddTrait( subrace struct, "<trait>" )
|
||||||
|
//
|
||||||
|
// This function adds a subrace trait (as represented by an effect) to the
|
||||||
|
// character. Each trait consists of a string that the script will interpret
|
||||||
|
// and translate to the correct effect. For this a strict syntax must be
|
||||||
|
// followed. Below is a list of all the texts it recognizes. Everything between
|
||||||
|
// angular brackets "<>" has it's own section with tokens to put there. Thus a
|
||||||
|
// trait can be 'constructed'.
|
||||||
|
//
|
||||||
|
// trait:
|
||||||
|
// - "ac_inc <amount>" = AC Increase by amount
|
||||||
|
// - "ac_dec <amount>" = AC decrease by amount
|
||||||
|
// - "attack_inc <amount>" = Attack increase by amount
|
||||||
|
// - "attack_dec <amount>" = Attack decrease by amount
|
||||||
|
// - "immune <immunity-type>" = Immunity to immunity-type
|
||||||
|
// - "ex <trait>" = Make trait extraordinary
|
||||||
|
// - "su <trait>" = Make trait supernatural
|
||||||
|
// - "m <trait>" = Only males characters get this trait
|
||||||
|
// - "f <trait>" = Only females characters get this trait
|
||||||
|
// - "ability_inc <ability> <amount>" = Increase ability by amount
|
||||||
|
// - "ability_dec <ability> <amount>" = Decrease ability by amount
|
||||||
|
// - "skill_inc <skill> <amount>" = Increase skill by amount
|
||||||
|
// - "skill_dec <skill> <amount>" = Decrease skill by amount
|
||||||
|
// - "vs <race> <trait>" = Make trait against race
|
||||||
|
// - "save_inc <save> <amount> <save-type>" = Increase saving throws of save and save-type by amount
|
||||||
|
// - "save_dec <save> <amount> <save-type>" = Decrease saving throws of save and save-type by amount
|
||||||
|
//
|
||||||
|
///////////////////////
|
||||||
|
// Lorinton change
|
||||||
|
// Add damage resist
|
||||||
|
//
|
||||||
|
// - "dam_resist <type> <amount> <limit>" = Provide damage resistance (uses EffectDamageResistance arguments)
|
||||||
|
//
|
||||||
|
// ability:
|
||||||
|
// - "0" = ABILITY_STRENGTH
|
||||||
|
// - "1" = ABILITY_DEXTERITY
|
||||||
|
// - "2" = ABILITY_CONSTITUTION
|
||||||
|
// - "3" = ABILITY_INTELLIGENCE
|
||||||
|
// - "4" = ABILITY_WISDOM
|
||||||
|
// - "5" = ABILITY_CHARISMA
|
||||||
|
//
|
||||||
|
// immunity-type:
|
||||||
|
// - "0" = IMMUNITY_TYPE_NONE
|
||||||
|
// - "1" = IMMUNITY_TYPE_MIND_SPELLS
|
||||||
|
// - "2" = IMMUNITY_TYPE_POISON
|
||||||
|
// - "3" = IMMUNITY_TYPE_DISEASE
|
||||||
|
// - "4" = IMMUNITY_TYPE_FEAR
|
||||||
|
// - "5" = IMMUNITY_TYPE_TRAP
|
||||||
|
// - "6" = IMMUNITY_TYPE_PARALYSIS
|
||||||
|
// - "7" = IMMUNITY_TYPE_BLINDNESS
|
||||||
|
// - "8" = IMMUNITY_TYPE_DEAFNESS
|
||||||
|
// - "9" = IMMUNITY_TYPE_SLOW
|
||||||
|
// - "10" = IMMUNITY_TYPE_ENTANGLE
|
||||||
|
// - "11" = IMMUNITY_TYPE_SILENCE
|
||||||
|
// - "12" = IMMUNITY_TYPE_STUN
|
||||||
|
// - "13" = IMMUNITY_TYPE_SLEEP
|
||||||
|
// - "14" = IMMUNITY_TYPE_CHARM
|
||||||
|
// - "15" = IMMUNITY_TYPE_DOMINATE
|
||||||
|
// - "16" = IMMUNITY_TYPE_CONFUSED
|
||||||
|
// - "17" = IMMUNITY_TYPE_CURSED
|
||||||
|
// - "18" = IMMUNITY_TYPE_DAZED
|
||||||
|
// - "19" = IMMUNITY_TYPE_ABILITY_DECREASE
|
||||||
|
// - "20" = IMMUNITY_TYPE_ATTACK_DECREASE
|
||||||
|
// - "21" = IMMUNITY_TYPE_DAMAGE_DECREASE
|
||||||
|
// - "22" = IMMUNITY_TYPE_DAMAGE_IMMUNITY_DECREASE
|
||||||
|
// - "23" = IMMUNITY_TYPE_AC_DECREASE
|
||||||
|
// - "24" = IMMUNITY_TYPE_MOVEMENT_SPEED_DECREASE
|
||||||
|
// - "25" = IMMUNITY_TYPE_SAVING_THROW_DECREASE
|
||||||
|
// - "26" = IMMUNITY_TYPE_SPELL_RESISTANCE_DECREASE
|
||||||
|
// - "27" = IMMUNITY_TYPE_SKILL_DECREASE
|
||||||
|
// - "28" = IMMUNITY_TYPE_KNOCKDOWN
|
||||||
|
// - "29" = IMMUNITY_TYPE_NEGATIVE_LEVEL
|
||||||
|
// - "30" = IMMUNITY_TYPE_SNEAK_ATTACK
|
||||||
|
// - "31" = IMMUNITY_TYPE_CRITICAL_HIT
|
||||||
|
// - "32" = IMMUNITY_TYPE_DEATH
|
||||||
|
//
|
||||||
|
// race:
|
||||||
|
// - "0" = RACIAL_TYPE_DWARF
|
||||||
|
// - "1" = RACIAL_TYPE_ELF
|
||||||
|
// - "2" = RACIAL_TYPE_GNOME
|
||||||
|
// - "3" = RACIAL_TYPE_HALFLING
|
||||||
|
// - "4" = RACIAL_TYPE_HALFELF
|
||||||
|
// - "5" = RACIAL_TYPE_HALFORC
|
||||||
|
// - "6" = RACIAL_TYPE_HUMAN
|
||||||
|
// - "7" = RACIAL_TYPE_ABERRATION
|
||||||
|
// - "8" = RACIAL_TYPE_ANIMAL
|
||||||
|
// - "9" = RACIAL_TYPE_BEAST
|
||||||
|
// - "10" = RACIAL_TYPE_CONSTRUCT
|
||||||
|
// - "11" = RACIAL_TYPE_DRAGON
|
||||||
|
// - "12" = RACIAL_TYPE_HUMANOID_GOBLINOID
|
||||||
|
// - "13" = RACIAL_TYPE_HUMANOID_MONSTROUS
|
||||||
|
// - "14" = RACIAL_TYPE_HUMANOID_ORC
|
||||||
|
// - "15" = RACIAL_TYPE_HUMANOID_REPTILIAN
|
||||||
|
// - "16" = RACIAL_TYPE_ELEMENTAL
|
||||||
|
// - "17" = RACIAL_TYPE_FEY
|
||||||
|
// - "18" = RACIAL_TYPE_GIANT
|
||||||
|
// - "19" = RACIAL_TYPE_MAGICAL_BEAST
|
||||||
|
// - "20" = RACIAL_TYPE_OUTSIDER
|
||||||
|
// - "23" = RACIAL_TYPE_SHAPECHANGER
|
||||||
|
// - "24" = RACIAL_TYPE_UNDEAD
|
||||||
|
// - "25" = RACIAL_TYPE_VERMIN
|
||||||
|
// - "28" = RACIAL_TYPE_ALL
|
||||||
|
// - "29" = RACIAL_TYPE_INVALID
|
||||||
|
//
|
||||||
|
// save:
|
||||||
|
// - "0" = SAVING_THROW_ALL
|
||||||
|
// - "1" = SAVING_THROW_FORT
|
||||||
|
// - "2" = SAVING_THROW_REFLEX
|
||||||
|
// - "3" = SAVING_THROW_WILL
|
||||||
|
//
|
||||||
|
// save-type:
|
||||||
|
// - "0" = SAVING_THROW_TYPE_ALL
|
||||||
|
// - "1" = SAVING_THROW_TYPE_MIND_SPELLS
|
||||||
|
// - "2" = SAVING_THROW_TYPE_POISON
|
||||||
|
// - "3" = SAVING_THROW_TYPE_DISEASE
|
||||||
|
// - "4" = SAVING_THROW_TYPE_FEAR
|
||||||
|
// - "5" = SAVING_THROW_TYPE_SONIC
|
||||||
|
// - "6" = SAVING_THROW_TYPE_ACID
|
||||||
|
// - "7" = SAVING_THROW_TYPE_FIRE
|
||||||
|
// - "8" = SAVING_THROW_TYPE_ELECTRICITY
|
||||||
|
// - "9" = SAVING_THROW_TYPE_POSITIVE
|
||||||
|
// - "10" = SAVING_THROW_TYPE_NEGATIVE
|
||||||
|
// - "11" = SAVING_THROW_TYPE_DEATH
|
||||||
|
// - "12" = SAVING_THROW_TYPE_COLD
|
||||||
|
// - "13" = SAVING_THROW_TYPE_DIVINE
|
||||||
|
// - "14" = SAVING_THROW_TYPE_TRAP
|
||||||
|
// - "15" = SAVING_THROW_TYPE_SPELL
|
||||||
|
// - "16" = SAVING_THROW_TYPE_GOOD
|
||||||
|
// - "17" = SAVING_THROW_TYPE_EVIL
|
||||||
|
// - "18" = SAVING_THROW_TYPE_LAW
|
||||||
|
// - "19" = SAVING_THROW_TYPE_CHAOS
|
||||||
|
//
|
||||||
|
// skill:
|
||||||
|
// - "0" = SKILL_ANIMAL_EMPATHY
|
||||||
|
// - "1" = SKILL_CONCENTRATION
|
||||||
|
// - "2" = SKILL_DISABLE_TRAP
|
||||||
|
// - "3" = SKILL_DISCIPLINE
|
||||||
|
// - "4" = SKILL_HEAL
|
||||||
|
// - "5" = SKILL_HIDE
|
||||||
|
// - "6" = SKILL_LISTEN
|
||||||
|
// - "7" = SKILL_LORE
|
||||||
|
// - "8" = SKILL_MOVE_SILENTLY
|
||||||
|
// - "9" = SKILL_OPEN_LOCK
|
||||||
|
// - "10" = SKILL_PARRY
|
||||||
|
// - "11" = SKILL_PERFORM
|
||||||
|
// - "12" = SKILL_PERSUADE
|
||||||
|
// - "13" = SKILL_PICK_POCKET
|
||||||
|
// - "14" = SKILL_SEARCH
|
||||||
|
// - "15" = SKILL_SET_TRAP
|
||||||
|
// - "16" = SKILL_SPELLCRAFT
|
||||||
|
// - "17" = SKILL_SPOT
|
||||||
|
// - "18" = SKILL_TAUNT
|
||||||
|
// - "19" = SKILL_USE_MAGIC_DEVICE
|
||||||
|
// - "255" = SKILL_ALL_SKILLS
|
||||||
|
//
|
||||||
|
///////////////////////////
|
||||||
|
// Lorinton change
|
||||||
|
// Add damage reduction
|
||||||
|
//
|
||||||
|
// - "32" = DAMAGE_TYPE_COLD
|
||||||
|
// - "128" = DAMAGE_TYPE_ELECTRICAL
|
||||||
|
// - "256" = DAMAGE_TYPE_FIRE
|
||||||
|
//
|
||||||
|
// stSubrace.m_nLightSensitivity = <sensitivity level>;
|
||||||
|
//
|
||||||
|
// This field sets the subrace's light sensitivity. Characters sensitive to
|
||||||
|
// bright light get a penalty based on the light sensitivity. Note that while
|
||||||
|
// light blindness isn't included in the light sensitivity, a subrace must have
|
||||||
|
// a light sensitivity of at least 1 to have light blindness.
|
||||||
|
//
|
||||||
|
// sensitivity level:
|
||||||
|
// 0 = Not sensitive to bright light.
|
||||||
|
// 1 = Exposure to bright light give a -1 penalty.
|
||||||
|
// 2 = Exposure to bright light give a -2 penalty.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// stSubrace.m_nStonecunning = <TRUE/FALSE>;
|
||||||
|
//
|
||||||
|
// This field describes if the subrace gives stonecunning. Characters with
|
||||||
|
// stonecunning will have a higher search and hide skill while underground.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// stSubrace.m_nSpellLikeAbility = <spell-like ability>;
|
||||||
|
//
|
||||||
|
// This field describes which spell-like ability the subrace gives. Currently
|
||||||
|
// there are three spell-like abilities supported (based on spells available
|
||||||
|
// in NWN): Blindness/deafness, darkness and invisibility. A subrace can only
|
||||||
|
// have one spell-like ability.
|
||||||
|
//
|
||||||
|
// spell-like ability:
|
||||||
|
// 0 = No spell-like ability.
|
||||||
|
// 1 = Blindness/deafness
|
||||||
|
// 2 = Darkness
|
||||||
|
// 3 = Invisibility
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// stSubrace.m_bSpellResistance = <TRUE/FALSE>;
|
||||||
|
//
|
||||||
|
// This field describes if the subrace grants spell resistance. If granted the
|
||||||
|
// spell resistance will be 11 + character level.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// stSubrace.m_nFavoredClassF = <favored class>;
|
||||||
|
// stSubrace.m_nFavoredClassM = <favored class>;
|
||||||
|
//
|
||||||
|
// These fields set the favored class for the subrace (for females and males
|
||||||
|
// respectively). If no favored class is specified then the base race's favored
|
||||||
|
// class will be used. Use "CLASS_TYPE_INVALID" to have a character's highest
|
||||||
|
// class be their favored class.
|
||||||
|
//
|
||||||
|
// favored class:
|
||||||
|
// CLASS_TYPE_BARBARIAN
|
||||||
|
// CLASS_TYPE_BARD
|
||||||
|
// CLASS_TYPE_CLERIC
|
||||||
|
// CLASS_TYPE_DRUID
|
||||||
|
// CLASS_TYPE_FIGHTER
|
||||||
|
// CLASS_TYPE_MONK
|
||||||
|
// CLASS_TYPE_PALADIN
|
||||||
|
// CLASS_TYPE_RANGER
|
||||||
|
// CLASS_TYPE_ROGUE
|
||||||
|
// CLASS_TYPE_SORCERER
|
||||||
|
// CLASS_TYPE_WIZARD
|
||||||
|
// CLASS_TYPE_INVALID
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// stSubrace.m_nECLAdd = <amount to add for ECL>;
|
||||||
|
//
|
||||||
|
// These fields set how much must be added to the subrace's level to get to
|
||||||
|
// the effective character level. This is used to define the powerful races.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// stSubrace.m_bIsDefault = <TRUE/FALSE>;
|
||||||
|
//
|
||||||
|
// This field sets if the subrace is the default race for the base race. Only
|
||||||
|
// use it if you know what you're doing.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// SEI_SaveSubrace( subrace struct )
|
||||||
|
//
|
||||||
|
// Once the subrace is completely defined this function saves the data so
|
||||||
|
// that characters can become this subrace when they enter.
|
||||||
|
//
|
||||||
|
// Lorinton change
|
||||||
|
// Creature skins may be used in place of or mixed with effects to create
|
||||||
|
// subrace attributes. Not all subrace attributes may be assigned to the skin.
|
||||||
|
// To use only creature skins set USE_SUBRACE_HIDE = TRUE
|
||||||
|
// and USE_SUBRACE_MIX = FALSE in sei_subraces.
|
||||||
|
// To use creature skins with effects set USE_SUBRACE_HIDE = TRUE
|
||||||
|
// and USE_SUBRACE_MIX = TRUE in sei_subraces.
|
||||||
|
// To use only effects set USE_SUBRACE_HIDE = FALSE in sei_subraces.
|
||||||
|
//
|
||||||
|
#include "sei_subraces"
|
||||||
|
// **************************************************************
|
||||||
|
// ** Forward declarations
|
||||||
|
// **********************
|
||||||
|
// Private function for the subraces script. Do not use.
|
||||||
|
struct Subrace SEI_CreateSubrace( int a_nSubrace, int a_nBaseRace, string a_sDescription );
|
||||||
|
// Private function for the subraces script. Do not use.
|
||||||
|
struct Subrace SEI_AddFieldText( struct Subrace a_stSubrace, string a_sText );
|
||||||
|
// Private function for the subraces script. Do not use.
|
||||||
|
struct Subrace SEI_AddTrait( struct Subrace a_stSubrace, string a_sTrait );
|
||||||
|
// Private function for the subraces script. Do not use.
|
||||||
|
void SEI_SaveSubrace( struct Subrace a_stSubrace );
|
||||||
|
// Define all available subraces.
|
||||||
|
//
|
||||||
|
void SEI_DefineSubraces()
|
||||||
|
{
|
||||||
|
struct Subrace stSubrace;
|
||||||
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Default subraces
|
||||||
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
// SEI_NOTE: The favored classes for the default subraces need to be the
|
||||||
|
// same as the favored classes for the base races in NWN.
|
||||||
|
// Only change the default subraces if you know what you're doing.
|
||||||
|
// Define the "Shield Dwarf" subrace (dwarf default).
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_DWARF_SHIELD, RACIAL_TYPE_DWARF, "Shield Dwarf" );
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "shield" ); // "shield dwarf"
|
||||||
|
// The favored class for dwarves is fighter.
|
||||||
|
stSubrace.m_nFavoredClassF = CLASS_TYPE_FIGHTER;
|
||||||
|
stSubrace.m_nFavoredClassM = CLASS_TYPE_FIGHTER;
|
||||||
|
stSubrace.m_bIsDefault = TRUE;
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// Define the "Moon Elf" subrace (elf default).
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_ELF_MOON, RACIAL_TYPE_ELF, "Moon Elf" );
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "moon" ); // "moon elf"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "silver" ); // "silver elf"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "gray" ); // "gray elf"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "grey" ); // "grey elf"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "teu-tel" ); // "Teu-Tel'Quessir"
|
||||||
|
// The favored class for elves is wizard.
|
||||||
|
stSubrace.m_nFavoredClassF = CLASS_TYPE_WIZARD;
|
||||||
|
stSubrace.m_nFavoredClassM = CLASS_TYPE_WIZARD;
|
||||||
|
stSubrace.m_bIsDefault = TRUE;
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// Define the "Rock Gnome" subrace (gnome default).
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_GNOME_ROCK, RACIAL_TYPE_GNOME, "Rock Gnome" );
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "rock" );
|
||||||
|
// The favored class for gnomes is illusionist (wizard in NWN).
|
||||||
|
stSubrace.m_nFavoredClassF = CLASS_TYPE_WIZARD;
|
||||||
|
stSubrace.m_nFavoredClassM = CLASS_TYPE_WIZARD;
|
||||||
|
stSubrace.m_bIsDefault = TRUE;
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// Define the "Half-elf" subrace (half-elf default).
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_HALFELF, RACIAL_TYPE_HALFELF, "Half-elf" );
|
||||||
|
// The favored class for half-elves is any.
|
||||||
|
stSubrace.m_nFavoredClassF = CLASS_TYPE_INVALID;
|
||||||
|
stSubrace.m_nFavoredClassM = CLASS_TYPE_INVALID;
|
||||||
|
stSubrace.m_bIsDefault = TRUE;
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// Define the "Half-orc" subrace (half-orc).
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_HALFORC, RACIAL_TYPE_HALFORC, "Half-orc" );
|
||||||
|
// The favored class for half-orcs is barbarian.
|
||||||
|
stSubrace.m_nFavoredClassF = CLASS_TYPE_BARBARIAN;
|
||||||
|
stSubrace.m_nFavoredClassM = CLASS_TYPE_BARBARIAN;
|
||||||
|
stSubrace.m_bIsDefault = TRUE;
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// Define the "Lightfoot Halfling" subrace (halfling default).
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_HALFLING_LIGHTFOOT, RACIAL_TYPE_HALFLING, "Lightfoot Halfling" );
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "light" );
|
||||||
|
// The favored class for halflings is rogue.
|
||||||
|
stSubrace.m_nFavoredClassF = CLASS_TYPE_ROGUE;
|
||||||
|
stSubrace.m_nFavoredClassM = CLASS_TYPE_ROGUE;
|
||||||
|
stSubrace.m_bIsDefault = TRUE;
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// Define the "Human" subrace (human default).
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_HUMAN, RACIAL_TYPE_HUMAN, "Human" );
|
||||||
|
// The favored class for elves is any.
|
||||||
|
stSubrace.m_nFavoredClassF = CLASS_TYPE_INVALID;
|
||||||
|
stSubrace.m_nFavoredClassM = CLASS_TYPE_INVALID;
|
||||||
|
stSubrace.m_bIsDefault = TRUE;
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Additional subraces
|
||||||
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Define the "Gold Dwarf" subrace.
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_DWARF_GOLD, RACIAL_TYPE_DWARF, "Gold Dwarf" );
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "gold" ); // "gold dwarf"
|
||||||
|
// Gold dwarves get +2 Con, -2 Dex instead of the standard +2 Con, -2 Cha.
|
||||||
|
if( !USE_SUBRACE_HIDE )
|
||||||
|
{
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_inc 5 2" ); // +2 Cha
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_dec 1 2" ); // -2 Dex
|
||||||
|
}
|
||||||
|
// Gold dwarves get +1 attack against aberrations instead of against orcs and goblinoids.
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex vs 14 attack_dec 1" ); // -1 attack vs orcs
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex vs 12 attack_dec 1" ); // -1 attack vs goblinoids
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex vs 7 attack_inc 1" ); // +1 attack vs aberrations
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// Define the "Gray Dwarf" subrace.
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_DWARF_GRAY, RACIAL_TYPE_DWARF, "Gray Dwarf (Duergar)" );
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "gray" ); // "gray dwarf"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "grey" ); // "grey dwarf"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "deep" ); // "deep dwarf"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "duergar" ); // "duergar"
|
||||||
|
// Gray dwarves get +2 Con, -4 Cha instead of the standard +2 Con, -2 Cha.
|
||||||
|
if( !USE_SUBRACE_HIDE)
|
||||||
|
{
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_dec 5 2" ); // -2 Cha
|
||||||
|
// Gray dwarves get immunity to paralysis, phantasms, and magic or alchemical poisons (but not normal poisons).
|
||||||
|
// SEI_NOTE: Removed the phantasms one and replaced it with immunity to all poisons.
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex immune 6" ); // Immune to paralysis
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex immune 2" ); // Immune to poison
|
||||||
|
// Gray dwarves get +4 racial bonus on Move Silently checks.
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex skill_inc 8 4" ); // +4 to Move Silently
|
||||||
|
// Gray dwarves get +1 racial bonus on Listen and Spot checks.
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex skill_inc 6 1" ); // +1 to Listen
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex skill_inc 17 1" ); // +1 to Spot
|
||||||
|
}
|
||||||
|
// Gray dwarves are sensitive to bright light.
|
||||||
|
stSubrace.m_nLightSensitivity = 2; // Light sensitivity level 2
|
||||||
|
// Gray dwarves get the invisibility spell-like ability.
|
||||||
|
stSubrace.m_nSpellLikeAbility = 3; // Invisibility
|
||||||
|
// Gray dwarves get a +2 level adjustment for being a powerful race
|
||||||
|
stSubrace.m_nECLAdd = 2; // ECL + 2
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// Define the "Dark Elf" subrace.
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_ELF_DARK, RACIAL_TYPE_ELF, "Dark Elf (Drow)" );
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "drow" ); // "drow"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "dark" ); // "dark elf"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "black" ); // "black elf"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "ilythiiri" ); // "Ilythiiri"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "dhaeraow" ); // "Dhaerow"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "mori" ); // "Mori'Quessir"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "ssri-tel" ); // "Ssri-Tel'Quessir"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "gothrim" ); // "Tel'gothrim"
|
||||||
|
// Drow get +2 Dex, -2 Con, +2 Int, +2 Cha instead of the standard +2 Dex, -2 Con.
|
||||||
|
if( !USE_SUBRACE_HIDE )
|
||||||
|
{
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_inc 3 2" ); // +2 Int
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_inc 5 2" ); // +2 Cha
|
||||||
|
// Drow get a +2 racial bonus on Will saves against spells and spell-like abilities.
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex save_inc 3 2 15" ); // +2 Will save against spells
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex save_inc 3 2 1" ); // +2 Will save against mind-spells
|
||||||
|
// Drow get darkvision.
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex darkvision" ); // Darkvision
|
||||||
|
}
|
||||||
|
// Drow are sensitive to bright light.
|
||||||
|
stSubrace.m_nLightSensitivity = 1; // Light sensitivity level 1
|
||||||
|
// Drow are blinded when coming into bright light.
|
||||||
|
stSubrace.m_fLightBlindness = 6.0; // Blinded for 6 seconds
|
||||||
|
// Drow get spell resistance.
|
||||||
|
stSubrace.m_bSpellResistance = TRUE; // Spell resistance
|
||||||
|
// Drow get the darkness spell-like ability.
|
||||||
|
stSubrace.m_nSpellLikeAbility = 2; // Darkness
|
||||||
|
// Drow get a +2 level adjustment for being a powerful race
|
||||||
|
stSubrace.m_nECLAdd = 2; // ECL + 2
|
||||||
|
// Drow females have cleric as their favored class.
|
||||||
|
stSubrace.m_nFavoredClassF = CLASS_TYPE_CLERIC; // Favored class: Cleric
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// Define the "Sun Elf" subrace.
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_ELF_SUN, RACIAL_TYPE_ELF, "Sun Elf" );
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "sun" ); // "sun elf"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "gold" ); // "gold elf"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "ar-tel" ); // "Ar-Tel'Quessir"
|
||||||
|
// Sun elves get +2 Int, -2 Con instead of the standard +2 Dex, -2 Con.
|
||||||
|
if (!USE_SUBRACE_HIDE )
|
||||||
|
{
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_inc 3 2" ); // +2 Int
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_dec 1 2" ); // -2 Dex
|
||||||
|
}
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// Define the "Wild Elf" subrace.
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_ELF_WILD, RACIAL_TYPE_ELF, "Wild Elf" );
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "wild" ); // "wild elf"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "savage" ); // "savage elf"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "sy-tel" ); // "Sy-Tel'Quessir"
|
||||||
|
// Wild elves get +2 Dex, -2 Int instead of the standard +2 Dex, -2 Con.
|
||||||
|
if( !USE_SUBRACE_HIDE )
|
||||||
|
{
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_inc 2 2" ); // +2 Con
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_dec 3 2" ); // -2 Int
|
||||||
|
}
|
||||||
|
// [Errata] Wild elves have sorcerer as their favored class.
|
||||||
|
stSubrace.m_nFavoredClassF = CLASS_TYPE_SORCERER; // Favored class: Sorcerer
|
||||||
|
stSubrace.m_nFavoredClassM = CLASS_TYPE_SORCERER; // Favored class: Sorcerer
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// Define the "Wood Elf" subrace.
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_ELF_WOOD, RACIAL_TYPE_ELF, "Wood Elf" );
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "wood" ); // "wood elf"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "green" ); // "green elf"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "forest" ); // "forest elf"
|
||||||
|
// Wood elves get +2 Str, +2 Dex, -2 Con, -2 Int, -2 Cha instead of the standard +2 Dex, -2 Con.
|
||||||
|
if( !USE_SUBRACE_HIDE )
|
||||||
|
{
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_inc 0 2" ); // +2 Str
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_dec 3 2" ); // -2 Int
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_dec 5 2" ); // -2 Cha
|
||||||
|
}
|
||||||
|
// [Errata] Wood elves have ranger as their favored class.
|
||||||
|
stSubrace.m_nFavoredClassF = CLASS_TYPE_RANGER; // Favored class: Ranger
|
||||||
|
stSubrace.m_nFavoredClassM = CLASS_TYPE_RANGER; // Favored class: Ranger
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// Define the "Deep Gnome" subrace.
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_GNOME_DEEP, RACIAL_TYPE_GNOME, "Deep Gnome (Svirfneblin)" );
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "deep" );
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "svirfneblin" );
|
||||||
|
// Deep gnomes get -2 Str, +2 Dex, +2 Wis, -4 Cha instead of the standard +2 Con, -2 Str.
|
||||||
|
if( !USE_SUBRACE_HIDE )
|
||||||
|
{
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_inc 1 2" ); // +2 Dex
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_inc 4 2" ); // +2 Wis
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_dec 2 2" ); // -2 Con
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ability_dec 5 4" ); // -4 Cha
|
||||||
|
// Deep gnomes get a +4 dodge bonus against all creatures (and no special bonus against giants).
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex ac_inc 4" ); // +4 AC
|
||||||
|
// Deep gnomes get a +2 racial bonus on all saving throws.
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex save_inc 0 2 0" ); // +2 save bonus
|
||||||
|
// Deep gnomes get a +2 racial bonus on Hide checks.
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex skill_inc 5 2" ); // +2 to Hide
|
||||||
|
// Deep gnomes get darkvision.
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex darkvision" ); // Darkvision
|
||||||
|
}
|
||||||
|
// Deep gnomes get a +4 dodge bonus against all creatures (and no special bonus against giants).
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex vs 18 ac_dec 4" ); // -4 AC vs giants
|
||||||
|
// Deep gnomes get spell resistance.
|
||||||
|
stSubrace.m_bSpellResistance = TRUE; // Spell resistance
|
||||||
|
// Deep gnomes get stonecunning.
|
||||||
|
stSubrace.m_nStonecunning = TRUE; // Stonecunning
|
||||||
|
// Deep gnomes get the blindness spell-like ability.
|
||||||
|
stSubrace.m_nSpellLikeAbility = 1; // Blindness/deafness
|
||||||
|
// Drow get a +3 level adjustment for being a powerful race
|
||||||
|
stSubrace.m_nECLAdd = 3; // ECL + 3
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// Define the "Ghostwise Halfling" subrace.
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_HALFLING_GHOSTWISE, RACIAL_TYPE_HALFLING, "Ghostwise Halfling" );
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "ghost" );
|
||||||
|
// Ghostwise halflings do not receive the standard Halfling +1 racial bonus on all saving throws.
|
||||||
|
if( !USE_SUBRACE_HIDE )
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex save_dec 0 1 0" ); // -1 save penalty
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// Define the "Strongheart Halfling" subrace.
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_HALFLING_STRONGHEART, RACIAL_TYPE_HALFLING, "Strongheart Halfling" );
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "strong" );
|
||||||
|
// Strongheart halflings do not receive the standard Halfling +1 racial bonus on all saving throws.
|
||||||
|
if( !USE_SUBRACE_HIDE )
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex save_dec 0 1 0" ); // -1 save penalty
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// Define the "Half-drow" subrace.
|
||||||
|
stSubrace = SEI_CreateSubrace( SUBRACE_HALFDROW, RACIAL_TYPE_HALFELF, "Half-drow" );
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "drow" ); // "drow"
|
||||||
|
stSubrace = SEI_AddFieldText( stSubrace, "dark" ); // "dark elf"
|
||||||
|
// Half-drow get darkvision.
|
||||||
|
if( !USE_SUBRACE_HIDE )
|
||||||
|
stSubrace = SEI_AddTrait( stSubrace, "ex darkvision" ); // Darkvision
|
||||||
|
// The favored class for half-drow is any.
|
||||||
|
stSubrace.m_nFavoredClassF = CLASS_TYPE_INVALID;
|
||||||
|
stSubrace.m_nFavoredClassM = CLASS_TYPE_INVALID;
|
||||||
|
SEI_SaveSubrace( stSubrace );
|
||||||
|
// SEI_NOTE: New subraces can be added here.
|
||||||
|
} // End SEI_DefineSubraces
|
17
src/_removed/sei_subrconv.nss
Normal file
17
src/_removed/sei_subrconv.nss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// NWSubraceConversation
|
||||||
|
//
|
||||||
|
// Re-start the interrupted subrace selection conversation
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "subraces"
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
// Conversation interrupted, start again.
|
||||||
|
SEI_StartSubraceDialog( OBJECT_SELF );
|
||||||
|
}
|
||||||
|
|
290
src/_removed/subraces.nss
Normal file
290
src/_removed/subraces.nss
Normal file
@ -0,0 +1,290 @@
|
|||||||
|
// HCR 5.5 change by Lorinton
|
||||||
|
// Modified to reduce (hopefully eliminate) subrace effects being stripped by the game
|
||||||
|
// and other effects such as level drain being stripped by the subrace system.
|
||||||
|
//
|
||||||
|
// NWSubraces
|
||||||
|
//
|
||||||
|
// Basic subrace functionality
|
||||||
|
//
|
||||||
|
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
// Include the subrace definitions and the subraces code.
|
||||||
|
// Lorinton change
|
||||||
|
//#include "sei_subraces"
|
||||||
|
#include "sei_subraceslst"
|
||||||
|
#include "sei_xp"
|
||||||
|
// **************************************************************
|
||||||
|
// ** Constants
|
||||||
|
// **********************
|
||||||
|
// Enum of the supported subraces
|
||||||
|
int SUBRACE_NONE = 0; // No Subrace set yet
|
||||||
|
int SUBRACE_MONSTER = 1; // For monsters, etc. without subrace
|
||||||
|
int SUBRACE_DWARF_GOLD = 2;
|
||||||
|
int SUBRACE_DWARF_GRAY = 3;
|
||||||
|
int SUBRACE_DWARF_SHIELD = 4;
|
||||||
|
int SUBRACE_ELF_DARK = 5;
|
||||||
|
int SUBRACE_ELF_MOON = 6;
|
||||||
|
int SUBRACE_ELF_SUN = 7;
|
||||||
|
int SUBRACE_ELF_WILD = 8;
|
||||||
|
int SUBRACE_ELF_WOOD = 9;
|
||||||
|
int SUBRACE_GNOME_DEEP = 10;
|
||||||
|
int SUBRACE_GNOME_ROCK = 11;
|
||||||
|
int SUBRACE_HALFELF = 12;
|
||||||
|
int SUBRACE_HALFORC = 13;
|
||||||
|
int SUBRACE_HALFLING_GHOSTWISE = 14;
|
||||||
|
int SUBRACE_HALFLING_LIGHTFOOT = 15;
|
||||||
|
int SUBRACE_HALFLING_STRONGHEART = 16;
|
||||||
|
int SUBRACE_HUMAN = 17;
|
||||||
|
int SUBRACE_HALFDROW = 18;
|
||||||
|
int AREA_NONE = 0;
|
||||||
|
int AREA_DEFAULT_LIGHT = 1;
|
||||||
|
int AREA_DARK = 2;
|
||||||
|
int AREA_LIGHT = 3;
|
||||||
|
int AREA_SUN = 4;
|
||||||
|
int AREA_DEFAULT_GROUND = 10;
|
||||||
|
int AREA_LEXINGTON = 20;
|
||||||
|
int AREA_KENTUCKY = 30;
|
||||||
|
|
||||||
|
// **************************************************************
|
||||||
|
// ** Structures
|
||||||
|
// **********************
|
||||||
|
// Structure used to pass information on a certain subrace.
|
||||||
|
struct Subrace
|
||||||
|
{
|
||||||
|
int m_nID;
|
||||||
|
int m_nBaseRace;
|
||||||
|
int m_nNumFieldValues;
|
||||||
|
int m_nNumTraits;
|
||||||
|
int m_bSpellResistance;
|
||||||
|
int m_nLightSensitivity;
|
||||||
|
float m_fLightBlindness;
|
||||||
|
int m_nStonecunning;
|
||||||
|
int m_nSpellLikeAbility;
|
||||||
|
int m_nECLAdd;
|
||||||
|
int m_nFavoredClassF;
|
||||||
|
int m_nFavoredClassM;
|
||||||
|
int m_bIsDefault;
|
||||||
|
};
|
||||||
|
// **************************************************************
|
||||||
|
// ** Event functions
|
||||||
|
// **********************
|
||||||
|
// Initializes the available subraces and everything that is needed to properly
|
||||||
|
// run this script.
|
||||||
|
// Call this function in the OnModuleLoad event of the module.
|
||||||
|
//
|
||||||
|
void Subraces_InitSubraces();
|
||||||
|
// Sets the default area settings. This is so you don't have to do it for every area.
|
||||||
|
// Call this function in the OnModuleLoad event of the module.
|
||||||
|
// ARGUMENTS:
|
||||||
|
// a_nSettings = What the default settings for the area are.
|
||||||
|
// There is light-level:
|
||||||
|
// AREA_DARK - The area is considered dark.
|
||||||
|
// AREA_LIGHT - The area is considered daylight.
|
||||||
|
// AREA_SUN - The light level depends on the sun (day/night).
|
||||||
|
// And there is the 'ground' setting:
|
||||||
|
// AREA_UNDERGROUND - The area is underground.
|
||||||
|
// AREA_ABOVEGROUND - The area is above ground.
|
||||||
|
// Add the setting for lightness to that of ground for the
|
||||||
|
// final setting, i.e.:
|
||||||
|
// Subraces_SetDefaultAreaSettings( AREA_DARK + AREA_UNDERGROUND );
|
||||||
|
// for if most of the areas in the module are dark and underground.
|
||||||
|
//
|
||||||
|
void Subraces_SetDefaultAreaSettings( int a_nSettings );
|
||||||
|
// Initializes the subrace for character a_oCharacter.
|
||||||
|
// Call this function in the OnClientEnter event of the module.
|
||||||
|
// ARGUMENTS:
|
||||||
|
// a_oCharacter = The character to initialize the subrace for
|
||||||
|
//
|
||||||
|
void Subraces_InitSubrace( object a_oCharacter );
|
||||||
|
// Modifies the character's subrace attributes on a character's level up.
|
||||||
|
// Call this function in the OnPlayerLevelUp event of the module.
|
||||||
|
// ARGUMENTS:
|
||||||
|
// a_oCharacter = The character to level up.
|
||||||
|
//
|
||||||
|
void Subraces_LevelUpSubrace( object a_oCharacter );
|
||||||
|
// Makes sure that the subrace is set correctly again when the character respawns.
|
||||||
|
// ARGUMENTS:
|
||||||
|
// a_oCharacter = The character respawning.
|
||||||
|
//
|
||||||
|
void Subraces_RespawnSubrace( object a_oCharacter );
|
||||||
|
// Does some subrace specific things when a character enters a new area.
|
||||||
|
// Call this function in the OnEnter event of every area.
|
||||||
|
// ARGUMENTS:
|
||||||
|
// a_oCharacter = The character to enter the new area.
|
||||||
|
// a_nSettings = The light and (under)ground settings of the area.
|
||||||
|
// Don't specify this argument to use module defaults.
|
||||||
|
//
|
||||||
|
void Subraces_OnEnterArea( object a_oCharacter, int a_nSettings = 0 );
|
||||||
|
// **************************************************************
|
||||||
|
// ** Useage functions
|
||||||
|
// **********************
|
||||||
|
// Returns the subrace (enum) for the target.
|
||||||
|
// ARGUMENTS:
|
||||||
|
// a_oCharacter = The character to get the subrace from (assumed valid)
|
||||||
|
// RESULT:
|
||||||
|
// The subrace of a_oCharacter (see te "SUBRACE_" variables)
|
||||||
|
//
|
||||||
|
int Subraces_GetCharacterSubrace( object a_oCharacter );
|
||||||
|
// Returns whether the character is of subrace a_nSubrace.
|
||||||
|
// ARGUMENTS:
|
||||||
|
// a_oCharacter = The character to get the subrace from (assumed valid)
|
||||||
|
// a_nSubrace = The subrace to check against
|
||||||
|
// RESULT:
|
||||||
|
// Whether a_oCharacter is of subrace a_nSubrace
|
||||||
|
//
|
||||||
|
int Subraces_IsCharacterOfSubrace( object a_oCharacter, int a_nSubrace );
|
||||||
|
// Returns the effective character level of the character.
|
||||||
|
// ARGUMENTS:
|
||||||
|
// a_oCharacter = The character to get the ECL from (assumed valid)
|
||||||
|
//
|
||||||
|
int Subraces_GetEffectiveCharacterLevel( object a_oCharacter );
|
||||||
|
// Remove subrace related items before starting a new module.
|
||||||
|
// If the new module supports subraces it should re-initialize them.
|
||||||
|
// ARGUMENTS:
|
||||||
|
// a_sModuleName = The name of the module to start.
|
||||||
|
//
|
||||||
|
void Subraces_StartNewModule( string a_sModuleName );
|
||||||
|
// Remove subrace related items before sending PC through protal.
|
||||||
|
// If the new server supports subraces it should re-initialize them.
|
||||||
|
// ARGUMENTS:
|
||||||
|
// a_oTarget = The character to send through the portal.
|
||||||
|
// a_sIPaddress = This can be numerical "192.168.0.84" or alphanumeric
|
||||||
|
// "www.bioware.com". It can also contain a port
|
||||||
|
// "192.168.0.84:5121" or "www.bioware.com:5121"; if the
|
||||||
|
// port is not specified, it will default to 5121.
|
||||||
|
// a_sPassword = Login password for the destination server.
|
||||||
|
// a_sWaypointTag = If this is set, after portalling the character will be
|
||||||
|
// moved to this waypoint if it exists.
|
||||||
|
// a_bSeamless = If this is set, the client wil not be prompted with
|
||||||
|
// the information window telling them about the server,
|
||||||
|
// and they will not be allowed to save a copy of their
|
||||||
|
// character if they are using a local vault character.
|
||||||
|
//
|
||||||
|
void Subraces_ActivatePortal( object a_oTarget, string a_sIPaddress="", string a_sPassword="", string a_sWaypointTag="", int a_bSeemless=FALSE );
|
||||||
|
// Change the area settings dependent traits for the character.
|
||||||
|
// This function can for instance be called in the OnEnter and OnExit scripts
|
||||||
|
// of a trigger to create an area where the settings differ from the rest of the
|
||||||
|
// area. (Like a room of sunlight in an otherwise lightless dungeon).
|
||||||
|
// ARGUMENTS:
|
||||||
|
// a_oCharacter = The character the settings affect.
|
||||||
|
// a_nSettings = What these differing settings are. Leave away to reset
|
||||||
|
// to the area defaults.
|
||||||
|
//
|
||||||
|
void Subraces_ChangeAreaSettings( object a_oCharacter, int a_nSettings = 0 );
|
||||||
|
// A subrace safe version of BioWare's RemoveEffect function. Removes effect
|
||||||
|
// in such a way as not to touch te subraces (i.e. te subraces are safe).
|
||||||
|
// ARGUMENTS:
|
||||||
|
// a_oCreature = The creature to remove the effect from.
|
||||||
|
// a_eEffect = The effect to remove from the creature.
|
||||||
|
//
|
||||||
|
void Subraces_SafeRemoveEffect( object a_oCreature, effect a_eEffect );
|
||||||
|
// A subrace safe version that removes all non-subrace effects from the char.
|
||||||
|
// ARGUMENTS:
|
||||||
|
// a_oCreature = The creature to remove the effect from.
|
||||||
|
//
|
||||||
|
void Subraces_SafeRemoveEffects( object a_oCreature );
|
||||||
|
// **************************************************************
|
||||||
|
// ** Function definitions
|
||||||
|
// **********************
|
||||||
|
// Initializes the available subraces and everything that is needed to properly
|
||||||
|
// run this script.
|
||||||
|
//
|
||||||
|
void Subraces_InitSubraces()
|
||||||
|
{
|
||||||
|
SEI_InitSubraces();
|
||||||
|
}
|
||||||
|
// Sets the default area settings. This is so you don't have to do it for every area.
|
||||||
|
//
|
||||||
|
void Subraces_SetDefaultAreaSettings( int a_nSettings )
|
||||||
|
{
|
||||||
|
SEI_SetDefaultAreaSettings( a_nSettings );
|
||||||
|
}
|
||||||
|
// Initializes the subrace for character a_oCharacter.
|
||||||
|
//
|
||||||
|
void Subraces_InitSubrace( object a_oCharacter )
|
||||||
|
{
|
||||||
|
AssignCommand( GetModule(), SEI_InitSubrace( a_oCharacter ) );
|
||||||
|
}
|
||||||
|
// Modifies the character's subrace attributes on a character's level up.
|
||||||
|
//
|
||||||
|
void Subraces_LevelUpSubrace( object a_oCharacter )
|
||||||
|
{
|
||||||
|
SEI_LevelUpSubrace( a_oCharacter );
|
||||||
|
}
|
||||||
|
// Makes sure that the subrace is set correctly again when the character respawns.
|
||||||
|
//
|
||||||
|
void Subraces_RespawnSubrace( object a_oCharacter )
|
||||||
|
{
|
||||||
|
SEI_InitSubrace( a_oCharacter );
|
||||||
|
}
|
||||||
|
// Does some subrace specific things when a character enters a new area.
|
||||||
|
//
|
||||||
|
void Subraces_OnEnterArea( object a_oCharacter, int a_nSettings = 0 )
|
||||||
|
{
|
||||||
|
SEI_EnterArea( a_oCharacter, a_nSettings );
|
||||||
|
}
|
||||||
|
// Returns the subrace (enum) for the target.
|
||||||
|
//
|
||||||
|
int Subraces_GetCharacterSubrace( object a_oCharacter )
|
||||||
|
{
|
||||||
|
return SEI_GetCharacterSubrace( a_oCharacter );
|
||||||
|
}
|
||||||
|
// Returns whether the character is of subrace a_nSubrace.
|
||||||
|
//
|
||||||
|
int Subraces_IsCharacterOfSubrace( object a_oCharacter, int a_nSubrace )
|
||||||
|
{
|
||||||
|
return SEI_IsCharacterOfSubrace( a_oCharacter, a_nSubrace );
|
||||||
|
}
|
||||||
|
// Returns the effective character level of the character.
|
||||||
|
//
|
||||||
|
int Subraces_GetEffectiveCharacterLevel( object a_oCharacter )
|
||||||
|
{
|
||||||
|
return SEI_GetEffectiveCharacterLevel( a_oCharacter );
|
||||||
|
}
|
||||||
|
// Remove subrace related items before starting a new module.
|
||||||
|
//
|
||||||
|
void Subraces_StartNewModule( string a_sModuleName )
|
||||||
|
{
|
||||||
|
object oPC = GetFirstPC();
|
||||||
|
while( GetIsObjectValid( oPC ) )
|
||||||
|
{
|
||||||
|
SEI_RemoveSubrace( oPC );
|
||||||
|
oPC = GetNextPC();
|
||||||
|
}
|
||||||
|
StartNewModule( a_sModuleName );
|
||||||
|
}
|
||||||
|
// Remove subrace related items before sending PC through protal.
|
||||||
|
//
|
||||||
|
void Subraces_ActivatePortal( object a_oTarget, string a_sIPaddress="", string a_sPassword="", string a_sWaypointTag="", int a_bSeemless=FALSE )
|
||||||
|
{
|
||||||
|
SEI_RemoveSubrace( a_oTarget );
|
||||||
|
ActivatePortal( a_oTarget, a_sIPaddress, a_sPassword, a_sWaypointTag, a_bSeemless );
|
||||||
|
}
|
||||||
|
// Change the area settings dependent traits for the character.
|
||||||
|
//
|
||||||
|
void Subraces_ChangeAreaSettings( object a_oCharacter, int a_nSettings = 0 )
|
||||||
|
{
|
||||||
|
SEI_ApplyAreaSettings( a_oCharacter, a_nSettings );
|
||||||
|
}
|
||||||
|
// A subrace safe version of BioWare's RemoveEffect function.
|
||||||
|
//
|
||||||
|
void Subraces_SafeRemoveEffect( object a_oCreature, effect a_eEffect )
|
||||||
|
{
|
||||||
|
SEI_RemoveEffect( a_oCreature, a_eEffect );
|
||||||
|
}
|
||||||
|
// A subrace safe version that removes all non-subrace effects from the char.
|
||||||
|
//
|
||||||
|
void Subraces_SafeRemoveEffects( object a_oCreature )
|
||||||
|
{
|
||||||
|
SEI_RemoveEffects( a_oCreature );
|
||||||
|
// Lorinton change, the subrace is now reinitialized after removing effects.
|
||||||
|
// This call is not needed.
|
||||||
|
//SEI_InitSubraceTraits( a_oCreature, FALSE );
|
||||||
|
}
|
||||||
|
// SEI_TODO: Added for development. Remove!
|
||||||
|
/*
|
||||||
|
void main ()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//*/
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user