[ECL] Implement Champion of the Weird

This commit is contained in:
theelk801 2026-01-06 09:54:41 -05:00
parent 13cb4f2111
commit 9d196d791a
5 changed files with 104 additions and 3 deletions

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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);