[ONE] Implement Oil-Gorger Troll

This commit is contained in:
theelk801 2023-01-29 15:35:11 -05:00
parent 40e80ebaa6
commit 33610d8017
2 changed files with 67 additions and 0 deletions

View file

@ -0,0 +1,66 @@
package mage.cards.o;
import mage.MageInt;
import mage.abilities.Ability;
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.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class OilGorgerTroll extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent();
static {
filter.add(CounterType.OIL.getPredicate());
}
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
private static final Hint hint = new ValueHint(
"Permanents you control with oil counters", new PermanentsOnBattlefieldCount(filter)
);
public OilGorgerTroll(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
this.subtype.add(SubType.PHYREXIAN);
this.subtype.add(SubType.TROLL);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// When Oil-Gorger Troll enters the battlefield, you gain 3 life. Then if you control a permanent with an oil counter on it, draw a card.
Ability ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3));
ability.addEffect(new ConditionalOneShotEffect(
new DrawCardSourceControllerEffect(1), condition,
"then if you control a permanent with an oil counter on it, draw a card"
));
this.addAbility(ability.addHint(hint));
}
private OilGorgerTroll(final OilGorgerTroll card) {
super(card);
}
@Override
public OilGorgerTroll copy() {
return new OilGorgerTroll(this);
}
}

View file

@ -139,6 +139,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet {
cards.add(new SetCardInfo("Nissa, Ascended Animist", 175, Rarity.MYTHIC, mage.cards.n.NissaAscendedAnimist.class));
cards.add(new SetCardInfo("Norn's Wellspring", 24, Rarity.RARE, mage.cards.n.NornsWellspring.class));
cards.add(new SetCardInfo("Offer Immortality", 102, Rarity.COMMON, mage.cards.o.OfferImmortality.class));
cards.add(new SetCardInfo("Oil-Gorger Troll", 177, Rarity.COMMON, mage.cards.o.OilGorgerTroll.class));
cards.add(new SetCardInfo("Orthodoxy Enforcer", 25, Rarity.COMMON, mage.cards.o.OrthodoxyEnforcer.class));
cards.add(new SetCardInfo("Ossification", 26, Rarity.UNCOMMON, mage.cards.o.Ossification.class));
cards.add(new SetCardInfo("Ovika, Enigma Goliath", 213, Rarity.RARE, mage.cards.o.OvikaEnigmaGoliath.class));