mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 14:32:06 -08:00
add UNTAPPED option to AttachedToTappedCondition
This commit is contained in:
parent
35ec41d8e0
commit
595a1d6f14
3 changed files with 18 additions and 25 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue