Example #1
0
 public void Load(CardId left, CardId middle, CardId right, FoodId food)
 {
     SetCard(left, 0);
     SetCard(middle, 1);
     SetCard(right, 2);
     SetFood(food);
 }
Example #2
0
    public void MsgAddCard(CardId cardId)
    {
        handCards.Add(cardId);
        //Debug.Log("przydzielam karte " + cardId);

        playerPanel.AddCard(cardId);
    }
Example #3
0
    public override void _Ready()
    {
        GameData.Instance.State = GameData.GameState.Narration;
        if (GameData.Instance.yokai == YokaiId.None)
        {
            Continue();
            return;
        } // Sanity check to avoid the infamous win-crash
        int money = (100 + GameData.Instance.MoneyPercentageBonus) * GameData.Instance.yokai.Data().Reward / 100;

        GameData.Instance.yokai         = YokaiId.None;
        GetNode <Label>(moneyPath).Text = $"+{money}";
        GameData.Instance.Money        += money;

        CardId card = CardData.AllSpecial().Random();

        GetNode <CardVisual>(cardPath).ShowCard(card.Data());
        GetNode <CardVisual>(cardPath).IsDisabled           = true;
        GetNode <RichTextLabel>(descriptionPath).BbcodeText = BB.Format(card.Data().Description);
        GetNode <Button>(addCardbuttonPath).Connect("pressed", this, nameof(AddToDeck), new Godot.Collections.Array()
        {
            card
        });
        GetNode <Button>(continuePath).Connect("pressed", this, nameof(Continue));


        RNG.StartCycle();
        Global.SaveGame();
    }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is InvoicePaymentRequest other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((RequestMethod == null && other.RequestMethod == null) || (RequestMethod?.Equals(other.RequestMethod) == true)) &&
                   ((RequestType == null && other.RequestType == null) || (RequestType?.Equals(other.RequestType) == true)) &&
                   ((DueDate == null && other.DueDate == null) || (DueDate?.Equals(other.DueDate) == true)) &&
                   ((FixedAmountRequestedMoney == null && other.FixedAmountRequestedMoney == null) || (FixedAmountRequestedMoney?.Equals(other.FixedAmountRequestedMoney) == true)) &&
                   ((PercentageRequested == null && other.PercentageRequested == null) || (PercentageRequested?.Equals(other.PercentageRequested) == true)) &&
                   ((TippingEnabled == null && other.TippingEnabled == null) || (TippingEnabled?.Equals(other.TippingEnabled) == true)) &&
                   ((AutomaticPaymentSource == null && other.AutomaticPaymentSource == null) || (AutomaticPaymentSource?.Equals(other.AutomaticPaymentSource) == true)) &&
                   ((CardId == null && other.CardId == null) || (CardId?.Equals(other.CardId) == true)) &&
                   ((Reminders == null && other.Reminders == null) || (Reminders?.Equals(other.Reminders) == true)) &&
                   ((ComputedAmountMoney == null && other.ComputedAmountMoney == null) || (ComputedAmountMoney?.Equals(other.ComputedAmountMoney) == true)) &&
                   ((TotalCompletedAmountMoney == null && other.TotalCompletedAmountMoney == null) || (TotalCompletedAmountMoney?.Equals(other.TotalCompletedAmountMoney) == true)) &&
                   ((RoundingAdjustmentIncludedMoney == null && other.RoundingAdjustmentIncludedMoney == null) || (RoundingAdjustmentIncludedMoney?.Equals(other.RoundingAdjustmentIncludedMoney) == true)));
        }
Example #5
0
        public string MatchIdV3(string v3Id)
        {
            (string scryfallId, string name) = _repo42.GetById(v3Id);

            if (scryfallId == default && name == default)
            {
                _log.Error($"No v3 card found by id {v3Id}");
                return(null);
            }

            var id = CardId.Generate(scryfallId, name);

            if (!_repo.CardsById.ContainsKey(id))
            {
                if (_repo.CardsByName.TryGetValue(name, out var cards))
                {
                    return(cards[0].Id);
                }

                _log.Error($"No card found by id {id}");
                return(null);
            }

            return(id);
        }
Example #6
0
        public byte[] SerializeASCII()
        {
            List <byte> sendBytes = new List <byte>();

            // command
            sendBytes.AddRange("RG".Select(c => (byte)c)); // "RG" request game (shoul pay is false), "SG" start game (shoul pay is true)
            sendBytes.Add(0x1F);                           // 0x1F - unit separator char(31)
            // concentrator id
            sendBytes.AddRange(ConcentratorId.Select(c => (byte)c));
            sendBytes.Add(0x1F);
            // controller id
            sendBytes.AddRange(GameControllerId.Select(c => (byte)c));
            sendBytes.Add(0x1F);
            // card type
            sendBytes.AddRange(CardType.Select(c => (byte)c));
            sendBytes.Add(0x1F);
            // card id
            sendBytes.AddRange(CardId.Select(c => (byte)c));
            sendBytes.Add(0x1F);
            // should pay
            sendBytes.Add(0x30); //  0x30 '0' char(48)
            sendBytes.Add(0x1F);
            // transaction id
            sendBytes.AddRange(TransactionId.ToString().Select(c => (byte)c));
            sendBytes.Add(0x1F);
            // endpoint rssi
            sendBytes.AddRange(EndpointRssi.ToString().Select(c => (byte)c));
            sendBytes.Add(0x1F);
            // concentrator rssi
            sendBytes.AddRange(ConcentratorRssi.ToString().Select(c => (byte)c));
            sendBytes.Add(0x1E);// 0x1E - record separator char(30)

            return(sendBytes.ToArray());
        }
Example #7
0
    }//check for royal flush

    private bool IsStarightFlush(List <CardId> cards)
    {
        int count = 0;



        for (int i = 0; i < 4; i++)
        {
            count = 0;
            CardId preCard = cards[0];

            for (int j = 1; j < cards.Count; j++)
            {
                if (preCard.card - cards[j].card == 1 && preCard.suite == cards[j].suite)
                {
                    preCard = cards[j];
                    count++;
                }
            }


            if (count >= 4)
            {
                return(true);
            }
        }
        return(false);
    }//check for stright flush
Example #8
0
    void OnGUI()
    {
        if (GUI.Button(new Rect(10, 10, 100, 28), "Start"))
        {
            foreach (PlayerPanel p in pp)
            {
                CardId card = cd.deck.GetTopCard();
                p.AddCard(card, (int)card.suite);
                finalhand.Add(card);
            }

            foreach (PlayerPanel p in pp)
            {
                CardId card = cd.deck.GetTopCard();
                p.AddCard(card, (int)card.suite);
                finalhand.Add(card);
            }

            for (int i = 0; i < table.cardSlots.Length; i++)
            {
                CardId card = cd.deck.GetTopCard();
                table.AddCard(card, 90);
                finalhand.Add(card);
            }


            HandRanker.setHandRanker(finalhand);
        }
    }
Example #9
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is Subscription other &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((LocationId == null && other.LocationId == null) || (LocationId?.Equals(other.LocationId) == true)) &&
                   ((PlanId == null && other.PlanId == null) || (PlanId?.Equals(other.PlanId) == true)) &&
                   ((CustomerId == null && other.CustomerId == null) || (CustomerId?.Equals(other.CustomerId) == true)) &&
                   ((StartDate == null && other.StartDate == null) || (StartDate?.Equals(other.StartDate) == true)) &&
                   ((CanceledDate == null && other.CanceledDate == null) || (CanceledDate?.Equals(other.CanceledDate) == true)) &&
                   ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) &&
                   ((TaxPercentage == null && other.TaxPercentage == null) || (TaxPercentage?.Equals(other.TaxPercentage) == true)) &&
                   ((InvoiceIds == null && other.InvoiceIds == null) || (InvoiceIds?.Equals(other.InvoiceIds) == true)) &&
                   ((PriceOverrideMoney == null && other.PriceOverrideMoney == null) || (PriceOverrideMoney?.Equals(other.PriceOverrideMoney) == true)) &&
                   ((Version == null && other.Version == null) || (Version?.Equals(other.Version) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((CardId == null && other.CardId == null) || (CardId?.Equals(other.CardId) == true)) &&
                   ((PaidUntilDate == null && other.PaidUntilDate == null) || (PaidUntilDate?.Equals(other.PaidUntilDate) == true)) &&
                   ((Timezone == null && other.Timezone == null) || (Timezone?.Equals(other.Timezone) == true)));
        }
Example #10
0
 private CardId[] newPack()
 {
     Random rando = new Random();
     CardId[] r = new CardId[10];
     CardId[] enm = (CardId[])Enum.GetValues(typeof (CardId));
     CardId[] commons = enm.Where(id => Card.rarityOf(id) == Rarity.Common).ToArray();
     CardId[] uncommons = enm.Where(id => Card.rarityOf(id) == Rarity.Uncommon).ToArray();
     CardId[] ebins = enm.Where(id => Card.rarityOf(id) == Rarity.Ebin).ToArray();
     CardId[] legens = enm.Where(id => Card.rarityOf(id) == Rarity.Legendair).ToArray();
     int i = 0;
     while (i < 6)
     {
         r[i++] = commons[rando.Next(commons.Length)];
     }
     while (i < 9)
     {
         r[i++] = uncommons[rando.Next(uncommons.Length)];
     }
     while (i < 10)
     {
         if (rando.Next(13) == 0)
         {
             r[i++] = legens[rando.Next(legens.Length)];
         }
         else
         {
             r[i++] = ebins[rando.Next(ebins.Length)];
         }
     }
     return r;
 }
 void PopulateSpecialCardSprites()
 {
     for (int i = 1; i < Special.Length; i++)
     {
         CardId cardId = new CardId(Suit.Special, (Rank)(-i));
         SpriteLookup[cardId] = Special[i];
     }
 }
Example #12
0
        public void appendIssue(int guid, Card c)
        {
            string csid = c.GetCardId();
            CardId cid  = new CardId(csid);

            trello.Cards.ChangeDescription(cid, "IssueID: " + guid + "\n" + c.Desc);
            refreshData();
        }
Example #13
0
 [ClientRpc]//from server to client
 void RpcdealRiver(CardId newCard)//from server to clients
 {
     if (!isServer)
     {
         cardsInTable.Add(newCard);
         // this was already done for host player
         communityCard.AddCard(newCard, 90);
     }
 }//broadcast the turn card to all the clients
Example #14
0
 [ClientRpc]//from server to client
 void RpcdealFlop(CardId newCard)//from server to clients
 {
     if (!isServer)
     {
         // this was already done for host player
         communityCard.AddCard(newCard, 90);
         cardsInTable.Add(newCard);
     }
 }//broadcast the the cards in the flop to all the clients
Example #15
0
        public async Task <IActionResult> Remove([FromRoute] Guid cardId)
        {
            var id      = new CardId(cardId);
            var command = new RemoveCard(id);

            await _lifetimeService.RemoveAsync(command);

            return(Ok());
        }
Example #16
0
 public CardCreated(
     CardId cardId,
     UserId userId,
     CardName name)
 {
     CardId = cardId;
     UserId = userId;
     Name   = name;
 }
        public override int GetHashCode()
        {
            int hashCode = 801909259;

            if (IdempotencyKey != null)
            {
                hashCode += IdempotencyKey.GetHashCode();
            }

            if (LocationId != null)
            {
                hashCode += LocationId.GetHashCode();
            }

            if (PlanId != null)
            {
                hashCode += PlanId.GetHashCode();
            }

            if (CustomerId != null)
            {
                hashCode += CustomerId.GetHashCode();
            }

            if (StartDate != null)
            {
                hashCode += StartDate.GetHashCode();
            }

            if (CanceledDate != null)
            {
                hashCode += CanceledDate.GetHashCode();
            }

            if (TaxPercentage != null)
            {
                hashCode += TaxPercentage.GetHashCode();
            }

            if (PriceOverrideMoney != null)
            {
                hashCode += PriceOverrideMoney.GetHashCode();
            }

            if (CardId != null)
            {
                hashCode += CardId.GetHashCode();
            }

            if (Timezone != null)
            {
                hashCode += Timezone.GetHashCode();
            }

            return(hashCode);
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="otherside">Name of the other side of this Wonder.  Kind of useless</param>
        /// <param name="name">Name of the active side of the Wonder (e.g. "Giza (B)")</param>
        /// <param name="effect">This is the starting resource or effect that the Wonder Board provides</param>
        /// <param name="nStages">The number of stages this wonder has (1, 2, 3, 4)</param>
        public Board(ExpansionSet e, Wonder otherside, string name, CardId cardId, Effect boardEffect, int nStages)
        {
            this.expansionSet = e;
            this.otherSide = otherside;
            this.name = name;
            this.startingResourceCard = new Card(cardId, name, boardEffect);
            this.numOfStages = nStages;

            inPlay = false;
        }
Example #19
0
        public async Task <IActionResult> Rename([FromRoute] Guid cardId, RenameFormModel model)
        {
            var id      = new CardId(cardId);
            var name    = new CardName(model.Name);
            var command = new RenameCard(id, name);

            await _cardService.RenameAsync(command);

            return(Ok());
        }
Example #20
0
    void RpcAddCard(CardId newCard)
    {
        if (!isServer)
        {
            // this was already done for host player
            //handCards.Add(newCard);
        }

        playerPanel.AddCard(newCard);
    }
    public Sprite GetFrontSprite(CardId cardId)
    {
        Sprite frontSprite;

        SpriteLookup.TryGetValue(cardId, out frontSprite);
        if (frontSprite == null)
        {
            Debug.LogError("Failed to get front sprite for " + cardId);
        }
        return(frontSprite);
    }
Example #22
0
 public CardData GetData(CardId id)
 {
     foreach (var i in _register)
     {
         if (i.Id == id)
         {
             return(i);
         }
     }
     return(null);
 }
Example #23
0
        public async Task <IActionResult> Withdrawal([FromRoute] Guid cardId, WithdrawalFormModel model)
        {
            var id    = new CardId(cardId);
            var money = new Money(model.Amount, model.Currency);

            var command = new DecreaseBalance(id, money);

            var version = await _cardService.WithdrawalAsync(command);

            return(Ok(version));
        }
Example #24
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (Branch != null ? Branch.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CommitUrl != null ? CommitUrl.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CardId != null ? CardId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Message != null ? Message.GetHashCode() : 0);
         return(hashCode);
     }
 }
Example #25
0
    public void AddCard(CardId cardId)
    {
        var cardSlot = cardSlots[nextSlot];

        nextSlot += 1;
        var findCard = cardId;

        cardSlot.GetComponent <Image>().sprite = CardManager.singleton.GetCardSprite(findCard);
        cardSlot.cardId = cardId;
        cardSlot.gameObject.SetActive(true);
    }
Example #26
0
        public async Task <IActionResult> Create(CreateFormModel model)
        {
            var cardId = new CardId(model.CardId);
            var userId = new UserId(model.UserId);
            var name   = new CardName(model.Name);

            var command = new CreateCard(cardId, userId, name);

            await _lifetimeService.CreateAsync(command);

            return(Ok());
        }
Example #27
0
 public void resetCard()
 {
     id = "";
     if (!string.IsNullOrEmpty(CardId))
     {
         string[] s = CardId.Split(' ');
         for (int i = s.Length - 1; i >= 1; i--)
         {
             id += s[i].ToString();
         }
         id = Convert.ToInt32(id, 16).ToString();
     }
 }
Example #28
0
        public async Task <ICard> GetOrCreate(CardId cardId)
        {
            var card = await _repository.GetAsync(cardId);

            if (card.Any())
            {
                return(card.Single());
            }

            _logger.LogDebug($"Get removed card {cardId}");

            return(new NullCard());
        }
Example #29
0
 public CardSnapshot(
     CardId id,
     UserId userId,
     CardName name,
     Money balance,
     bool isRemoved)
 {
     Id        = id;
     UserId    = userId;
     Name      = name;
     Balance   = balance;
     IsRemoved = isRemoved;
 }
Example #30
0
        public void Scenario_ChangeNameOfChecklistItem()
        {
            var card      = new CardId(CardWithCheckList);
            var checklist = _trelloReadWrite.Checklists.ForCard(card).First();

            _trelloReadWrite.Cards.ChangeCheckItemName(card, checklist, checklist.CheckItems.First(), "A changed name");

            var checklistAfterUpdate = _trelloReadWrite.Checklists.ForCard(card).First();

            _trelloReadWrite.Cards.ChangeCheckItemName(card, checklist, checklist.CheckItems.First(), "Make your own boards");

            Assert.That(checklistAfterUpdate.CheckItems.First().Name, Is.EqualTo("A changed name"));
        }
        public void Switch(CardId atackingCard)
        {
            string            cardName      = atackingCard.CardName;
            PlayerIndentifier choosenPlayer = atackingCard.PlayerIdentifier;

            foreach (var card in this.battlefield.cardsOnField)
            {
                if (card.GetType().Name == cardName)
                {
                    card.SwitchPosition();
                    break;
                }
            }
        }
Example #32
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (CardId != 0)
            {
                hash ^= CardId.GetHashCode();
            }
            if (Num != 0)
            {
                hash ^= Num.GetHashCode();
            }
            return(hash);
        }
Example #33
0
 private bool removeFromDeck(CardId id)
 {
     for(int i = myDeckIsHard.count-1; i >= 0; i--)
     {
         if (myDeckIsHard[i].cardId == id)
         {
             myDeckIsHard.remove(myDeckIsHard[i]);
             cardCount.Text = "Count: " + myDeckIsHard.count;
             return true;
         }
     }
     return false;
 }
Example #34
0
 private bool addToDeck(CardId id)
 {
     if (myDeckIsHard.cards.Count(card => card.cardId == id) == maxOf(Card.rarityOf(id))) return false;
     myDeckIsHard.add(new Card(id));
     cardCount.Text = "Count: " + myDeckIsHard.count;
     return true;
 }
Example #35
0
        public static bool deckVerificationThing(CardId[] ids)
        {
            const int minDeckSize = 25;
            if (ids.Count() < minDeckSize) return false;

            int nrOfIds = Enum.GetNames(typeof (CardId)).Length;
            int[] ctrs = new int[nrOfIds];
            foreach (CardId id in ids)
            {
                ctrs[(int) id]++;
            }

            for (int i = 0; i < nrOfIds; i++)
            {
                if (ctrs[i] > maxOf(Card.rarityOf((CardId)i))) return false;
            }
            return true;
        }
Example #36
0
 public static Image getCardArt(CardId id, Size s)
 {
     return getImage(s, Settings.resCard + id + ".png");
 }
Example #37
0
 public CardButton(CardId c)
     : this()
 {
     Card card = new Card(c);
     card.addObserver(this);
 }
Example #38
0
 public SummonTokenEvent(Player p, CardId id)
     : base(GameEventType.SUMMONTOKEN)
 {
     this.id = id;
     player = p;
 }
Example #39
0
        public Card(CardId c)
        {
            cardId = c;
            location = null;

            List<SubEffect> fx = new List<SubEffect>();

            keyAbilities = new List<KeyAbility>();
            string castDescription = "";
            int redCost = 0, greenCost = 0, whiteCost = 0, blackCost = 0, blueCost = 0, greyCost = 0;

            string s = cardId.ToString();
            StringBuilder b = new StringBuilder();
            b.Append(s[0]);
            for (int i = 1; i < s.Length; i++)
            {
                char ch = s[i];
                if ((byte)ch <= 90) { b.Append(' '); }

                b.Append(ch);
            }
            auras = new List<Aura>();
            name = b.ToString();
            baseActivatedAbilities = new List<ActivatedAbility>();
            baseTriggeredAbilities = new List<TriggeredAbility>();

            List<SubCost> castingCosts = new List<SubCost>();

            Colour? forceColour = null;
            int? basePower = null, baseToughness = null;

            switch (cardId)
            {
                #region Kappa
                case CardId.Kappa:
                    {
                        blueCost = 2;
                        greyCost = 2;
                        basePower = 1;
                        baseToughness = 3;
                        cardType = CardType.Creature;
                        race = Race.Salamander;
                        activatedAbilities.Add(new ActivatedAbility(this,
                        new Cost(new ExhaustCost(this)),
                            new Effect(new Mill(new ResolveTargetRule(ResolveTarget.CONTROLLER), 4)),
                            true,
                            LocationPile.FIELD,
                        "E: Target player mills 4 cards."));
                    }
                    break;
                #endregion
                #region GrizzlyBear
                case CardId.GrizzlyBear:
                    {
                        greenCost = 2;
                        cardType = CardType.Creature;
                        race = Race.Bear;
                        subType = SubType.Warrior;
                        basePower = 3;
                        baseToughness = 3;
                    }
                    break;
                #endregion
                #region LightningBolt
                case CardId.LightningBolt:
                    {
                        redCost = 1;
                        greyCost = 1;
                        cardType = CardType.Instant;
                        fx.Add(new Ping(new FilterTargetRule(1, FilterLambda.ZAPPABLE), 3));
                        castDescription = "Deal 3 damage to target player or creature.";
                    }
                    break;
                #endregion
                #region ForkedLightning
                case CardId.ForkedLightning:
                    {
                        redCost = 1;
                        greyCost = 1;
                        cardType = CardType.Sorcery;
                        fx.Add(new Ping(new FilterTargetRule(2, FilterLambda.ZAPPABLE), 1));
                        castDescription = "Deal 1 damage to 2 target players or creatures.";
                    }
                    break;
                #endregion
                #region SolemnAberration
                case CardId.SolemnAberration:
                    {
                        blackCost = 1;
                        cardType = CardType.Creature;
                        race = Race.Zombie;
                        basePower = 2;
                        baseToughness = 1;
                    }
                    break;
                #endregion
                #region PropheticVision
                case CardId.PropheticVision:
                    {
                        blueCost = 2;
                        cardType = CardType.Sorcery;
                        fx.Add(new Draw(new ResolveTargetRule(ResolveTarget.CONTROLLER), 2));
                        castDescription = "Draw 2 cards.";
                    }
                    break;
                #endregion
                #region DragonHatchling
                case CardId.DragonHatchling:
                    {
                        redCost = 1;
                        cardType = CardType.Creature;
                        race = Race.Dragon;
                        basePower = 1;
                        baseToughness = 1;
                        keyAbilities.Add(KeyAbility.Fervor);
                    }
                    break;
                #endregion
                #region TempleHealer
                case CardId.TempleHealer:
                    {
                        whiteCost = 3;
                        greyCost = 1;
                        cardType = CardType.Creature;
                        race = Race.Human;
                        subType = SubType.Cleric;
                        basePower = 4;
                        baseToughness = 4;
                        EventFilter e = vanillaETB;
                        baseTriggeredAbilities.Add(new TriggeredAbility(this,
                            friendlyETB,
                            underYourControlETBDescription + "gain 1 life.",
                            LocationPile.FIELD, EventTiming.Post, new GainLife(new ResolveTargetRule(ResolveTarget.CONTROLLER), 1)));
                    }
                    break;
                #endregion
                #region Rapture
                case CardId.Rapture:
                    {
                        whiteCost = 2;
                        greyCost = 1;
                        cardType = CardType.Instant;
                        fx.Add(new MoveTo(new FilterTargetRule(1, FilterLambda.ZAPPABLE, FilterLambda.CREATURE), LocationPile.EXILE));
                        castDescription = "Exile target creature";
                    }
                    break;
                #endregion
                #region CallToArms
                case CardId.CallToArms:
                    {
                        whiteCost = 1;
                        cardType = CardType.Sorcery;
                        fx.Add(new SummonTokens(new ResolveTargetRule(ResolveTarget.CONTROLLER), CardId.Squire, CardId.Squire));
                        castDescription = "Summon two Squires.";
                    }
                    break;
                #endregion
                #region Squire
                case CardId.Squire:
                    {
                        isToken = true;
                        race = Race.Human;
                        baseToughness = 1;
                        basePower = 1;
                        forceColour = Colour.WHITE;

                    }
                    break;
                #endregion
                #region ShimmeringKoi
                case CardId.ShimmeringKoi:
                    {
                        blueCost = 2;
                        greyCost = 2;
                        cardType = CardType.Creature;
                        race = Race.Fish;
                        basePower = 2;
                        baseToughness = 3;
                        baseTriggeredAbilities.Add(new TriggeredAbility(this,
                            thisETB(this),
                            thisETBDescription + "draw a card.",
                            LocationPile.FIELD, EventTiming.Post,
                            new Draw(new ResolveTargetRule(ResolveTarget.CONTROLLER), 1)
                            ));
                    }
                    break;
                #endregion
                #region Belwas
                case CardId.Belwas:
                    {
                        whiteCost = 2;
                        greyCost = 1;
                        basePower = 3;
                        baseToughness = 2;
                        cardType = CardType.Creature;
                        race = Race.Human;
                        Aura a = new Aura(
                            (crd) => crd.controller == this.controller && crd.colour == Colour.WHITE && crd != this,
                            Modifiable.Power,
                            1,
                            "Other white creatures you control get +1/+0.");
                        auras.Add(a);
                    }
                    break;
                #endregion
                #region AlterTime
                case CardId.AlterTime:
                    {
                        blueCost = 1;
                        cardType = CardType.Instant;
                        fx.Add(new Timelapse(2));
                        fx.Add(new Draw(new ResolveTargetRule(ResolveTarget.CONTROLLER), 1));
                        castDescription = "Timelapse 2 " + timelapseReminder2 + "\nDraw a card.";
                    }
                    break;
                #endregion
                #region GrizzlyCub
                case CardId.GrizzlyCub:
                    {
                        greenCost = 1;
                        cardType = CardType.Creature;
                        race = Race.Bear;
                        basePower = 2;
                        baseToughness = 2;
                    }
                    break;
                #endregion
                #region EvolveFangs
                case CardId.EvolveFangs:
                    {
                        greenCost = 1;
                        cardType = CardType.Instant;
                        fx.Add(new ModifyUntil(new FilterTargetRule(1, FilterLambda.ZAPPABLE, FilterLambda.CREATURE), Modifiable.Power, never, 2));
                        castDescription = "Target creature gets +2/+0.";
                    }
                    break;
                #endregion
                #region IlasGambit
                case CardId.IlasGambit:
                    {
                        name = "Ila's Gambit";
                        blackCost = 1;
                        castingCosts.Add(new PayLifeCost(3));
                        cardType = CardType.Sorcery;
                        fx.Add(
                            new MoveTo(new SelectFromTargetRule(
                                new ResolveTargetRule(ResolveTarget.CONTROLLER),
                                new FilterTargetRule(1, FilterLambda.PLAYER),
                                p => p.hand.cards.ToArray()),
                            LocationPile.GRAVEYARD));
                        castDescription =
                            "As an additional cost to casting this card pay 3 life.\nLook at target players hand and choose 1 card from it. The chosen card is discarded.";
                    }
                    break;
                #endregion
                #region YungLich
                case CardId.YungLich:
                    {
                        blackCost = 1;
                        blueCost = 1;
                        greyCost = 1;
                        cardType = CardType.Creature;
                        race = Race.Zombie;
                        subType = SubType.Wizard;
                        basePower = 2;
                        baseToughness = 2;
                        triggeredAbilities.Add(new TriggeredAbility(this, thisDies(this),
                            thisDiesDescription + "draw a card.",
                            LocationPile.GRAVEYARD, EventTiming.Post,
                            new Draw(new ResolveTargetRule(ResolveTarget.CONTROLLER), 1)));
                    }
                    break;
                #endregion
                #region Unmake
                case CardId.Unmake:
                    {
                        blueCost = 1;
                        cardType = CardType.Instant;
                        fx.Add(new MoveTo(new FilterTargetRule(1, FilterLambda.ZAPPABLE, FilterLambda.CREATURE), LocationPile.HAND));
                        castDescription = "Return target creature to its owners hand.";
                    }
                    break;
                #endregion
                #region EnragedDragon
                case CardId.EnragedDragon:
                    {
                        redCost = 2;
                        cardType = CardType.Creature;
                        race = Race.Dragon;
                        basePower = 3;
                        baseToughness = 2;
                        triggeredAbilities.Add(new TriggeredAbility(this, thisETB(this), thisETBDescription + " deal 1 damage to target player or creature.",
                            LocationPile.FIELD, EventTiming.Post,
                            () => true,
                            new Ping(new FilterTargetRule(1, FilterLambda.ZAPPABLE), 1)));
                    }
                    break;
                #endregion
                #region SteamBolt
                case CardId.SteamBolt:
                    {
                        redCost = 1;
                        blueCost = 1;
                        cardType = CardType.Instant;
                        fx.Add(new Ping(new FilterTargetRule(1, FilterLambda.ZAPPABLE), 1));
                        fx.Add(new Draw(new ResolveTargetRule(ResolveTarget.CONTROLLER), 1));
                        castDescription = "Deal 1 damage to target creature or player.\nDraw a card.";
                    }
                    break;
                #endregion
                #region IlasGravekeeper
                case CardId.IlasGravekeeper:
                    {
                        name = "Ila's Gravekeeper";
                        blackCost = 3;
                        basePower = 0;
                        baseToughness = 4;
                        cardType = CardType.Creature;
                        race = Race.Zombie;
                        auras.Add(new DynamicAura((a) => a == this, Modifiable.Power, () => owner.field.cards.Count(card => card.race == Race.Zombie), "Ila's Gravekeeper gets +1/+0 for each zombie under your control."));
                    }
                    break;
                #endregion
                #region RottingZombie
                //todo: phrasing and balance
                case CardId.RottingZombie:
                    {
                        //todo: phrasing and balance
                        blackCost = 2;
                        greyCost = 1;
                        basePower = 2;
                        baseToughness = 3;
                        cardType = CardType.Creature;
                        race = Race.Zombie;

                        EventFilter f = (e) =>
                        {
                            if (e.type != GameEventType.MOVECARD) return false;
                            MoveCardEvent mevent = (MoveCardEvent)e;
                            return mevent.from?.pile == LocationPile.FIELD && mevent.to?.pile == LocationPile.GRAVEYARD &&
                                   mevent.card.owner == owner && mevent.card.isCreature && mevent.card != this;
                        };

                    triggeredAbilities.Add(new TriggeredAbility(this, f, "Whenever a friendly creature dies this creature gets +1/+1.", LocationPile.FIELD, EventTiming.Post,
                            new ModifyUntil(new ResolveTargetRule(ResolveTarget.SELF), Modifiable.Power, () => false, 1),
                            new ModifyUntil(new ResolveTargetRule(ResolveTarget.SELF), Modifiable.Toughness, () => false, 1)));
                    }
                    break;
                #endregion
                #region Infiltrator
                case CardId.Infiltrator:
                    {
                        blueCost = 3;
                    basePower = 3;
                    baseToughness = 3;
                        cardType = CardType.Creature;
                        EventFilter f = (e) =>
                        {
                            if (e.type != GameEventType.DAMAGEPLAYER) { return false; }
                            DamagePlayerEvent devent = (DamagePlayerEvent)e;
                            return devent.source == this;
                        };
                    triggeredAbilities.Add(new TriggeredAbility(this, f, "Whenever this creature deals damage to a player that player Mills 3.", LocationPile.FIELD, EventTiming.Post,
                        new Mill(new ResolveTargetRule(ResolveTarget.OPPONENT), 3)));
                    }
                    break;
                #endregion
                #region RiderOfDeath
                case CardId.RiderOfDeath:
                    {
                        name = "Rider of Death";
                        blackCost = 3;
                        greyCost = 2;
                        cardType = CardType.Creature;
                        basePower = 5;
                        baseToughness = 4;
                        triggeredAbilities.Add(new TriggeredAbility(this, thisETB(this), thisETBDescription + "kill target creature.",
                            LocationPile.FIELD, EventTiming.Post, () => true, new MoveTo(new FilterTargetRule(1, FilterLambda.ZAPPABLE, FilterLambda.CREATURE), LocationPile.GRAVEYARD)));
                    }
                    break;
                #endregion
                #region IlatianWineMerchant
                case CardId.IlatianWineMerchant:
                    {
                        blackCost = 1;
                        greyCost = 2;
                        cardType = CardType.Creature;
                        basePower = 1;
                        baseToughness = 2;

                    activatedAbilities.Add(new ActivatedAbility(this, new Cost(new MoveToCost(LocationPile.HAND, LocationPile.GRAVEYARD, 1)), new Effect(new GainLife(new ResolveTargetRule(ResolveTarget.CONTROLLER), 3)), true, LocationPile.FIELD, "Discard a card: Gain 3 life."));
                        //triggeredAbilities.Add(new ActivatedAbility(this, new Cost(), ));
                        /*
                        Card c = fx.Add(new MoveTo(new FilterTargetRule(1, FilterLambda.INHAND), LocationPile.GRAVEYARD)); //todo jasin: take cost of creature and put it in gainlife
                        fx.Add(new GainLife(new ResolveTargetRule(ResolveTarget.CONTROLLER), c.manacost));
                        */
                    }
                    break;
                #endregion
                #region MeteorRain
                case CardId.MeteorRain: //todo: seba review
                    {
                        redCost = 2;
                        greyCost = 1;
                        cardType = CardType.Sorcery;
                        castDescription = "Deal 3 damage to all creatures.";
                    fx.Add(new Ping(new ResolveTargetRule(ResolveTarget.ALLCREATURES), 3));
                    }
                    break;
                #endregion
                #region FuryOfTheRighteous
                case CardId.FuryOfTheRighteous: //todo: seba review
                    {
                        name = "Fury of the Righteous";
                        whiteCost = 2;
                        greyCost = 2;
                        cardType = CardType.Sorcery;
                        castDescription = "Deal 2 damage to all creatures your opponent controls.";
                    fx.Add(new Ping(new ResolveTargetRule(ResolveTarget.OPPONENTCREATURES), 2));
                    }
                    break;
                #endregion
                #region Extinguish
                case CardId.Extinguish: //todo: seba review
                    {
                        blackCost = 2;
                        cardType = CardType.Instant;
                        castDescription = "Kill target creature.";
                        flavourText = "Be gone!";
                        fx.Add(new MoveTo(new FilterTargetRule(1, FilterLambda.ZAPPABLE, FilterLambda.CREATURE), LocationPile.GRAVEYARD));
                    }
                    break;
                #endregion
                #region ElderTreeant
                case CardId.ElderTreeant: //todo serious balance and flavor issues
                    {
                    greenCost = 2;
                    greyCost = 1;
                        basePower = 1;
                        baseToughness = 2;
                        cardType = CardType.Creature;
                    activatedAbilities.Add(new ActivatedAbility(this, new Cost(new ManaCost(0,0,0,0,2,1)),
                            new Effect(new ModifyUntil(new ResolveTargetRule(ResolveTarget.SELF), Modifiable.Power, never, 1),
                            new ModifyUntil(new ResolveTargetRule(ResolveTarget.SELF), Modifiable.Toughness, never, 1)), true,
                        LocationPile.FIELD, "1GG: Gain +1/+1."));
                    }
                    break;
                #endregion
                #region EssenceOfDemise
                //todo: each time player casts spell deal one damage to face
                case CardId.EssenceOfDemise:
                    {
                        name = "Essence of Demise";
                        blackCost = 3;
                        greyCost = 1;
                        cardType = CardType.Relic;
                        auras.Add(new Aura((crd) => crd.isCreature, Modifiable.Power, -1, "All creatures get -1/-1."));
                        auras.Add(new Aura((crd) => crd.isCreature, Modifiable.Toughness, -1, ""));
                    }
                    break;
                #endregion
                #region Counterspell
                case CardId.Counterspell:
                    {
                        blueCost = 2;
                        greyCost = 1;
                        cardType = CardType.Instant;
                        castDescription = "Counter target spell.";
                        fx.Add(new CounterSpell(new FilterTargetRule(1, FilterLambda.ONSTACK)));
                    }
                    break;
                #endregion
                #region EssenceOfRage
                case CardId.EssenceOfRage:
                    {
                        name = "Essence of Rage";
                        redCost = 3;
                        greyCost = 1;
                        cardType = CardType.Relic;

                        triggeredAbilities.Add(new TriggeredAbility(this, stepFilter(Step.END), "At the beginning of each end step deal 1 damage to all players.",
                            LocationPile.FIELD, EventTiming.Post, new Ping(new ResolveTargetRule(ResolveTarget.CONTROLLER), 1), new Ping(new ResolveTargetRule(ResolveTarget.OPPONENT), 1)));
                    }
                    break;
                #endregion
                #region EssenceOfClarity
                case CardId.EssenceOfClarity:
                    {
                        name = "Essence of Clarity";
                        blueCost = 3;
                        greyCost = 1;
                        cardType = CardType.Relic;

                        triggeredAbilities.Add(new TriggeredAbility(this, stepFilter(Step.END), "At the beginning of each player's end step that player draws a card.",
                            LocationPile.FIELD, EventTiming.Post, new Draw(new ResolveTargetRule(ResolveTarget.ACTIVE), 1)));
                    }
                    break;
                #endregion
                #region EssenceOfWilderness

                /*
                case CardId.EssenceOfWilderness:
                {
                    name = "Essence of Wilderness";
                    greenCost = 3;
                    cardType = CardType.Relic;

                    EventFilter f = (gevent) =>
                    {
                        if (gevent.type != GameEventType.MOVECARD) return false;
                        MoveCardEvent mevent = (MoveCardEvent) gevent;
                        return mevent.to.pile == LocationPile.FIELD &&mevent.card.cardType == CardType.Creature;
                    };

                    triggeredAbilities.Add(new TriggeredAbility(this, ));
                } break;
                */
                #endregion
                #region EssenceOfValor
                /*
                case CardId.EssenceOfValor:
                {
                    name = "Essence of Valor";
                    whiteCost = 3;
                    cardType = CardType.Relic;

                    //creatures with more than 3 damage cannot attack
                } break;
                */
                #endregion
                #region IlasMagicLamp
                /*
                case CardId.IlasMagicLamp:
                {
                    name = "Ila's Magic Lamp";
                    blackCost = 1;
                    cardType = CardType.Sorcery;

                    //has three charges, get card from deck and shuffle deck

                } break;
                */
                #endregion
                #region StampedingDragon
                case CardId.StampedingDragon:
                    {
                    redCost = 3;
                        baseToughness = 1;
                    basePower = 6;
                        cardType = CardType.Creature; ;

                        keyAbilities.Add(KeyAbility.Fervor);
                    triggeredAbilities.Add(new TriggeredAbility(this, stepFilter(Step.END), "At the end of turn sacrifice this creature.",
                            LocationPile.FIELD, EventTiming.Post, new MoveTo(new ResolveTargetRule(ResolveTarget.SELF), LocationPile.GRAVEYARD)));
                    }
                    break;
                #endregion
                #region MorenianMedic
                case CardId.MorenianMedic:
                    {
                        whiteCost = 2;
                        basePower = 2;
                        baseToughness = 2;
                        activatedAbilities.Add(new ActivatedAbility(this,
                        new Cost(new ExhaustCost(this), new ManaCost(1, 0, 0, 0, 0, 1)),
                            new Effect(new GainLife(new ResolveTargetRule(ResolveTarget.CONTROLLER), 2)),
                            true,
                            LocationPile.FIELD,
                        "E, 1W: Gain 2 life."));
                    }
                    break;
                #endregion
                #region MattysGambit
                case CardId.MattysGambit:
                    {
                        name = "Matty's Gambit";
                        redCost = 1;
                        castingCosts.Add(new PayLifeCost(3));
                        castDescription =
                            "As an additional cost to casting this card pay 3 life.\nDeal 4 damage to target creature or player.";
                        cardType = CardType.Instant;
                        fx.Add(new Ping(new FilterTargetRule(1, FilterLambda.ZAPPABLE), 4));
                    }
                    break;
                #endregion
                #region BelwasGambit
                case CardId.BelwasGambit:
                    {
                        name = "Belwas's Gambit";
                        whiteCost = 1;
                        castingCosts.Add(new PayLifeCost(4));
                        castDescription =
                            "As an additional cost to casting this card pay 4 life.\nTarget creature gets +3/+3.";
                        cardType = CardType.Instant;
                        fx.Add(new ModifyUntil(new FilterTargetRule(1, FilterLambda.CREATURE, FilterLambda.ONFIELD), Modifiable.Power, never, 3));
                        fx.Add(new ModifyUntil(new ResolveTargetRule(ResolveTarget.LAST), Modifiable.Toughness, never, 3));
                    }
                    break;
                #endregion
                #region GrazingBison
                case CardId.GrazingBison:
                    {
                        cardType = CardType.Creature;
                        race = Race.Bison;
                        greenCost = 2;
                        greyCost = 2;
                        basePower = 4;
                        baseToughness = 5;
                    }
                    break;
                #endregion
                #region RockhandOgre
                case CardId.RockhandOgre:
                    {
                        cardType = CardType.Creature;
                        race = Race.Ogre;
                        greenCost = 3;
                        greyCost = 3;
                        basePower = 6;
                        baseToughness = 7;
                    }
                    break;
                #endregion
                #region Figment
                case CardId.Figment:
                    {
                        blackCost = 2;
                        greyCost = 1;
                        cardType = CardType.Sorcery;
                        castDescription = "Search your deck for a card and put it to your hand. Shuffle your deck.";
                        fx.Add(new MoveTo(
                            new SelectFromTargetRule(new ResolveTargetRule(ResolveTarget.CONTROLLER), new ResolveTargetRule(ResolveTarget.LAST),
                        (p) => p.deck.cards.ToArray()),
                            LocationPile.HAND));
                        fx.Add(new Shuffle(new ResolveTargetRule(ResolveTarget.CONTROLLER), false));

                    }
                    break;
                #endregion
                #region SebasGambit
                case CardId.SebasGambit:
                    {
                        name = "Seba's Gambit";
                        blueCost = 1;
                        castingCosts.Add(new PayLifeCost(4));
                        castDescription =
                            "As an additional cost to casting this card pay 4 life.\nCounter target spell.";
                        cardType = CardType.Instant;
                        fx.Add(new CounterSpell(new FilterTargetRule(1, FilterLambda.ONSTACK)));
                    }
                    break;
                #endregion
                #region AberrantSacrifice
                case CardId.AberrantSacrifice:
                {
                    blackCost = 2;
                    castingCosts.Add(new MoveToCost(LocationPile.FIELD, LocationPile.GRAVEYARD, 1));
                    cardType = CardType.Sorcery;
                    fx.Add(new Draw(new ResolveTargetRule(ResolveTarget.CONTROLLER), 2));
                    castDescription = "As an additional cost to cast this card sacrifice a creature.\nDraw 2 cards.";
                } break;
                #endregion
                #region Spark
                case CardId.Spark:
                {
                    redCost = 1;
                    cardType = CardType.Instant;
                    fx.Add(new Ping(new FilterTargetRule(1, FilterLambda.ZAPPABLE), 2));
                    castDescription = "Deal 2 damage to target creature or player.";
                } break;
                #endregion
                #region MaleficentSpirit
                case CardId.MaleficentSpirit:
                {
                    blackCost = 2;
                    greyCost = 2;
                    basePower = 3;
                    baseToughness = 2;
                    cardType = CardType.Creature;
                    triggeredAbilities.Add(new TriggeredAbility(this,
                        thisETB(this),
                        thisETBDescription + "target player discards a card.",
                        LocationPile.FIELD,
                        EventTiming.Post,
                        new Effect(new MoveTo(new SelectFromTargetRule(
                            new FilterTargetRule(1, FilterLambda.PLAYER),
                            new ResolveTargetRule(ResolveTarget.LAST),
                            p => p.hand.cards.ToArray()), LocationPile.GRAVEYARD))
                        ));
                } break;
                #endregion
                #region Bubastis
                case CardId.Bubastis:
                {
                    blueCost = 4;
                    greyCost = 3;
                    basePower = 5;
                    baseToughness = 5;
                    cardType = CardType.Creature;
                    activatedAbilities.Add(new ActivatedAbility(this,
                        new Cost(new ManaCost(0, 2, 0, 0, 0, 1)),
                        new Effect(new Exhaust(new FilterTargetRule(1, FilterLambda.CREATURE, FilterLambda.ONFIELD))),
                        true,
                        LocationPile.FIELD,
                        "1UU: Exhaust target creature."
                        ));
                } break;
                #endregion
                #region HauntedChapel
                case CardId.HauntedChapel:
                {
                    blackCost = 2;
                    whiteCost = 2;
                    cardType = CardType.Relic;
                    activatedAbilities.Add(new ActivatedAbility(this,
                        new Cost(new ManaCost(1, 0, 1, 0, 0, 0), new MoveToCost(LocationPile.GRAVEYARD, LocationPile.EXILE, 1), new ExhaustCost(this)),
                        new Effect(new SummonTokens(new ResolveTargetRule(ResolveTarget.CONTROLLER), CardId.Spirit)),
                        true,
                        LocationPile.FIELD,
                        "E, BW, Exile a card from your graveyard: Put a 1/1 white Spirit token with flying onto the battlefield."
                        ));
                } break;
                #endregion
                #region Spirit
                case CardId.Spirit:
                {
                    isToken = true;
                    keyAbilities.Add(KeyAbility.Flying);
                    forceColour = Colour.WHITE;
                    basePower = 1;
                    baseToughness = 1;
                } break;
                #endregion
                #region OneWithNature
                case CardId.OneWithNature:
                {
                    greenCost = 1;
                    cardType = CardType.Sorcery;
                    fx.Add(new GainBonusMana(new ResolveTargetRule(ResolveTarget.CONTROLLER), Colour.GREEN, Colour.GREEN, Colour.GREEN));
                    castDescription = "Add GGG until end of step.";
                } break;
                #endregion
                #region MysteriousLilac
                case CardId.MysteriousLilac:
                {
                    blueCost = 1;
                    cardType = CardType.Relic;
                        triggeredAbilities.Add(new TriggeredAbility(this,
                            thisETB(this),
                            thisETBDescription + "draw 1 card.",
                            LocationPile.FIELD,
                            EventTiming.Post,
                            new Effect(new Draw(new ResolveTargetRule(ResolveTarget.CONTROLLER), 1))
                            ));
                    activatedAbilities.Add(new ActivatedAbility(this,
                        new Cost(new ManaCost(0, 0, 0, 0, 0, 2)),
                        new Effect(new GainBonusMana(new ResolveTargetRule(ResolveTarget.CONTROLLER), Colour.BLUE)),
                        true,
                        LocationPile.FIELD,
                        "2: Gain U until end of step."
                        ));
                } break;
                #endregion
                #region Overgrow
                case CardId.Overgrow:
                {
                    greenCost = 2;
                    cardType = CardType.Instant;
                    fx.Add(new MoveTo(new FilterTargetRule(1, FilterLambda.RELIC, FilterLambda.ONFIELD), LocationPile.GRAVEYARD));
                    castDescription = "Destroy target relic.";
                } break;
                #endregion
                #region Abolish
                case CardId.Abolish:
                    {
                        whiteCost = 2;
                        cardType = CardType.Instant;
                        fx.Add(new MoveTo(new FilterTargetRule(1, FilterLambda.RELIC, FilterLambda.ONFIELD), LocationPile.GRAVEYARD));
                        castDescription = "Destroy target relic.";
                    }
                    break;
                #endregion
                #region ElvenDruid
                case CardId.ElvenDruid:
                {
                    greenCost = 1;
                    cardType = CardType.Creature;
                    basePower = 1;
                    baseToughness = 1;
                    activatedAbilities.Add(new ActivatedAbility(this,
                        new Cost(new ExhaustCost(this)),
                        new Effect(new GainBonusMana(new ResolveTargetRule(ResolveTarget.CONTROLLER), Colour.GREEN)),
                        true,
                        LocationPile.FIELD,
                        "E: Gain G until end of step."
                        ));
                } break;
                #endregion
                #region ChromaticUnicorn
                case CardId.ChromaticUnicorn:
                {
                    greenCost = 1;
                    cardType = CardType.Creature;
                    basePower = 1;
                    baseToughness = 1;
                    auras.Add(new DynamicAura(crd => this == crd,
                        Modifiable.Power,
                        () => owner.getMaxMana((int)Colour.RED) > 0 ? 2 : 0,
                        "This creature gets +2/+0 as long as you have a red mana orb."
                        ));
                    auras.Add(new DynamicAura(crd => this == crd,
                        Modifiable.Toughness,
                        () => owner.getMaxMana((int)Colour.WHITE) > 0 ? 2 : 0,
                        "This creature gets +0/+2 as long as you have a white mana orb."
                        ));
                    } break;
                #endregion
                #region Flamemane
                case CardId.Flamemane:
                {
                    redCost = 3;
                    greyCost = 1;
                    cardType = CardType.Creature;
                    basePower = 4;
                    baseToughness = 4;
                    keyAbilities.Add(KeyAbility.Flying);
                    activatedAbilities.Add(new ActivatedAbility(this,
                        new Cost(new ManaCost(0, 0, 0, 2, 0, 0)),
                        new Effect(new Ping(new FilterTargetRule(1, FilterLambda.ZAPPABLE), 1)),
                        true,
                        LocationPile.FIELD,
                        "RR: Deal 1 damage to target creature or player."
                        ));
                } break;
                #endregion
                #region CoupDeGrace
                case CardId.CoupDeGrace:
                {
                    whiteCost = 1;
                    cardType = CardType.Instant;
                    fx.Add(
                        new MoveTo(
                            new FilterTargetRule(1, FilterLambda.CREATURE, FilterLambda.ONFIELD, FilterLambda.EXHAUSTED),
                            LocationPile.GRAVEYARD));
                    castDescription = "Destroy target exhausted creature.";
                }
                    break;

                    #endregion
                #region LoneRanger
                case CardId.LoneRanger:
                {
                    //better if it isnt when summoned, instead it should be dynamic when no other creatures are on board?
                    //filter doesn't account for relics on board
                    greenCost = 2;
                    cardType = CardType.Creature;
                    basePower = 2;
                    baseToughness = 2;
                    auras.Add(new DynamicAura(crd => crd == this,
                        Modifiable.Power,
                        () => owner.field.cards.Count() == 1 ? 1 : 0,
                        "This creature gains +1/+2 as long as you control no other permanents."));
                    auras.Add(new DynamicAura(crd => crd == this,
                        Modifiable.Toughness,
                        () => owner.field.cards.Count() == 1 ? 2 : 0,
                        ""));
                    } break;
                #endregion
                #region DecayingZombie
                case CardId.DecayingZombie:
                {
                    cardType = CardType.Creature;
                    blackCost = 2;
                    basePower = 4;
                    baseToughness = 5;
                    triggeredAbilities.Add(new TriggeredAbility(this, stepFilter(Step.END, true), "At the beginning of your endstep this creature gains -1/-1.",
                        LocationPile.FIELD, EventTiming.Post,
                        new ModifyUntil(new ResolveTargetRule(ResolveTarget.SELF), Modifiable.Power, never, -1),
                        new ModifyUntil(new ResolveTargetRule(ResolveTarget.SELF), Modifiable.Toughness, never, -1)));
                    race = Race.Zombie;
                } break;
                #endregion

                #region AsylumWarden
                case CardId.AsylumWarden:
                {
                    cardType = CardType.Creature;
                    blackCost = 1;
                    whiteCost = 1;
                    basePower = 2;
                    baseToughness = 2;
                        triggeredAbilities.Add(new TriggeredAbility(this, thisDies(this),
                                thisDiesDescription + "put a 1/1 white Spirit token with flying onto the battlefield.",
                                LocationPile.GRAVEYARD, EventTiming.Post,
                                new SummonTokens(new ResolveTargetRule(ResolveTarget.CONTROLLER), CardId.Spirit)));
                    } break;
                #endregion
                #region default
                default:
                    {
                        throw new Exception("pls no" + c.ToString());
                    }
                #endregion
            }
            if (basePower != null)
            {
                power = new Modifiable<int>(add, sub);
                power.setBaseValue(basePower.Value);
                toughness = new Modifiable<int>(add, sub);
                toughness.setBaseValue(baseToughness.Value);
            }

            Effect x = new Effect(fx.ToArray());
            castingCost = new ManaCost(whiteCost, blueCost, blackCost, redCost, greenCost, greyCost);
            castingCosts.Add(castingCost);
            Cost cc = new Cost(castingCosts.ToArray());
            castAbility = new ActivatedAbility(this,
                cc,
                new Effect(fx.ToArray()),
                cardType == CardType.Instant,
                LocationPile.HAND, castDescription);
            baseActivatedAbilities.Add(castAbility);

            if ((basePower == null) != (baseToughness == null))
            {
                throw new Exception("bad thing b0ss");
            }

            var vs = castingCost.costsEnumerable;
            List<int> n = new List<int>();
            int ctr = 0;
            foreach (var v in vs)
            {
                if (v != 0)
                {
                    n.Add(ctr);
                }
                if (++ctr == 5)
                {
                    break;
                }
            }
            if (n.Count() == 0)
            {
                if (!forceColour.HasValue)
                {
                    colour = Colour.GREY;
                }
                else
                {
                    colour = forceColour.Value;
                }
            }
            else if (n.Count() == 1)
            {
                colour = (Colour)n.First();
            }
            else
            {
                colour = Colour.MULTI;
            }
        }
Example #40
0
            public Card makeCard(Player owner, CardId id)
            {
                int i = ctr++;
                Card c = new Card(id);
                c.setId(i);
                c.owner = owner;
                c.controller = owner;
                cards.Add(i, c);
                if (owner.isHero)
                {
                    hero.Add(c);
                }
                else
                {
                    villain.Add(c);
                }

                return c;
            }
Example #41
0
 public bool Equals(CardId other)
 {
     return Equals(other._cardId, _cardId);
 }
Example #42
0
 public void sendDeck(CardId[] ids)
 {
     sendAction(new DeclareDeckAction(ids));
 }
Example #43
0
 public Card makeCard(Player p, CardId id)
 {
     return cardFactory.makeCard(p, id);
 }
Example #44
0
 public void loadDeck(Player p, CardId[] cs)
 {
     List<Card> myDeck = cardFactory.makeList(hero, cs);
     p.loadDeck(myDeck);
 }
Example #45
0
 public static Rarity rarityOf(CardId id)
 {
     return rarities[(int)id];
 }
Example #46
0
        public virtual void notifyObserver(Observable o, object args)
        {
            Card card = (Card)o;

            Card = card;
            colour = card.colour;
            art = card.cardId;
            name = card.getName();
            archtype = card.getArchtypeString();
            abilityText = card.getAbilitiesString();
            costs = card.getManaCost().costs;
            hasPT = false;
            isExhausted = card.exhausted;
            rarity = card.rarity;
            if (card.attacking)
            {
                borderColor = Color.Red;
            }
            else if (card.defenderOf != null)
            {
                borderColor = Color.Blue;
            }
            else
            {
                borderColor = null;
            }
            if (card.hasPT())
            {
                hasPT = true;
                power = card.currentPower.ToString();
                toughness = card.currentToughness.ToString();
                isDamaged = card.isDamaged();
            }

            targets = card.stackWrapper?.targets ?? (IEnumerable<Target>)notahack;
            if (card.defenderOf != null)
            {
                targets = targets.Concat(new [] {new Target(card.defenderOf)});
            }

            Invalidate();
        }
Example #47
0
		public void Scenario_ChangeNameOfChecklistItem()
		{
			var card = new CardId(CardWithCheckList);
			var checklist = _trelloReadWrite.Checklists.ForCard(card).First();

			_trelloReadWrite.Cards.ChangeCheckItemName(card, checklist, checklist.CheckItems.First(), "A changed name");

			var checklistAfterUpdate = _trelloReadWrite.Checklists.ForCard(card).First();

			_trelloReadWrite.Cards.ChangeCheckItemName(card, checklist, checklist.CheckItems.First(), "Make your own boards");

			Assert.That(checklistAfterUpdate.CheckItems.First().Name, Is.EqualTo("A changed name"));
		}
 public Card(CardId cardId, string name, Effect effect)
 {
     this.Id = cardId;
     this.strName = name;
     this.effect = effect;
 }