mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Implemented Soulherder
This commit is contained in:
parent
710b3f07a2
commit
4a045222e3
2 changed files with 96 additions and 0 deletions
95
Mage.Sets/src/mage/cards/s/Soulherder.java
Normal file
95
Mage.Sets/src/mage/cards/s/Soulherder.java
Normal file
|
@ -0,0 +1,95 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.ZoneChangeTriggeredAbility;
|
||||
import mage.abilities.effects.common.ExileTargetForSourceEffect;
|
||||
import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Soulherder extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("another target creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public Soulherder(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{U}");
|
||||
|
||||
this.subtype.add(SubType.SPIRIT);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever a creature is exiled from the battlefield, put a +1/+1 counter on Soulherder.
|
||||
this.addAbility(new SoulherderTriggeredAbility());
|
||||
|
||||
// At the beginning of your end step, you may exile another target creature you control, then return that card to the battlefield under its owner's control.
|
||||
Ability ability = new BeginningOfEndStepTriggeredAbility(
|
||||
new ExileTargetForSourceEffect(), TargetController.YOU, true
|
||||
);
|
||||
ability.addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect().concatBy("then"));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private Soulherder(final Soulherder card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Soulherder copy() {
|
||||
return new Soulherder(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SoulherderTriggeredAbility extends ZoneChangeTriggeredAbility {
|
||||
|
||||
SoulherderTriggeredAbility() {
|
||||
super(
|
||||
Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.EXILED,
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
|
||||
"Whenever a creature is exiled from the battlefield, ", false
|
||||
);
|
||||
}
|
||||
|
||||
private SoulherderTriggeredAbility(final SoulherderTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoulherderTriggeredAbility copy() {
|
||||
return new SoulherderTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId());
|
||||
if (permanent != null && permanent.isCreature()) {
|
||||
return super.checkTrigger(event, game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -211,6 +211,7 @@ public final class ModernHorizons extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Snow-Covered Plains", 250, Rarity.LAND, mage.cards.s.SnowCoveredPlains.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Snow-Covered Swamp", 252, Rarity.LAND, mage.cards.s.SnowCoveredSwamp.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Soul-Strike Technique", 30, Rarity.COMMON, mage.cards.s.SoulStrikeTechnique.class));
|
||||
cards.add(new SetCardInfo("Soulherder", 214, Rarity.UNCOMMON, mage.cards.s.Soulherder.class));
|
||||
cards.add(new SetCardInfo("Spell Snuff", 70, Rarity.COMMON, mage.cards.s.SpellSnuff.class));
|
||||
cards.add(new SetCardInfo("Spinehorn Minotaur", 147, Rarity.COMMON, mage.cards.s.SpinehornMinotaur.class));
|
||||
cards.add(new SetCardInfo("Splicer's Skill", 31, Rarity.UNCOMMON, mage.cards.s.SplicersSkill.class));
|
||||
|
|
Loading…
Reference in a new issue