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.
This commit is contained in:
33
_module/nss/tri_hobtrap1.nss
Normal file
33
_module/nss/tri_hobtrap1.nss
Normal file
@@ -0,0 +1,33 @@
|
||||
void main()
|
||||
{
|
||||
location lLoc = GetLocation(GetObjectByTag("WP_tri_hobtraploc"));
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_ACID_L);
|
||||
int nDamage;
|
||||
|
||||
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, lLoc, 4.0 );
|
||||
|
||||
effect eDam;
|
||||
//Declare the spell shape, size and the location. Capture the first target object in the shape.
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, lLoc, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR);
|
||||
//Cycle through the targets within the spell shape until an invalid object is captured.
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ACID_FOG));
|
||||
|
||||
{
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
nDamage = GetReflexAdjustedDamage(20, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_ACID);
|
||||
//Set the damage effect
|
||||
eDam = EffectDamage(nDamage, DAMAGE_TYPE_ACID);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget, 0.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
//Select the next target within the spell shape.
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lLoc, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user