mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
Refactor: fixed targets from cards list (support filters with player predicate);
This commit is contained in:
parent
0faecb2fb6
commit
dca3e034f4
11 changed files with 71 additions and 111 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue