[CMR] Implemented Fathom Fleet Swordjack

This commit is contained in:
Evan Kranzler 2020-11-06 18:24:07 -05:00
parent 6895489598
commit 4beeac9e6a
2 changed files with 78 additions and 0 deletions

View file

@ -0,0 +1,77 @@
package mage.cards.f;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.EncoreAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.game.Game;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class FathomFleetSwordjack extends CardImpl {
public FathomFleetSwordjack(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add(SubType.ORC);
this.subtype.add(SubType.PIRATE);
this.power = new MageInt(4);
this.toughness = new MageInt(3);
// Whenever Fathom Fleet Swordjack attacks, it deals damage to the player or planeswalker it's attacking equal to the number of artifacts you control.
this.addAbility(new AttacksTriggeredAbility(new FathomFleetSwordjackEffect(), false));
// Encore {5}{R}
this.addAbility(new EncoreAbility(new ManaCostsImpl<>("{5}{R}")));
}
private FathomFleetSwordjack(final FathomFleetSwordjack card) {
super(card);
}
@Override
public FathomFleetSwordjack copy() {
return new FathomFleetSwordjack(this);
}
}
class FathomFleetSwordjackEffect extends OneShotEffect {
FathomFleetSwordjackEffect() {
super(Outcome.Benefit);
staticText = "it deals damage to the player or planeswalker " +
"it's attacking equal to the number of artifacts you control";
}
private FathomFleetSwordjackEffect(final FathomFleetSwordjackEffect effect) {
super(effect);
}
@Override
public FathomFleetSwordjackEffect copy() {
return new FathomFleetSwordjackEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
int artifactCount = game.getBattlefield().count(
StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT,
source.getSourceId(), source.getControllerId(), game
);
return artifactCount > 0 && game.damagePlayerOrPlaneswalker(
game.getCombat().getDefenderId(source.getSourceId()), artifactCount,
source.getSourceId(), game, false, true
) > 0;
}
}

View file

@ -162,6 +162,7 @@ public final class CommanderLegends extends ExpansionSet {
cards.add(new SetCardInfo("Fall from Favor", 68, Rarity.COMMON, mage.cards.f.FallFromFavor.class));
cards.add(new SetCardInfo("Falthis, Shadowcat Familiar", 126, Rarity.UNCOMMON, mage.cards.f.FalthisShadowcatFamiliar.class));
cards.add(new SetCardInfo("Farhaven Elf", 225, Rarity.COMMON, mage.cards.f.FarhavenElf.class));
cards.add(new SetCardInfo("Fathom Fleet Swordjack", 177, Rarity.UNCOMMON, mage.cards.f.FathomFleetSwordjack.class));
cards.add(new SetCardInfo("Fathom Mage", 445, Rarity.RARE, mage.cards.f.FathomMage.class));
cards.add(new SetCardInfo("Feast of Succession", 127, Rarity.UNCOMMON, mage.cards.f.FeastOfSuccession.class));
cards.add(new SetCardInfo("Fencing Ace", 21, Rarity.UNCOMMON, mage.cards.f.FencingAce.class));