Merge remote-tracking branch 'origin/master'

This commit is contained in:
Oleg Agafonov 2019-05-27 19:31:51 +04:00
commit 9b65da3027
5 changed files with 189 additions and 1 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

@ -0,0 +1,41 @@
package mage.cards.g;
import mage.MageInt;
import mage.abilities.keyword.ExaltedAbility;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class GoblinChampion extends CardImpl {
public GoblinChampion(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}");
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(0);
this.toughness = new MageInt(1);
// Haste
this.addAbility(HasteAbility.getInstance());
// Exalted
this.addAbility(new ExaltedAbility());
}
private GoblinChampion(final GoblinChampion card) {
super(card);
}
@Override
public GoblinChampion copy() {
return new GoblinChampion(this);
}
}

View file

@ -0,0 +1,72 @@
package mage.cards.y;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.effects.common.counter.ProliferateEffect;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class YawgmothThranPhysician extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent(SubType.HUMAN, "Humans");
public YawgmothThranPhysician(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(2);
this.toughness = new MageInt(4);
// Protection from Humans.
this.addAbility(new ProtectionAbility(filter));
// Pay 1 life, Sacrifice another creature: Put a -1/-1 counter on up to one target creature and draw a card.
Ability ability = new SimpleActivatedAbility(
new AddCountersTargetEffect(CounterType.M1M1.createInstance()), new PayLifeCost(1)
);
ability.addCost(new SacrificeTargetCost(
new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)
));
ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy("and"));
ability.addTarget(new TargetCreaturePermanent(0, 1));
this.addAbility(ability);
// {B}{B}, Discard a card: Proliferate.
ability = new SimpleActivatedAbility(new ProliferateEffect(), new ManaCostsImpl("{B}{B}"));
ability.addCost(new DiscardCardCost());
this.addAbility(ability);
}
private YawgmothThranPhysician(final YawgmothThranPhysician card) {
super(card);
}
@Override
public YawgmothThranPhysician copy() {
return new YawgmothThranPhysician(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));
@ -68,6 +69,7 @@ public final class ModernHorizons extends ExpansionSet {
cards.add(new SetCardInfo("Giver of Runes", 13, Rarity.RARE, mage.cards.g.GiverOfRunes.class));
cards.add(new SetCardInfo("Glacial Revelation", 167, Rarity.UNCOMMON, mage.cards.g.GlacialRevelation.class));
cards.add(new SetCardInfo("Goatnap", 126, Rarity.COMMON, mage.cards.g.Goatnap.class));
cards.add(new SetCardInfo("Goblin Champion", 127, Rarity.COMMON, mage.cards.g.GoblinChampion.class));
cards.add(new SetCardInfo("Goblin Engineer", 128, Rarity.RARE, mage.cards.g.GoblinEngineer.class));
cards.add(new SetCardInfo("Goblin Matron", 129, Rarity.UNCOMMON, mage.cards.g.GoblinMatron.class));
cards.add(new SetCardInfo("Goblin War Party", 131, Rarity.COMMON, mage.cards.g.GoblinWarParty.class));
@ -137,6 +139,7 @@ public final class ModernHorizons extends ExpansionSet {
cards.add(new SetCardInfo("Winds of Abandon", 37, Rarity.RARE, mage.cards.w.WindsOfAbandon.class));
cards.add(new SetCardInfo("Wing Shards", 38, Rarity.UNCOMMON, mage.cards.w.WingShards.class));
cards.add(new SetCardInfo("Wrenn and Six", 217, Rarity.MYTHIC, mage.cards.w.WrennAndSix.class));
cards.add(new SetCardInfo("Yawgmoth, Thran Physician", 116, Rarity.MYTHIC, mage.cards.y.YawgmothThranPhysician.class));
cards.add(new SetCardInfo("Zhalfirin Decoy", 39, Rarity.UNCOMMON, mage.cards.z.ZhalfirinDecoy.class));
}
}