Hi Draxes,
I had same issues in G1 (I have created very specific quest in which one way to kill an overpowered guard is by throwing him to abyss with StormFist/Windfist)
My solution was to 'Freeze AI' by starting AI state ZS_StormFistFreeze - which stops NPC for 3 seconds.
Maybe you can use same approach with G2A:
Code:
FUNC VOID B_StopStormFistFreeze ()
{
Npc_ClearAIQueue (self);
AI_Standup (self);
if (C_NpcIsHuman (self) || C_NpcIsOrc (self))
{
AI_StartState (self, ZS_ReactToDamage, 0, "");
} else if (C_NpcIsMonster (self))
{
AI_StartState (self, ZS_MM_Attack, 0, "");
};
};
FUNC VOID ZS_StormFistFreeze ()
{
Npc_PercEnable (self, PERC_ASSESSMAGIC, ZS_StormFistFreeze);
};
FUNC INT ZS_StormFistFreeze_Loop ()
{
if (Npc_GetStateTime (self) > 3)
{
B_StopStormFistFreeze ();
return LOOP_END;
};
AI_Wait (self, 1);
return LOOP_CONTINUE;
};
FUNC VOID ZS_StormFistFreeze_End () {};
//---
FUNC INT Spell_Logic_Windfist (VAR INT manaInvested)
{
if ((manaInvested == ((SPL_SENDCAST_WINDFIST * 3) / 10)) || (manaInvested == ((SPL_SENDCAST_WINDFIST * 5) / 10)) || (manaInvested == ((SPL_SENDCAST_WINDFIST * 8) / 10)))
{
return SPL_NEXTLEVEL;
};
if (manaInvested >= SPL_SENDCAST_WINDFIST)
{
if (Hlp_IsValidNPC (other)) {
//--- MOD ---
//'Freeze AI'
NPC_ClearAIQueue (other);
AI_StartState (other, ZS_StormFistFreeze, 0, "");
};
return SPL_SENDCAST;
};
return SPL_RECEIVEINVEST;
};
FUNC INT Spell_Logic_Stormfist (VAR INT manaInvested)
{
if ((manaInvested == ((SPL_SENDCAST_STORMFIST * 3) / 10)) || (manaInvested == ((SPL_SENDCAST_STORMFIST * 5) / 10)) || (manaInvested == ((SPL_SENDCAST_STORMFIST * 8) / 10)))
{
return SPL_NEXTLEVEL;
};
if (manaInvested >= SPL_SENDCAST_STORMFIST)
{
if (Hlp_IsValidNPC (other)) {
//--- MOD ---
//'Freeze AI'
NPC_ClearAIQueue (other);
AI_StartState (other, ZS_StormFistFreeze, 0, "");
};
return SPL_SENDCAST;
};
return SPL_RECEIVEINVEST;
};