int GetIsFlatfooted(object oCreature=OBJECT_SELF)
{
if(GetHasFeat(FEAT_UNCANNY_REFLEX,oCreature))
{
return FALSE;
}
switch(GetCurrentAction(oCreature))
{
case ACTION_DISABLETRAP:
case ACTION_EXAMINETRAP:
case ACTION_FLAGTRAP:
case ACTION_INVALID:
case ACTION_LOCK:
case ACTION_OPENLOCK:
case ACTION_RECOVERTRAP:
case ACTION_REST:
case ACTION_SETTRAP:
case ACTION_SIT:
case ACTION_TAUNT:
case ACTION_WAIT:
return TRUE;
}
int bBlindFight = GetHasFeat(FEAT_BLIND_FIGHT,oCreature);
effect e = GetFirstEffect(oCreature);
while(GetIsEffectValid(e))
{
switch(GetEffectType(e))
{
case EFFECT_TYPE_ENTANGLE:
case EFFECT_TYPE_CUTSCENEIMMOBILIZE:
return TRUE;
case EFFECT_TYPE_BLINDNESS:
if(!bBlindFight) return TRUE;
break;
}
e = GetNextEffect(oCreature);
}
return GetMovementRate(oCreature) < 2;
}
there is a custom function inside NWScript. Its definitely not 100% reliable and there might be some other circumstances I have missed or misinterpreted.
Im unsure whether the creature is already flatfooted when she has the action to open lock assigned, but she is running towards locked object. As well I dont even know if its ACTION_OPENLOCK returned in such moment. Also I dont know whether cutscene immobilize effect type ID is correctly returned by the function GetEffectType - lexicon says nothing about any weirdness so I guess it does.
Modifié par ShaDoOoW, 01 décembre 2012 - 09:15 .