Jump to content

Default Pet Battle Fight Class 1

   (0 reviews)

About This File

Hello,

 

This is the default Pet Battle Fight Class.

 

You need to move download file to folder "WRobot\FightClass\Pet Battle\".

 

You can edit this with Visual Studio (create new library project add in references "wManager.dll" and "robotManager.dll".


What's New in Version 1   See changelog

Released

No changelog available for this version.

User Feedback

Recommended Comments

I downloaded visual studio but i dont know what to change in the file to alter the skill rotation.. any tips m8?

Also, you made a "Is Grinder" option in the easy quest. Would be awsome you added a "IS PetBattle" option, then it would just be

Hotspots and you could get the bot to move to another area with the min and max level setting.

Just a thought! Thanks for a good product

Link to comment
Share on other sites

On 7/11/2015 19:05:36, Retardo101 said:

I downloaded visual studio but i dont know what to change in the file to alter the skill rotation.. any tips m8?

Also, you made a "Is Grinder" option in the easy quest. Would be awsome you added a "IS PetBattle" option, then it would just be

Hotspots and you could get the bot to move to another area with the min and max level setting.

Just a thought! Thanks for a good product

Hello,

In pet battle profile creator you can add several zones, and change zone by pets levels.

In visual studio, create library project and add in references "wManager.dll" and "robotManager.dll". Open downloaded file with notepad (Default.cs) and copy/past the text in visual studio.

Link to comment
Share on other sites

Hello

n'y a t il pas une erreur ici ?

if (TargetTypeIsWeaknesses())
                PetBattles.ChangeToBestPet();
            else if (PetBattles.GetNumberUsableAbility() <= 0)
                PetBattles.SkipTurn();
            else if (PetBattles.GetNumberUsableAbility() <= 0 && !PetBattles.ActionSelected() && !PetBattles.IsWaitingOnOpponent())
                PetBattles.ChangeToBestPet();
            else if (TrapUsable())
                PetBattles.UseTrap();
            else if (!FightBattlePet.PetBattlesDontFight)
                PetBattles.UseBestAbility();

 

sachant que les conditions étant les mêmes (en souligné), c'est toujours le premier else if qui passera. Le second sera toujours zappé. Il faudrait mettre le second en premier.

Je me trompe peut-être...

Link to comment
Share on other sites

On 14/12/2015 at 7:09 AM, PierreDeRosette said:

Hello

n'y a t il pas une erreur ici ?

if (TargetTypeIsWeaknesses())
                PetBattles.ChangeToBestPet();
            else if (PetBattles.GetNumberUsableAbility() <= 0)
                PetBattles.SkipTurn();
            else if (PetBattles.GetNumberUsableAbility() <= 0 && !PetBattles.ActionSelected() && !PetBattles.IsWaitingOnOpponent())
                PetBattles.ChangeToBestPet();
            else if (TrapUsable())
                PetBattles.UseTrap();
            else if (!FightBattlePet.PetBattlesDontFight)
                PetBattles.UseBestAbility();

 

sachant que les conditions étant les mêmes (en souligné), c'est toujours le premier else if qui passera. Le second sera toujours zappé. Il faudrait mettre le second en premier.

Je me trompe peut-être...

Bonjour, Merci, je viens de corriger le problème.

Link to comment
Share on other sites

Salut,

ça serait possible d'avoir le code de "UseBestAbility", dans beaucoup de combats le choix n'est pas bon , et c'est surtout cette fonction qu'il faudrait remanier

 

Merci d'avance

Link to comment
Share on other sites

15 minutes ago, AudreyH said:

Salut,

ça serait possible d'avoir le code de "UseBestAbility", dans beaucoup de combats le choix n'est pas bon , et c'est surtout cette fonction qu'il faudrait remanier

 

Merci d'avance

Salut,


        public static int GetBestAbility()
        {
            try
            {
                int activePetAlly = GetActivePet(PetFaction.Ally);
                int activePetEnemy = GetActivePet(PetFaction.Enemy);
                var typePetEnemy = GetPetType(PetFaction.Enemy, activePetEnemy);

                var bestAbility = new List<int>();
                var weakAbility = new List<int>();
                var normalAbility = new List<int>();
                for (int i = 1; i <= NUM_BATTLE_PET_ABILITIES; i++)
                {
                    if (GetAbilityState(PetFaction.Ally, activePetAlly, i))
                    {
                        var abilityInfo = GetAbilityInfo(PetFaction.Ally, activePetAlly, i);
                        if (!FightBattlePet.AbilitiesBlackListed.Contains(abilityInfo.Name))
                        {
                            ModiferEffects abilityModifer =
                                AbilityModifer.Find(effects => effects.Type == abilityInfo.AbilityPetType);
                            if (abilityModifer != null)
                            {
                                if (abilityModifer.Strong == typePetEnemy)
                                {
                                    bestAbility.Add(i);
                                }
                                if (abilityModifer.Weak == typePetEnemy)
                                {
                                    weakAbility.Add(i);
                                }
                                else
                                {
                                    normalAbility.Add(i);
                                }
                            }
                        }
                    }
                }

                int ability = Others.Random(1, 3);
                if (bestAbility.Count > 0)
                {
                    ability = bestAbility[Others.Random(0, bestAbility.Count - 1)];
                }
                else if (normalAbility.Count > 0)
                {
                    ability = normalAbility[Others.Random(0, normalAbility.Count - 1)];
                }
                else if (weakAbility.Count > 0)
                {
                    ability = weakAbility[Others.Random(0, weakAbility.Count - 1)];
                }
                return ability;
            }
            catch (Exception e)
            {
                Logging.WriteError("GetBestAbility(): " + e);
                return 1;
            }
        }

 

Link to comment
Share on other sites

×
×
  • Create New...