示例#1
0
        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
        }
示例#2
0
        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);
            }
        }
示例#3
0
 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);
     }
 }
示例#4
0
        public void Draw(HS_Hand hand)
        {
            HS_CardInstance cardInstance = DrawCard();

            hand.Add(cardInstance);
        }