public void CopyFrom(ReadableCard other) { this.name = other.Name; this.cost = other.GetCost(); this.ControllerID = other.Get_ControllerID(); this.OwnerID = other.Get_OwnerID(); this.ID = other.GetID((ReadableCard)null).ToInt(); this.afterPlay_triggers = new LinkedList <GameTrigger <GameEffect> >(); foreach (GameTrigger <GameEffect> trigger in other.Get_AfterPlay_Triggers()) { this.afterPlay_triggers.AddLast(trigger.Clone((GameTrigger <GameEffect>)null)); } }
public override void Process(Game game) { Writable_GamePlayer player = null; int numCards = this.numCards_provider.GetValue(this, game, default(int)); if (numCards >= 1) { player = this.playerProvider.GetValue(this, game, (Writable_GamePlayer)null); } for (int i = 0; i < numCards; i++) { // draw another card ReadableCard card = this.cardProvider.GetValue(this, game, (ReadableCard)null); if (card != null && card.Get_ControllerID() == null) { // This only ever happens if the card isn't in the game yet, so it works to just clone it here WritableCard writable = card.Clone((WritableCard)null); writable.ControllerID = this.ControllerID; card = writable; } player.TryToDrawCard(card, game); } }