AMAI icon indicating copy to clipboard operation
AMAI copied to clipboard

AI's low-hp hero sometimes can't use healing potions correctly.

Open Pixyy opened this issue 3 years ago • 1 comments

I have seen multiple times that AI's dying hero didn't use the healing potion it had. It's hard to find where this bug comes from. But this time I find a special case that is worth writing a new issue. WC3ScrnShot_011322_222125_001 WC3ScrnShot_011322_222130_001 As you can see, AI's orc hero was retreated by using a town portal. Tauren Chief was in bad shape but it didn't have a healing potion. The healing potion was in Farseer's bag. WC3ScrnShot_011322_222149_001 WC3ScrnShot_011322_222154_001 After they reached home, Farseer passed its healing potion to Tauren Chief, which is a rare situation. WC3ScrnShot_011322_222244_001 Soon Farseer was killed by the enemy's Death Knight. Tauren Chief didn't use the healing potion even if it was targeted by Death Knight. So it died unsurprisingly.

In this scenario, I think there are two possible reasons why this kind of bug might be triggered. First, AI's hero may not use healing potions correctly after using a portal. Second, maybe it's the swap of the healing potion between the two heroes that caused this bug.

Pixyy avatar Jan 13 '22 15:01 Pixyy

Item use and control in inventory is primarily coming from hardcoded logic. We might be able to add extra logic to make sure the potion is used if they are dying though.

SMUnlimited avatar Jan 13 '22 17:01 SMUnlimited