示例#1
0
 public void SetPaid(ActionCostPart acb)
 {
     if (ActionParts.Contains(acb))
     {
         PaidActions.Add(acb);
     }
 }
        public override void Undo(Game g)
        {
            Card           c   = CardID.Value(g);
            Activatable    act = c.CurrentCharacteristics.Activatables[ActivatableIndex];
            ActionCostPart acp = act.MyCost.ActionParts[CostPartIndex];

            act.MyCost.PaidActions.Remove(acp);
            //No need to undo anything more, as the Commands issued by the CostPart's Pay method should already be undone.
        }
        public override void Do(Game g)
        {
            Card           c   = CardID.Value(g);
            Activatable    act = c.CurrentCharacteristics.Activatables[ActivatableIndex];
            ActionCostPart acp = act.MyCost.ActionParts[CostPartIndex];

            act.MyCost.PaidActions.Add(acp);

            acp.Pay(g);
        }