Added Daz's persistent NUI storage
Added Daz's persistent NUI storage. Added instanced player room at the Inn of the Flying Monkey. Added PnP cockatrice & dire weasel. Full compile.
This commit is contained in:
46
_module/nss/ra_cocktrc_bite.nss
Normal file
46
_module/nss/ra_cocktrc_bite.nss
Normal file
@@ -0,0 +1,46 @@
|
||||
// Cockatrice Bite - Item Unique OnHit Script
|
||||
//
|
||||
// CON based petrification attack
|
||||
//
|
||||
//
|
||||
|
||||
#include "prc_inc_spells"
|
||||
//#include "x2_inc_spellhook"
|
||||
#include "x2_inc_switches"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oNPC = OBJECT_SELF;
|
||||
object oItem = GetSpellCastItem();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
|
||||
int oFort = GetFortitudeSavingThrow(oTarget);
|
||||
int nDC = 10 + (GetHitDice(oNPC) / 2) + GetAbilityModifier(ABILITY_CONSTITUTION, oNPC);
|
||||
int bImmune = GetHasFeat(FEAT_IMMUNE_PETRIFICATION, oTarget);
|
||||
|
||||
effect ePetrify = EffectPetrify();
|
||||
effect ePetrifyVis = EffectVisualEffect(VFX_IMP_FORTITUDE_SAVING_THROW_USE);
|
||||
effect eImmune = EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE);
|
||||
|
||||
//:: Respect Immunity to Petrification
|
||||
if (bImmune)
|
||||
{
|
||||
//SendMessageToPC(OBJECT_SELF, "This creatrure is immune to petrification");
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImmune, oTarget);
|
||||
return;
|
||||
}
|
||||
|
||||
//:: Cockatrice's are immune to their own petrification attack.
|
||||
if (GetName(OBJECT_SELF) == GetName(oTarget))
|
||||
return;
|
||||
|
||||
//:: See if the petrification is resisted.
|
||||
if (!FortitudeSave(oTarget, nDC, SAVING_THROW_TYPE_ALL, oTarget))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, ePetrifyVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePetrify, oTarget);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user