forked from External/mage
Implemented Omnath, Locus of the Roil
This commit is contained in:
parent
3a99a801ad
commit
146064576d
2 changed files with 79 additions and 0 deletions
78
Mage.Sets/src/mage/cards/o/OmnathLocusOfTheRoil.java
Normal file
78
Mage.Sets/src/mage/cards/o/OmnathLocusOfTheRoil.java
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
package mage.cards.o;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class OmnathLocusOfTheRoil extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledPermanent(SubType.ELEMENTAL, "Elemental you control");
|
||||
private static final DynamicValue xValue
|
||||
= new PermanentsOnBattlefieldCount(filter);
|
||||
private static final Condition condition
|
||||
= new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LAND, ComparisonType.MORE_THAN, 7);
|
||||
|
||||
public OmnathLocusOfTheRoil(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{U}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.ELEMENTAL);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Omnath, Locus of the Roil enters the battlefield, it deals damage to any target equal to the number of Elementals you control.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new DamageTargetEffect(xValue)
|
||||
.setText("it deals damage to any target equal to the number of Elementals you control")
|
||||
);
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever a land enters the battlefield under your control, put a +1/+1 counter on target Elemental you control. If you control eight or more lands, draw a card.
|
||||
ability = new EntersBattlefieldControlledTriggeredAbility(
|
||||
new AddCountersTargetEffect(CounterType.P1P1.createInstance()), StaticFilters.FILTER_LAND_A
|
||||
);
|
||||
ability.addEffect(new ConditionalOneShotEffect(
|
||||
new DrawCardSourceControllerEffect(1), condition,
|
||||
"If you control eight or more lands, draw a card."
|
||||
));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private OmnathLocusOfTheRoil(final OmnathLocusOfTheRoil card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OmnathLocusOfTheRoil copy() {
|
||||
return new OmnathLocusOfTheRoil(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -137,6 +137,7 @@ public final class CoreSet2020 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Noxious Grasp", 110, Rarity.UNCOMMON, mage.cards.n.NoxiousGrasp.class));
|
||||
cards.add(new SetCardInfo("Octoprophet", 70, Rarity.COMMON, mage.cards.o.Octoprophet.class));
|
||||
cards.add(new SetCardInfo("Ogre Siegebreaker", 215, Rarity.UNCOMMON, mage.cards.o.OgreSiegebreaker.class));
|
||||
cards.add(new SetCardInfo("Omnath, Locus of the Roil", 216, Rarity.MYTHIC, mage.cards.o.OmnathLocusOfTheRoil.class));
|
||||
cards.add(new SetCardInfo("Pacifism", 32, Rarity.COMMON, mage.cards.p.Pacifism.class));
|
||||
cards.add(new SetCardInfo("Planar Cleansing", 33, Rarity.RARE, mage.cards.p.PlanarCleansing.class));
|
||||
cards.add(new SetCardInfo("Portal of Sanctuary", 71, Rarity.UNCOMMON, mage.cards.p.PortalOfSanctuary.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue