Implemented Collector Ouphe

This commit is contained in:
Evan Kranzler 2019-05-27 11:19:53 -04:00
parent ab5036fcfb
commit a2f149f7e4
2 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,69 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.RestrictionEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CollectorOuphe extends CardImpl {
public CollectorOuphe(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.OUPHE);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Activated abilities of artifacts can't be activated.
this.addAbility(new SimpleStaticAbility(new CollectorOupheEffect()));
}
private CollectorOuphe(final CollectorOuphe card) {
super(card);
}
@Override
public CollectorOuphe copy() {
return new CollectorOuphe(this);
}
}
class CollectorOupheEffect extends RestrictionEffect {
CollectorOupheEffect() {
super(Duration.WhileOnBattlefield);
staticText = "Activated abilities of artifacts can't be activated";
}
private CollectorOupheEffect(final CollectorOupheEffect effect) {
super(effect);
}
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
return permanent.isArtifact();
}
@Override
public boolean canUseActivatedAbilities(Permanent permanent, Ability source, Game game, boolean canUseChooseDialogs) {
return false;
}
@Override
public CollectorOupheEffect copy() {
return new CollectorOupheEffect(this);
}
}

View file

@ -41,6 +41,7 @@ public final class ModernHorizons extends ExpansionSet {
cards.add(new SetCardInfo("Choking Tethers", 44, Rarity.COMMON, mage.cards.c.ChokingTethers.class));
cards.add(new SetCardInfo("Cloudshredder Sliver", 195, Rarity.RARE, mage.cards.c.CloudshredderSliver.class));
cards.add(new SetCardInfo("Collected Conjuring", 196, Rarity.RARE, mage.cards.c.CollectedConjuring.class));
cards.add(new SetCardInfo("Collector Ouphe", 158, Rarity.RARE, mage.cards.c.CollectorOuphe.class));
cards.add(new SetCardInfo("Crypt Rats", 84, Rarity.UNCOMMON, mage.cards.c.CryptRats.class));
cards.add(new SetCardInfo("Deep Forest Hermit", 161, Rarity.RARE, mage.cards.d.DeepForestHermit.class));
cards.add(new SetCardInfo("Diabolic Edict", 87, Rarity.COMMON, mage.cards.d.DiabolicEdict.class));