mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[EOC] Implement Depthshaker Titan
This commit is contained in:
parent
70ce416e00
commit
6dd213a97d
3 changed files with 98 additions and 4 deletions
86
Mage.Sets/src/mage/cards/d/DepthshakerTitan.java
Normal file
86
Mage.Sets/src/mage/cards/d/DepthshakerTitan.java
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.AddCardTypeTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerToughnessTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.MeleeAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DepthshakerTitan extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledArtifactPermanent("noncreature artifacts you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
|
||||
}
|
||||
|
||||
public DepthshakerTitan(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}{R}{R}");
|
||||
|
||||
this.subtype.add(SubType.ROBOT);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// When this creature enters, any number of target noncreature artifacts you control become 3/3 artifact creatures. Sacrifice them at the beginning of the next end step.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new AddCardTypeTargetEffect(
|
||||
Duration.Custom, CardType.ARTIFACT, CardType.CREATURE
|
||||
).setText("any number of target noncreature artifacts you control"));
|
||||
ability.addEffect(new SetBasePowerToughnessTargetEffect(
|
||||
3, 3, Duration.Custom
|
||||
).setText(" 3/3 artifact creatures"));
|
||||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(
|
||||
new AtTheBeginOfNextEndStepDelayedTriggeredAbility(
|
||||
new SacrificeTargetEffect().setText("sacrifice those artifacts")
|
||||
), true
|
||||
).withCopyToPointer(true).setText("Sacrifice them at the beginning of the next end step"));
|
||||
ability.addTarget(new TargetPermanent(0, Integer.MAX_VALUE, filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Each artifact creature you control has melee, trample, and haste.
|
||||
ability = new SimpleStaticAbility(new GainAbilityControlledEffect(
|
||||
new MeleeAbility(), Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_PERMANENT_ARTIFACT_CREATURE
|
||||
).setText("each artifact creature you control has melee"));
|
||||
ability.addEffect(new GainAbilityControlledEffect(
|
||||
TrampleAbility.getInstance(), Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_PERMANENT_ARTIFACT_CREATURE
|
||||
).setText(", trample"));
|
||||
ability.addEffect(new GainAbilityControlledEffect(
|
||||
HasteAbility.getInstance(), Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_PERMANENT_ARTIFACT_CREATURE
|
||||
).setText(", and haste"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private DepthshakerTitan(final DepthshakerTitan card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DepthshakerTitan copy() {
|
||||
return new DepthshakerTitan(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -54,6 +54,7 @@ public final class EdgeOfEternitiesCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dakmor Salvage", 156, Rarity.UNCOMMON, mage.cards.d.DakmorSalvage.class));
|
||||
cards.add(new SetCardInfo("Darksteel Reactor", 134, Rarity.RARE, mage.cards.d.DarksteelReactor.class));
|
||||
cards.add(new SetCardInfo("Deepglow Skate", 70, Rarity.RARE, mage.cards.d.DeepglowSkate.class));
|
||||
cards.add(new SetCardInfo("Depthshaker Titan", 9, Rarity.RARE, mage.cards.d.DepthshakerTitan.class));
|
||||
cards.add(new SetCardInfo("Dispatch", 64, Rarity.UNCOMMON, mage.cards.d.Dispatch.class));
|
||||
cards.add(new SetCardInfo("Empowered Autogenerator", 135, Rarity.RARE, mage.cards.e.EmpoweredAutogenerator.class));
|
||||
cards.add(new SetCardInfo("Emry, Lurker of the Loch", 71, Rarity.RARE, mage.cards.e.EmryLurkerOfTheLoch.class));
|
||||
|
|
|
|||
|
|
@ -14,9 +14,10 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public class CreateDelayedTriggeredAbilityEffect extends OneShotEffect {
|
||||
|
||||
protected DelayedTriggeredAbility ability;
|
||||
protected boolean copyTargets;
|
||||
protected String rulePrefix;
|
||||
private final DelayedTriggeredAbility ability;
|
||||
private final boolean copyTargets;
|
||||
private final String rulePrefix;
|
||||
private boolean copyToPointer = false;
|
||||
|
||||
public CreateDelayedTriggeredAbilityEffect(DelayedTriggeredAbility ability) {
|
||||
this(ability, true);
|
||||
|
|
@ -38,6 +39,7 @@ public class CreateDelayedTriggeredAbilityEffect extends OneShotEffect {
|
|||
this.ability = effect.ability.copy();
|
||||
this.copyTargets = effect.copyTargets;
|
||||
this.rulePrefix = effect.rulePrefix;
|
||||
this.copyToPointer = effect.copyToPointer;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -49,7 +51,7 @@ public class CreateDelayedTriggeredAbilityEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
DelayedTriggeredAbility delayedAbility = ability.copy();
|
||||
if (this.copyTargets) {
|
||||
if (source.getTargets().isEmpty()) {
|
||||
if (copyToPointer || source.getTargets().isEmpty()) {
|
||||
delayedAbility.getEffects().setTargetPointer(this.getTargetPointer().copy());
|
||||
} else {
|
||||
delayedAbility.getTargets().addAll(source.getTargets());
|
||||
|
|
@ -89,4 +91,9 @@ public class CreateDelayedTriggeredAbilityEffect extends OneShotEffect {
|
|||
super.setTargetPointer(targetPointer);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreateDelayedTriggeredAbilityEffect withCopyToPointer(boolean copyToPointer) {
|
||||
this.copyToPointer = copyToPointer;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue