fixed a few more errors

This commit is contained in:
Evan Kranzler 2019-01-12 21:58:10 -05:00
parent aa29b7fffb
commit 616d800ebe
5 changed files with 38 additions and 30 deletions

View file

@ -1,7 +1,6 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -14,14 +13,15 @@ import mage.constants.*;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class AdamaroFirstToDesire extends CardImpl { public final class AdamaroFirstToDesire extends CardImpl {
public AdamaroFirstToDesire(UUID ownerId, CardSetInfo setInfo) { public AdamaroFirstToDesire(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.SPIRIT); this.subtype.add(SubType.SPIRIT);
@ -46,7 +46,7 @@ class MostCardsInOpponentsHandCount implements DynamicValue {
@Override @Override
public int calculate(Game game, Ability source, Effect effect) { public int calculate(Game game, Ability source, Effect effect) {
int maxCards = 0; int maxCards = 0;
for (UUID opponentId: game.getOpponents(source.getControllerId())) { for (UUID opponentId : game.getOpponents(source.getControllerId())) {
Player opponent = game.getPlayer(opponentId); Player opponent = game.getPlayer(opponentId);
if (opponent != null) { if (opponent != null) {
int cards = opponent.getHand().size(); int cards = opponent.getHand().size();
@ -60,7 +60,7 @@ class MostCardsInOpponentsHandCount implements DynamicValue {
@Override @Override
public DynamicValue copy() { public DynamicValue copy() {
return new mage.abilities.dynamicvalue.common.CardsInControllerHandCount(); return new MostCardsInOpponentsHandCount();
} }
@Override @Override

View file

@ -1,7 +1,6 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.AsEntersBattlefieldAbility;
@ -19,8 +18,9 @@ import mage.constants.*;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class EntropicSpecter extends CardImpl { public final class EntropicSpecter extends CardImpl {
@ -58,7 +58,8 @@ public final class EntropicSpecter extends CardImpl {
} }
} }
class CardsInTargetPlayerHandCount implements DynamicValue { enum CardsInTargetPlayerHandCount implements DynamicValue {
instance;
@Override @Override
public int calculate(Game game, Ability sourceAbility, Effect effect) { public int calculate(Game game, Ability sourceAbility, Effect effect) {
@ -74,7 +75,7 @@ class CardsInTargetPlayerHandCount implements DynamicValue {
@Override @Override
public DynamicValue copy() { public DynamicValue copy() {
return new mage.abilities.dynamicvalue.common.CardsInControllerHandCount(); return instance;
} }
@Override @Override

View file

@ -2,7 +2,6 @@
package mage.cards.r; package mage.cards.r;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.BeginningOfDrawTriggeredAbility; import mage.abilities.common.BeginningOfDrawTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -21,18 +20,18 @@ import mage.players.Player;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class RighteousAuthority extends CardImpl { public final class RighteousAuthority extends CardImpl {
public RighteousAuthority (UUID ownerId, CardSetInfo setInfo) { public RighteousAuthority(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}{U}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{U}");
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
// Enchant creature // Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent(); TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addTarget(auraTarget);
@ -48,7 +47,7 @@ public final class RighteousAuthority extends CardImpl {
this.addAbility(new BeginningOfDrawTriggeredAbility(new DrawCardTargetEffect(1), TargetController.CONTROLLER_ATTACHED_TO, false)); this.addAbility(new BeginningOfDrawTriggeredAbility(new DrawCardTargetEffect(1), TargetController.CONTROLLER_ATTACHED_TO, false));
} }
public RighteousAuthority (final RighteousAuthority card) { public RighteousAuthority(final RighteousAuthority card) {
super(card); super(card);
} }
@ -79,7 +78,7 @@ class CardsInEnchantedControllerHandCount implements DynamicValue {
@Override @Override
public DynamicValue copy() { public DynamicValue copy() {
return new mage.abilities.dynamicvalue.common.CardsInControllerHandCount(); return new CardsInEnchantedControllerHandCount();
} }
@Override @Override

View file

@ -1,9 +1,8 @@
package mage.cards.s; package mage.cards.s;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.ReturnToLibrarySpellEffect; import mage.abilities.effects.common.ReturnToLibrarySpellEffect;
@ -12,8 +11,9 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.game.Game; import mage.game.Game;
import java.util.UUID;
/** /**
*
* @author spjspj * @author spjspj
*/ */
public final class SanguineSacrament extends CardImpl { public final class SanguineSacrament extends CardImpl {
@ -22,11 +22,11 @@ public final class SanguineSacrament extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{W}{W}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{W}{W}");
// You gain twice X life. Put Sanguine Sacrament on the bottom of its owner's library. // You gain twice X life. Put Sanguine Sacrament on the bottom of its owner's library.
this.getSpellAbility().addEffect(new GainLifeEffect(new SanguineSacramentValue())); this.getSpellAbility().addEffect(new GainLifeEffect(SanguineSacramentValue.instance));
this.getSpellAbility().addEffect(new ReturnToLibrarySpellEffect(false)); this.getSpellAbility().addEffect(new ReturnToLibrarySpellEffect(false));
} }
public SanguineSacrament(final SanguineSacrament card) { private SanguineSacrament(final SanguineSacrament card) {
super(card); super(card);
} }
@ -36,16 +36,22 @@ public final class SanguineSacrament extends CardImpl {
} }
} }
class SanguineSacramentValue extends ManacostVariableValue { enum SanguineSacramentValue implements DynamicValue {
instance;
@Override @Override
public int calculate(Game game, Ability sourceAbility, Effect effect) { public int calculate(Game game, Ability sourceAbility, Effect effect) {
return super.calculate(game, sourceAbility, effect) * 2; return sourceAbility.getManaCostsToPay().getX() * 2;
} }
@Override @Override
public SanguineSacramentValue copy() { public SanguineSacramentValue copy() {
return new SanguineSacramentValue(); return instance;
}
@Override
public String getMessage() {
return "";
} }
@Override @Override

View file

@ -1,7 +1,6 @@
package mage.cards.v; package mage.cards.v;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.costs.VariableCost; import mage.abilities.costs.VariableCost;
import mage.abilities.costs.common.SacrificeXTargetCost; import mage.abilities.costs.common.SacrificeXTargetCost;
@ -16,14 +15,15 @@ import mage.filter.common.FilterControlledCreaturePermanent;
import mage.game.Game; import mage.game.Game;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author Plopman * @author Plopman
*/ */
public final class ViciousBetrayal extends CardImpl { public final class ViciousBetrayal extends CardImpl {
public ViciousBetrayal(UUID ownerId, CardSetInfo setInfo) { public ViciousBetrayal(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}{B}");
// As an additional cost to cast Vicious Betrayal, sacrifice any number of creatures. // As an additional cost to cast Vicious Betrayal, sacrifice any number of creatures.
@ -43,14 +43,16 @@ public final class ViciousBetrayal extends CardImpl {
} }
} }
class GetXValue implements DynamicValue { enum GetXValue implements DynamicValue {
instance;
@Override @Override
public int calculate(Game game, Ability sourceAbility, Effect effect) { public int calculate(Game game, Ability sourceAbility, Effect effect) {
int amount = 0; int amount = 0;
for (VariableCost cost: sourceAbility.getCosts().getVariableCosts()) { for (VariableCost cost : sourceAbility.getCosts().getVariableCosts()) {
amount += cost.getAmount(); amount += cost.getAmount();
} }
return 2*amount; return 2 * amount;
} }
@Override @Override