Initial upload.

Adding base PRC 4.19a files to repository.
This commit is contained in:
Jaysyn904
2022-10-07 13:51:24 -04:00
parent 646eb01834
commit 1662218bb4
22441 changed files with 1274376 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
/*:://////////////////////////////////////////////
//:: Spell Name Protection from Arrows
//:: Spell FileName PHS_S_ProtArrows
//:://////////////////////////////////////////////
//:: In Game Spell desctiption
//:://////////////////////////////////////////////
Abjuration
Level: Sor/Wiz 2
Components: V, S, F
Casting Time: 1 standard action
Range: Touch
Target: Creature touched
Duration: 1 hour/level or until discharged
Saving Throw: Will negates (harmless)
Spell Resistance: Yes (harmless)
The warded creature gains resistance to piercing weapons. The subject gains
damage resistance 10/- against piercing weapons. Once the spell has
prevented a total of 10 points of damage per caster level (maximum 100
points), it is discharged.
Focus: A piece of shell from a tortoise or a turtle.
//:://////////////////////////////////////////////
//:: Spell Effects Applied / Notes
//:://////////////////////////////////////////////
Affects all piercing to the limit.
Shamefully, all piercing is a bit bad, but oh well...
//:://////////////////////////////////////////////
//:: Created By: Jasperre
//::////////////////////////////////////////////*/
#include "PHS_INC_SPELLS"
void main()
{
// Spell hook check.
if(!PHS_SpellHookCheck(PHS_SPELL_PROTECTION_FROM_ARROWS)) return;
//Declare major variables
object oCaster = OBJECT_SELF;
object oTarget = GetSpellTargetObject();
int nMetaMagic = PHS_GetMetaMagicFeat();
int nCasterLevel = PHS_GetCasterLevel();
// Duration in hours
float fDuration = PHS_GetDuration(PHS_HOURS, nCasterLevel, nMetaMagic);
// Damage is 10 * Caster level, max of 100.
int nDamageMax = PHS_LimitInteger(nCasterLevel * 10, 100);
// Delcare effects
effect eDur = EffectVisualEffect(PHS_VFX_DUR_PROTECTION_ARROWS);
effect eDamageResistance = EffectDamageResistance(DAMAGE_TYPE_PIERCING, 10, nDamageMax);
effect eCessate = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
// Link effects
effect eLink = EffectLinkEffects(eDur, eDamageResistance);
eLink = EffectLinkEffects(eLink, eCessate);
// Remove previous castings
PHS_RemoveSpellEffectsFromTarget(PHS_SPELL_PROTECTION_FROM_ARROWS, oTarget);
// Signal event
PHS_SignalSpellCastAt(oTarget, PHS_SPELL_PROTECTION_FROM_ARROWS, FALSE);
// Apply effects
PHS_ApplyDuration(oTarget, eLink, fDuration);
}