forked from External/mage
Refactoring
See github line by line comments in 'File changed'
This commit is contained in:
parent
c0cf22bbf7
commit
f04ba151f7
52 changed files with 87 additions and 220 deletions
|
|
@ -44,7 +44,7 @@ import mage.filter.predicate.other.OwnerIdPredicate;
|
|||
*/
|
||||
public class TargetDiscard extends TargetCard {
|
||||
|
||||
private UUID playerId;
|
||||
private final UUID playerId;
|
||||
|
||||
public TargetDiscard(UUID playerId) {
|
||||
this(1, 1, new FilterCard(), playerId);
|
||||
|
|
@ -73,10 +73,7 @@ public class TargetDiscard extends TargetCard {
|
|||
@Override
|
||||
public boolean canTarget(UUID id, Ability source, Game game) {
|
||||
Card card = game.getPlayer(playerId).getHand().get(id, game);
|
||||
if (card != null) {
|
||||
return filter.match(card, source.getControllerId(), game);
|
||||
}
|
||||
return false;
|
||||
return card != null && filter.match(card, source.getControllerId(), game);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue