internal void player_RegainFortress(Player player, ref TrashEventArgs e) { if (player._Game.Table.Trash.Contains(this.PhysicalCard)) { player.Gain(player._Game.Table.Trash, this.PhysicalCard, DeckLocation.Hand, DeckPosition.Automatic); _TrashedFinishedEventHandler = new Player.TrashedFinishedEventHandler(player_TrashedFinished); player.TrashedFinished += _TrashedFinishedEventHandler; } e.HandledBy.Add(this); }
void player_TrashedFinished(object sender, TrashEventArgs e) { this.PhysicalCard.ObtainedBy(e.CurrentPlayer); if (_TrashedFinishedEventHandler != null) e.CurrentPlayer.TrashedFinished -= _TrashedFinishedEventHandler; _TrashedFinishedEventHandler = null; }