So here's the problem:
I have two NPCs fighting during a dialogue sequence in KotOR 2, so essentially it's an all bark and no bite battle. One of the participants is a party member, the other is just an NPC. The party member seems to love using power attack while doing the fight, which is all well and good until the NPC starts getting knocked over and backwards by this party member.
My problem with this is I absolutely need
both the party member and the NPC to remain in the spots I have preordained for them, thus the knock down caused by the power attack is troublesome. The party member comes pre-loaded with power attack (as in they join the party with it) so I can't just gamble on them not having it, and I'm far too lazy (at least until this is my last option) to script out the whole fight with individual cutscene attacks.
So far, in order to remove the power attack's unwanted effects, I've tried using immunity effects, doing something like this:
effect eImmunity = EffectImmunity(IMMUNITY_TYPE_KNOCKDOWN);
effect eCritical = EffectImmunity(IMMUNITY_TYPE_CRITICAL_HIT);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eImmunity, oNPC, 35.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eCritical, oNPC, 35.0);
This didn't fix the problem, as the party member was still able to achieve a knockdown on the NPC. Is there any other way I could go about preventing the NPC from being knocked down by the power attack? Such as a saving throw boost, or something of that nature?
EDIT: Turns out I was on the right path of thinking - I added boosts to the NPC's saving throws and it solved my problem. The source code is below. If a mod could close this thread, that'd be great.
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectSavingThrowIncrease(SAVING_THROW_ALL, 250, SAVING_THROW_TYPE_ALL), oNPC, 35.0);