1. The module is setup for MP, but will unlikely see more than 3-4 players.
2. On Windows. No NWNX currently.
So, I've thrown this together on the module heartbeat. I track heartbeats (which has worked reliably so far), and this should fire every 2nd one. If it works, I'll give the numbers and the role of dwarven defender more thought later.
Of course, thanks for the replies. Using an AoE didn't cross my mind.
if( nHB % 2 == 0 )
{
while( GetIsObjectValid(oPC) )
{
if( GetIsInCombat(oPC) )
{
int iCount = 0;
int n = 1;
object oEnemy = GetNearestCreature(CREATURE_TYPE_REPUTATION,REPUTATION_TYPE_ENEMY,oPC,n);
while( GetDistanceBetween(oPC,oEnemy) < 4.0 )
{
iCount++;
n++;
oEnemy = GetNearestCreature(CREATURE_TYPE_REPUTATION,REPUTATION_TYPE_ENEMY,oPC,n);
}
if( iCount > 3 )
{
int nOppRoll = 10 + (iCount-2)*5;//the DC is at least 20
int nMyRoll = d20() + GetSkillRank(SKILL_TUMBLE,oPC);
if( nMyRoll < nOppRoll )
{
effect eSwarm = EffectACDecrease(iCount-2);//Minimum AC decrease of 2
eSwarm = SupernaturalEffect(eSwarm);
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_EVIL);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oPC);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eSwarm,oPC,12.0);
FloatingTextStringOnCreature("You are swarmed and unable to maneuver well.",oPC,FALSE);
}
}
}
oPC = GetNextPC();
}
}
Modifié par Terrorble, 23 novembre 2013 - 06:15 .