using DominionBase.Enums; using System; using System.Diagnostics.Contracts; namespace DominionBase.Cards.Universal { public static class TypeClass { public static readonly Type Dummy = typeof(Dummy); public static readonly Type DummyRed = typeof(DummyRed); public static readonly Type Blank = typeof(Blank); public static readonly Type Copper = typeof(Copper); public static readonly Type Silver = typeof(Silver); public static readonly Type Gold = typeof(Gold); public static readonly Type Estate = typeof(Estate); public static readonly Type Duchy = typeof(Duchy); public static readonly Type Province = typeof(Province); public static readonly Type Curse = typeof(Curse); } public class Dummy : Card { public Dummy() : base(Categories.Card, Source.All, Location.Invisible) { } } public class DummyRed : Card { public DummyRed() : base(Categories.Card, Source.All, Location.Invisible, Traits.None, CardBack.Red) { } } public class Blank : Card { public Blank() : base(Categories.Card, Source.All, Location.Invisible, Traits.None, CardBack.Blank) { } } public static class Utility { public static Card GenerateCardBack(CardBack back) { switch (back) { case CardBack.Blank: return new Blank(); case CardBack.Standard: return new Dummy(); case CardBack.Red: return new DummyRed(); } return new Dummy(); } } public class Copper : Card { public Copper() : base(Categories.Treasure, Source.All, Location.General) { Benefit.Currency.Coin.Value = 1; } protected override bool AllowUndo => true; } public class Silver : Card { public Silver() : base(Categories.Treasure, Source.All, Location.General) { BaseCost = new Cost(3); Benefit.Currency.Coin.Value = 2; } protected override bool AllowUndo => true; } public class Gold : Card { public Gold() : base(Categories.Treasure, Source.All, Location.General) { BaseCost = new Cost(6); Benefit.Currency.Coin.Value = 3; } protected override bool AllowUndo => true; } public class Curse : Card { public Curse() : base(Categories.Curse, Source.All, Location.General) { VictoryPoints = -1; } } public class Estate : Card { public Estate() : base(Categories.Victory, Source.All, Location.General) { BaseCost = new Cost(2); VictoryPoints = 1; } } public class Duchy : Card { public Duchy() : base(Categories.Victory, Source.All, Location.General) { BaseCost = new Cost(5); VictoryPoints = 3; } } public class Province : Card { public Province() : base(Categories.Victory, Source.All, Location.General) { BaseCost = new Cost(8); VictoryPoints = 6; } public override bool IsEndgameTriggered(ISupply supply) { Contract.Requires(supply != null, "supply cannot be null"); return supply.Count == 0; } } }