mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Fixed Umbra Mystic's ability being symmetrical
+ moved Mystic's predicate to common
This commit is contained in:
parent
6164a631ba
commit
2dcaf1d8b9
1 changed files with 3 additions and 26 deletions
|
@ -39,15 +39,12 @@ import mage.constants.Duration;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.filter.predicate.ObjectPlayer;
|
||||
import mage.filter.predicate.ObjectPlayerPredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.filter.predicate.permanent.AttachedToControlledPermanentPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
* @author North & L_J
|
||||
*/
|
||||
public class UmbraMystic extends CardImpl {
|
||||
|
||||
|
@ -55,6 +52,7 @@ public class UmbraMystic extends CardImpl {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate(SubType.AURA));
|
||||
filter.add(new AttachedToControlledPermanentPredicate());
|
||||
}
|
||||
|
||||
public UmbraMystic(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
@ -78,24 +76,3 @@ public class UmbraMystic extends CardImpl {
|
|||
return new UmbraMystic(this);
|
||||
}
|
||||
}
|
||||
|
||||
class UmbraMysticPredicate implements ObjectPlayerPredicate<ObjectPlayer<Permanent>> {
|
||||
|
||||
@Override
|
||||
public boolean apply(ObjectPlayer<Permanent> input, Game game) {
|
||||
Permanent attachement = input.getObject();
|
||||
if (attachement != null) {
|
||||
Permanent permanent = game.getPermanent(attachement.getAttachedTo());
|
||||
if (permanent != null && permanent.getControllerId().equals(input.getPlayerId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Attached to permanents you control";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue