mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
- Fixed #6834
This commit is contained in:
parent
0f82277eed
commit
a7b2c81db6
1 changed files with 4 additions and 9 deletions
|
@ -5,14 +5,14 @@ import mage.filter.FilterPermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class TargetTappedPermanentAsYouCast extends TargetPermanent {
|
public class TargetTappedPermanentAsYouCast extends TargetPermanent {
|
||||||
|
|
||||||
public TargetTappedPermanentAsYouCast() {}
|
public TargetTappedPermanentAsYouCast() {
|
||||||
|
}
|
||||||
|
|
||||||
public TargetTappedPermanentAsYouCast(FilterPermanent filter) {
|
public TargetTappedPermanentAsYouCast(FilterPermanent filter) {
|
||||||
this.filter = filter;
|
this.filter = filter;
|
||||||
|
@ -46,15 +46,10 @@ public class TargetTappedPermanentAsYouCast extends TargetPermanent {
|
||||||
public boolean canTarget(UUID controllerId, UUID id, Ability source, Game game) {
|
public boolean canTarget(UUID controllerId, UUID id, Ability source, Game game) {
|
||||||
if (super.canTarget(controllerId, id, source, game)) {
|
if (super.canTarget(controllerId, id, source, game)) {
|
||||||
Permanent permanent = game.getPermanent(id);
|
Permanent permanent = game.getPermanent(id);
|
||||||
return permanent != null && permanent.isTapped();
|
return permanent != null
|
||||||
|
&& permanent.isTapped();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// See ruling: https://www.mtgsalvation.com/forums/magic-fundamentals/magic-rulings/magic-rulings-archives/253345-dream-leash
|
|
||||||
@Override
|
|
||||||
public boolean stillLegalTarget(UUID id, Ability source, Game game) {
|
|
||||||
Permanent permanent = game.getPermanent(id);
|
|
||||||
return permanent != null && getFilter().match(permanent, game);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue