Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Engine/src/Board/CardAction/ComplexEffectExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

public (PlayResult, IEnumerable<CompletedAction>) Enact(Choice c, UniqueEffect choice)
{
return c.FollowUp switch

Check warning on line 22 in Engine/src/Board/CardAction/ComplexEffectExecutor.cs

View workflow job for this annotation

GitHub Actions / test

The switch expression does not handle all possible values of its input type (it is not exhaustive). For example, the pattern 'ScriptsOfTribute.ChoiceFollowUp.REPLACE_CARDS_IN_TAVERN' is not covered.
{
ChoiceFollowUp.ENACT_CHOSEN_EFFECT => CompleteChoice(choice),
};
Expand Down Expand Up @@ -146,7 +146,12 @@
{
_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);
}
Expand Down Expand Up @@ -207,6 +212,12 @@
_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);
Expand Down
Loading