add UNTAPPED option to AttachedToTappedCondition

This commit is contained in:
xenohedron 2023-11-04 16:59:22 -04:00
parent 35ec41d8e0
commit 595a1d6f14
3 changed files with 18 additions and 25 deletions

View file

@ -1,5 +1,3 @@
package mage.abilities.condition.common;
import mage.abilities.Ability;
@ -11,7 +9,13 @@ import mage.game.permanent.Permanent;
* @author LevelX2
*/
public enum AttachedToTappedCondition implements Condition {
instance;
TAPPED(true),
UNTAPPED(false);
private final boolean tapped;
AttachedToTappedCondition(boolean tapped) {
this.tapped = tapped;
}
@Override
public boolean apply(Game game, Ability source) {
@ -23,6 +27,6 @@ public enum AttachedToTappedCondition implements Condition {
if (attachedTo == null) {
return false;
}
return attachedTo.isTapped();
return attachedTo.isTapped() == this.tapped;
}
}