Files
Anphillia_PRC8/_module/nss/zep_marilith_end.nss
Jaysyn904 28cdb617b3 Initial commit
Adding all of the current content for Anphillia Unlimited.
2024-01-04 07:49:38 -05:00

33 lines
942 B
Plaintext

//File name: zep_marilith_end
//Usage/Description: OnCombatRound End script for Marilith.
#include "zep_inc_scrptdlg"
void main()
{
object oTarget = GetAttackTarget();
int nTargetAC = GetAC(oTarget);
int nRoll = d20();
int nCrit = FALSE;
if(nRoll >= 19) //crit on natural 19-20
{
if (d20()+8 >nTargetAC)
{
nCrit = TRUE;
}
}
if(nRoll + 8 >= nTargetAC)
{
int nDamage = d8() + 2;
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_SLASHING, DAMAGE_POWER_NORMAL);
if(nCrit == TRUE)
{
nDamage = d8(2) + 4;
eDamage = EffectDamage(nDamage, DAMAGE_TYPE_SLASHING, DAMAGE_POWER_NORMAL);
}
string sMessageToPC = GetStringByStrRef(nZEPMarilithDMG,GENDER_MALE);
SendMessageToPC(oTarget, sMessageToPC+IntToString(nDamage));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
}
}