using DominionBase.Enums; using System.Diagnostics.Contracts; namespace DominionBase.Cards.Menagerie { public class Fisherman : Card { public Fisherman() : base(Categories.Action, Source.Menagerie, Location.Kingdom, Traits.Cantrip | Traits.ModifyCost | Traits.PlusAction | Traits.PlusCard | Traits.PlusCoin) { BaseCost = new Cost(5, special: true); Benefit.Cards = 1; Benefit.Actions = 1; Benefit.Currency.Coin.Value = 1; } public override void SetupCard(IGame game) { Contract.Requires(game != null, "game cannot be null"); base.SetupCard(game); game.CostCompute += Fisherman_CostCompute; } public override void TearDown(IGame game) { Contract.Requires(game != null, "game cannot be null"); base.TearDown(game); game.CostCompute -= Fisherman_CostCompute; } private void Fisherman_CostCompute(object sender, CostComputeEventArgs e) { if (e.Card != this) return; var game = sender as IGame; if (game.ActivePlayer != null && game.ActivePlayer.DiscardPile.Count == 0) e.Cost.Coin -= 3; } } }