[BRO] Implement Spotter Thopter

This commit is contained in:
Evan Kranzler 2022-11-04 19:51:20 -04:00
parent 2a44f30a86
commit 12c14e0131
2 changed files with 79 additions and 0 deletions

View file

@ -0,0 +1,78 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.PrototypeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SpotterThopter extends CardImpl {
public SpotterThopter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{8}");
this.subtype.add(SubType.THOPTER);
this.power = new MageInt(4);
this.toughness = new MageInt(5);
// Prototype {3}{U} -- 2/3
this.addAbility(new PrototypeAbility(this, "{3}{U}", 2, 3));
// Flying
this.addAbility(FlyingAbility.getInstance());
// When Spotter Thopter enters the battlefield, scry X, where X is its power.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SpotterThopterEffect()));
}
private SpotterThopter(final SpotterThopter card) {
super(card);
}
@Override
public SpotterThopter copy() {
return new SpotterThopter(this);
}
}
class SpotterThopterEffect extends OneShotEffect {
SpotterThopterEffect() {
super(Outcome.Benefit);
staticText = "scry X, where X is its power";
}
private SpotterThopterEffect(final SpotterThopterEffect effect) {
super(effect);
}
@Override
public SpotterThopterEffect copy() {
return new SpotterThopterEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
Permanent permanent = source.getSourcePermanentOrLKI(game);
if (player == null || permanent == null) {
return false;
}
int power = permanent.getPower().getValue();
return power > 0 && player.scry(power, source, game);
}
}

View file

@ -179,6 +179,7 @@ public final class TheBrothersWar extends ExpansionSet {
cards.add(new SetCardInfo("Skitterbeam Battalion", 165, Rarity.MYTHIC, mage.cards.s.SkitterbeamBattalion.class));
cards.add(new SetCardInfo("Skystrike Officer", 62, Rarity.RARE, mage.cards.s.SkystrikeOfficer.class));
cards.add(new SetCardInfo("Splitting the Powerstone", 63, Rarity.UNCOMMON, mage.cards.s.SplittingThePowerstone.class));
cards.add(new SetCardInfo("Spotter Thopter", 80, Rarity.UNCOMMON, mage.cards.s.SpotterThopter.class));
cards.add(new SetCardInfo("Static Net", 27, Rarity.UNCOMMON, mage.cards.s.StaticNet.class));
cards.add(new SetCardInfo("Stern Lesson", 64, Rarity.COMMON, mage.cards.s.SternLesson.class));
cards.add(new SetCardInfo("Stone Retrieval Unit", 248, Rarity.COMMON, mage.cards.s.StoneRetrievalUnit.class));