diff --git a/Engine/src/Board/CardAction/ComplexEffectExecutor.cs b/Engine/src/Board/CardAction/ComplexEffectExecutor.cs index 74dbf87..ecc77b8 100644 --- a/Engine/src/Board/CardAction/ComplexEffectExecutor.cs +++ b/Engine/src/Board/CardAction/ComplexEffectExecutor.cs @@ -146,7 +146,12 @@ public PlayResult CompleteHlaalu(Choice sourceChoice, List choices) { _currentPlayer.Hand.Remove(card); } - else // if not in hand, then it must be in a played pile + else if (_currentPlayer.Agents.Any(agent => agent.RepresentingCard.UniqueId == card.UniqueId)) + { + var toRemove = _currentPlayer.Agents.First(agent => agent.RepresentingCard.UniqueId == card.UniqueId); + _currentPlayer.Agents.Remove(toRemove); + } + else // if not in hand and agents, then it must be in a played pile { _currentPlayer.Played.Remove(card); } @@ -207,6 +212,12 @@ public PlayResult CompleteTreasury(Choice _, List choices) _currentPlayer.Played.Remove(choice); _currentPlayer.CooldownPile.Add(writOfCoin); } + else if (_currentPlayer.Agents.Any(agent => agent.RepresentingCard.UniqueId == choice.UniqueId)) + { + var toRemove = _currentPlayer.Agents.First(agent => agent.RepresentingCard.UniqueId == choice.UniqueId); + _currentPlayer.Agents.Remove(toRemove); + _currentPlayer.CooldownPile.Add(writOfCoin); + } else { _currentPlayer.Hand.Remove(choice);