Rematch Script - Double Counter

Discuss your favorite pet addons and macros.
User avatar
Raelea
Posts:1
Joined:February 4th, 2014
Pet Score:7996
Realm:Proudmoore-us
Contact:
Rematch Script - Double Counter

Post by Raelea » August 2nd, 2023, 12:59 am

Double (or hard) counters are pets that are strong against the same family that they are also tough against. These aren't always the best choice for countering a particular enemy, but it can be a helpful starting point if you're trying to figure out your own team. Selecting Strong Against/Tough Against gives you a decent list, but I find it not restrictive enough as it will trigger on a single ability and that's often not enough to make it a strong counter.

The following script will show pets that have 2 or more abilities that are strong against the same family that a given pet is also tough against. Hopefully others find this useful as well. I took the Hybrid Counter code as a starting point.

Code: Select all

-- Pets with two or more attack types strong against enemies the pet is tough against.
local strong_vs_map = {2, 6, 9, 1, 4, 3, 10, 5, 7, 8}
local tough_vs_map = {5, 3, 8, 2, 7, 9, 10, 1, 4, 6}

local count = 0
for _,abilityID in ipairs(abilityList) do
  local abilityType,noHints = select(7, C_PetBattles.GetAbilityInfoByID(abilityID) )
  if not noHints and strong_vs_map[abilityType]==tough_vs_map[petType] then
    count = count + 1
  end
end

return count>=2

Post Reply