public GainLifeDefinedAbility(LazyGameObject <Card> h, LazyGameObject <Player> p, Int32 a) { Host = h; DefinedPlayer = p; Amount = a; }
public CommandAssignDamage(Int32 tgt, Int32 amt) { Target = new LazyGameObject <Card>(tgt); Amount = amt; }
public override void Build() { CardCharacteristics Front = MyCharacteristics[CharacteristicName.Front]; Front.Name = "Soul Warden"; Front.CardTypes.Add("Creature"); Front.SubTypes.Add("Human"); Front.SubTypes.Add("Cleric"); Front.Power = 1; Front.Toughness = 1; LazyGameObject <Card> lazyThis = new LazyGameObject <Card>(this); CastPermanent cast = new CastPermanent(lazyThis); cast.MyCost.ManaParts.Add(new ManaCostPart(ManaColor.White)); Front.Activatables.Add(cast); GainLifeDefinedAbility gla = new GainLifeDefinedAbility(lazyThis, this.Controller, 1); Func <CommandBase, Game, Boolean> shouldTrigger = (x, g) => { if (!(x is CommandMoveCard)) { return(false); } CommandMoveCard move = (CommandMoveCard)x; g.DebugAlert(DebugMode.Triggers, move.ToString(g)); if (move.Destination != ZoneType.Battlefield) { g.DebugAlert(DebugMode.Triggers, "Soul Warden should: failed destination"); return(false); //It must move to the battlefield. } if (move.CardID.ID == this.ID) { g.DebugAlert(DebugMode.Triggers, "Soul Warden should: failed id"); return(false); //Must be another card } if (!move.CardID.Value(g).CurrentCharacteristics.CardTypes.Contains("Creature")) { g.DebugAlert(DebugMode.Triggers, "Types:"); foreach (String s in move.CardID.Value(g).CurrentCharacteristics.CardTypes) { g.DebugAlert(DebugMode.Triggers, s); } g.DebugAlert(DebugMode.Triggers, "Soul Warden should: failed type"); return(false); //Must be a creature } return(true); }; Func <Trigger, Game, Boolean> canTrigger = (x, g) => { Boolean res = g.GetZoneTypeOf(x.host) == ZoneType.Battlefield; if (!res) { g.DebugAlert(DebugMode.Triggers, "Soulwarden can: failed zone"); } return(res); }; Trigger trig = new Trigger(shouldTrigger, canTrigger, gla, lazyThis); Front.Triggers.Add(trig); }
public PlayLand(LazyGameObject <Card> c) { Host = c; }
public CommandAddCounter(Int32 tid, CounterType ct) { Target = new LazyGameObject <GameObject>(tid); Type = ct; }
public CommandSetSummoningSickness(Int32 cid, Boolean m) { Card = new LazyGameObject <Card>(cid); Mode = m; }
public UntapSelf(LazyGameObject <Card> c) { Target = c; }
public CommandSetBlockingState(Int32 p) { Player = new LazyGameObject <Player>(p); }
public CommandPerformActionCost(Int32 cid, Int32 aind, Int32 cpind) { CardID = new LazyGameObject <Card>(cid); ActivatableIndex = aind; CostPartIndex = cpind; }
public CommandMoveCard(Int32 cid, ZoneType dest) { CardID = new LazyGameObject <Card>(cid); Destination = dest; }
public CommandAddTarget(Int32 tid, Int32 aind, Int32 oid) { Card = new LazyGameObject <Card>(tid); ActivatableIndex = aind; Target = new LazyGameObject <GameObject>(oid); }
public CommandDestroy(Int32 cid) { CardID = new LazyGameObject <Card>(cid); }
public CommandSetIsTapped(Int32 tgtID, Boolean m) { Card = new LazyGameObject <Card>(tgtID); Mode = m; }
public Trigger(Func <CommandBase, Game, Boolean> pred, Func <Trigger, Game, Boolean> canTrig, Ability ab, LazyGameObject <Card> h) { triggerOn = pred; canTrigger = canTrig; myAbility = ab; host = h; }
public PumpSpell(LazyGameObject <Card> c, Int32 p, Int32 t) { Host = c; PowerPump = p; ToughnessPump = t; }