mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Implemented Purphoros's Intervention
This commit is contained in:
parent
dccc17fac9
commit
f0bd9a58d4
3 changed files with 108 additions and 1 deletions
|
@ -39,7 +39,7 @@ public final class ArcanistsOwl extends CardImpl {
|
|||
Zone.LIBRARY, false, true, false, Zone.HAND,
|
||||
true, false, false
|
||||
).setBackInRandomOrder(true).setText("Look at the top four cards of your library. " +
|
||||
"You may reveal an artifact or enchantment from among them and put it into your hand. " +
|
||||
"You may reveal an artifact or enchantment card from among them and put it into your hand. " +
|
||||
"Put the rest on the bottom of your library in a random order.")
|
||||
));
|
||||
}
|
||||
|
|
106
Mage.Sets/src/mage/cards/s/SionaCaptainOfThePyleas.java
Normal file
106
Mage.Sets/src/mage/cards/s/SionaCaptainOfThePyleas.java
Normal file
|
@ -0,0 +1,106 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.HumanSoldierToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SionaCaptainOfThePyleas extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("an Aura card");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate(SubType.AURA));
|
||||
}
|
||||
|
||||
public SionaCaptainOfThePyleas(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.SOLDIER);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Siona, Captain of the Pyleas enters the battlefield, look at the top seven cards of your library. You may reveal an Aura card among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new LookLibraryAndPickControllerEffect(
|
||||
new StaticValue(7), false, new StaticValue(1), filter,
|
||||
Zone.LIBRARY, false, true, false, Zone.HAND,
|
||||
true, false, false
|
||||
).setBackInRandomOrder(true).setText("Look at the top seven cards of your library. " +
|
||||
"You may reveal an Aura card from among them and put it into your hand. " +
|
||||
"Put the rest on the bottom of your library in a random order.")
|
||||
));
|
||||
|
||||
// Whenever an Aura you control becomes attached to a creature you control, create a 1/1 white Human Soldier creature token.
|
||||
this.addAbility(new SionaCaptainOfThePyleasAbility());
|
||||
}
|
||||
|
||||
private SionaCaptainOfThePyleas(final SionaCaptainOfThePyleas card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SionaCaptainOfThePyleas copy() {
|
||||
return new SionaCaptainOfThePyleas(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SionaCaptainOfThePyleasAbility extends TriggeredAbilityImpl {
|
||||
|
||||
SionaCaptainOfThePyleasAbility() {
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new HumanSoldierToken()), false);
|
||||
}
|
||||
|
||||
private SionaCaptainOfThePyleasAbility(final SionaCaptainOfThePyleasAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ATTACHED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId());
|
||||
Permanent attachment = game.getPermanent(event.getSourceId());
|
||||
return permanent != null
|
||||
&& attachment != null
|
||||
&& permanent.isControlledBy(getControllerId())
|
||||
&& permanent.isCreature()
|
||||
&& attachment.isControlledBy(getControllerId())
|
||||
&& attachment.hasSubtype(SubType.AURA, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever an Aura you control becomes attached to a creature you control, " +
|
||||
"create a 1/1 white Human Soldier creature token";
|
||||
}
|
||||
|
||||
@Override
|
||||
public SionaCaptainOfThePyleasAbility copy() {
|
||||
return new SionaCaptainOfThePyleasAbility(this);
|
||||
}
|
||||
}
|
|
@ -106,6 +106,7 @@ public final class TherosBeyondDeath extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Setessan Petitioner", 199, Rarity.UNCOMMON, mage.cards.s.SetessanPetitioner.class));
|
||||
cards.add(new SetCardInfo("Shimmerwing Chimera", 64, Rarity.UNCOMMON, mage.cards.s.ShimmerwingChimera.class));
|
||||
cards.add(new SetCardInfo("Shoal Kraken", 65, Rarity.UNCOMMON, mage.cards.s.ShoalKraken.class));
|
||||
cards.add(new SetCardInfo("Siona, Captain of the Pyleas", 226, Rarity.UNCOMMON, mage.cards.s.SionaCaptainOfThePyleas.class));
|
||||
cards.add(new SetCardInfo("Sphinx Mindbreaker", 290, Rarity.RARE, mage.cards.s.SphinxMindbreaker.class));
|
||||
cards.add(new SetCardInfo("Staggering Insight", 228, Rarity.UNCOMMON, mage.cards.s.StaggeringInsight.class));
|
||||
cards.add(new SetCardInfo("Stinging Lionfish", 69, Rarity.UNCOMMON, mage.cards.s.StingingLionfish.class));
|
||||
|
|
Loading…
Reference in a new issue