public void Play(HS_Game game, int index) { HS_CardInstance card = game.CurrentPlayer.Hand.Cards[index]; SpendMana((byte)card.Stats.Cost); game.Battlefield.AddCreature(this, (HS_CreatureInstance)card); //game.CurrentBattlefield.Add((HS_CreatureInstance)card); Hand.Cards.RemoveAt(index); //TODO redo this }
public static void PrintCard(HS_CardInstance card) { String msg = card.Name + " - " + HS_CardTypeUtil.GetCode(card.Stats.Type) + " " + card.Stats.Cost + ""; //if (card.Stats.Type == CardType.Creature) msg += " ["; Console.WriteLine(msg); if (card.Stats.Copy != "") { Console.WriteLine("*" + card.Stats.Copy); } }
bool CanPlayCard(HS_Game g, HS_PlayerInstance player, int index) { try { HS_CardInstance card = player.Hand.Cards[index]; //Check have enough mana if (player.Mana >= card.Stats.Cost) { //TODO check full battlefield return(true); } else { return(false); } } catch { return(false); } }
public void Draw(HS_Hand hand) { HS_CardInstance cardInstance = DrawCard(); hand.Add(cardInstance); }