Refactor: fixed targets from cards list (support filters with player predicate);

This commit is contained in:
Oleg Agafonov 2019-12-31 05:11:45 +04:00
parent 0faecb2fb6
commit dca3e034f4
11 changed files with 71 additions and 111 deletions

View file

@ -208,8 +208,8 @@ public class TargetCard extends TargetObject {
&& getFilter() != null && getFilter().match(card, playerId, game);
}
public boolean canTarget(UUID id, Cards cards, Game game) {
return cards.contains(id) && canTarget(id, game);
public boolean canTarget(UUID playerId, UUID id, Ability source, Cards cards, Game game) {
return cards.contains(id) && canTarget(playerId, id, source, game);
}
@Override