mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Implemented Skyclave Relic
This commit is contained in:
parent
0c61973772
commit
ce4073d810
3 changed files with 66 additions and 6 deletions
50
Mage.Sets/src/mage/cards/s/SkyclaveRelic.java
Normal file
50
Mage.Sets/src/mage/cards/s/SkyclaveRelic.java
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
package mage.cards.s;
|
||||||
|
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.condition.common.KickedCondition;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||||
|
import mage.abilities.effects.CreateTokenCopySourceEffect;
|
||||||
|
import mage.abilities.keyword.IndestructibleAbility;
|
||||||
|
import mage.abilities.keyword.KickerAbility;
|
||||||
|
import mage.abilities.mana.AnyColorManaAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class SkyclaveRelic extends CardImpl {
|
||||||
|
|
||||||
|
public SkyclaveRelic(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||||
|
|
||||||
|
// Kicker {3}
|
||||||
|
this.addAbility(new KickerAbility(new ManaCostsImpl<>("{3}")));
|
||||||
|
|
||||||
|
// Indestructible
|
||||||
|
this.addAbility(IndestructibleAbility.getInstance());
|
||||||
|
|
||||||
|
// When Skyclave Relic enters the battlefield, if it was kicked, create two tapped tokens that are copies of Skyclave Relic.
|
||||||
|
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||||
|
new EntersBattlefieldTriggeredAbility(new CreateTokenCopySourceEffect(2,true)),
|
||||||
|
KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, " +
|
||||||
|
"create two tapped tokens that are copies of {this}."
|
||||||
|
));
|
||||||
|
|
||||||
|
// {T}: Add one mana of any color.
|
||||||
|
this.addAbility(new AnyColorManaAbility());
|
||||||
|
}
|
||||||
|
|
||||||
|
private SkyclaveRelic(final SkyclaveRelic card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SkyclaveRelic copy() {
|
||||||
|
return new SkyclaveRelic(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -250,6 +250,7 @@ public final class ZendikarRising extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Skyclave Cleric", 40, Rarity.UNCOMMON, mage.cards.s.SkyclaveCleric.class));
|
cards.add(new SetCardInfo("Skyclave Cleric", 40, Rarity.UNCOMMON, mage.cards.s.SkyclaveCleric.class));
|
||||||
cards.add(new SetCardInfo("Skyclave Geopede", 163, Rarity.UNCOMMON, mage.cards.s.SkyclaveGeopede.class));
|
cards.add(new SetCardInfo("Skyclave Geopede", 163, Rarity.UNCOMMON, mage.cards.s.SkyclaveGeopede.class));
|
||||||
cards.add(new SetCardInfo("Skyclave Pick-Axe", 204, Rarity.UNCOMMON, mage.cards.s.SkyclavePickAxe.class));
|
cards.add(new SetCardInfo("Skyclave Pick-Axe", 204, Rarity.UNCOMMON, mage.cards.s.SkyclavePickAxe.class));
|
||||||
|
cards.add(new SetCardInfo("Skyclave Relic", 252, Rarity.RARE, mage.cards.s.SkyclaveRelic.class));
|
||||||
cards.add(new SetCardInfo("Sneaking Guide", 164, Rarity.COMMON, mage.cards.s.SneakingGuide.class));
|
cards.add(new SetCardInfo("Sneaking Guide", 164, Rarity.COMMON, mage.cards.s.SneakingGuide.class));
|
||||||
cards.add(new SetCardInfo("Song-Mad Ruins", 165, Rarity.UNCOMMON, mage.cards.s.SongMadRuins.class));
|
cards.add(new SetCardInfo("Song-Mad Ruins", 165, Rarity.UNCOMMON, mage.cards.s.SongMadRuins.class));
|
||||||
cards.add(new SetCardInfo("Song-Mad Treachery", 165, Rarity.UNCOMMON, mage.cards.s.SongMadTreachery.class));
|
cards.add(new SetCardInfo("Song-Mad Treachery", 165, Rarity.UNCOMMON, mage.cards.s.SongMadTreachery.class));
|
||||||
|
|
|
@ -13,32 +13,41 @@ import mage.target.targetpointer.FixedTarget;
|
||||||
public class CreateTokenCopySourceEffect extends OneShotEffect {
|
public class CreateTokenCopySourceEffect extends OneShotEffect {
|
||||||
|
|
||||||
private final int number;
|
private final int number;
|
||||||
|
private final boolean tapped;
|
||||||
|
|
||||||
public CreateTokenCopySourceEffect() {
|
public CreateTokenCopySourceEffect() {
|
||||||
this(1);
|
this(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CreateTokenCopySourceEffect(int copies) {
|
public CreateTokenCopySourceEffect(int copies) {
|
||||||
|
this(copies, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateTokenCopySourceEffect(int copies, boolean tapped) {
|
||||||
super(Outcome.PutCreatureInPlay);
|
super(Outcome.PutCreatureInPlay);
|
||||||
this.number = copies;
|
this.number = copies;
|
||||||
staticText = "create a token that's a copy of {this}";
|
this.tapped = tapped;
|
||||||
|
staticText = "create a " + (tapped ? "tapped " : "") + "token that's a copy of {this}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public CreateTokenCopySourceEffect(final CreateTokenCopySourceEffect effect) {
|
public CreateTokenCopySourceEffect(final CreateTokenCopySourceEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
this.number = effect.number;
|
this.number = effect.number;
|
||||||
|
this.tapped = effect.tapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||||
if (permanent != null) {
|
if (permanent == null) {
|
||||||
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, false, number);
|
return false;
|
||||||
|
}
|
||||||
|
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(
|
||||||
|
source.getControllerId(), null, false, number, tapped, false
|
||||||
|
);
|
||||||
effect.setTargetPointer(new FixedTarget(source.getSourceId()));
|
effect.setTargetPointer(new FixedTarget(source.getSourceId()));
|
||||||
return effect.apply(game, source);
|
return effect.apply(game, source);
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CreateTokenCopySourceEffect copy() {
|
public CreateTokenCopySourceEffect copy() {
|
||||||
|
|
Loading…
Reference in a new issue