HoS_PRC8/_mod/_module/nss/syphonstone_hb.nss
Jaysyn904 04165202c0 Initial upload
Initial upload
2024-11-25 19:36:07 -05:00

115 lines
4.0 KiB
Plaintext

// syphon_stone HB
void main()
{
object oMe=OBJECT_SELF;
object oMother=GetLocalObject(oMe,"oMother");
effect eVFX;
effect eMother;
effect eResist;
int nType=GetLocalInt(oMe,"nType");
string sType;
if (nType==1)
{ // Acid
eMother=EffectDamageImmunityIncrease(DAMAGE_TYPE_ACID,100);
eVFX=EffectVisualEffect(VFX_DUR_GLOW_GREEN);
eResist=EffectDamageResistance(DAMAGE_TYPE_ACID,100,0);
sType="ACID";
} // Acid
else if (nType==2)
{ // base weapon
eMother=EffectDamageImmunityIncrease(DAMAGE_TYPE_BASE_WEAPON,100);
eVFX=EffectVisualEffect(VFX_DUR_GLOW_BROWN);
eResist=EffectDamageResistance(DAMAGE_TYPE_BASE_WEAPON,100,0);
sType="BASE WEAPON";
} // base weapon
else if (nType==3)
{ // bludgeon
eMother=EffectDamageImmunityIncrease(DAMAGE_TYPE_BLUDGEONING,100);
eVFX=EffectVisualEffect(VFX_DUR_GLOW_LIGHT_BROWN);
eResist=EffectDamageResistance(DAMAGE_TYPE_BLUDGEONING,100,0);
sType="BLUDGEON";
} // bludgeon
else if (nType==4)
{ // cold
eMother=EffectDamageImmunityIncrease(DAMAGE_TYPE_COLD,100);
eVFX=EffectVisualEffect(VFX_DUR_GLOW_BLUE);
eResist=EffectDamageResistance(DAMAGE_TYPE_COLD,100,0);
sType="COLD";
} // cold
else if (nType==5)
{ // divine
eMother=EffectDamageImmunityIncrease(DAMAGE_TYPE_DIVINE,100);
eVFX=EffectVisualEffect(VFX_DUR_GLOW_WHITE);
eResist=EffectDamageResistance(DAMAGE_TYPE_DIVINE,100,0);
sType="DIVINE";
} // divine
else if (nType==6)
{ // electrical
eMother=EffectDamageImmunityIncrease(DAMAGE_TYPE_ELECTRICAL,100);
eVFX=EffectVisualEffect(VFX_DUR_GLOW_LIGHT_BLUE);
eResist=EffectDamageResistance(DAMAGE_TYPE_ELECTRICAL,100,0);
sType="ELECTRIC";
} // electrical
else if (nType==7)
{ // fire
eMother=EffectDamageImmunityIncrease(DAMAGE_TYPE_FIRE,100);
eVFX=EffectVisualEffect(VFX_DUR_GLOW_LIGHT_RED);
eResist=EffectDamageResistance(DAMAGE_TYPE_FIRE,100,0);
sType="FIRE";
} // fire
else if (nType==8)
{ // magical
eMother=EffectDamageImmunityIncrease(DAMAGE_TYPE_MAGICAL,100);
eVFX=EffectVisualEffect(VFX_DUR_GLOW_PURPLE);
eResist=EffectDamageResistance(DAMAGE_TYPE_MAGICAL,100,0);
sType="MAGIC";
} // magical
else if (nType==9)
{ // negative
eMother=EffectDamageImmunityIncrease(DAMAGE_TYPE_NEGATIVE,100);
eVFX=EffectVisualEffect(VFX_DUR_GLOW_RED);
eResist=EffectDamageResistance(DAMAGE_TYPE_NEGATIVE,100,0);
sType="NEGATIVE";
} // negative
else if (nType==10)
{ // piercing
eMother=EffectDamageImmunityIncrease(DAMAGE_TYPE_PIERCING,100);
eVFX=EffectVisualEffect(VFX_DUR_GLOW_LIGHT_ORANGE);
eResist=EffectDamageResistance(DAMAGE_TYPE_PIERCING,100,0);
sType="PIERCE";
} // piercing
else if (nType==11)
{ // positive
eMother=EffectDamageImmunityIncrease(DAMAGE_TYPE_POSITIVE,100);
eVFX=EffectVisualEffect(VFX_DUR_GLOW_YELLOW);
eResist=EffectDamageResistance(DAMAGE_TYPE_POSITIVE,100,0);
sType="POSITIVE";
} // positive
else if (nType==12)
{ // slashing
eMother=EffectDamageImmunityIncrease(DAMAGE_TYPE_SLASHING,100);
eVFX=EffectVisualEffect(VFX_DUR_GLOW_ORANGE);
eResist=EffectDamageResistance(DAMAGE_TYPE_SLASHING,100,0);
sType="SLASH";
} // slashing
else if (nType==13)
{ // sonic
eMother=EffectDamageImmunityIncrease(DAMAGE_TYPE_SONIC,100);
eVFX=EffectVisualEffect(VFX_DUR_GLOW_GREY);
eResist=EffectDamageResistance(DAMAGE_TYPE_SONIC,100,0);
sType="SONIC";
} // sonic
if (oMother!=OBJECT_INVALID&&GetIsDead(oMother)==FALSE)
{ // mother lives
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eVFX,oMe,8.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eMother,oMother,10.0);
eVFX=EffectBeam(VFX_BEAM_SILENT_LIGHTNING,oMe,BODY_NODE_HAND);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eVFX,oMother,5.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eResist,oMother,10.0);
AssignCommand(oMe,SpeakString(sType));
} // mother lives
else
{ DestroyObject(oMe); }
}