forked from External/mage
[NEO] Implemented Sokenzan, Crucible of Defiance
This commit is contained in:
parent
14c8ead72f
commit
6a6b591549
3 changed files with 109 additions and 0 deletions
77
Mage.Sets/src/mage/cards/s/SokenzanCrucibleOfDefiance.java
Normal file
77
Mage.Sets/src/mage/cards/s/SokenzanCrucibleOfDefiance.java
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.costadjusters.LegendaryCreatureCostAdjuster;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.ChannelAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.mana.RedManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SuperType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.SpiritToken;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.targetpointer.FixedTargets;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SokenzanCrucibleOfDefiance extends CardImpl {
|
||||
|
||||
public SokenzanCrucibleOfDefiance(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
|
||||
// {T}: Add {R}.
|
||||
this.addAbility(new RedManaAbility());
|
||||
|
||||
// Channel — {3}{R}, Discard Sokenzan, Crucible of Defiance: Create two colorless 1/1 Spirit creature tokens. They gain haste until end of turn. This ability costs {1} less to activate for each legendary creature you control.
|
||||
Ability ability = new ChannelAbility("{3}{R}", new CreateTokenEffect(new SpiritToken(), 2));
|
||||
ability.setCostAdjuster(LegendaryCreatureCostAdjuster.instance);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private SokenzanCrucibleOfDefiance(final SokenzanCrucibleOfDefiance card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SokenzanCrucibleOfDefiance copy() {
|
||||
return new SokenzanCrucibleOfDefiance(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SokenzanCrucibleOfDefianceEffect extends OneShotEffect {
|
||||
|
||||
SokenzanCrucibleOfDefianceEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "create two colorless 1/1 Spirit creature tokens. They gain haste until end of turn. " +
|
||||
"This ability costs {1} less to activate for each legendary creature you control";
|
||||
}
|
||||
|
||||
private SokenzanCrucibleOfDefianceEffect(final SokenzanCrucibleOfDefianceEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SokenzanCrucibleOfDefianceEffect copy() {
|
||||
return new SokenzanCrucibleOfDefianceEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Token token = new SpiritToken();
|
||||
token.putOntoBattlefield(2, game, source);
|
||||
game.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance())
|
||||
.setTargetPointer(new FixedTargets(token, game)), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -65,6 +65,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Plains", 293, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Portrait of Michiko", 29, Rarity.UNCOMMON, mage.cards.p.PortraitOfMichiko.class));
|
||||
cards.add(new SetCardInfo("Satoru Umezawa", 234, Rarity.RARE, mage.cards.s.SatoruUmezawa.class));
|
||||
cards.add(new SetCardInfo("Sokenzan, Crucible of Defiance", 276, Rarity.RARE, mage.cards.s.SokenzanCrucibleOfDefiance.class));
|
||||
cards.add(new SetCardInfo("Spirited Companion", 38, Rarity.COMMON, mage.cards.s.SpiritedCompanion.class));
|
||||
cards.add(new SetCardInfo("Surgehacker Mech", 260, Rarity.RARE, mage.cards.s.SurgehackerMech.class));
|
||||
cards.add(new SetCardInfo("Swamp", 297, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
package mage.abilities.costs.costadjusters;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.CostAdjuster;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum LegendaryCreatureCostAdjuster implements CostAdjuster {
|
||||
instance;
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(SuperType.LEGENDARY.getPredicate());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustCosts(Ability ability, Game game) {
|
||||
int count = game.getBattlefield().count(
|
||||
filter, ability.getSourceId(), ability.getControllerId(), game
|
||||
);
|
||||
if (count > 0) {
|
||||
CardUtil.reduceCost(ability, count);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue