mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Implemented Incubation // Incongruity
This commit is contained in:
parent
6d21ccb6fc
commit
20d5bfc3c9
4 changed files with 89 additions and 7 deletions
81
Mage.Sets/src/mage/cards/i/IncubationIncongruity.java
Normal file
81
Mage.Sets/src/mage/cards/i/IncubationIncongruity.java
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
package mage.cards.i;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.ExileTargetEffect;
|
||||||
|
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.SplitCard;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SpellAbilityType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.game.permanent.token.FrogLizardToken;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class IncubationIncongruity extends SplitCard {
|
||||||
|
|
||||||
|
public IncubationIncongruity(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.INSTANT}, "{G/U}", "{1}{G}{U}", SpellAbilityType.SPLIT);
|
||||||
|
|
||||||
|
// Incubation
|
||||||
|
// Look at the top five cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||||
|
this.getLeftHalfCard().getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||||
|
new StaticValue(5), false,
|
||||||
|
new StaticValue(1), StaticFilters.FILTER_CARD_CREATURE_A,
|
||||||
|
Zone.LIBRARY, false, true, false,
|
||||||
|
Zone.HAND, false, false, false
|
||||||
|
));
|
||||||
|
|
||||||
|
// Incongruity
|
||||||
|
// Exile target creature. That creature's controller creates a 3/3 green Frog Lizard creature token.
|
||||||
|
this.getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
|
this.getRightHalfCard().getSpellAbility().addEffect(new ExileTargetEffect());
|
||||||
|
this.getRightHalfCard().getSpellAbility().addEffect(new IncongruityEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
private IncubationIncongruity(final IncubationIncongruity card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IncubationIncongruity copy() {
|
||||||
|
return new IncubationIncongruity(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class IncongruityEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public IncongruityEffect() {
|
||||||
|
super(Outcome.PutCreatureInPlay);
|
||||||
|
staticText = "That creature's controller creates a 3/3 green Frog Lizard creature token";
|
||||||
|
}
|
||||||
|
|
||||||
|
public IncongruityEffect(final IncongruityEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IncongruityEffect copy() {
|
||||||
|
return new IncongruityEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent permanent = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source));
|
||||||
|
if (permanent != null) {
|
||||||
|
FrogLizardToken token = new FrogLizardToken();
|
||||||
|
token.putOntoBattlefield(1, game, source.getSourceId(), permanent.getControllerId());
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,7 +11,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.token.RapidHybridizationToken;
|
import mage.game.permanent.token.FrogLizardToken;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,7 +59,7 @@ class RapidHybridizationEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source));
|
Permanent permanent = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source));
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
RapidHybridizationToken token = new RapidHybridizationToken();
|
FrogLizardToken token = new FrogLizardToken();
|
||||||
token.putOntoBattlefield(1, game, source.getSourceId(), permanent.getControllerId());
|
token.putOntoBattlefield(1, game, source.getSourceId(), permanent.getControllerId());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -39,6 +39,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Growth Spiral", 178, Rarity.COMMON, mage.cards.g.GrowthSpiral.class));
|
cards.add(new SetCardInfo("Growth Spiral", 178, Rarity.COMMON, mage.cards.g.GrowthSpiral.class));
|
||||||
cards.add(new SetCardInfo("Gruul Spellbreaker", 179, Rarity.RARE, mage.cards.g.GruulSpellbreaker.class));
|
cards.add(new SetCardInfo("Gruul Spellbreaker", 179, Rarity.RARE, mage.cards.g.GruulSpellbreaker.class));
|
||||||
cards.add(new SetCardInfo("Imperious Oligarch", 184, Rarity.COMMON, mage.cards.i.ImperiousOligarch.class));
|
cards.add(new SetCardInfo("Imperious Oligarch", 184, Rarity.COMMON, mage.cards.i.ImperiousOligarch.class));
|
||||||
|
cards.add(new SetCardInfo("Incubation // Incongruity", 226, Rarity.UNCOMMON, mage.cards.i.IncubationIncongruity.class));
|
||||||
cards.add(new SetCardInfo("Light Up the Stage", 107, Rarity.UNCOMMON, mage.cards.l.LightUpTheStage.class));
|
cards.add(new SetCardInfo("Light Up the Stage", 107, Rarity.UNCOMMON, mage.cards.l.LightUpTheStage.class));
|
||||||
cards.add(new SetCardInfo("Mortify", 192, Rarity.UNCOMMON, mage.cards.m.Mortify.class));
|
cards.add(new SetCardInfo("Mortify", 192, Rarity.UNCOMMON, mage.cards.m.Mortify.class));
|
||||||
cards.add(new SetCardInfo("Rafter Demon", 196, Rarity.COMMON, mage.cards.r.RafterDemon.class));
|
cards.add(new SetCardInfo("Rafter Demon", 196, Rarity.COMMON, mage.cards.r.RafterDemon.class));
|
||||||
|
|
|
@ -9,9 +9,9 @@ import mage.MageInt;
|
||||||
*
|
*
|
||||||
* @author spjspj
|
* @author spjspj
|
||||||
*/
|
*/
|
||||||
public final class RapidHybridizationToken extends TokenImpl {
|
public final class FrogLizardToken extends TokenImpl {
|
||||||
|
|
||||||
public RapidHybridizationToken() {
|
public FrogLizardToken() {
|
||||||
super("Frog Lizard", "3/3 green Frog Lizard creature token");
|
super("Frog Lizard", "3/3 green Frog Lizard creature token");
|
||||||
this.setOriginalExpansionSetCode("GTC");
|
this.setOriginalExpansionSetCode("GTC");
|
||||||
cardType.add(CardType.CREATURE);
|
cardType.add(CardType.CREATURE);
|
||||||
|
@ -25,11 +25,11 @@ public final class RapidHybridizationToken extends TokenImpl {
|
||||||
toughness = new MageInt(3);
|
toughness = new MageInt(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RapidHybridizationToken(final RapidHybridizationToken token) {
|
public FrogLizardToken(final FrogLizardToken token) {
|
||||||
super(token);
|
super(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RapidHybridizationToken copy() {
|
public FrogLizardToken copy() {
|
||||||
return new RapidHybridizationToken(this);
|
return new FrogLizardToken(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue