What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Card logic bounties

db user

New Member
Joined
Apr 15, 2014
Messages
62
Hello,

Right now I see that there are a lot of things going on with improving the bot, but at the moment there are very few things being done about card logic. There are a ton of threads about misplays which some are easy to fix and others are more complicated. Unfortunately I am not a coder myself and can not fix these things, but I would like to try to put together a compilation of broken card logics and try to reward the community for fixing them. My proposal is to list here cards that are broken. If you fix one I will include your donation link next to the name and then hopefully as people use them they will take a minute to tip you for your work. It is all on a 100% voluntary basis, but I have seen a lot of very generous people on the Buddy forums and I feel that this could definitely be the extra incentive needed.

I will also need your help in finding out which cards are broken. If you need a card fixed and would like it added to this list, please submit the following information:

Card name:
Description of Misplay:
Description of Correct Play:


Thank you!
 
Last edited:
Active Bounties

Card Name:
CardID:
Description of Misplay:
Description of Correct Play:



Card Name: Enhance-o Mechano
CardID: GVG_107
Description of Misplay: Plays this card before other cards on this turn, they do not get the buffs.
Description of Correct Play: Summon all other cards first, Do not play with very few cards on board.



Card Name: Mechwarper
CardID: GVG_006
Description of Misplay: Summons other mech before using mechwarper
Description of Correct Play: Always summon mechwarper before playing other mechs. Also, T1 should coin mechwarper -> clockwork gnome for example



Card Name: Goblin Auto-Barber
CardID: GVG_023
Description of Misplay: His buff gives +1 to the equipped weapon. And the bot is playing him without having a weapon. (Is a rogue card)
Description of Correct Play: Only play if haves a weapon.



Card Name: Deadly Poison
CardID: CS2_074
Description of Misplay: Uses when the durability of the weapon is just one.
Description of Correct Play: This should use when the durability of weapon is only +2
 
Last edited:
Completed Bounties

Updated Card Logic

Card Name:
Location:
Coder:
Donation Link:
Updated Logic: [HIDE]
Code:
[/HIDE]

--------

Card Name: Goblin Blastmage
Location: Hearthbuddy\Routines\DefaultRoutine\Silverfish\cards\Sim_GVG_004.cs
Coder: Dcrew
Donation Link:
Updated Logic: [HIDE]
Code:
using System;
using System.Collections.Generic;
using System.Text;

namespace HREngine.Bots
{
    class Sim_GVG_004 : SimTemplate //Goblin Blastmage (Updated card logic by Dcrew)
    {
        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            bool myTurn = own.own, hasMech = false;
            List<Minion> minions = (myTurn ? p.ownMinions : p.enemyMinions);
            foreach (Minion m in minions) if ((TAG_RACE)m.handcard.card.race == TAG_RACE.MECHANICAL) { hasMech = true; break; }
            if (!hasMech) return;
            minions = (myTurn ? p.enemyMinions : p.ownMinions);
            int times = (myTurn ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(4));
            if ((myTurn && (p.enemyHero.Hp <= times)) || (!myTurn && (p.ownHero.Hp <= times)))
            {
                if (myTurn) p.minionGetDamageOrHeal(p.enemyHero, (p.enemyHero.Hp - 1));
                else p.minionGetDamageOrHeal(p.ownHero, (p.ownHero.Hp - 1));
            }
            else
                for (int i = 0; i < times; i++)
                    if (minions.Count >= 1)
                    {
                        Minion enemy = minions[0];
                        byte minHP = byte.MaxValue;
                        foreach (Minion m in minions)
                            if ((m.name == CardDB.cardName.nerubianegg) && (enemy.Hp >= 2)) continue;
                            else if ((m.Hp >= 2) && (minHP > m.Hp)) { enemy = m; minHP = (byte)m.Hp; }
                        if (minHP < byte.MaxValue) p.minionGetDamageOrHeal(enemy, 1);
                        else p.minionGetDamageOrHeal((myTurn ? p.enemyHero : p.ownHero), 1);
                    }
                    else p.minionGetDamageOrHeal((myTurn ? p.enemyHero : p.ownHero), 1);
        }
    }
}
[/HIDE]

--------

Card Name: Tinkertown Technician
Location: Hearthbuddy\Routines\DefaultRoutine\Silverfish\cards\Sim_GVG_102.cs
Coder: Dcrew
Donation Link:
Updated Logic: [HIDE]
Code:
using System;
using System.Collections.Generic;
using System.Text;

namespace HREngine.Bots
{
    class Sim_GVG_102 : SimTemplate //Tinkertown Technician (Updated card logic by Dcrew)
    {
        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            bool myTurn = own.own, hasMech = false;
            List<Minion> minions = (myTurn ? p.ownMinions : p.enemyMinions);
            foreach (Minion m in minions) if ((TAG_RACE)m.handcard.card.race == TAG_RACE.MECHANICAL) { hasMech = true; break; }
            if (hasMech)
            {
                p.minionGetBuffed(own, 1, 1);
                p.drawACard(CardDB.cardName.armorplating, myTurn, true);
            }
        }
    }
}
[/HIDE]
 
Last edited:
Other Code Updates

Description:
Coder:
Donation:
Location:
Old Code: [HIDE]
Code:
[/HIDE]
New Code: [HIDE]
Code:
[/HIDE]



Description: General Code Optimization
Coder: Dcrew
Donation:
Location: Hearthbuddy\Routines\DefaultRoutine\Silverfish\ai\CardDB.cs
Old Code: [HIDE]
Code:
public cardIDEnum cardIdstringToEnum(string s)
        {
            if (s == "CS1h_001") return CardDB.cardIDEnum.CS1h_001;
            if (s == "CS1_042") return CardDB.cardIDEnum.CS1_042;
            //...
            if (s == "PlaceholderCard") return CardDB.cardIDEnum.PlaceholderCard;
            return CardDB.cardIDEnum.None;
        }
[/HIDE]
New Code: [HIDE]
Code:
 public cardIDEnum cardIdstringToEnum(string s)
        {
            cardIDEnum type;
            if (Enum.TryParse<cardIDEnum>(s, out type)) return type;
            else return cardIDEnum.None;
        }
[/HIDE]



Description: General Code Optimization
Coder: Dcrew
Donation:
Location: Hearthbuddy\Routines\DefaultRoutine\Silverfish\ai\CardDB.cs
Old Code: [HIDE]
Code:
public cardName cardNamestringToEnum(string s)
        {
            cardName name;
            if (Enum.TryParse<cardName>(s, out name)) return name;
            if (s == "unknown") return CardDB.cardName.unknown;
            if (s == "lesserheal") return CardDB.cardName.lesserheal;
            //...
            if (s == "placeholdercard") return CardDB.cardName.placeholdercard;
            return CardDB.cardName.unknown;
        }
[/HIDE]
New Code: [HIDE]
Code:
 public cardName cardNamestringToEnum(string s)
        {
            cardName name;
            if (Enum.TryParse<cardName>(s, out name)) return name;
            else return CardDB.cardName.unknown;
        }
[/HIDE]
 
Last edited:
Card name: Goblin Auto-Barber
Description of Misplay: His buff gives +1 to the equipped weapon. And the bot is playing him without having a weapon. (Is a rogue card)
Description of Correct Play: Only play if haves a weapon.


Card name: Deadly Poison
Description of Misplay: Uses when the durability of the weapon is just one(1).
Description of Correct Play: This should use when the durability of weapon is only +2.
 
Last edited:
Card name: Loatheb
Description of Misplay: Bot did skip the turn without attacking a rogue that had nothing to be afraid of.
Description of Correct Play: Attack face ?
 
Card name: Goblin Auto-Barber
Description of Misplay: His buff gives +1 to the equipped weapon. And the bot is playing him without having a weapon. (Is a rogue card)
Description of Correct Play: Only play if haves a weapon.


Card name: Deadly Poison
Description of Misplay: Uses when the durability of the weapon is just one(1).
Description of Correct Play: This should use when the durability of weapon is only +2.

Added, ty!

Card name: Loatheb
Description of Misplay: Bot did skip the turn without attacking a rogue that had nothing to be afraid of.
Description of Correct Play: Attack face ?

This has been happening to a few people from the last update, I do not believe it is a card issue or card specific.
 
Back
Top