mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -08:00
Fix #9366
This commit is contained in:
parent
d06d736915
commit
7ececeffb3
1 changed files with 6 additions and 7 deletions
|
|
@ -3,6 +3,7 @@ package mage.cards.b;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.costs.costadjusters.LegendaryCreatureCostAdjuster;
|
import mage.abilities.costs.costadjusters.LegendaryCreatureCostAdjuster;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.abilities.keyword.ChannelAbility;
|
import mage.abilities.keyword.ChannelAbility;
|
||||||
import mage.abilities.mana.GreenManaAbility;
|
import mage.abilities.mana.GreenManaAbility;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
|
|
@ -50,7 +51,8 @@ public final class BoseijuWhoEndures extends CardImpl {
|
||||||
this.addAbility(new GreenManaAbility());
|
this.addAbility(new GreenManaAbility());
|
||||||
|
|
||||||
// Channel — {1}{G}, Discard Boseiju, Who Endures: Destroy target artifact, enchantment, or nonbasic land an opponent controls. That player may search their library for a land card with a basic land type, put it onto the battlefield, then shuffle. This ability costs {1} less to activate for each legendary creature you control.
|
// Channel — {1}{G}, Discard Boseiju, Who Endures: Destroy target artifact, enchantment, or nonbasic land an opponent controls. That player may search their library for a land card with a basic land type, put it onto the battlefield, then shuffle. This ability costs {1} less to activate for each legendary creature you control.
|
||||||
Ability ability = new ChannelAbility("{1}{G}", new BoseijuWhoEnduresEffect());
|
Ability ability = new ChannelAbility("{1}{G}", new DestroyTargetEffect());
|
||||||
|
ability.addEffect(new BoseijuWhoEnduresEffect());
|
||||||
ability.addTarget(new TargetPermanent(filter));
|
ability.addTarget(new TargetPermanent(filter));
|
||||||
ability.setCostAdjuster(LegendaryCreatureCostAdjuster.instance);
|
ability.setCostAdjuster(LegendaryCreatureCostAdjuster.instance);
|
||||||
this.addAbility(ability.addHint(LegendaryCreatureCostAdjuster.getHint()));
|
this.addAbility(ability.addHint(LegendaryCreatureCostAdjuster.getHint()));
|
||||||
|
|
@ -82,8 +84,7 @@ class BoseijuWhoEnduresEffect extends OneShotEffect {
|
||||||
|
|
||||||
BoseijuWhoEnduresEffect() {
|
BoseijuWhoEnduresEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
staticText = "destroy target artifact, enchantment, or nonbasic land an opponent controls. " +
|
staticText = "That player may search their library for a land card with a basic land type, " +
|
||||||
"That player may search their library for a land card with a basic land type, " +
|
|
||||||
"put it onto the battlefield, then shuffle. " +
|
"put it onto the battlefield, then shuffle. " +
|
||||||
"This ability costs {1} less to activate for each legendary creature you control";
|
"This ability costs {1} less to activate for each legendary creature you control";
|
||||||
}
|
}
|
||||||
|
|
@ -99,13 +100,11 @@ class BoseijuWhoEnduresEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Permanent permanent = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
|
||||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
if (permanent == null) {
|
||||||
if (controller == null || permanent == null) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Player player = game.getPlayer(permanent.getControllerId());
|
Player player = game.getPlayer(permanent.getControllerId());
|
||||||
permanent.destroy(source, game);
|
|
||||||
if (!player.chooseUse(Outcome.PutCardInPlay, "Search your library for a land card?", source, game)) {
|
if (!player.chooseUse(Outcome.PutCardInPlay, "Search your library for a land card?", source, game)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue