PRC8/Notes/future spells/sp_angelskin.nss
Jaysyn904 bb7073b5c6 Baleful Utterance affects detected traps
Baleful Utterance affects detected traps.  Tempest offhand attack fix.  Minified feat.2da.  Started reviewing @Tenjac's incomplete spell scripts.  Updated release archive.
2024-10-06 00:21:54 -04:00

61 lines
1.8 KiB
Plaintext

//:://////////////////////////////////////////////
//:: 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.");
}
}