Pet Battle Scripts

Pet Battle Scripts

265k Downloads

can_explode threshold (minor issue)

cosinussinus opened this issue ยท 2 comments

commented

Addon:RegisterCondition('hp.can_explode', { type = 'boolean', arg = false }, function(owner, pet)
return pet and C_PetBattles.GetHealth(owner, pet) < floor(logical_max_health(getOpponentActivePet(owner)) * 0.4)
end)

should be changed to

Addon:RegisterCondition('hp.can_explode', { type = 'boolean', arg = false }, function(owner, pet)
return pet and C_PetBattles.GetHealth(owner, pet) <= floor(logical_max_health(getOpponentActivePet(owner)) * 0.4)
end)

commented

I have created a PR with this change, since indeed, it should be <= instead of =

commented

Merged, will be present in next release.