예제 #1
0
 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;
 }
예제 #3
0
        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);
        }
예제 #4
0
 public PlayLand(LazyGameObject <Card> c)
 {
     Host = c;
 }
 public CommandAddCounter(Int32 tid, CounterType ct)
 {
     Target = new LazyGameObject <GameObject>(tid);
     Type   = ct;
 }
예제 #6
0
 public CommandSetSummoningSickness(Int32 cid, Boolean m)
 {
     Card = new LazyGameObject <Card>(cid);
     Mode = m;
 }
예제 #7
0
 public UntapSelf(LazyGameObject <Card> c)
 {
     Target = c;
 }
예제 #8
0
 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;
 }
예제 #10
0
 public CommandMoveCard(Int32 cid, ZoneType dest)
 {
     CardID      = new LazyGameObject <Card>(cid);
     Destination = dest;
 }
예제 #11
0
 public CommandAddTarget(Int32 tid, Int32 aind, Int32 oid)
 {
     Card             = new LazyGameObject <Card>(tid);
     ActivatableIndex = aind;
     Target           = new LazyGameObject <GameObject>(oid);
 }
예제 #12
0
 public CommandDestroy(Int32 cid)
 {
     CardID = new LazyGameObject <Card>(cid);
 }
예제 #13
0
 public CommandSetIsTapped(Int32 tgtID, Boolean m)
 {
     Card = new LazyGameObject <Card>(tgtID);
     Mode = m;
 }
예제 #14
0
 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;
 }
예제 #15
0
 public PumpSpell(LazyGameObject <Card> c, Int32 p, Int32 t)
 {
     Host          = c;
     PowerPump     = p;
     ToughnessPump = t;
 }