forked from External/mage
[LCI] Implement Saheeli's Lattice / Mastercraft Raptor
This commit is contained in:
parent
574dc9b94b
commit
0dcddf30f6
3 changed files with 134 additions and 0 deletions
88
Mage.Sets/src/mage/cards/m/MastercraftRaptor.java
Normal file
88
Mage.Sets/src/mage/cards/m/MastercraftRaptor.java
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MastercraftRaptor extends CardImpl {
|
||||
|
||||
public MastercraftRaptor(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "");
|
||||
|
||||
this.subtype.add(SubType.DINOSAUR);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(4);
|
||||
this.nightCard = true;
|
||||
this.color.setRed(true);
|
||||
|
||||
// Mastercraft Raptor's power is equal to the total power of the exiled cards used to craft it.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SetBasePowerSourceEffect(MastercraftRaptorValue.instance)
|
||||
.setText("{this}'s power is equal to the total power of the exiled cards used to craft it")
|
||||
));
|
||||
}
|
||||
|
||||
private MastercraftRaptor(final MastercraftRaptor card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MastercraftRaptor copy() {
|
||||
return new MastercraftRaptor(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum MastercraftRaptorValue implements DynamicValue {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
ExileZone exileZone = game
|
||||
.getExile()
|
||||
.getExileZone(CardUtil.getExileZoneId(
|
||||
game, sourceAbility.getSourceId(),
|
||||
game.getState().getZoneChangeCounter(sourceAbility.getSourceId()) - 2
|
||||
));
|
||||
if (exileZone == null) {
|
||||
return 0;
|
||||
}
|
||||
return exileZone
|
||||
.getCards(game)
|
||||
.stream()
|
||||
.map(MageObject::getPower)
|
||||
.mapToInt(MageInt::getValue)
|
||||
.sum();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MastercraftRaptorValue copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
44
Mage.Sets/src/mage/cards/s/SaheelisLattice.java
Normal file
44
Mage.Sets/src/mage/cards/s/SaheelisLattice.java
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.common.DiscardCardCost;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.keyword.CraftAbility;
|
||||
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 SaheelisLattice extends CardImpl {
|
||||
|
||||
public SaheelisLattice(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{R}");
|
||||
this.secondSideCardClazz = mage.cards.m.MastercraftRaptor.class;
|
||||
|
||||
// When Saheeli's Lattice enters the battlefield, you may discard a card. If you do, draw two cards.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new DoIfCostPaid(new DrawCardSourceControllerEffect(2), new DiscardCardCost())
|
||||
));
|
||||
|
||||
// Craft with one or more Dinosaurs {4}{R}
|
||||
this.addAbility(new CraftAbility(
|
||||
"{4}{R}", "one or more Dinosaurs", "other Dinosaurs you control " +
|
||||
"or Dinosaur cards in your graveyard", 1, Integer.MAX_VALUE, SubType.DINOSAUR.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
private SaheelisLattice(final SaheelisLattice card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SaheelisLattice copy() {
|
||||
return new SaheelisLattice(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -115,6 +115,7 @@ public final class TheLostCavernsOfIxalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Malcolm, Alluring Scoundrel", 63, Rarity.RARE, mage.cards.m.MalcolmAlluringScoundrel.class));
|
||||
cards.add(new SetCardInfo("Master's Guide-Mural", 233, Rarity.UNCOMMON, mage.cards.m.MastersGuideMural.class));
|
||||
cards.add(new SetCardInfo("Master's Manufactory", 233, Rarity.UNCOMMON, mage.cards.m.MastersManufactory.class));
|
||||
cards.add(new SetCardInfo("Mastercraft Raptor", 164, Rarity.UNCOMMON, mage.cards.m.MastercraftRaptor.class));
|
||||
cards.add(new SetCardInfo("Matzalantli, the Great Door", 256, Rarity.RARE, mage.cards.m.MatzalantliTheGreatDoor.class));
|
||||
cards.add(new SetCardInfo("Merfolk Cave-Diver", 65, Rarity.UNCOMMON, mage.cards.m.MerfolkCaveDiver.class));
|
||||
cards.add(new SetCardInfo("Miner's Guidewing", 24, Rarity.COMMON, mage.cards.m.MinersGuidewing.class));
|
||||
|
|
@ -148,6 +149,7 @@ public final class TheLostCavernsOfIxalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Restless Vents", 284, Rarity.RARE, mage.cards.r.RestlessVents.class));
|
||||
cards.add(new SetCardInfo("Roar of the Fifth People", 189, Rarity.MYTHIC, mage.cards.r.RoarOfTheFifthPeople.class));
|
||||
cards.add(new SetCardInfo("Ruin-Lurker Bat", 33, Rarity.UNCOMMON, mage.cards.r.RuinLurkerBat.class));
|
||||
cards.add(new SetCardInfo("Saheeli's Lattice", 164, Rarity.UNCOMMON, mage.cards.s.SaheelisLattice.class));
|
||||
cards.add(new SetCardInfo("Saheeli, the Sun's Brilliance", 239, Rarity.MYTHIC, mage.cards.s.SaheeliTheSunsBrilliance.class));
|
||||
cards.add(new SetCardInfo("Sanguine Evangelist", 34, Rarity.RARE, mage.cards.s.SanguineEvangelist.class));
|
||||
cards.add(new SetCardInfo("Scytheclaw Raptor", 165, Rarity.UNCOMMON, mage.cards.s.ScytheclawRaptor.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue