It seems officers dont use anitode altough they have this in place (removed some commented code):
and this function should find the right antidote:
So either the function doesn't provide the antidote or something else is going wrong.
Code:
if(CheckAttribute(chr, "chr_ai.poison"))
{
if(LAi_GetCharacterRelHP(chr) < 0.8)
{
//Levis:
btl = FindAntidoteForCharacter(chr);
DoCharacterUsedItem(&Characters[sti(chr.index)], btl);
}
}
and this function should find the right antidote:
Code:
string FindAntidoteForCharacter(ref chref)
{
string sret = "";
aref chritems; makearef(chritems, chref.items);
int n;
for(int i = 0; i < GetAttributesNum(chritems); i++)
{
if(sti(GetAttributeValue(GetAttributeN(chritems, i))) > 0)
{
n = GetItemIndex(GetAttributeName(GetAttributeN(chritems, i)));
if(CheckAttribute(&Items[n],"potion"))
{
if(CheckAttribute(&Items[n],"potion.antidote"))
{
//TODO: Make it check which antidote is best etc but let's start with this.
sret = Items[n].id;
}
}
}
}
return sret;
}
So either the function doesn't provide the antidote or something else is going wrong.