mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 12:19:59 -08:00
[ECL] Implement Champion of the Weird
This commit is contained in:
parent
13cb4f2111
commit
9d196d791a
5 changed files with 104 additions and 3 deletions
55
Mage.Sets/src/mage/cards/c/ChampionOfTheWeird.java
Normal file
55
Mage.Sets/src/mage/cards/c/ChampionOfTheWeird.java
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.common.BeholdAndExileCost;
|
||||
import mage.abilities.costs.common.BlightCost;
|
||||
import mage.abilities.costs.common.PayLifeCost;
|
||||
import mage.abilities.effects.common.ReturnExiledCardToHandEffect;
|
||||
import mage.abilities.effects.keyword.BlightTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.BeholdType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ChampionOfTheWeird extends CardImpl {
|
||||
|
||||
public ChampionOfTheWeird(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
|
||||
this.subtype.add(SubType.GOBLIN);
|
||||
this.subtype.add(SubType.BERSERKER);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// As an additional cost to cast this spell, behold a Goblin and exile it.
|
||||
this.getSpellAbility().addCost(new BeholdAndExileCost(BeholdType.GOBLIN));
|
||||
|
||||
// Pay 1 life, Blight 2: Target opponent blights 2. Activate only as a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(new BlightTargetEffect(2), new PayLifeCost(1));
|
||||
ability.addCost(new BlightCost(2));
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// When this creature leaves the battlefield, return the exiled card to its owner's hand.
|
||||
this.addAbility(new LeavesBattlefieldTriggeredAbility(new ReturnExiledCardToHandEffect()));
|
||||
}
|
||||
|
||||
private ChampionOfTheWeird(final ChampionOfTheWeird card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChampionOfTheWeird copy() {
|
||||
return new ChampionOfTheWeird(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -41,6 +41,8 @@ public final class LorwynEclipsed extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Boggart Mischief", 92, Rarity.UNCOMMON, mage.cards.b.BoggartMischief.class));
|
||||
cards.add(new SetCardInfo("Champion of the Clachan", 353, Rarity.RARE, mage.cards.c.ChampionOfTheClachan.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Champion of the Clachan", 9, Rarity.RARE, mage.cards.c.ChampionOfTheClachan.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Champion of the Weird", 360, Rarity.RARE, mage.cards.c.ChampionOfTheWeird.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Champion of the Weird", 95, Rarity.RARE, mage.cards.c.ChampionOfTheWeird.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Champions of the Perfect", 171, Rarity.RARE, mage.cards.c.ChampionsOfThePerfect.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Champions of the Perfect", 365, Rarity.RARE, mage.cards.c.ChampionsOfThePerfect.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Chomping Changeling", 172, Rarity.UNCOMMON, mage.cards.c.ChompingChangeling.class));
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import mage.abilities.costs.common.BlightCost;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
|
|
@ -32,7 +31,6 @@ public class BlightControllerEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
return BlightCost.doBlight(player, amount, game, source) != null;
|
||||
return BlightCost.doBlight(game.getPlayer(source.getControllerId()), amount, game, source) != null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
package mage.abilities.effects.keyword;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.costs.common.BlightCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class BlightTargetEffect extends OneShotEffect {
|
||||
|
||||
private final int amount;
|
||||
|
||||
public BlightTargetEffect(int amount) {
|
||||
super(Outcome.Detriment);
|
||||
this.amount = amount;
|
||||
staticText = "blight " + amount;
|
||||
}
|
||||
|
||||
private BlightTargetEffect(final BlightTargetEffect effect) {
|
||||
super(effect);
|
||||
this.amount = effect.amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlightTargetEffect copy() {
|
||||
return new BlightTargetEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return BlightCost.doBlight(game.getPlayer(getTargetPointer().getFirst(game, source)), amount, game, source) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if (staticText != null && !staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
return getTargetPointer().describeTargets(mode.getTargets(), "that player") + " blights " + amount;
|
||||
}
|
||||
}
|
||||
|
|
@ -21,6 +21,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public enum BeholdType {
|
||||
DRAGON(SubType.DRAGON),
|
||||
GOBLIN(SubType.GOBLIN),
|
||||
ELF(SubType.ELF),
|
||||
KITHKIN(SubType.KITHKIN),
|
||||
MERFOLK(SubType.MERFOLK);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue