mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- CheckStyle.
This commit is contained in:
@@ -80,7 +80,7 @@ public final class EditionCollection extends StorageView<CardEdition> {
|
||||
final CardEdition set = this.get(code);
|
||||
return set == null ? "" : set.getCode2();
|
||||
}
|
||||
|
||||
|
||||
public final Function<String, CardEdition> FN_EDITION_BY_CODE = new Function<String, CardEdition>() {
|
||||
@Override
|
||||
public CardEdition apply(String code) {
|
||||
|
||||
@@ -407,14 +407,14 @@ public abstract class PumpAiBase extends SpellAiLogic {
|
||||
|
||||
// is the creature unblocked and the spell will pump its power?
|
||||
if (phase.is(PhaseType.COMBAT_DECLARE_BLOCKERS_INSTANT_ABILITY)
|
||||
&& Singletons.getModel().getGame().getCombat().isAttacking(c)
|
||||
&& Singletons.getModel().getGame().getCombat().isAttacking(c)
|
||||
&& Singletons.getModel().getGame().getCombat().isUnblocked(c) && (attack > 0)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// is the creature blocked and the blocker would survive
|
||||
if (phase.is(PhaseType.COMBAT_DECLARE_BLOCKERS_INSTANT_ABILITY) && (attack > 0)
|
||||
&& Singletons.getModel().getGame().getCombat().isAttacking(c)
|
||||
&& Singletons.getModel().getGame().getCombat().isAttacking(c)
|
||||
&& Singletons.getModel().getGame().getCombat().isBlocked(c)
|
||||
&& Singletons.getModel().getGame().getCombat().getBlockers(c) != null
|
||||
&& !Singletons.getModel().getGame().getCombat().getBlockers(c).isEmpty()
|
||||
|
||||
@@ -380,7 +380,7 @@ class CardFactoryArtifacts {
|
||||
Zone zone = Singletons.getModel().getGame().getZoneOf(c);
|
||||
return zone.is(ZoneType.Hand) && c.getController() == card.getController();
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see forge.control.input.InputSelectManyCards#onDone()
|
||||
*/
|
||||
|
||||
@@ -286,7 +286,7 @@ class CardFactoryLands {
|
||||
}
|
||||
|
||||
public void humanExecute() {
|
||||
Singletons.getModel().getMatch().getInput().setInput(new InputSelectManyCards(0,1) {
|
||||
Singletons.getModel().getMatch().getInput().setInput(new InputSelectManyCards(0, 1) {
|
||||
private static final long serialVersionUID = -2774066137824255680L;
|
||||
|
||||
@Override
|
||||
@@ -299,7 +299,7 @@ class CardFactoryLands {
|
||||
Zone zone = Singletons.getModel().getGame().getZoneOf(c);
|
||||
return zone.is(ZoneType.Hand) && c.isType(type) && c.getController() == card.getController();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected Input onDone() {
|
||||
String cardName = selected.get(0).getName();
|
||||
|
||||
@@ -364,7 +364,7 @@ public class Cost {
|
||||
if (xCantBe0) {
|
||||
parse = parse.replaceAll(XCANTBE0_STR, "");
|
||||
}
|
||||
|
||||
|
||||
final String stripXCost = parse.replaceAll("X", "");
|
||||
|
||||
final int amountX = parse.length() - stripXCost.length();
|
||||
@@ -451,7 +451,7 @@ public class Cost {
|
||||
}
|
||||
}
|
||||
|
||||
public final CostMana getCostMana () {
|
||||
public final CostMana getCostMana() {
|
||||
// TODO: Change where ChangeCost happens
|
||||
for (final CostPart part : this.costParts) {
|
||||
if (part instanceof CostMana) {
|
||||
|
||||
@@ -164,7 +164,7 @@ public class CostMana extends CostPart {
|
||||
if (!this.mana.equals("0")) {
|
||||
sb.append(this.mana);
|
||||
}
|
||||
|
||||
|
||||
return sb.toString().trim();
|
||||
}
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ public class CostPutCounter extends CostPartWithList {
|
||||
c = AbilityFactory.calculateAmount(source, this.getAmount(), ability);
|
||||
}
|
||||
|
||||
final List<Card> typeList =
|
||||
final List<Card> typeList =
|
||||
CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), this.getType().split(";"), ai, source);
|
||||
|
||||
Card card = null;
|
||||
|
||||
@@ -289,7 +289,7 @@ public class CostRemoveCounter extends CostPartWithList {
|
||||
|
||||
if (!this.getThis()) {
|
||||
this.getList().clear();
|
||||
final List<Card> typeList =
|
||||
final List<Card> typeList =
|
||||
CardLists.getValidCards(ai.getCardsIn(this.getZone()), this.getType().split(";"), ai, source);
|
||||
for (Card card : typeList) {
|
||||
if (card.getCounters(this.getCounter()) >= c) {
|
||||
@@ -388,7 +388,7 @@ public class CostRemoveCounter extends CostPartWithList {
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* returnType.
|
||||
@@ -432,16 +432,16 @@ public class CostRemoveCounter extends CostPartWithList {
|
||||
|
||||
if (o != null) {
|
||||
final Card card = o;
|
||||
|
||||
|
||||
if (card.getCounters(costRemoveCounter.getCounter()) > 0) {
|
||||
this.nRemove++;
|
||||
costRemoveCounter.addToList(card);
|
||||
card.subtractCounter(costRemoveCounter.getCounter(), 1);
|
||||
|
||||
|
||||
if (card.getCounters(costRemoveCounter.getCounter()) == 0) {
|
||||
this.typeList.remove(card);
|
||||
}
|
||||
|
||||
|
||||
if (nNeeded == this.nRemove) {
|
||||
this.done();
|
||||
} else {
|
||||
@@ -474,4 +474,4 @@ public class CostRemoveCounter extends CostPartWithList {
|
||||
};
|
||||
return target;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ public class CostTapType extends CostPartWithList {
|
||||
if (c == null) {
|
||||
final String sVar = ability.getSVar(amount);
|
||||
if (sVar.equals("XChoice")) {
|
||||
List<Card> typeList =
|
||||
List<Card> typeList =
|
||||
CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), this.getType().split(";"), ability.getActivatingPlayer(), ability.getSourceCard());
|
||||
typeList = CardLists.filter(typeList, Presets.UNTAPPED);
|
||||
c = typeList.size();
|
||||
|
||||
@@ -83,7 +83,7 @@ public class CostUtil {
|
||||
continue;
|
||||
}
|
||||
|
||||
final List<Card> typeList =
|
||||
final List<Card> typeList =
|
||||
CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), type.split(","), source.getController(), source);
|
||||
if (ComputerUtil.getCardPreference(ai, source, "SacCost", typeList) == null) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user