Ejemplo n.º 1
0
        public override void Land(Game game)
        {
            // @TODO: Ajouter un timer pour qu'il y ai un délai avant le Play() de la specialCard
            Random rnd = new Random();
            List <AbstractCard> deck = game.Cards.Where(c => c.Deck == Type).ToList();
            AbstractCard        ac   = deck[rnd.Next(deck.Count)];

            game.LastSpecialCard = ac;
            ac.Play(game);
        }
Ejemplo n.º 2
0
 public bool PlayCard(AbstractCard card, AbstractCharacter source, AbstractCharacter target)
 {
     if (card == null)
     {
         return(false);
     }
     try {
         card.Play(source, target);
         cardsPlayedThisTurn += 1;
         return(true);
     } catch (Exception ex) {
         Debug.LogWarning("Failed to play card, reason: " + ex.Message);
         return(false);
     }
 }
Ejemplo n.º 3
0
 public bool PlayCard(AbstractCard card, AbstractCharacter source, AbstractArgument target)
 {
     if (card == null)
     {
         return(false);
     }
     try {
         card.Play(source, target);
         // numCardsPlayedThisTurn += 1;
         if (!card.suppressEventCalls)   // Event calls are suppressed here if SelectCardsFromList is invoked; instead invoked after SelectedCards is played
         {
             em.TriggerEvent(new EventCardPlayed(card, source));
         }
         return(true);
     } catch (Exception ex) {
         Debug.LogWarning("NegotiationManager.cs failed to play " + card.NAME + ", reason: " + ex.ToString());
         return(false);
     }
 }