Beispiel #1
0
 public void UnsubscribeEvents(Card card, List<EventEnum> typeEvents)
 {
     foreach (EventEnum typeEvent in typeEvents)
     {
         Events[Enum.GetName(typeof(EventEnum), typeEvent)].Remove(card);
     }
 }
Beispiel #2
0
        public static List<Card> GenerateDeck()
        {
            List<Card> cards = new List<Card>();

            Card tramway = new Card("Tramway", 4, new List<CardAction>(), null);

            CardAction cardAction = new CardAction();
            cardAction.TypeEvent = EventEnum.CARD_BOUGHT;
            cardAction.LifeTime = LifeTimeEnum.ONE_SHOT;
            cardAction.EffectList += cardAction.ImpactVP;
            cardAction.ImpactedPlayers += cardAction.SelectCurrentPlayer;
            cardAction.Amount = 2;
            tramway.CardActions.Add(cardAction);

            cards.Add(tramway);

            Card tank = new Card("Tank", 4, new List<CardAction>(), null);

            cardAction = new CardAction();
            cardAction.TypeEvent = EventEnum.CARD_BOUGHT;
            cardAction.LifeTime = LifeTimeEnum.ONE_SHOT;
            cardAction.EffectList += cardAction.ImpactVP;
            cardAction.Amount = 4;
            cardAction.ImpactedPlayers += cardAction.SelectCurrentPlayer;
            tank.CardActions.Add(cardAction);
            cardAction = new CardAction();
            cardAction.TypeEvent = EventEnum.CARD_BOUGHT;
            cardAction.LifeTime = LifeTimeEnum.ONE_SHOT;
            cardAction.EffectList += cardAction.ImpactHp;
            cardAction.Amount = -3;
            cardAction.ImpactedPlayers += cardAction.SelectCurrentPlayer;
            tank.CardActions.Add(cardAction);

            cards.Add(tank);

            Card soin = new Card("Soin", 3, new List<CardAction>(), null);

            cardAction = new CardAction();
            cardAction.TypeEvent = EventEnum.CARD_BOUGHT;
            cardAction.LifeTime = LifeTimeEnum.ONE_SHOT;
            cardAction.EffectList += cardAction.ImpactHp;
            cardAction.Amount = 2;
            cardAction.ImpactedPlayers = cardAction.SelectCurrentPlayer;
            soin.CardActions.Add(cardAction);

            cards.Add(soin);

            Card cafeDuCoin = new Card("Cafe Du Coin", 3, new List<CardAction>(), null);

            cardAction = new CardAction();
            cardAction.TypeEvent = EventEnum.CARD_BOUGHT;
            cardAction.LifeTime = LifeTimeEnum.ONE_SHOT;
            cardAction.EffectList += cardAction.ImpactVP;
            cardAction.Amount = 1;
            cardAction.ImpactedPlayers += cardAction.SelectCurrentPlayer;
            cafeDuCoin.CardActions.Add(cardAction);

            cards.Add(cafeDuCoin);

            Card raffinerieDeGaz = new Card("Raffinerie de gaz", 6, new List<CardAction>(), null);

            cardAction = new CardAction();
            cardAction.TypeEvent = EventEnum.CARD_BOUGHT;
            cardAction.LifeTime = LifeTimeEnum.ONE_SHOT;
            cardAction.EffectList += cardAction.ImpactHp;
            cardAction.Amount = -3;
            raffinerieDeGaz.CardActions.Add(cardAction);
            cardAction = new CardAction();
            cardAction.TypeEvent = EventEnum.CARD_BOUGHT;
            cardAction.LifeTime = LifeTimeEnum.ONE_SHOT;
            cardAction.EffectList += cardAction.ImpactVP;
            cardAction.Amount = 2;
            raffinerieDeGaz.CardActions.Add(cardAction);

            cards.Add(raffinerieDeGaz);

             return CardShuffle(cards);
        }