Battledale_PRC8/_module/nss/jw_nun_gelc_func.nss
Jaysyn904 7b9e44ebbb Initial upload
Initial upload.  PRC8 has been added.  Module compiles, PRC's default AI & treasure scripts have been integrated.  Started work on top hak for SLA / Ability / Scripting modifications.
2024-03-11 23:44:08 -04:00

129 lines
3.2 KiB
Plaintext

// * Gelatinous Cube Paralyze attack
int JWDoCubeParalyze(object oTarget, object oSource, int nSaveDC = 12)
{
if (GetIsImmune(oTarget,IMMUNITY_TYPE_PARALYSIS) )
{
return FALSE;
}
nSaveDC=nSaveDC+GetHitDice(OBJECT_SELF);
if (FortitudeSave(oTarget,nSaveDC, SAVING_THROW_TYPE_POISON,oSource) == 0)
{
effect ePara = EffectParalyze();
effect eDur = EffectVisualEffect(VFX_DUR_PARALYZED);
ePara = EffectLinkEffects(eDur,ePara);
ePara = EffectLinkEffects(EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION),ePara);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,ePara,oTarget,RoundsToSeconds(3+d3())); // not 3 d6, thats not fun
return TRUE;
}
else
{
effect eSave = EffectVisualEffect(VFX_IMP_FORTITUDE_SAVING_THROW_USE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eSave,oTarget);
}
return FALSE;
}
// --------------------------------------------------------------------------------
// GZ: Gel. Cube special abilities
// --------------------------------------------------------------------------------
void JWEngulfAndDamage(object oTarget, object oSource)
{
int nSaveDC=12+GetHitDice(OBJECT_SELF);
int nDamage=GetHitDice(OBJECT_SELF)/4;
if (nDamage<1)
{
nDamage=1;
}
if (nDamage>5)
{
nDamage=5;
}
if (ReflexSave(oTarget, nSaveDC, SAVING_THROW_TYPE_NONE,oSource) == 0)
{
FloatingTextStrRefOnCreature(84610,oTarget); // * Engulfed
int nDamage = d6(nDamage);
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_ACID,nDamage);
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
if (!GetIsImmune(oTarget,IMMUNITY_TYPE_PARALYSIS) )
{
if (JWDoCubeParalyze(oTarget,oSource))
{
FloatingTextStrRefOnCreature(84609,oTarget);
}
}
} else
{
effect eSave = EffectVisualEffect(VFX_IMP_REFLEX_SAVE_THROW_USE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eSave,oTarget);
}
}
void JWEngulfOnly(object oTarget, object oSource)
{
if (GetDistanceToObject(oTarget)>4.0)
{
return;
}
int nSaveDC=12+GetHitDice(OBJECT_SELF);
int nDamage=GetHitDice(OBJECT_SELF)/4;
if (nDamage<1)
{
nDamage=1;
}
if (nDamage>5)
{
nDamage=5;
}
if (ReflexSave(oTarget, nSaveDC, SAVING_THROW_TYPE_NONE,oSource) == 0)
{
FloatingTextStrRefOnCreature(84610,oTarget); // * Engulfed
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
if (!GetIsImmune(oTarget,IMMUNITY_TYPE_PARALYSIS) )
{
if (JWDoCubeParalyze(oTarget,oSource))
{
FloatingTextStrRefOnCreature(84609,oTarget);
}
}
} else
{
effect eSave = EffectVisualEffect(VFX_IMP_REFLEX_SAVE_THROW_USE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eSave,oTarget);
}
}
void JWPullOver(object oVictim)
{
object oSource=OBJECT_SELF;
AssignCommand(oVictim,ClearAllActions());
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_TORNADO),oVictim);
//ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDisappearAppear(GetLocation(oSource)),oVictim);
AssignCommand(oVictim,JumpToObject(oSource));
}