forked from External/mage
cleanup and add tests on '{this} enters the battlefield tapped unless [Condition]'
Almost a refactor. The only change is that all those cards were missing the notTarget argument in TapSourceEffect. closes #12411
This commit is contained in:
parent
5b74858573
commit
40a1fc6c23
77 changed files with 1119 additions and 897 deletions
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class EntersBattlefieldTappedUnlessAbility extends EntersBattlefieldAbility {
|
||||
|
||||
public EntersBattlefieldTappedUnlessAbility(Condition condition) {
|
||||
this(condition, condition.toString());
|
||||
}
|
||||
|
||||
public EntersBattlefieldTappedUnlessAbility(Condition condition, String conditionText) {
|
||||
super(
|
||||
new ConditionalOneShotEffect(null, new TapSourceEffect(true), condition, null),
|
||||
"tapped unless " + conditionText
|
||||
);
|
||||
}
|
||||
|
||||
private EntersBattlefieldTappedUnlessAbility(final EntersBattlefieldTappedUnlessAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntersBattlefieldTappedUnlessAbility copy() {
|
||||
return new EntersBattlefieldTappedUnlessAbility(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue