mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
[SNC] Implemented Undercover Operative
This commit is contained in:
parent
40cae5bef5
commit
e8a1725a55
2 changed files with 69 additions and 0 deletions
68
Mage.Sets/src/mage/cards/u/UndercoverOperative.java
Normal file
68
Mage.Sets/src/mage/cards/u/UndercoverOperative.java
Normal file
|
@ -0,0 +1,68 @@
|
|||
package mage.cards.u;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.effects.common.CopyPermanentEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.util.functions.CopyApplier;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class UndercoverOperative extends CardImpl {
|
||||
|
||||
public UndercoverOperative(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}");
|
||||
|
||||
this.subtype.add(SubType.SHAPESHIFTER);
|
||||
this.subtype.add(SubType.ROGUE);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
|
||||
// You may have Undercover Operative enter the battlefield as a copy of any creature on the battlefield, except it enters with a shield counter on it if you control that creature.
|
||||
this.addAbility(new EntersBattlefieldAbility(new CopyPermanentEffect(
|
||||
StaticFilters.FILTER_PERMANENT_CREATURE, new UndercoverOperativeApplier()
|
||||
), true));
|
||||
}
|
||||
|
||||
private UndercoverOperative(final UndercoverOperative card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UndercoverOperative copy() {
|
||||
return new UndercoverOperative(this);
|
||||
}
|
||||
}
|
||||
|
||||
class UndercoverOperativeApplier extends CopyApplier {
|
||||
|
||||
@Override
|
||||
public String getText() {
|
||||
return ", except it enters with a shield counter on it if you control that creature";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, MageObject blueprint, Ability source, UUID copyToObjectId) {
|
||||
if (!isCopyOfCopy(source, blueprint, copyToObjectId)
|
||||
&& ((Permanent) blueprint).isControlledBy(source.getControllerId())) {
|
||||
blueprint.getAbilities().add(new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.SHIELD.createInstance(), false)
|
||||
.setText("with a shield counter on it")
|
||||
));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -254,6 +254,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Topiary Stomper", 160, Rarity.RARE, mage.cards.t.TopiaryStomper.class));
|
||||
cards.add(new SetCardInfo("Torch Breath", 127, Rarity.UNCOMMON, mage.cards.t.TorchBreath.class));
|
||||
cards.add(new SetCardInfo("Tramway Station", 258, Rarity.COMMON, mage.cards.t.TramwayStation.class));
|
||||
cards.add(new SetCardInfo("Undercover Operative", 63, Rarity.RARE, mage.cards.u.UndercoverOperative.class));
|
||||
cards.add(new SetCardInfo("Unleash the Inferno", 229, Rarity.RARE, mage.cards.u.UnleashTheInferno.class));
|
||||
cards.add(new SetCardInfo("Unlicensed Hearse", 246, Rarity.RARE, mage.cards.u.UnlicensedHearse.class));
|
||||
cards.add(new SetCardInfo("Unlucky Witness", 128, Rarity.UNCOMMON, mage.cards.u.UnluckyWitness.class));
|
||||
|
|
Loading…
Reference in a new issue