if(getEffectList().getEffectsCountForSkill(5753) > 0) // Awakening
{
return null;
}
boolean improved = PetDataTable.isImprovedBabyPet(getNpcId());
L2Skill skill = null;
if(!Config.ALT_PET_HEAL_BATTLE_ONLY || owner.isInCombat())
{
// проверка лечения
double curHp = owner.getCurrentHpPercents();
if(curHp < 90 && Rnd.chance((100 - curHp) / 3))
{
if(curHp < 33) // экстренная ситуация, сильный хил
{
skill = SkillTable.getInstance().getInfo(improved ? BattleHeal : GreaterHealTrick, getHealLevel());
}
else if(getNpcId() != PetDataTable.IMPROVED_BABY_KOOKABURRA_ID)
{
skill = SkillTable.getInstance().getInfo(improved ? GreaterHeal : HealTrick, getHealLevel());
}
}
// проверка речарджа
if(skill == null && getNpcId() == PetDataTable.IMPROVED_BABY_KOOKABURRA_ID) // Речардж только у Kookaburra и в комбат моде
{
double curMp = owner.getCurrentMpPercents();
if(curMp < 66 && Rnd.chance((100 - curMp) / 3))
{
skill = SkillTable.getInstance().getInfo(Recharge, getRechargeLevel());
}
}
if(skill != null && skill.checkCondition(L2PetBabyInstance.this, owner, false, !isFollow(), true))
{
setTarget(owner);
getAI().Cast(skill, owner, false, !isFollow());
return skill;
}