forked from External/mage
[minor] removed unused imports
This commit is contained in:
parent
a3be8073e2
commit
2b7471df3f
4 changed files with 14 additions and 39 deletions
|
|
@ -35,6 +35,7 @@ import mage.MageObject;
|
|||
import mage.ObjectColor;
|
||||
import mage.abilities.Mode;
|
||||
import mage.cards.Card;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentToken;
|
||||
|
|
@ -47,8 +48,6 @@ import mage.target.Targets;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.Counters;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
|
@ -100,10 +99,11 @@ public class CardView extends SimpleCardView {
|
|||
this.name = card.getName();
|
||||
this.rules = card.getRules();
|
||||
if (card instanceof Permanent) {
|
||||
Permanent permanent = (Permanent)card;
|
||||
this.power = Integer.toString(card.getPower().getValue());
|
||||
this.toughness = Integer.toString(card.getToughness().getValue());
|
||||
this.loyalty = Integer.toString(((Permanent) card).getCounters().getCount(CounterType.LOYALTY));
|
||||
this.pairedCard = ((Permanent)card).getPairedCard();
|
||||
this.loyalty = Integer.toString(permanent.getCounters().getCount(CounterType.LOYALTY));
|
||||
this.pairedCard = permanent.getPairedCard();
|
||||
} else {
|
||||
this.power = card.getPower().toString();
|
||||
this.toughness = card.getToughness().toString();
|
||||
|
|
@ -169,21 +169,13 @@ public class CardView extends SimpleCardView {
|
|||
this.color = card.getColor();
|
||||
this.manaCost = card.getManaCost().getSymbols();
|
||||
this.convertedManaCost = card.getManaCost().convertedManaCost();
|
||||
// if (card instanceof Card) {
|
||||
// Counters cardCounters = ((Card) card).getCounters();
|
||||
// if (cardCounters != null && !cardCounters.isEmpty()) {
|
||||
// counters = new ArrayList<CounterView>();
|
||||
// for (Counter counter: cardCounters.values()) {
|
||||
// counters.add(new CounterView(counter));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
if (card instanceof PermanentToken) {
|
||||
PermanentToken permanentToken = (PermanentToken) card;
|
||||
this.rarity = Rarity.COMMON;
|
||||
this.expansionSetCode = ((PermanentToken) card).getExpansionSetCode();
|
||||
this.rules = ((PermanentToken) card).getRules();
|
||||
this.type = ((PermanentToken)card).getToken().getTokenType();
|
||||
this.expansionSetCode = permanentToken.getExpansionSetCode();
|
||||
this.rules = permanentToken.getRules();
|
||||
this.type = permanentToken.getToken().getTokenType();
|
||||
}
|
||||
if (this.rarity == null && card instanceof StackAbility) {
|
||||
StackAbility stackAbility = (StackAbility)card;
|
||||
|
|
@ -245,34 +237,21 @@ public class CardView extends SimpleCardView {
|
|||
this.manaCost = token.getManaCost().getSymbols();
|
||||
this.rarity = Rarity.NA;
|
||||
this.type = token.getTokenType();
|
||||
//this.expansionSetCode = "";
|
||||
}
|
||||
|
||||
protected void setTargets(Targets targets) {
|
||||
protected final void setTargets(Targets targets) {
|
||||
for (Target target : targets) {
|
||||
if (target.isChosen()) {
|
||||
for (UUID targetUUID : target.getTargets()) {
|
||||
if (this.targets == null) this.targets = new ArrayList<UUID>();
|
||||
if (this.targets == null) {
|
||||
this.targets = new ArrayList<UUID>();
|
||||
}
|
||||
this.targets.add(targetUUID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// protected List<String> formatRules(List<String> rules) {
|
||||
// List<String> newRules = new ArrayList<String>();
|
||||
// for (String rule: rules) {
|
||||
// newRules.add(formatRule(rule));
|
||||
// }
|
||||
// return newRules;
|
||||
// }
|
||||
//
|
||||
// protected String formatRule(String rule) {
|
||||
// String replace = rule.replace("{this}", this.name);
|
||||
// replace = replace.replace("{source}", this.name);
|
||||
// return replace;
|
||||
// }
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.common.FightTargetsEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
|
@ -52,7 +51,7 @@ public class BloodFeud extends CardImpl<BloodFeud> {
|
|||
// Target creature fights another target creature.
|
||||
this.getSpellAbility().addEffect(new FightTargetsEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(true));
|
||||
this.getSpellAbility().addTarget(new TargetOtherCreaturePermanent(true));
|
||||
this.getSpellAbility().addTarget(new TargetOtherCreaturePermanent());
|
||||
}
|
||||
|
||||
public BloodFeud(final BloodFeud card) {
|
||||
|
|
@ -67,7 +66,7 @@ public class BloodFeud extends CardImpl<BloodFeud> {
|
|||
|
||||
class TargetOtherCreaturePermanent extends TargetCreaturePermanent {
|
||||
|
||||
public TargetOtherCreaturePermanent(boolean required) {
|
||||
public TargetOtherCreaturePermanent() {
|
||||
super(true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.sets.lorwyn;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue