public bool TryRemoveUrgentStatusAfflictions(CreatureObject HealTarget)
{
if (HealTarget.Confused || HealTarget.Insane || HealTarget.Frightened || HealTarget.Paralyzed || HealTarget.Blinded)
{
if (Script.GetHasSpell(CLRScriptBase.SPELL_HEAL, ObjectId) == CLRScriptBase.TRUE)
{
Script.ActionUseTalentOnObject(Script.TalentSpell(CLRScriptBase.SPELL_HEAL), HealTarget.ObjectId);
return true;
}
if (HealTarget.Blinded || HealTarget.Deaf)
{
if (Script.GetHasSpell(CLRScriptBase.SPELL_REMOVE_BLINDNESS_AND_DEAFNESS, ObjectId) == CLRScriptBase.TRUE)
{
Script.ActionUseTalentOnObject(Script.TalentSpell(CLRScriptBase.SPELL_REMOVE_BLINDNESS_AND_DEAFNESS), HealTarget.ObjectId);
return true;
}
}
}
if (HealTarget.Petrified)
{
if (Script.GetHasSpell(CLRScriptBase.SPELL_STONE_TO_FLESH, ObjectId) == CLRScriptBase.TRUE)
{
Script.ActionUseTalentOnObject(Script.TalentSpell(CLRScriptBase.SPELL_STONE_TO_FLESH), HealTarget.ObjectId);
return true;
}
}
if (HealTarget.Wounded)
{
int nMissingHitPoints = HealTarget.MaxHitPoints - HealTarget.CurrentHitPoints;
if (nMissingHitPoints == 0) nMissingHitPoints = 1;
if (TryToHeal(HealTarget, nMissingHitPoints))
return true;
}
return false;
}