protected override void AfterCostPaid(IGame game, IEffectHandle handle, IEnumerable<Tuple<ICharacterInPlay, byte>> charactersAndPayments) { var attachedTo = handle.Target as IAttachmentHostInPlay; if (attachedTo == null) throw new InvalidOperationException("target undefined for this attachment"); player.Hand.RemoveCards(new List<IPlayerCard> { costlyCard }); if (attachmentCard != null) { var attachmentInPlay = new AttachmentInPlay(game, attachmentCard, attachedTo); player.AddCardInPlay(attachmentInPlay); } else if (treasureCard != null) { var treasureInPlay = new TreasureInPlay(game, treasureCard, attachedTo); player.AddCardInPlay(treasureInPlay); } }
protected override void AfterCostPaid(IGame game, IEffectHandle handle, IEnumerable <Tuple <ICharacterInPlay, byte> > charactersAndPayments) { var attachedTo = handle.Target as IAttachmentHostInPlay; if (attachedTo == null) { throw new InvalidOperationException("target undefined for this attachment"); } player.Hand.RemoveCards(new List <IPlayerCard> { costlyCard }); if (attachmentCard != null) { var attachmentInPlay = new AttachmentInPlay(game, attachmentCard, attachedTo); player.AddCardInPlay(attachmentInPlay); } else if (treasureCard != null) { var treasureInPlay = new TreasureInPlay(game, treasureCard, attachedTo); player.AddCardInPlay(treasureInPlay); } }