mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
[NCC] Implemented Extravagant Replication
This commit is contained in:
parent
f56b7639ab
commit
9bfd17e653
3 changed files with 57 additions and 5 deletions
48
Mage.Sets/src/mage/cards/e/ExtravagantReplication.java
Normal file
48
Mage.Sets/src/mage/cards/e/ExtravagantReplication.java
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ExtravagantReplication extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterNonlandPermanent("another target nonland permanent you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public ExtravagantReplication(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}{U}");
|
||||
|
||||
// At the beginning of your upkeep, create a token that's a copy of another target nonland permanent you control.
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(
|
||||
new CreateTokenCopyTargetEffect(), TargetController.YOU, false
|
||||
);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private ExtravagantReplication(final ExtravagantReplication card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtravagantReplication copy() {
|
||||
return new ExtravagantReplication(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -26,6 +26,7 @@ public final class NewCapennaCommander extends ExpansionSet {
|
|||
|
||||
cards.add(new SetCardInfo("Bennie Bracks, Zoologist", 86, Rarity.MYTHIC, mage.cards.b.BennieBracksZoologist.class));
|
||||
cards.add(new SetCardInfo("Damning Verdict", 15, Rarity.RARE, mage.cards.d.DamningVerdict.class));
|
||||
cards.add(new SetCardInfo("Extravagant Replication", 25, Rarity.RARE, mage.cards.e.ExtravagantReplication.class));
|
||||
cards.add(new SetCardInfo("Kitt Kanto, Mayhem Diva", 4, Rarity.MYTHIC, mage.cards.k.KittKantoMayhemDiva.class));
|
||||
|
||||
cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName())); // remove when shield counters are implemented
|
||||
|
|
|
|||
|
|
@ -286,20 +286,23 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect {
|
|||
if (tapped && !attacking) {
|
||||
sb.append("tapped ");
|
||||
}
|
||||
sb.append("token that's a copy of target ");
|
||||
sb.append("token that's a copy of ");
|
||||
} else {
|
||||
sb.append(number);
|
||||
sb.append(" ");
|
||||
if (tapped && !attacking) {
|
||||
sb.append("tapped ");
|
||||
}
|
||||
sb.append("tokens that are copies of target ");
|
||||
sb.append("tokens that are copies of ");
|
||||
}
|
||||
if (!mode.getTargets().isEmpty()) {
|
||||
sb.append(mode.getTargets().get(0).getTargetName());
|
||||
} else {
|
||||
if (mode.getTargets().isEmpty()) {
|
||||
throw new UnsupportedOperationException("Using default rule generation of target effect without having a target object");
|
||||
}
|
||||
String targetName = mode.getTargets().get(0).getTargetName();
|
||||
if (!targetName.startsWith("another target")) {
|
||||
sb.append("target ");
|
||||
}
|
||||
sb.append(targetName);
|
||||
|
||||
if (attacking) {
|
||||
sb.append(" that are");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue