root/lang/csharp/DominionEngine/DominionEngine.CardInfo.Base/Moneylender.cs @ 37531

Revision 37531, 0.6 kB (checked in by isaisstillalive, 3 years ago)
  • Moneylenderを実装
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5
6namespace DominionEngine.CardInfo
7{
8    public class Moneylender : CardInfo, IAction
9    {
10        public override Worth Cost { get { return Worth.Coin(4); } }
11
12        public void Action()
13        {
14            //Trash a Copper from your hand.
15            var trashCard = Player.Choose(CardPosition.Hand, cardinfo => cardinfo is Copper);
16            trashCard.Trash();
17            //If you do, +3 Coin.
18            if (trashCard.Count == 1) Player.Coin += 3;
19        }
20    }
21}
Note: See TracBrowser for help on using the browser.