forked from Jaysyn/PRC8
Updated Vow of Poverty. Added Sanctify Ki Strike, Holy Strike, Fist of Heavens, Vow of Abstinence, Vow of Chastity & Gift of Faith. (@fenac). Turned off the Taunt & Parry skills. Re-disabled AC & save bonuses from Tumble & Spellcraft. Updated min() & max() to PRCmin() & PRCmax() to not conflict with similarly named NUI adjacent functions. Set Point Blank Shot to 30' per PnP. Added icon for Chosen of Evil. Started work on Hidden Talent. Created Psionics function cheatsheet. Updated release archive.
46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
/*
|
|
prc_pyro_bolt
|
|
|
|
Bolt of Fire
|
|
|
|
By: Flaming_Sword
|
|
Created: Dec 6, 2007
|
|
Modified: Dec 6, 2007
|
|
*/
|
|
|
|
#include "prc_inc_sp_tch"
|
|
|
|
void main()
|
|
{
|
|
object oPC = OBJECT_SELF;
|
|
object oTarget = PRCGetSpellTargetObject();
|
|
int nDamageType = GetPersistantLocalInt(oPC, "PyroDamageType");
|
|
int nLevel = (GetLevelByClass(CLASS_TYPE_PYROKINETICIST, oPC));
|
|
int iAttackRoll = 0;
|
|
int nImpactVFX = GetPersistantLocalInt(oPC, "PyroImpactVFX");
|
|
int nBeam = GetPersistantLocalInt(oPC, "PyroBeam");
|
|
|
|
int nDam = (nDamageType == DAMAGE_TYPE_SONIC) ? d4(nLevel) : d6(nLevel); //reduced damage dice
|
|
if((nDamageType == DAMAGE_TYPE_COLD) || (nDamageType == DAMAGE_TYPE_ELECTRICAL) || (nDamageType == DAMAGE_TYPE_ACID))
|
|
nDam = PRCMax(nLevel, nDam - nLevel); //minimum of 1 per die
|
|
|
|
if(!GetIsReactionTypeFriendly(oTarget))
|
|
{
|
|
//Fire cast spell at event for the specified target
|
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_BOLT_OF_FIRE));
|
|
|
|
iAttackRoll = PRCDoRangedTouchAttack(oTarget);
|
|
if(iAttackRoll > 0)
|
|
{
|
|
// perform ranged touch attack and apply sneak attack if any exists
|
|
ApplyTouchAttackDamage(oPC, oTarget, iAttackRoll, nDam, nDamageType);
|
|
PRCBonusDamage(oTarget);
|
|
|
|
//Apply the VFX impact and damage effect
|
|
SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nImpactVFX), oTarget);
|
|
}
|
|
effect eRay = EffectBeam(nBeam, OBJECT_SELF, BODY_NODE_HAND, !iAttackRoll);
|
|
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRay, oTarget, 1.7,FALSE);
|
|
}
|
|
}
|