[Question] Pet Battle Abilities menu

User Tag List

Results 1 to 3 of 3
  1. #1
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question] Pet Battle Abilities

    Hi guys,

    I seem to be a bit stumped... I am trying to figure out if a Pet Battle Ability is Powerful, Weak, or just normal!

    You can see what I mean by the red and green arrows in the picture below:
    [Question] Pet Battle Abilities-petbattle-png

    Does anyone know which lua function I can use to check this? I can't seem to find it.

    Note: the lua function C_PetBattles.GetAttackModifier() prototype is as follows, but it does not help in my situation as I need a specific ability modifier.

    Code:
    C_PetBattles.GetAttackModifier(ActiveAllyPetType, ActiveEnemyPetType);
    Thanks
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

    [Question] Pet Battle Abilities
  2. #2
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    C_PetBattles.GetAttackModifier() wants the ability type, not the pet type. Blizzard's code is a bit confusing because they've named the var petType
    For example,
    Code:
    function DumpAbilityStrengths()
       local activePetSlot = C_PetBattles.GetActivePet(LE_BATTLE_PET_ALLY)
       local enemyPetSlot = C_PetBattles.GetActivePet(LE_BATTLE_PET_ENEMY)
       local enemyType = C_PetBattles.GetPetType(LE_BATTLE_PET_ENEMY, enemyPetSlot)
       for i=1,3 do -- only need to check the first 3 buttons
          local abilityName, abilityType, noHints
          _, abilityName, _, _, _, _, abilityType, noHints = C_PetBattles.GetAbilityInfo(LE_BATTLE_PET_ALLY, activePetSlot, i)
          if(noHints) then
             print(abilityName .. " has no modifier")
          else
             local modifier = C_PetBattles.GetAttackModifier(abilityType, enemyType)
             if(modifier < 1) then
                print(abilityName .. " is weak against enemy")
             elseif(modifier > 1) then
                print(abilityName .. " is strong against enemy")
             else
                print(abilityName .. " is normal strength against enemy")
             end
          end
       end
    end

  3. #3
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by _Mike View Post
    C_PetBattles.GetAttackModifier() wants the ability type, not the pet type. Blizzard's code is a bit confusing because they've named the var petType
    For example,
    Code:
    function DumpAbilityStrengths()
       local activePetSlot = C_PetBattles.GetActivePet(LE_BATTLE_PET_ALLY)
       local enemyPetSlot = C_PetBattles.GetActivePet(LE_BATTLE_PET_ENEMY)
       local enemyType = C_PetBattles.GetPetType(LE_BATTLE_PET_ENEMY, enemyPetSlot)
       for i=1,3 do -- only need to check the first 3 buttons
          local abilityName, abilityType, noHints
          _, abilityName, _, _, _, _, abilityType, noHints = C_PetBattles.GetAbilityInfo(LE_BATTLE_PET_ALLY, activePetSlot, i)
          if(noHints) then
             print(abilityName .. " has no modifier")
          else
             local modifier = C_PetBattles.GetAttackModifier(abilityType, enemyType)
             if(modifier < 1) then
                print(abilityName .. " is weak against enemy")
             elseif(modifier > 1) then
                print(abilityName .. " is strong against enemy")
             else
                print(abilityName .. " is normal strength against enemy")
             end
          end
       end
    end
    Yeah, that makes more sense now... have you noticed anything else that wrong?

    Also, how do you decide which more to use, first?
    What I mean is, some moves cause a debuff on the enemy which cause x2 damage on your next attack... Do you handle this?


    EDIT: I am currently getting my best ability using GetAttackModifier... However this causes issues.

    For Example:
    Enemy = Squirrel / Critter
    Ability Type = Howl / Beast

    If I use
    GetAttackModifier in this situation it returns 1.5 however this move doesn't even cause damage it casts a debuff.
    Last edited by -Ryuk-; 09-29-2012 at 01:33 PM.
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

Similar Threads

  1. Pet battle - rare quality command/addon - question
    By Fuo in forum World of Warcraft General
    Replies: 2
    Last Post: 10-18-2013, 12:41 PM
  2. How do level via pet battles now? (Question)
    By adamlad101 in forum World of Warcraft Exploits
    Replies: 4
    Last Post: 07-02-2013, 12:13 AM
  3. Question on Battle.net and scammed accounts
    By Coolio Jenkins in forum WoW Scams Help
    Replies: 6
    Last Post: 04-05-2009, 05:28 AM
  4. [Question / Request] Battle Ground map
    By kravron in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 03-09-2008, 05:19 AM
  5. [Question] Pet to Creature edits
    By Kyiz in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 10-11-2007, 11:34 AM
All times are GMT -5. The time now is 06:26 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search