Initial commit
Adding all of the current content for Anphillia Unlimited.
This commit is contained in:
58
_module/nss/it_acidbmb.nss
Normal file
58
_module/nss/it_acidbmb.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
float fRadius = RADIUS_SIZE_MEDIUM;
|
||||
int nDC = 22;
|
||||
int nDice = 2;
|
||||
int nDamageRounds = 4;
|
||||
int nACPenalty = 1;
|
||||
int nACPenaltyHeavy = 2;
|
||||
float fACPenaltyDuration = RoundsToSeconds(5);
|
||||
|
||||
int nTargetVisualFail = VFX_IMP_ACID_L;
|
||||
int nTargetVisualSuccess = VFX_IMP_ACID_S;
|
||||
int nTargetVisualTick = VFX_IMP_ACID_S;
|
||||
int nImpactVisual = VFX_FNF_LOS_NORMAL_20;
|
||||
|
||||
void ApplyDamage(object oTarget)
|
||||
{
|
||||
int nDamage = d6(nDice);
|
||||
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_ACID);
|
||||
effect eVisual = EffectVisualEffect(nTargetVisualFail);
|
||||
eDamage = EffectLinkEffects(eVisual, eDamage);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
location lTargetLocation = GetItemActivatedTargetLocation();
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, fRadius,
|
||||
lTargetLocation, TRUE);
|
||||
while(oTarget != OBJECT_INVALID)
|
||||
{
|
||||
int nSave = ReflexSave(oTarget, nDC, SAVING_THROW_TYPE_ACID);
|
||||
if(nSave == 0)
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < nDamageRounds; ++i)
|
||||
{
|
||||
float fDelay = IntToFloat(i + 1) * RoundsToSeconds(1);
|
||||
DelayCommand(fDelay, ApplyDamage(oTarget));
|
||||
}
|
||||
}
|
||||
|
||||
int nPenalty = nACPenalty;
|
||||
object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST, oTarget);
|
||||
if(GetItemACValue(oArmor) > 5)
|
||||
{
|
||||
nPenalty = nACPenaltyHeavy;
|
||||
}
|
||||
|
||||
effect eACPenalty = EffectACDecrease(nPenalty,
|
||||
AC_ARMOUR_ENCHANTMENT_BONUS);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eACPenalty, oTarget,
|
||||
fACPenaltyDuration);
|
||||
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, fRadius,
|
||||
lTargetLocation, TRUE);
|
||||
}
|
||||
effect eVisual = EffectVisualEffect(nImpactVisual);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVisual, lTargetLocation);
|
||||
}
|
||||
Reference in New Issue
Block a user