Files
HeroesStone_PRC8/_module/nss/ww_bite.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

39 lines
1.1 KiB
Plaintext

/////////////////////
//::Werewolf bite
/////////////////////
/*
Start the lycanthropy infection
*/
#include "ww_inc"
void main()
{
//SpeakString("Running ww_bite");
object oWerewolf = GetLastDamager();
// Paladin's are immune
int nClass = GetLevelByClass(CLASS_TYPE_PALADIN,OBJECT_SELF);
int nPC = GetIsPC(OBJECT_SELF);
// Difficulty check for infection
int nDC = 15;
// Greater Werewolf is more potent
if(GetTag(oWerewolf)=="GREATERWEREWOLF") nDC = 20;
if(GetTag(oWerewolf)=="ALPHAWEREWOLF") nDC = 25;
// Get variables to store
string sID = GetName(OBJECT_SELF) + GetPCPublicCDKey(OBJECT_SELF);
if(nPC && (nClass < 1))
{
int nLycanSave = FortitudeSave(OBJECT_SELF,nDC,SAVING_THROW_TYPE_DISEASE);
if(!(nLycanSave))
{
SpeakString("Ack!! I've been bitten!");
SetLocalInt(oMod, "AFF_WEREWOLF"+sID,1);
SetLocalLocation(oMod, "WEREWOLF"+sID, GetLocation(OBJECT_SELF));
// If set-up hasn't run yet, run it
if(GetLocalInt(GetModule(),"WEREWOLF")!=1) SetUpShapeChange();
}
}
}