forked from Jaysyn/PRC8
2025/12/04 Update
Added Intrinsic Armor builder's feat to prevent any Disarming. Added Intrinsic Weapon builder's feat to prevent Ruin Armor. GetEpicSorcerer() should allow racial hit dice casters. Enlarge / Reduce Person now stores object's original scale. Added prc_inc_size for the above changes. Updated PRC8 version. Reverted Vow of Poverty to use PRC event system. Reverted Forsaker to use PRC event system. Updated Spell Cancel NUI to not show "system" spells @Rakiov) Added notes on instanced Maze system. Organized notes.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
Toxic Weapon
|
||||
|
||||
Darkvision
|
||||
Binary file not shown.
162
nwn/nwnprc/trunk/users/Jaysyn/future spells/pg_s0_chromorb.nss
Normal file
162
nwn/nwnprc/trunk/users/Jaysyn/future spells/pg_s0_chromorb.nss
Normal file
@@ -0,0 +1,162 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Sihlbrane's Grove
|
||||
//:: Chromatic Orb
|
||||
//:: 00_S0_CHROMORB
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
This spell creates a 4-inch-diameter sphere
|
||||
that can be hurled unerringly to its target.
|
||||
The orb's effect depends on the level of the
|
||||
wizard:
|
||||
A 1st-level sphere inflicts 1d4 damage and blinds
|
||||
the target for one round.
|
||||
A 2nd-level sphere inflicts 1d6 damage.
|
||||
A 3rd-level sphere deals 1d8 damage and burns the
|
||||
victim for 1d3 fire damage.
|
||||
A 4th-level sphere deals 1d10 damage and blinds
|
||||
the target for four rounds.
|
||||
A 5th to 6th-level sphere deals 1d12 damage and
|
||||
stuns the target for three rounds.
|
||||
The 7th+ level sphere deals 2d8 damage and
|
||||
paralyzes the victim for 13 rounds.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Yaballa
|
||||
//:: Created On: 5/9/2003
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "pg_spell_CONST"
|
||||
#include "x2_inc_spellhook"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void RunWhiteOrb(object oTarget, int nDamage, int nColor);
|
||||
void RunRedOrb(object oTarget, int nDamage, int nColor);
|
||||
void RunOrangeOrb(object oTarget, int nDamage, int nDamage2, int nColor);
|
||||
void RunYellowOrb(object oTarget, int nDamage, int nColor);
|
||||
void RunGreenOrb(object oTarget, int nDamage, int nColor);
|
||||
void RunBlackOrb(object oTarget, int nDamage, int nColor);
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
object oCaster = OBJECT_SELF;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = PRCGetCasterLevel(oCaster);
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDamage, nDamage2, nColor;
|
||||
effect eMissile = EffectVisualEffect(VFX_IMP_MIRV);
|
||||
float fDist = GetDistanceBetween(OBJECT_SELF, oTarget);
|
||||
float fDelay = (fDist/25.0f);
|
||||
float fDelay2, fTime;
|
||||
|
||||
if(nHD < 1) {nHD = 1;}
|
||||
switch(nHD)
|
||||
{
|
||||
case 1: nDamage = d4(); nColor = VFX_DUR_LIGHT_WHITE_20; break;
|
||||
case 2: nDamage = d6(); nColor = VFX_DUR_LIGHT_RED_20; break;
|
||||
case 3: nDamage = d8(); nDamage2 = d3(); nColor = VFX_DUR_LIGHT_ORANGE_20; break;
|
||||
case 4: nDamage = d10(); nColor = VFX_DUR_LIGHT_YELLOW_20; break;
|
||||
case 5: case 6: nDamage = d12(); nColor = VFX_DUR_LIGHT_PURPLE_20; break;
|
||||
default: nDamage = d8(2); nColor = VFX_DUR_DARKNESS; break;
|
||||
}
|
||||
if(nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
switch(nHD)
|
||||
{
|
||||
case 1: nDamage = 4; break;
|
||||
case 2: nDamage = 6; break;
|
||||
case 3: nDamage = 8; nDamage2 = 3; break;
|
||||
case 4: nDamage = 10; break;
|
||||
case 5: case 6: nDamage = 12; break;
|
||||
default: nDamage = 16; break;
|
||||
}
|
||||
}
|
||||
else if(nMetaMagic == METAMAGIC_EMPOWER) {
|
||||
nDamage = nDamage + (nDamage/2); }
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
fTime = fDelay;
|
||||
fDelay2 += 0.1f;
|
||||
fTime += fDelay2;
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CHROMATIC_ORB));
|
||||
if(!PRCDoResistSpell(OBJECT_SELF, oTarget, FloatToInt(fDelay)))
|
||||
{
|
||||
if(!PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay))
|
||||
{
|
||||
switch(nHD)
|
||||
{
|
||||
case 1: DelayCommand(fTime, RunWhiteOrb(oTarget, nDamage, nColor)); break;
|
||||
case 2: DelayCommand(fTime, RunRedOrb(oTarget, nDamage, nColor)); break;
|
||||
case 3: DelayCommand(fTime, RunOrangeOrb(oTarget, nDamage, nDamage2, nColor)); break;
|
||||
case 4: DelayCommand(fTime, RunYellowOrb(oTarget, nDamage, nColor)); break;
|
||||
case 5: case 6: DelayCommand(fTime, RunGreenOrb(oTarget, nDamage, nColor)); break;
|
||||
default: DelayCommand(fTime, RunBlackOrb(oTarget, nDamage, nColor)); break;
|
||||
}
|
||||
DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_MAGBLUE), oTarget));
|
||||
}
|
||||
}
|
||||
DelayCommand(fDelay2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eMissile, oTarget));
|
||||
}
|
||||
}
|
||||
|
||||
void RunWhiteOrb(object oTarget, int nDamage, int nColor)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_BLIND_DEAF_M), oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(nColor), oTarget, 3.0f);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectBlindness(), oTarget, 6.0f);
|
||||
}
|
||||
|
||||
void RunRedOrb(object oTarget, int nDamage, int nColor)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(nColor), oTarget, 3.0f);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget);
|
||||
}
|
||||
|
||||
void RunOrangeOrb(object oTarget, int nDamage, int nDamage2, int nColor)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(nColor), oTarget, 3.0f);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage2, DAMAGE_TYPE_FIRE), oTarget);
|
||||
}
|
||||
|
||||
void RunYellowOrb(object oTarget, int nDamage, int nColor)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_BLIND_DEAF_M), oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(nColor), oTarget, 3.0f);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectBlindness(), oTarget, 24.0f);
|
||||
}
|
||||
|
||||
void RunGreenOrb(object oTarget, int nDamage, int nColor)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_STUN), oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(nColor), oTarget, 3.0f);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectStunned(), oTarget, 18.0f);
|
||||
}
|
||||
|
||||
void RunBlackOrb(object oTarget, int nDamage, int nColor)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_PARALYZE_HOLD), oTarget, 78.0f);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(nColor), oTarget, 3.0f);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectParalyze(), oTarget, 78.0f);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Sihlbrane's Grove
|
||||
//:: Larloch's Minor Drain
|
||||
//:: 00_S0_LARLDRAIN
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Yaballa
|
||||
//:: Created On: 7/9/2003
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "pg_spell_CONST"
|
||||
#include "x2_inc_spellhook"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-07-07 by Georg Zoeller
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDamage = d4();
|
||||
|
||||
if(nMetaMagic == METAMAGIC_MAXIMIZE) {
|
||||
nDamage = 4; }
|
||||
else if(nMetaMagic == METAMAGIC_EMPOWER) {
|
||||
nDamage = nDamage + (nDamage/2); }
|
||||
effect eHeal = EffectTemporaryHitpoints(nDamage);
|
||||
effect eRay = EffectBeam(VFX_BEAM_EVIL, OBJECT_SELF, BODY_NODE_HAND);
|
||||
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_LARLOCHS_MINOR_DRAIN));
|
||||
if(!PRCDoResistSpell(OBJECT_SELF, oTarget, 1))
|
||||
{
|
||||
effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE);
|
||||
DelayCommand(1.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
DelayCommand(1.0f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHeal, OBJECT_SELF, HoursToSeconds(1)));
|
||||
DelayCommand(1.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HEAD_EVIL), oTarget));
|
||||
DelayCommand(1.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HEAD_HEAL), OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRay, oTarget, 1.7f);
|
||||
}
|
||||
|
||||
143
nwn/nwnprc/trunk/users/Jaysyn/future spells/prc_c_bladebane.nss
Normal file
143
nwn/nwnprc/trunk/users/Jaysyn/future spells/prc_c_bladebane.nss
Normal file
@@ -0,0 +1,143 @@
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Short description Bladebane Conversation
|
||||
//:: filename prc_c_bladebane.nss
|
||||
//:://////////////////////////////////////////////
|
||||
/** @file
|
||||
|
||||
|
||||
@author Tenjac
|
||||
@date Created - 7/29/22
|
||||
@updater Jaysyn
|
||||
@updated 2024-10-02 10:47:03
|
||||
//////////////////////////////////////////////////
|
||||
/* Constant defintions */
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
const int STAGE_ENTRY = 0;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
/* Aid functions */
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
/* Main function */
|
||||
//////////////////////////////////////////////////
|
||||
#include "inc_dynconv"
|
||||
#include "prc_inc_racial"
|
||||
#include "inc_2dacache"
|
||||
#include "inc_addragebonus"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
/* Get the value of the local variable set by the conversation script calling
|
||||
* this script. Values:
|
||||
* DYNCONV_ABORTED Conversation aborted
|
||||
* DYNCONV_EXITED Conversation exited via the exit node
|
||||
* DYNCONV_SETUP_STAGE System's reply turn
|
||||
* 0 Error - something else called the script
|
||||
* Other The user made a choice
|
||||
*/
|
||||
int nValue = GetLocalInt(oPC, DYNCONV_VARIABLE);
|
||||
// The stage is used to determine the active conversation node.
|
||||
// 0 is the entry node.
|
||||
int nStage = GetStage(oPC);
|
||||
|
||||
// Check which of the conversation scripts called the scripts
|
||||
if(nValue == 0) // All of them set the DynConv_Var to non-zero value, so something is wrong -> abort
|
||||
return;
|
||||
|
||||
if(nValue == DYNCONV_SETUP_STAGE)
|
||||
{
|
||||
// Check if this stage is marked as already set up
|
||||
// This stops list duplication when scrolling
|
||||
if(!GetIsStageSetUp(nStage, oPC))
|
||||
{
|
||||
// variable named nStage determines the current conversation node
|
||||
// Function SetHeader to set the text displayed to the PC
|
||||
// Function AddChoice to add a response option for the PC. The responses are show in order added
|
||||
if(nStage == STAGE_ENTRY)
|
||||
{
|
||||
// Set the header
|
||||
SetHeader("Choose racial type.");
|
||||
object oPC = GetPCSpeaker(); // The PC object
|
||||
string sName; // Variable to hold the racial type name
|
||||
int racialType; // Variable for the racial type
|
||||
|
||||
// Loop through the specified racial types
|
||||
for (racialType = 0; racialType <= 52; racialType++) // Covers all the default racialtypes + ooze & plant
|
||||
{
|
||||
// Only list specific racial groups
|
||||
if (racialType == 0 || racialType == 1 || racialType == 2 || racialType == 3 || racialType == 4 ||
|
||||
racialType == 5 || racialType == 6 || racialType == 7 || racialType == 8 || racialType == 9 ||
|
||||
racialType == 10 || racialType == 11 || racialType == 12 || racialType == 13 || racialType == 14 ||
|
||||
racialType == 15 || racialType == 16 || racialType == 17 || racialType == 18 || racialType == 19 ||
|
||||
racialType == 20 || racialType == 23 || racialType == 24 || racialType == 25 || racialType == 29 ||
|
||||
racialType == 52)
|
||||
{
|
||||
// Get the racial type name using the current racial type integer
|
||||
sName = Get2DACache("racialtypes", "Constant", racialType); // Use racialType to get the name
|
||||
|
||||
// Only add to the conversation if sName is not empty
|
||||
if (sName != "")
|
||||
{
|
||||
AddChoice(sName, racialType, oPC); // Add the choice to the conversation
|
||||
}
|
||||
}
|
||||
}
|
||||
/* // Set the header
|
||||
SetHeader("Choose racial type.");
|
||||
int i;
|
||||
for (i=0; i <=254; i++)
|
||||
{
|
||||
string sName = Get2daCache("racialtypes", "Constant", i);
|
||||
// Add responses for the PC
|
||||
if(sName != "")
|
||||
{
|
||||
AddChoice(sName, i, oPC);
|
||||
}
|
||||
} */
|
||||
|
||||
MarkStageSetUp(nStage, oPC); // This prevents the setup being run for this stage again until MarkStageNotSetUp is called for it
|
||||
SetDefaultTokens(); // Set the next, previous, exit and wait tokens to default values
|
||||
}
|
||||
//add more stages for more nodes with Else If clauses
|
||||
}
|
||||
|
||||
// Do token setup
|
||||
SetupTokens();
|
||||
}
|
||||
// End of conversation cleanup
|
||||
else if(nValue == DYNCONV_EXITED)
|
||||
{
|
||||
// Add any locals set through this conversation
|
||||
}
|
||||
// Abort conversation cleanup.
|
||||
// NOTE: This section is only run when the conversation is aborted
|
||||
// while aborting is allowed. When it isn't, the dynconvo infrastructure
|
||||
// handles restoring the conversation in a transparent manner
|
||||
else if(nValue == DYNCONV_ABORTED)
|
||||
{
|
||||
// Add any locals set through this conversation
|
||||
}
|
||||
// Handle PC responses
|
||||
else
|
||||
{
|
||||
// variable named nChoice is the value of the player's choice as stored when building the choice list
|
||||
// variable named nStage determines the current conversation node
|
||||
int nChoice = GetChoice(oPC);
|
||||
if(nStage == STAGE_ENTRY)
|
||||
{
|
||||
int n2daLine = nChoice--;
|
||||
SetLocalInt(oPC, "BladebaneRace", n2daLine);
|
||||
// Move to another stage based on response, for example
|
||||
//nStage = STAGE_QUUX;
|
||||
}
|
||||
|
||||
// Store the stage value. If it has been changed, this clears out the choices
|
||||
SetStage(nStage, oPC);
|
||||
}
|
||||
}
|
||||
61
nwn/nwnprc/trunk/users/Jaysyn/future spells/sp_angelskin.nss
Normal file
61
nwn/nwnprc/trunk/users/Jaysyn/future spells/sp_angelskin.nss
Normal file
@@ -0,0 +1,61 @@
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Name Angelskin
|
||||
//:: FileName sp_angelskin.nss
|
||||
//:://////////////////////////////////////////////
|
||||
/** @file
|
||||
Abjuration [Good]
|
||||
Level: Paladin 2
|
||||
Components: V, S, DF,
|
||||
Casting Time: 1 standard action
|
||||
Range: Touch
|
||||
Target: Lawful good creature touched
|
||||
Duration: 1 round/level
|
||||
Saving Throw: Will negates (harmless)
|
||||
Spell Resistance: Yes (harmless)
|
||||
|
||||
You touch your ally with the holy symbol and invoke the blessed words. An opalescent
|
||||
glow spreads across her skin, imbuing it with a pearl-like sheen.
|
||||
|
||||
The subject gains damage reduction 5/evil.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Tenjac
|
||||
//:: Created On: 1/22/21
|
||||
//:: Updated by: Jaysyn
|
||||
//:: Updated on: 2024-10-01 08:58:45
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_sp_func"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
void main()
|
||||
{
|
||||
if(!X2PreSpellCastCode()) return;
|
||||
|
||||
PRCSetSchool(SPELL_SCHOOL_ABJURATION);
|
||||
object oPC = OBJECT_SELF;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nCasterLvl = PRCGetCasterLevel(oPC);
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
float fDur = RoundsToSeconds(nCasterLvl);
|
||||
|
||||
if(nMetaMagic & METAMAGIC_EXTEND)
|
||||
{
|
||||
fDur += fDur;
|
||||
}
|
||||
|
||||
// Alignment check
|
||||
if((GetAlignmentGoodEvil(oTarget) == ALIGNMENT_GOOD) && (GetAlignmentLawChaos(oTarget) == ALIGNMENT_LAWFUL))
|
||||
{
|
||||
effect eDR = EffectDamageReduction(5, DAMAGE_POWER_PLUS_THREE, 0);
|
||||
effect eVFX = EffectVisualEffect(VFX_DUR_AURA_WHITE);
|
||||
effect eSpell = EffectLinkEffects(eDR, eVFX);
|
||||
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSpell, oTarget, fDur);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Invalid target alignment
|
||||
SendMessageToPC(oPC, "This spell must target a lawful good creature.");
|
||||
}
|
||||
}
|
||||
69
nwn/nwnprc/trunk/users/Jaysyn/future spells/sp_bladebane.nss
Normal file
69
nwn/nwnprc/trunk/users/Jaysyn/future spells/sp_bladebane.nss
Normal file
@@ -0,0 +1,69 @@
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Name Bladebane
|
||||
//:: FileName sp_bladebane.nss
|
||||
//:://////////////////////////////////////////////
|
||||
/** @file Transmutation
|
||||
Level: Paladin 2, Cleric 3, Sorcerer 4, Wizard 4,
|
||||
Components: V, S, M,
|
||||
Casting Time: 1 standard action
|
||||
Range: Touch
|
||||
Target: Weapon touched
|
||||
Duration: 1 round/level
|
||||
Saving Throw: Will negates (harmless, object)
|
||||
Spell Resistance: Yes (harmless, object)
|
||||
|
||||
You impart a deadly quality to a single bladed weapon
|
||||
(any slashing weapon) for a short time.
|
||||
Bladebane confers the bane ability on the weapon touched,
|
||||
against a creature type (and subtype, if necessary) of
|
||||
your choice.
|
||||
The weapon's enhancement bonus increases by +2 against
|
||||
the appropriate creature type, and it deals +2d6 points
|
||||
of bonus damage to those creatures.
|
||||
|
||||
Material Component: A drop of blood and ruby dust worth 500 gp.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Tenjac
|
||||
//:: Created On: 7/27/2022
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "prc_sp_func"
|
||||
#include "prc_add_spell_dc"
|
||||
#include "inc_dynconv"
|
||||
|
||||
void main()
|
||||
{
|
||||
if(!X2PreSpellCastCode()) return;
|
||||
PRCSetSchool(SPELL_SCHOOL_TRANSMUTATION);
|
||||
object oPC = OBJECT_SELF;
|
||||
int nCasterLvl = PRCGetCasterLevel(oPC);
|
||||
float fDur = RoundsToSeconds(nCasterLvl);
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
if(nMetaMagic & METAMAGIC_EXTEND) fDur += fDur;
|
||||
object oWeapon = PRCGetSpellTargetObject();
|
||||
|
||||
//only bladed
|
||||
if(GetDamageTypeOfWeapon(oWeapon) != DAMAGE_TYPE_SLASHING)
|
||||
{
|
||||
SendMessageToPC(oPC, "Invalid target. This spell must target slashing weapons.");
|
||||
return;
|
||||
}
|
||||
|
||||
//+2 increase
|
||||
int nBonus = IPGetWeaponEnhancementBonus(oWeapon) + 2;
|
||||
|
||||
//convo for race
|
||||
SetLocalInt(oPC, "BladebaneRace");
|
||||
StartDynamicConversation("prc_c_bladebane", oPC, DYNCONV_EXIT_NOT_ALLOWED, FALSE, TRUE, oPC);
|
||||
|
||||
int nRace = GetLocalInt(oPC, "BladebaneRace");
|
||||
|
||||
itemproperty iEnhance = ItemPropertyEnhancementBonusVsRace(nRace, nBonus);
|
||||
itemproperty iDam = ItemPropertyDamageBonusVsRace(nRace, IP_CONST_DAMAGETYPE_SLASHING, IP_CONST_DAMAGEBONUS_2d6);
|
||||
|
||||
IPSafeAddItemProperty(oWeapon, iEnhance, fDur);
|
||||
IPSafeAddItemProperty(oWeapon, iDam, fDur);
|
||||
|
||||
PRCSetSchool();
|
||||
}
|
||||
114
nwn/nwnprc/trunk/users/Jaysyn/future spells/sp_unmovobj.nss
Normal file
114
nwn/nwnprc/trunk/users/Jaysyn/future spells/sp_unmovobj.nss
Normal file
@@ -0,0 +1,114 @@
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Name Unmovable Object
|
||||
//:: FileName sp_unmovobj.nss
|
||||
//:://////////////////////////////////////////////
|
||||
/** @file Evocation
|
||||
Level: Paladin 4,
|
||||
Components: V, S,
|
||||
Casting Time: 1 action
|
||||
Range: Personal
|
||||
Target: You
|
||||
Duration: 1 round/level
|
||||
|
||||
Charging yourself with divine energy, you bond yourself
|
||||
to the ground beneath your feet and become the epitome
|
||||
of stability.
|
||||
The spell ends instantly if you move from your current
|
||||
position and does not work unless you are in contact
|
||||
with the ground.
|
||||
|
||||
You gain a +2 bonus to Strength, a +4 bonus to Constitution,
|
||||
a +2 resistance bonus on saving throws, and a +4 dodge
|
||||
bonus to AC.
|
||||
|
||||
You gain a +10 bonus to resist a bull rush (this bonus does
|
||||
not include the +4 bonus for being "exceptionally stable",
|
||||
but exceptionally stable creatures do get that bonus in
|
||||
addition to the bonus from this spell).
|
||||
|
||||
You gain a +10 bonus to resist all trip attacks (but not
|
||||
to your attempts to trip someone in return).
|
||||
|
||||
You gain a +10 resistance bonus on any roll made to resist
|
||||
an effect that would cause you to move from your current
|
||||
location.
|
||||
|
||||
For example, while you are not immune to enchantment
|
||||
effects, you gain a +10 resistance bonus on saving throws
|
||||
(or Charisma checks, in the case of effects such as charm
|
||||
person) to resist commands that would cause you to leave
|
||||
your current position.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Tenjac
|
||||
//:: Created On: 8/4/22
|
||||
//:: Updated By: Jaysyn
|
||||
//:: Updated on: 2024-10-01 09:23:56
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_sp_func"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
void StillCheck(object oPC, float fDur, location lLoc)
|
||||
{
|
||||
if (!GetIsInCombat(oPC) || GetLocation(oPC) != lLoc)
|
||||
{
|
||||
effect eToDispel = GetFirstEffect(oPC);
|
||||
while (GetIsEffectValid(eToDispel))
|
||||
{
|
||||
if (GetEffectSpellId(eToDispel) == SPELL_UNMOVABLE_OBJECT)
|
||||
{
|
||||
RemoveEffect(oPC, eToDispel);
|
||||
}
|
||||
eToDispel = GetNextEffect(oPC);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DelayCommand(1.0f, StillCheck(oPC, fDur - 1.0f, lLoc));
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
if (!X2PreSpellCastCode()) return;
|
||||
|
||||
PRCSetSchool(SPELL_SCHOOL_EVOCATION); // Set spell school
|
||||
|
||||
object oPC = OBJECT_SELF;
|
||||
int nCasterLvl = PRCGetCasterLevel(oPC);
|
||||
float fDur = RoundsToSeconds(nCasterLvl);
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
|
||||
if (nMetaMagic & METAMAGIC_EXTEND)
|
||||
{
|
||||
fDur += fDur;
|
||||
}
|
||||
|
||||
// Delay to check if combat has ended, if so remove the effects
|
||||
DelayCommand(1.0f, StillCheck(oPC, fDur - 1.0f, GetLocation(oPC)));
|
||||
|
||||
// Apply cutscene immobilization
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectCutsceneImmobilize(), oPC, fDur);
|
||||
|
||||
// Apply ability increases: +2 STR, +4 CON
|
||||
effect eLink = EffectLinkEffects(EffectAbilityIncrease(ABILITY_STRENGTH, 2),
|
||||
EffectAbilityIncrease(ABILITY_CONSTITUTION, 4));
|
||||
|
||||
// Apply +2 to all saving throws
|
||||
eLink = EffectLinkEffects(eLink, EffectSavingThrowIncrease(SAVING_THROW_ALL, 2, SAVING_THROW_TYPE_ALL));
|
||||
|
||||
// Apply +4 dodge bonus to AC
|
||||
eLink = EffectLinkEffects(eLink, EffectACIncrease(4, AC_DODGE_BONUS));
|
||||
|
||||
// Apply +10 resistance vs fear effects (to resist effects that move the target)
|
||||
eLink = EffectLinkEffects(eLink, EffectSavingThrowIncrease(SAVING_THROW_ALL, 10, SAVING_THROW_TYPE_FEAR));
|
||||
|
||||
// Apply all linked effects to the caster
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oPC, fDur);
|
||||
|
||||
// Apply visual effect for AC bonus
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_AC_BONUS), oPC);
|
||||
|
||||
PRCSetSchool(); // Reset spell school (correctly used)
|
||||
}
|
||||
Reference in New Issue
Block a user