public static IManaAmount Colored(ManaColor color, int count) { if (count == 0) return Zero; return new SingleColorManaAmount(color, count); }
public ManaUnit(ManaColor color, int rank, IManaSource source = null, ManaUsage usageRestriction = ManaUsage.Any) { Color = color; Rank = rank; Source = source; _usageRestriction = usageRestriction; }
public TapForMana(LazyGameObject <Card> h, ManaColor color) { Host = h; Color = color; IsManaAbility = true; MyCost.ActionParts.Add(new TapSelf(Host)); }
public static ManaAmount Colored(ManaColor color, int count) { if (count == 0) { return(Zero); } return(new SingleColorManaAmount(color, count)); }
public void AddMana(ManaColor color, int amount) { if (amount < 0) throw new Exception("Cannot add negative mana to manapool"); if (AvailableMana.ContainsKey(color)) AvailableMana[color] += amount; else AvailableMana.Add(color, amount); }
public static ManaAttribute GetManaAttribute(ManaColor color) { MemberInfo memberInfo = typeof(ManaColor).GetMember(color.ToString()).FirstOrDefault(); if (memberInfo != null) { return(memberInfo.GetCustomAttribute(typeof(ManaAttribute), false) as ManaAttribute); } return(null); }
protected Card GetBasicLandCard(Player owner, ManaColor color, CardType[] types, string[] subtypes, bool isSnow) { var card = new Card(owner, types, subtypes, true, 0, 0, false, isSnow); card._attrs = CardAttrs; // Basic Lands tap for 1 mana of their specific color var cost = new TapCost(card); var manaGenerated = new ManaAmount(1, color); card.AddAbility(new ManaAbility(card, cost, manaGenerated, $"{cost}: Add {manaGenerated}")); return(card); }
public static String ColorToShortenedString(ManaColor col) { String res; switch (col) { case (ManaColor.White): res = "W"; break; case (ManaColor.Blue): res = "U"; break; case (ManaColor.Black): res = "B"; break; case (ManaColor.Red): res = "R"; break; case (ManaColor.Green): res = "G"; break; default: res = "1"; break; } return(res); }
public int this[ManaColor color] { get { switch (color) { case ManaColor.White: case ManaColor.Blue: case ManaColor.Black: case ManaColor.Red: case ManaColor.Green: case ManaColor.Colorless: return(_pool[color]); default: throw new ArgumentException("Only White, Blue, Black, Red, Green, and Colorless mana can exist in the mana pool"); } } set { switch (color) { case ManaColor.White: case ManaColor.Blue: case ManaColor.Black: case ManaColor.Red: case ManaColor.Green: case ManaColor.Colorless: _pool[color] = value; break; default: throw new ArgumentException("Only White, Blue, Black, Red, Green, and Colorless mana can exist in the mana pool"); } } }
public ColorModifier(IResolvable source, string property, ModifierMode mode, ManaColor value) : base(source, property, mode) { Value = value; }
public void ManaAmount(ManaColor color, Func<Card, bool> filter, ControlledBy controlledBy = ControlledBy.SpellOwner) { ManaOutput = new PermanentCountManaOutput(color, filter, controlledBy); Colors = color.Indices; }
public ManaAmount(int amount, ManaColor color) { Amount = amount; Color = color; }
public SingleColorManaAmount(ManaColor color, int count) { Color = color; Count = count; }
public void AddDefaultColors() { ManaColor colorless = new ManaColor("colorless"); colorless.Default = true; colors.Add(colorless); }
public Land(ManaColor color) { _color = color; }
public void ConsumeMana(ManaColor color, int amount) { AvailableMana[color] -= amount; }
public ManaPointView(Int32 i, ManaColor c) { id = i; Color = c; }
public ManaCostPart(ManaColor col) { Color = col; }
public Card GetBasicSnowLand(Player owner, ManaColor color, CardType[] types, string[] subtypes) { return(GetBasicLandCard(owner, color, types, subtypes, true)); }
public ManaAction(ManaColor color) { _color = color; }
private ManaUnit CreateManaUnit(ManaColor color) { return new ManaUnit( color, _p.Priority, this, _p.UsageRestriction); }
public CommandAddManaToPool(Int32 pid, ManaColor mc) { Player = new LazyGameObject <Player>(pid); Color = mc; }