mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[40K] Implemented Sporocyst
This commit is contained in:
parent
518c8c20b6
commit
f21c2a6b2b
3 changed files with 83 additions and 2 deletions
78
Mage.Sets/src/mage/cards/s/Sporocyst.java
Normal file
78
Mage.Sets/src/mage/cards/s/Sporocyst.java
Normal file
|
@ -0,0 +1,78 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.abilities.keyword.RavenousAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Sporocyst extends CardImpl {
|
||||
|
||||
public Sporocyst(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{X}{X}{G}");
|
||||
|
||||
this.subtype.add(SubType.TYRANID);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
|
||||
// Ravenous
|
||||
this.addAbility(new RavenousAbility());
|
||||
|
||||
// Defender
|
||||
this.addAbility(DefenderAbility.getInstance());
|
||||
|
||||
// Spore Chimney -- When Sporocyst enters the battlefield, search your library for up to X basic land cards, put them onto the battlefield tapped, then shuffle.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SporocystEffect()).withFlavorWord("Spore Chimney"));
|
||||
}
|
||||
|
||||
private Sporocyst(final Sporocyst card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Sporocyst copy() {
|
||||
return new Sporocyst(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SporocystEffect extends OneShotEffect {
|
||||
|
||||
SporocystEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "search your library for up to X basic land cards, " +
|
||||
"put them onto the battlefield tapped, then shuffle";
|
||||
}
|
||||
|
||||
private SporocystEffect(final SporocystEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SporocystEffect copy() {
|
||||
return new SporocystEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int xValue = ManacostVariableValue.ETB.calculate(game, source, this);
|
||||
return new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(
|
||||
0, xValue, StaticFilters.FILTER_CARD_BASIC_LANDS
|
||||
), true, true).apply(game, source);
|
||||
}
|
||||
}
|
|
@ -174,6 +174,7 @@ public final class Warhammer40000 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Skycloud Expanse", 294, Rarity.RARE, mage.cards.s.SkycloudExpanse.class));
|
||||
cards.add(new SetCardInfo("Sol Ring", 249, Rarity.UNCOMMON, mage.cards.s.SolRing.class));
|
||||
cards.add(new SetCardInfo("Space Marine Devastator", 14, Rarity.RARE, mage.cards.s.SpaceMarineDevastator.class));
|
||||
cards.add(new SetCardInfo("Sporocyst", 98, Rarity.RARE, mage.cards.s.Sporocyst.class));
|
||||
cards.add(new SetCardInfo("Starstorm", 208, Rarity.RARE, mage.cards.s.Starstorm.class));
|
||||
cards.add(new SetCardInfo("Sunken Hollow", 295, Rarity.RARE, mage.cards.s.SunkenHollow.class));
|
||||
cards.add(new SetCardInfo("Swamp", 310, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
|
@ -18,11 +18,13 @@ public class RavenousAbility extends EntersBattlefieldAbility {
|
|||
|
||||
public RavenousAbility() {
|
||||
super(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()));
|
||||
this.addSubAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)),
|
||||
RavenousAbilityCondition.instance, "When this creature enters the battlefield, " +
|
||||
"if X is 5 or more, draw a card"
|
||||
));
|
||||
);
|
||||
ability.setRuleVisible(false);
|
||||
this.addSubAbility(ability);
|
||||
}
|
||||
|
||||
private RavenousAbility(final RavenousAbility ability) {
|
||||
|
|
Loading…
Reference in a new issue