Shadosky
New Member
- Joined
- May 22, 2014
- Messages
- 22
Good news everyone
Since nobody have posted their own CustomDeck I post here the Alpha version of the mine hoping that it can help those who are a little lost
Actually the AI : - drop card in a logic order
- Rush the enemy Hero or Taunter ( trade function in coming )
At the moment I've coded :
- The major part of the functions who manage the card's drop. -> DropHelper.cs [PERCENTAGE=85][/PERCENTAGE]
- A class for each card used in the deck (Default class for other card on the way...)[PERCENTAGE=75][/PERCENTAGE]
- Main class in progress -> i_am_murloc.cs [PERCENTAGE=60][/PERCENTAGE]
I'm working on the Trade class -> TradeHelper.cs [PERCENTAGE=50][/PERCENTAGE]
Here is the list of card u need in your Deck :

In English -> Warlock - Deckbuilder - HearthPwn
Work In Progress
- Code the Leroy card to use instead of the rocketeer
- TradeHelper.cs -> Lethal dammage
Download
The Project his on GitHub : https://github.com/Shadosky/Custom_Deck/tree/new
But u can find the .zip here :
View attachment MurlocCustomRush.zip Rush mode only trade taunter & hero
View attachment MurlocCustomDeckAlpha1.zip Including TradeHelper ( Murloc kill dangerous ennemy minions )
Just unzip it in your HearthBuddy\CustomDecks\ folder
It's an Alpha Version & i post it for helping people who try to dev & are blocked, it can mannage 90% win vs PracticeNormal but I still have a lot to do on it..
Ask any question you need if u have trouble to understand how it work
How to add a card in the deck
Create a new .cs file the name must be the Id of the card for the exemple : CS2_065.cs
Remplace in this code all IdCard with the id of the card u wanna add
Put some condition in the GetPlayPriority() function and return a PlayPriority for each case // .Low .Normal .High .Ultra or .DontPlay
In the I_am_murloc.cs :
add ur card in the dictionary like all this one ( Format : {"IdCard", new IdCard()} )
Hope this can help you
Since nobody have posted their own CustomDeck I post here the Alpha version of the mine hoping that it can help those who are a little lost

Actually the AI : - drop card in a logic order
- Rush the enemy Hero or Taunter ( trade function in coming )
At the moment I've coded :
- The major part of the functions who manage the card's drop. -> DropHelper.cs [PERCENTAGE=85][/PERCENTAGE]
- A class for each card used in the deck (Default class for other card on the way...)[PERCENTAGE=75][/PERCENTAGE]
- Main class in progress -> i_am_murloc.cs [PERCENTAGE=60][/PERCENTAGE]
I'm working on the Trade class -> TradeHelper.cs [PERCENTAGE=50][/PERCENTAGE]
Here is the list of card u need in your Deck :

In English -> Warlock - Deckbuilder - HearthPwn
Work In Progress
- Code the Leroy card to use instead of the rocketeer
- TradeHelper.cs -> Lethal dammage
Download
The Project his on GitHub : https://github.com/Shadosky/Custom_Deck/tree/new
But u can find the .zip here :
View attachment MurlocCustomRush.zip Rush mode only trade taunter & hero
View attachment MurlocCustomDeckAlpha1.zip Including TradeHelper ( Murloc kill dangerous ennemy minions )
Just unzip it in your HearthBuddy\CustomDecks\ folder
It's an Alpha Version & i post it for helping people who try to dev & are blocked, it can mannage 90% win vs PracticeNormal but I still have a lot to do on it..
Ask any question you need if u have trouble to understand how it work
How to add a card in the deck
Create a new .cs file the name must be the Id of the card for the exemple : CS2_065.cs
Remplace in this code all IdCard with the id of the card u wanna add
Code:
using System.Collections;
using System.Linq;
using Triton.Bot;
using Triton.Common;
using Triton.Game;
using Triton.Game.Mapping;
// Class & struct by Shadosky
// Special thanks to Hankerspace
// Don't forget us in our CustomDeck's credit if u use code find here
namespace Shadosky.murloc
{
public class IdCard : ICardDefinition
{
public string Id { get { return "IdCard"; } }
// Cardname:
public PlayPriority GetPlayPriority()
{
if (DropHelper.DoIHaveTaunter())
return PlayPriority.Low;
return PlayPriority.High;
}
public HSCard GetCardToUseOn(HSCard thisCard )
{
if (Murloc.DoTheEnemyHasATaunter())
{
// Do our attack on enemy taunter
return Murloc.RetrieveEnemyTaunter();
}
// Enemy has NO taunter and we can target him => go for the face
if (TritonHS.EnemyHero.CanBeTargetedByOpponents)
{
// Do our attack
return TritonHS.EnemyHero;
}
return null;
}
public HSCard UseBattlecryOn(HSCard thisCard)
{
return null;
}
}
}
Put some condition in the GetPlayPriority() function and return a PlayPriority for each case // .Low .Normal .High .Ultra or .DontPlay
In the I_am_murloc.cs :
Code:
public Dictionary<string, ICardDefinition> MurlocMap = new Dictionary<string, ICardDefinition>()
{
{ "CS2_065", new CS2_065()},
{ "CS2_122", new CS2_122()},
{ "CS2_124", new CS2_124()},
{ "CS2_168", new CS2_168()},
{ "CS2_173", new CS2_173()},
{ "CS2_213", new CS2_213()},
{ "EX1_004", new EX1_004()},
{ "EX1_029", new EX1_029()},
{ "EX1_062", new EX1_062()},
{ "EX1_103", new EX1_103()},
{ "EX1_319", new EX1_319()},
{ "EX1_506", new EX1_506()},
{ "EX1_506a", new EX1_506a()},
{ "EX1_507", new EX1_507()},
{ "EX1_508", new EX1_508()},
{ "EX1_509", new EX1_509()},
{ "NEW1_017", new NEW1_017()},
{ "NEW1_019", new NEW1_019()},
{ "GAME_005", new GAME_005()}
};
add ur card in the dictionary like all this one ( Format : {"IdCard", new IdCard()} )
Hope this can help you

Last edited: