public override void Undo(Game g)
        {
            PayManaCost pmc = (PayManaCost)g.InputHandlers[PlayerID].CurrentInputState;

            pmc.MyActivatable.MyCost.PaidMana.Clear();
            pmc.MyActivatable.MyCost.PaidMana.AddRange(paidManaParts);
        }
        public override void Do(Game g)
        {
            paidManaParts = new List <ManaCostPart>();

            PayManaCost pmc = (PayManaCost)g.InputHandlers[PlayerID].CurrentInputState;;

            paidManaParts.AddRange(pmc.MyActivatable.MyCost.PaidMana);
            pmc.MyActivatable.MyCost.PaidMana.Clear();
        }
        public override void Undo(Game g)
        {
            Player       p   = Payer.Value(g);
            InputHandler IH  = g.InputHandlers[Payer.ID];
            PayManaCost  pmc = (PayManaCost)IH.CurrentInputState;

            pmc.MyActivatable.MyCost.PaidMana.Remove(pmc.MyActivatable.MyCost.ManaParts[CostIndex]);
            p.ManaPool.Add(new LazyGameObject <ManaPoint>(mp));
            g.GameObjects.Add(mp);
        }
        public override void Do(Game g)
        {
            Player       p   = Payer.Value(g);
            InputHandler IH  = g.InputHandlers[Payer.ID];
            PayManaCost  pmc = (PayManaCost)IH.CurrentInputState;

            mp = ManaPoint.Value(g);

            pmc.MyActivatable.MyCost.ManaParts[CostIndex].Pay(mp, g);
            pmc.MyActivatable.MyCost.PaidMana.Add(pmc.MyActivatable.MyCost.ManaParts[CostIndex]);
            p.ManaPool.Remove(ManaPoint);
            g.GameObjects.Remove(mp);
        }
예제 #5
0
        public override void Do(Game g)
        {
            Card        c   = (Card)g.GetGameObjectByID(CardID);
            Activatable act = null;

            if (Mode == AbilityType.Activatable)
            {
                act = c.CurrentCharacteristics.Activatables[Index];
            }
            else if (Mode == AbilityType.Trigger)
            {
                act = c.CurrentCharacteristics.Triggers[Index].myAbility;
            }

            pmc = new PayManaCost(act, Mode);

            g.InputHandlers[PlayerID].CurrentInputState = pmc;
        }