mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
more fixes
This commit is contained in:
parent
8c2a347f4d
commit
5cab28182d
10 changed files with 123 additions and 128 deletions
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
@ -21,8 +20,9 @@ import mage.game.events.GameEvent.EventType;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class AquamorphEntity extends CardImpl {
|
||||
|
@ -42,7 +42,7 @@ public final class AquamorphEntity extends CardImpl {
|
|||
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{U}")));
|
||||
}
|
||||
|
||||
public AquamorphEntity(final AquamorphEntity card) {
|
||||
private AquamorphEntity(final AquamorphEntity card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
@ -57,12 +57,12 @@ class AquamorphEntityReplacementEffect extends ReplacementEffectImpl {
|
|||
private static final String choice51 = "a 5/1 creature";
|
||||
private static final String choice15 = "a 1/5 creature";
|
||||
|
||||
public AquamorphEntityReplacementEffect() {
|
||||
AquamorphEntityReplacementEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "as {this} enters the battlefield or is turned face up, it becomes your choice of 5/1 or 1/5";
|
||||
}
|
||||
|
||||
public AquamorphEntityReplacementEffect(AquamorphEntityReplacementEffect effect) {
|
||||
private AquamorphEntityReplacementEffect(AquamorphEntityReplacementEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
@ -103,34 +103,32 @@ class AquamorphEntityReplacementEffect extends ReplacementEffectImpl {
|
|||
} else {
|
||||
permanent = game.getPermanent(event.getTargetId());
|
||||
}
|
||||
if (permanent != null) {
|
||||
Choice choice = new ChoiceImpl(true);
|
||||
choice.setMessage("Choose what the creature becomes to");
|
||||
choice.getChoices().add(choice51);
|
||||
choice.getChoices().add(choice15);
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
if (!controller.choose(Outcome.Neutral, choice, game)) {
|
||||
discard();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
int power = 0;
|
||||
int toughness = 0;
|
||||
switch (choice.getChoice()) {
|
||||
case choice51:
|
||||
power = 5;
|
||||
toughness = 1;
|
||||
break;
|
||||
case choice15:
|
||||
power = 1;
|
||||
toughness = 5;
|
||||
break;
|
||||
}
|
||||
game.addEffect(new SetPowerToughnessSourceEffect(power, toughness, Duration.Custom, SubLayer.SetPT_7b), source);
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
|
||||
Choice choice = new ChoiceImpl(true);
|
||||
choice.setMessage("Choose what the creature becomes to");
|
||||
choice.getChoices().add(choice51);
|
||||
choice.getChoices().add(choice15);
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null && !controller.choose(Outcome.Neutral, choice, game)) {
|
||||
discard();
|
||||
return false;
|
||||
}
|
||||
int power = 0;
|
||||
int toughness = 0;
|
||||
switch (choice.getChoice()) {
|
||||
case choice51:
|
||||
power = 5;
|
||||
toughness = 1;
|
||||
break;
|
||||
case choice15:
|
||||
power = 1;
|
||||
toughness = 5;
|
||||
break;
|
||||
}
|
||||
game.addEffect(new SetPowerToughnessSourceEffect(power, toughness, Duration.Custom, SubLayer.SetPT_7b), source);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -91,17 +91,17 @@ class SpellWithManaCostLessThanOrEqualToCondition implements Condition {
|
|||
class AsForetoldAlternativeCost extends AlternativeCostSourceAbility {
|
||||
|
||||
private UUID sourceAsForetold;
|
||||
boolean activated;
|
||||
private boolean wasActivated;
|
||||
|
||||
AsForetoldAlternativeCost(UUID sourceAsForetold, int timeCounters) {
|
||||
super(new ManaCostsImpl("{0}"), new SpellWithManaCostLessThanOrEqualToCondition(timeCounters));
|
||||
this.sourceAsForetold = sourceAsForetold;
|
||||
}
|
||||
|
||||
AsForetoldAlternativeCost(final AsForetoldAlternativeCost ability) {
|
||||
private AsForetoldAlternativeCost(final AsForetoldAlternativeCost ability) {
|
||||
super(ability);
|
||||
this.sourceAsForetold = ability.sourceAsForetold;
|
||||
this.activated = ability.activated;
|
||||
this.wasActivated = ability.wasActivated;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -116,8 +116,8 @@ class AsForetoldAlternativeCost extends AlternativeCostSourceAbility {
|
|||
if (controller != null
|
||||
&& asForetold != null) {
|
||||
if (controller.chooseUse(Outcome.Neutral, "Do you wish to use " + asForetold.getLogName() + " to pay the alternative cost ?", ability, game)) {
|
||||
activated = super.askToActivateAlternativeCosts(ability, game);
|
||||
if (activated) {
|
||||
wasActivated = super.askToActivateAlternativeCosts(ability, game);
|
||||
if (wasActivated) {
|
||||
// Get the watcher
|
||||
AsForetoldAltCostUsedWatcher asForetoldAltCostUsedWatcher
|
||||
= (AsForetoldAltCostUsedWatcher) game.getState().getWatchers()
|
||||
|
@ -128,7 +128,7 @@ class AsForetoldAlternativeCost extends AlternativeCostSourceAbility {
|
|||
}
|
||||
}
|
||||
}
|
||||
return activated;
|
||||
return wasActivated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -15,15 +13,16 @@ import mage.game.events.GameEvent;
|
|||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class BanefulOmen extends CardImpl {
|
||||
|
||||
public BanefulOmen(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{B}{B}{B}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{B}{B}{B}");
|
||||
|
||||
// At the beginning of your end step, you may reveal the top card of your library. If you do, each opponent loses life equal to that card's converted mana cost.
|
||||
this.addAbility(new BanefulOmenTriggeredAbility());
|
||||
|
@ -40,11 +39,11 @@ public final class BanefulOmen extends CardImpl {
|
|||
|
||||
class BanefulOmenTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public BanefulOmenTriggeredAbility() {
|
||||
BanefulOmenTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new BanefulOmenEffect(), true);
|
||||
}
|
||||
|
||||
public BanefulOmenTriggeredAbility(BanefulOmenTriggeredAbility ability) {
|
||||
private BanefulOmenTriggeredAbility(BanefulOmenTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
|
@ -71,11 +70,11 @@ public final class BanefulOmen extends CardImpl {
|
|||
|
||||
static class BanefulOmenEffect extends OneShotEffect {
|
||||
|
||||
public BanefulOmenEffect() {
|
||||
BanefulOmenEffect() {
|
||||
super(Outcome.Benefit);
|
||||
}
|
||||
|
||||
public BanefulOmenEffect(final BanefulOmenEffect effect) {
|
||||
private BanefulOmenEffect(final BanefulOmenEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
@ -85,24 +84,26 @@ public final class BanefulOmen extends CardImpl {
|
|||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
if (player.getLibrary().hasCards()) {
|
||||
Card card = player.getLibrary().getFromTop(game);
|
||||
Cards cards = new CardsImpl();
|
||||
cards.add(card);
|
||||
player.revealCards("Baneful Omen", cards, game);
|
||||
if (!player.getLibrary().hasCards()) {
|
||||
return false;
|
||||
}
|
||||
Card card = player.getLibrary().getFromTop(game);
|
||||
Cards cards = new CardsImpl();
|
||||
cards.add(card);
|
||||
player.revealCards("Baneful Omen", cards, game);
|
||||
|
||||
if (card != null) {
|
||||
int loseLife = card.getConvertedManaCost();
|
||||
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
||||
for (UUID opponentUuid : opponents) {
|
||||
Player opponent = game.getPlayer(opponentUuid);
|
||||
if (opponent != null) {
|
||||
opponent.loseLife(loseLife, game, false);
|
||||
}
|
||||
}
|
||||
if (card == null) {
|
||||
return false;
|
||||
}
|
||||
int loseLife = card.getConvertedManaCost();
|
||||
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
||||
for (UUID opponentUuid : opponents) {
|
||||
Player opponent = game.getPlayer(opponentUuid);
|
||||
if (opponent != null) {
|
||||
opponent.loseLife(loseLife, game, false);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
|
@ -18,6 +17,8 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author nantuko
|
||||
*/
|
||||
|
@ -31,7 +32,7 @@ public final class BloodlordOfVaasgoth extends CardImpl {
|
|||
}
|
||||
|
||||
public BloodlordOfVaasgoth(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
||||
this.subtype.add(SubType.VAMPIRE, SubType.WARRIOR);
|
||||
|
||||
this.power = new MageInt(3);
|
||||
|
@ -47,7 +48,7 @@ public final class BloodlordOfVaasgoth extends CardImpl {
|
|||
this.addAbility(new SpellCastControllerTriggeredAbility(new BloodlordOfVaasgothEffect(), filter, false, true));
|
||||
}
|
||||
|
||||
public BloodlordOfVaasgoth(final BloodlordOfVaasgoth card) {
|
||||
private BloodlordOfVaasgoth(final BloodlordOfVaasgoth card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
@ -63,12 +64,12 @@ class BloodlordOfVaasgothEffect extends ContinuousEffectImpl {
|
|||
private int zoneChangeCounter;
|
||||
private UUID permanentId;
|
||||
|
||||
public BloodlordOfVaasgothEffect() {
|
||||
BloodlordOfVaasgothEffect() {
|
||||
super(Duration.OneUse, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
|
||||
staticText = "it gains bloodthirst 3";
|
||||
}
|
||||
|
||||
public BloodlordOfVaasgothEffect(final BloodlordOfVaasgothEffect effect) {
|
||||
private BloodlordOfVaasgothEffect(final BloodlordOfVaasgothEffect effect) {
|
||||
super(effect);
|
||||
this.ability = effect.ability.copy();
|
||||
this.zoneChangeCounter = effect.zoneChangeCounter;
|
||||
|
@ -95,7 +96,6 @@ class BloodlordOfVaasgothEffect extends ContinuousEffectImpl {
|
|||
Permanent permanent = game.getPermanent(permanentId);
|
||||
if (permanent != null && permanent.getZoneChangeCounter(game) <= zoneChangeCounter) {
|
||||
permanent.addAbility(ability, source.getSourceId(), game);
|
||||
return true;
|
||||
} else {
|
||||
if (game.getState().getZoneChangeCounter(permanentId) >= zoneChangeCounter) {
|
||||
discard();
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.RollDiceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -15,21 +11,21 @@ import mage.constants.Outcome;
|
|||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author NinthWorld
|
||||
*/
|
||||
public final class CantonicaCasino extends CardImpl {
|
||||
|
||||
public CantonicaCasino(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
|
||||
|
||||
// {T}: Roll two six-sided dice. If you roll doubles, gain 10 life. Otherwise, lose 1 life.
|
||||
this.addAbility(new SimpleActivatedAbility(new CantonicaCasinoEffect(), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public CantonicaCasino(final CantonicaCasino card) {
|
||||
private CantonicaCasino(final CantonicaCasino card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
@ -41,33 +37,31 @@ public final class CantonicaCasino extends CardImpl {
|
|||
|
||||
class CantonicaCasinoEffect extends OneShotEffect {
|
||||
|
||||
public CantonicaCasinoEffect() {
|
||||
CantonicaCasinoEffect() {
|
||||
super(Outcome.Neutral);
|
||||
staticText = "Roll two six-sided dice. If you roll doubles, gain 10 life. Otherwise, lose 1 life";
|
||||
staticText = "Roll two six-sided dice. If you roll doubles, gain 10 life. Otherwise, you lose 1 life";
|
||||
}
|
||||
|
||||
public CantonicaCasinoEffect(final CantonicaCasinoEffect effect) {
|
||||
private CantonicaCasinoEffect(final CantonicaCasinoEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player you = game.getPlayer(source.getControllerId());
|
||||
if(you != null) {
|
||||
if (you != null) {
|
||||
// Roll two six-sided dice
|
||||
int dice1 = you.rollDice(game, 6);
|
||||
int dice2 = you.rollDice(game, 6);
|
||||
|
||||
if(dice1 == dice2) {
|
||||
if (dice1 == dice2) {
|
||||
// If you roll doubles, gain 10 life
|
||||
you.gainLife(10, game, source);
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// Otherwise, lose 1 life
|
||||
you.loseLife(1, game, false);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2,40 +2,44 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public final class CarapaceForger extends CardImpl {
|
||||
private static final String text = "<i>Metalcraft</i> — Carapace Forger gets +2/+2 as long as you control three or more artifacts";
|
||||
|
||||
public CarapaceForger (UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
|
||||
public CarapaceForger(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
this.subtype.add(SubType.ELF);
|
||||
this.subtype.add(SubType.ARTIFICER);
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
ContinuousEffect boostSource = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield);
|
||||
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, MetalcraftCondition.instance, text);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new ConditionalContinuousEffect(
|
||||
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
|
||||
MetalcraftCondition.instance, "<i>Metalcraft</i> — {this} gets " +
|
||||
"+2/+2 as long as you control three or more artifacts"
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
public CarapaceForger (final CarapaceForger card) {
|
||||
public CarapaceForger(final CarapaceForger card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,38 +2,42 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public final class ChromeSteed extends CardImpl {
|
||||
private static final String text = "<i>Metalcraft</i> — Chrome Steed gets +2/+2 as long as you control three or more artifacts";
|
||||
|
||||
public ChromeSteed (UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}");
|
||||
public ChromeSteed(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
|
||||
this.subtype.add(SubType.HORSE);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
ContinuousEffect boostSource = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield);
|
||||
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, MetalcraftCondition.instance, text);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new ConditionalContinuousEffect(
|
||||
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
|
||||
MetalcraftCondition.instance, "<i>Metalcraft</i> — {this} gets " +
|
||||
"+2/+2 as long as you control three or more artifacts"
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
public ChromeSteed (final ChromeSteed card) {
|
||||
public ChromeSteed(final ChromeSteed card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -15,8 +14,9 @@ import mage.game.permanent.Permanent;
|
|||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ciaccona007
|
||||
*/
|
||||
public final class CinderCloud extends CardImpl {
|
||||
|
@ -43,7 +43,8 @@ class CinderCloudEffect extends OneShotEffect {
|
|||
|
||||
public CinderCloudEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Destroy target creature. If a white creature dies this way, {this} deals damage to that creature's controller equal to the creature's power";
|
||||
this.staticText = "Destroy target creature. If a white creature dies this way, " +
|
||||
"{this} deals damage to that creature's controller equal to the creature's power";
|
||||
}
|
||||
|
||||
public CinderCloudEffect(final CinderCloudEffect effect) {
|
||||
|
@ -71,6 +72,6 @@ class CinderCloudEffect extends OneShotEffect {
|
|||
permanentController.damage(damage, source.getSourceId(), game, false, true);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
|
@ -13,20 +12,16 @@ import mage.abilities.effects.mana.AddManaOfAnyColorEffect;
|
|||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CovetedJewel extends CardImpl {
|
||||
|
@ -130,7 +125,7 @@ class CovetedJewelControlEffect extends ContinuousEffectImpl {
|
|||
Player newControllingPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (permanent == null || newControllingPlayer == null || !newControllingPlayer.isInGame()) {
|
||||
this.discard();
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
permanent.changeControllerId(getTargetPointer().getFirst(game, source), game);
|
||||
return true;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
@ -20,11 +19,12 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
|
@ -46,7 +46,7 @@ public final class CrownOfConvergence extends CardImpl {
|
|||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CrownOfConvergenceEffect(), new ManaCostsImpl("{G}{W}")));
|
||||
}
|
||||
|
||||
public CrownOfConvergence(final CrownOfConvergence card) {
|
||||
private CrownOfConvergence(final CrownOfConvergence card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
@ -58,8 +58,6 @@ public final class CrownOfConvergence extends CardImpl {
|
|||
|
||||
class CrownOfConvergenceColorBoostEffect extends BoostAllEffect {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures you control");
|
||||
|
||||
private static final String effectText = "creatures you control that share a color with that card get +1/+1";
|
||||
|
||||
CrownOfConvergenceColorBoostEffect() {
|
||||
|
@ -67,7 +65,7 @@ class CrownOfConvergenceColorBoostEffect extends BoostAllEffect {
|
|||
staticText = effectText;
|
||||
}
|
||||
|
||||
CrownOfConvergenceColorBoostEffect(CrownOfConvergenceColorBoostEffect effect) {
|
||||
private CrownOfConvergenceColorBoostEffect(CrownOfConvergenceColorBoostEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
@ -77,7 +75,7 @@ class CrownOfConvergenceColorBoostEffect extends BoostAllEffect {
|
|||
if (you != null) {
|
||||
Card topCard = you.getLibrary().getFromTop(game);
|
||||
if (topCard != null) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_CONTROLLED_CREATURE, source.getControllerId(), source.getSourceId(), game)) {
|
||||
if (permanent.getColor(game).shares(topCard.getColor(game)) && !permanent.getColor(game).isColorless()) {
|
||||
permanent.addPower(power.calculate(game, source, this));
|
||||
permanent.addToughness(toughness.calculate(game, source, this));
|
||||
|
@ -97,12 +95,12 @@ class CrownOfConvergenceColorBoostEffect extends BoostAllEffect {
|
|||
|
||||
class CrownOfConvergenceEffect extends OneShotEffect {
|
||||
|
||||
public CrownOfConvergenceEffect() {
|
||||
CrownOfConvergenceEffect() {
|
||||
super(Outcome.Neutral);
|
||||
staticText = "Put the top card of your library on the bottom of your library";
|
||||
}
|
||||
|
||||
public CrownOfConvergenceEffect(final CrownOfConvergenceEffect effect) {
|
||||
private CrownOfConvergenceEffect(final CrownOfConvergenceEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue