mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[STX] Implemented Stonebound Mentor
This commit is contained in:
parent
0461c77d9b
commit
63c7c52d92
4 changed files with 97 additions and 49 deletions
38
Mage.Sets/src/mage/cards/s/StoneboundMentor.java
Normal file
38
Mage.Sets/src/mage/cards/s/StoneboundMentor.java
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
package mage.cards.s;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.common.CardsLeaveGraveyardTriggeredAbility;
|
||||||
|
import mage.abilities.effects.keyword.ScryEffect;
|
||||||
|
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 StoneboundMentor extends CardImpl {
|
||||||
|
|
||||||
|
public StoneboundMentor(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{W}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.SPIRIT);
|
||||||
|
this.subtype.add(SubType.ADVISOR);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Whenever one or more cards leave your graveyard, scry 1.
|
||||||
|
this.addAbility(new CardsLeaveGraveyardTriggeredAbility(new ScryEffect(1)));
|
||||||
|
}
|
||||||
|
|
||||||
|
private StoneboundMentor(final StoneboundMentor card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StoneboundMentor copy() {
|
||||||
|
return new StoneboundMentor(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,22 +1,16 @@
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.common.CardsLeaveGraveyardTriggeredAbility;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.keyword.PartnerAbility;
|
import mage.abilities.keyword.PartnerAbility;
|
||||||
import mage.cards.Card;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.events.GameEvent;
|
|
||||||
import mage.game.events.ZoneChangeGroupEvent;
|
|
||||||
import mage.game.permanent.token.ZombieToken;
|
import mage.game.permanent.token.ZombieToken;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,7 +28,9 @@ public final class TormodTheDesecrator extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// Whenever one or more cards leave your graveyard, create a tapped 2/2 black Zombie creature token.
|
// Whenever one or more cards leave your graveyard, create a tapped 2/2 black Zombie creature token.
|
||||||
this.addAbility(new TormodTheDesecratorTriggeredAbility());
|
this.addAbility(new CardsLeaveGraveyardTriggeredAbility(
|
||||||
|
new CreateTokenEffect(new ZombieToken(), 1, true, false)
|
||||||
|
));
|
||||||
|
|
||||||
// Partner
|
// Partner
|
||||||
this.addAbility(PartnerAbility.getInstance());
|
this.addAbility(PartnerAbility.getInstance());
|
||||||
|
@ -49,44 +45,3 @@ public final class TormodTheDesecrator extends CardImpl {
|
||||||
return new TormodTheDesecrator(this);
|
return new TormodTheDesecrator(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TormodTheDesecratorTriggeredAbility extends TriggeredAbilityImpl {
|
|
||||||
|
|
||||||
TormodTheDesecratorTriggeredAbility() {
|
|
||||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieToken(), 1, true, false), false);
|
|
||||||
}
|
|
||||||
|
|
||||||
private TormodTheDesecratorTriggeredAbility(final TormodTheDesecratorTriggeredAbility ability) {
|
|
||||||
super(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkEventType(GameEvent event, Game game) {
|
|
||||||
return event.getType() == GameEvent.EventType.ZONE_CHANGE_GROUP;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
|
||||||
ZoneChangeGroupEvent zEvent = (ZoneChangeGroupEvent) event;
|
|
||||||
return zEvent != null
|
|
||||||
&& Zone.GRAVEYARD == zEvent.getFromZone()
|
|
||||||
&& Zone.GRAVEYARD != zEvent.getToZone()
|
|
||||||
&& zEvent.getCards() != null
|
|
||||||
&& zEvent.getCards()
|
|
||||||
.stream()
|
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.map(Card::getOwnerId)
|
|
||||||
.anyMatch(getControllerId()::equals);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TormodTheDesecratorTriggeredAbility copy() {
|
|
||||||
return new TormodTheDesecratorTriggeredAbility(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRule() {
|
|
||||||
return "Whenever one or more cards leave your graveyard, " +
|
|
||||||
"create a tapped 2/2 black Zombie creature token.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -82,6 +82,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Silverquill Command", 232, Rarity.RARE, mage.cards.s.SilverquillCommand.class));
|
cards.add(new SetCardInfo("Silverquill Command", 232, Rarity.RARE, mage.cards.s.SilverquillCommand.class));
|
||||||
cards.add(new SetCardInfo("Spirit Summoning", 236, Rarity.COMMON, mage.cards.s.SpiritSummoning.class));
|
cards.add(new SetCardInfo("Spirit Summoning", 236, Rarity.COMMON, mage.cards.s.SpiritSummoning.class));
|
||||||
cards.add(new SetCardInfo("Star Pupil", 30, Rarity.COMMON, mage.cards.s.StarPupil.class));
|
cards.add(new SetCardInfo("Star Pupil", 30, Rarity.COMMON, mage.cards.s.StarPupil.class));
|
||||||
|
cards.add(new SetCardInfo("Stonebound Mentor", 239, Rarity.COMMON, mage.cards.s.StoneboundMentor.class));
|
||||||
cards.add(new SetCardInfo("Storm-Kiln Artist", 115, Rarity.UNCOMMON, mage.cards.s.StormKilnArtist.class));
|
cards.add(new SetCardInfo("Storm-Kiln Artist", 115, Rarity.UNCOMMON, mage.cards.s.StormKilnArtist.class));
|
||||||
cards.add(new SetCardInfo("Study Break", 34, Rarity.COMMON, mage.cards.s.StudyBreak.class));
|
cards.add(new SetCardInfo("Study Break", 34, Rarity.COMMON, mage.cards.s.StudyBreak.class));
|
||||||
cards.add(new SetCardInfo("Swamp", 370, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Swamp", 370, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
package mage.abilities.common;
|
||||||
|
|
||||||
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.game.events.ZoneChangeGroupEvent;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class CardsLeaveGraveyardTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
|
public CardsLeaveGraveyardTriggeredAbility(Effect effect) {
|
||||||
|
super(Zone.BATTLEFIELD, effect, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private CardsLeaveGraveyardTriggeredAbility(final CardsLeaveGraveyardTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.ZONE_CHANGE_GROUP;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
ZoneChangeGroupEvent zEvent = (ZoneChangeGroupEvent) event;
|
||||||
|
return zEvent != null
|
||||||
|
&& Zone.GRAVEYARD == zEvent.getFromZone()
|
||||||
|
&& Zone.GRAVEYARD != zEvent.getToZone()
|
||||||
|
&& zEvent.getCards() != null
|
||||||
|
&& zEvent.getCards()
|
||||||
|
.stream()
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.map(Card::getOwnerId)
|
||||||
|
.anyMatch(this::isControlledBy);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CardsLeaveGraveyardTriggeredAbility copy() {
|
||||||
|
return new CardsLeaveGraveyardTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "Whenever one or more cards leave your graveyard, " + super.getRule();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue