mirror of
https://github.com/magefree/mage.git
synced 2026-01-22 19:29:59 -08:00
fix text for enchantments that turn into creatures permanently
This commit is contained in:
parent
bcac563272
commit
96cc1e40ee
24 changed files with 256 additions and 656 deletions
|
|
@ -12,7 +12,11 @@ import mage.game.permanent.Permanent;
|
|||
*/
|
||||
public class OpponentPlaysLandTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public OpponentPlaysLandTriggeredAbility(Zone zone, Effect effect, Boolean optional) {
|
||||
public OpponentPlaysLandTriggeredAbility(Effect effect, boolean optional) {
|
||||
this(Zone.BATTLEFIELD, effect, optional);
|
||||
}
|
||||
|
||||
public OpponentPlaysLandTriggeredAbility(Zone zone, Effect effect, boolean optional) {
|
||||
super(zone, effect, optional);
|
||||
setTriggerPhrase("Whenever an opponent plays a land, ");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum SourceIsEnchantmentCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return Optional
|
||||
.ofNullable(source.getSourcePermanentOrLKI(game))
|
||||
.filter(permanent -> permanent.isEnchantment(game))
|
||||
.isPresent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "this permanent is an enchantment";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue