[J21] Implemented Bounty of the Deep

This commit is contained in:
Evan Kranzler 2021-08-06 09:04:18 -04:00
parent 106d0ea4bb
commit 9d27f130bb
2 changed files with 69 additions and 0 deletions

View file

@ -0,0 +1,68 @@
package mage.cards.b;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BountyOfTheDeep extends CardImpl {
public BountyOfTheDeep(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}");
// If you have no land cards in your hand, seek a land card and a nonland card. Otherwise, seek two nonland cards.
this.getSpellAbility().addEffect(new BountyOfTheDeepEffect());
}
private BountyOfTheDeep(final BountyOfTheDeep card) {
super(card);
}
@Override
public BountyOfTheDeep copy() {
return new BountyOfTheDeep(this);
}
}
class BountyOfTheDeepEffect extends OneShotEffect {
BountyOfTheDeepEffect() {
super(Outcome.Benefit);
staticText = "if you have no land cards in your hand, " +
"seek a land card and a nonland card. Otherwise, seek two nonland cards";
}
private BountyOfTheDeepEffect(final BountyOfTheDeepEffect effect) {
super(effect);
}
@Override
public BountyOfTheDeepEffect copy() {
return new BountyOfTheDeepEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
if (player.getHand().count(StaticFilters.FILTER_CARD_LAND, game) < 1) {
player.seekCard(StaticFilters.FILTER_CARD_LAND, source, game);
} else {
player.seekCard(StaticFilters.FILTER_CARD_NON_LAND, source, game);
}
player.seekCard(StaticFilters.FILTER_CARD_NON_LAND, source, game);
return true;
}
}

View file

@ -20,6 +20,7 @@ public final class JumpstartHistoricHorizons extends ExpansionSet {
this.hasBoosters = false;
this.hasBasicLands = false;
cards.add(new SetCardInfo("Bounty of the Deep", 7, Rarity.UNCOMMON, mage.cards.b.BountyOfTheDeep.class));
cards.add(new SetCardInfo("Faceless Agent", 31, Rarity.COMMON, mage.cards.f.FacelessAgent.class));
cards.add(new SetCardInfo("Manor Guardian", 16, Rarity.UNCOMMON, mage.cards.m.ManorGuardian.class));
cards.add(new SetCardInfo("Skyshroud Lookout", 29, Rarity.UNCOMMON, mage.cards.s.SkyshroudLookout.class));