mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- CheckStyle.
This commit is contained in:
@@ -656,6 +656,9 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
this.imprintedCards.addAll(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: Write javadoc for this method.
|
||||
*/
|
||||
public final void removeImprinted(final Object o) {
|
||||
this.imprintedCards.remove(o);
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ public class ChangeZoneEffect extends SpellEffect {
|
||||
tgtC.clearUnEnchantCommand();
|
||||
}
|
||||
tgtC.enchantEntity(attachedTo);
|
||||
} else {//Equipment
|
||||
} else { //Equipment
|
||||
if (tgtC.isEquipping()) {
|
||||
final Card oldEquiped = tgtC.getEquippingCard();
|
||||
tgtC.removeEquipping(oldEquiped);
|
||||
@@ -689,7 +689,7 @@ public class ChangeZoneEffect extends SpellEffect {
|
||||
c.clearUnEnchantCommand();
|
||||
}
|
||||
c.enchantEntity(attachedTo);
|
||||
} else {//Equipment
|
||||
} else { //Equipment
|
||||
if (c.isEquipping()) {
|
||||
final Card oldEquiped = c.getEquippingCard();
|
||||
c.removeEquipping(oldEquiped);
|
||||
|
||||
@@ -52,8 +52,8 @@ public class DiscardEffect extends RevealEffectBase {
|
||||
sb.append("All");
|
||||
} else if (sa.hasParam("AnyNumber")) {
|
||||
sb.append("any number");
|
||||
} else if (sa.hasParam("NumCards") && sa.getParam("NumCards").equals("X") &&
|
||||
sa.getSVar("X").equals("Remembered$Amount")) {
|
||||
} else if (sa.hasParam("NumCards") && sa.getParam("NumCards").equals("X")
|
||||
&& sa.getSVar("X").equals("Remembered$Amount")) {
|
||||
sb.append("that many");
|
||||
} else {
|
||||
sb.append(numCards);
|
||||
|
||||
@@ -190,7 +190,7 @@ public class CostExile extends CostPartWithList {
|
||||
if (this.sameZone && amount != null) {
|
||||
boolean foundPayable = false;
|
||||
List<Player> players = game.getPlayers();
|
||||
for(Player p : players) {
|
||||
for (Player p : players) {
|
||||
if (CardLists.filter(typeList, CardPredicates.isController(p)).size() >= amount) {
|
||||
foundPayable = true;
|
||||
break;
|
||||
@@ -283,7 +283,7 @@ public class CostExile extends CostPartWithList {
|
||||
} else if (this.sameZone) {
|
||||
List<Player> players = game.getPlayers();
|
||||
List<Player> payableZone = new ArrayList<Player>();
|
||||
for(Player p : players) {
|
||||
for (Player p : players) {
|
||||
List<Card> enoughType = CardLists.filter(list, CardPredicates.isOwner(p));
|
||||
if (enoughType.size() < c) {
|
||||
list.removeAll(enoughType);
|
||||
|
||||
@@ -190,7 +190,7 @@ public class ManaPool {
|
||||
return numRemoved;
|
||||
}
|
||||
|
||||
if (isEndOfPhase && this.owner.hasKeyword("Green mana doesn't empty from your mana pool as steps and phases end.")){
|
||||
if (isEndOfPhase && this.owner.hasKeyword("Green mana doesn't empty from your mana pool as steps and phases end.")) {
|
||||
// Omnath in play, clear all non-green mana
|
||||
int i = 0;
|
||||
while (i < this.floatingMana.size()) {
|
||||
|
||||
@@ -483,7 +483,7 @@ public class SpellPermanent extends Spell {
|
||||
final SpellAbility exSA = af.getAbility(card.getSVar(execute), card);
|
||||
|
||||
if (api != null) {
|
||||
if(exSA.getApi() != api) {
|
||||
if (exSA.getApi() != api) {
|
||||
continue;
|
||||
} else {
|
||||
rightapi = true;
|
||||
|
||||
@@ -3,7 +3,7 @@ package forge.card.trigger;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* TriggerWaiting is just a small object to keep track of things that occurred that need to be run
|
||||
* TriggerWaiting is just a small object to keep track of things that occurred that need to be run.
|
||||
*/
|
||||
public class TriggerWaiting {
|
||||
private TriggerType mode;
|
||||
|
||||
@@ -165,9 +165,10 @@ public class Deck extends DeckBase {
|
||||
|
||||
//This if clause is really only necessary when cloning decks that were
|
||||
//around before schemes.
|
||||
if(this.schemes != null)
|
||||
if (this.schemes != null) {
|
||||
result.schemes.addAll(this.schemes);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
||||
@@ -249,10 +249,12 @@ public class DeckgenUtil {
|
||||
|
||||
deckList.append(dName == null ? "" : dName + nl + nl);
|
||||
|
||||
if(deck.getAvatar() != null)
|
||||
if (deck.getAvatar() != null) {
|
||||
deckList.append("Avatar: " + deck.getAvatar().getName() + nl + nl);
|
||||
if(deck.getCommander() != null)
|
||||
}
|
||||
if (deck.getCommander() != null) {
|
||||
deckList.append("Commander: " + deck.getCommander().getName() + nl + nl);
|
||||
}
|
||||
|
||||
for (final Entry<String, Integer> ev : deckMap.entrySet()) {
|
||||
deckList.append(ev.getValue() + " x " + ev.getKey() + nl);
|
||||
@@ -311,24 +313,23 @@ public class DeckgenUtil {
|
||||
public static Deck generateSchemeDeck() {
|
||||
Deck res = new Deck();
|
||||
|
||||
Iterable<CardPrinted> allSchemes = Iterables.filter(CardDb.instance().getAllNonTraditionalCards(),CardPrinted.Predicates.type("Scheme"));
|
||||
Iterable<CardPrinted> allSchemes = Iterables.filter(CardDb.instance().getAllNonTraditionalCards(), CardPrinted.Predicates.type("Scheme"));
|
||||
|
||||
for(int i=0;i<20;i++) {
|
||||
for (int i = 0; i < 20; i++) {
|
||||
CardPrinted cp = Iterables.get(allSchemes, MyRandom.getRandom().nextInt(Iterables.size(allSchemes)));
|
||||
int appearances = 0;
|
||||
for(CardPrinted added : res.getSchemes().toFlatList()) {
|
||||
if(added.getName().equals(cp.getName()))
|
||||
{
|
||||
for (CardPrinted added : res.getSchemes().toFlatList()) {
|
||||
if (added.getName().equals(cp.getName())) {
|
||||
|
||||
appearances++;
|
||||
}
|
||||
}
|
||||
|
||||
if(appearances < 2)
|
||||
{
|
||||
if (appearances < 2) {
|
||||
|
||||
res.getSchemes().add(cp);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,8 +125,8 @@ public class GameNew {
|
||||
|
||||
// mark card as difficult for AI to play
|
||||
if (player.isComputer() && card.getSVar("RemAIDeck").equals("True") && !rAICards.contains(card.getName())) {
|
||||
if (Singletons.getModel().getMatch().getGameType() != GameType.Draft &&
|
||||
Singletons.getModel().getMatch().getGameType() != GameType.Sealed) {
|
||||
if (Singletons.getModel().getMatch().getGameType() != GameType.Draft
|
||||
&& Singletons.getModel().getMatch().getGameType() != GameType.Sealed) {
|
||||
rAICards.add(card.getName());
|
||||
// get card picture so that it is in the image cache
|
||||
// ImageCache.getImage(card);
|
||||
@@ -250,7 +250,7 @@ public class GameNew {
|
||||
}
|
||||
|
||||
Iterable<Card> schemes = p.getValue().getSchemes();
|
||||
if(schemes != null) {
|
||||
if (schemes != null) {
|
||||
player.setSchemeDeck(schemes);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ public class MatchStartHelper {
|
||||
@Override
|
||||
public Iterable<Card> get() {
|
||||
List<Card> res = new ArrayList<Card>();
|
||||
for(CardPrinted cp : schemes)
|
||||
{
|
||||
for (CardPrinted cp : schemes) {
|
||||
|
||||
res.add(cp.toForgeCard());
|
||||
}
|
||||
|
||||
|
||||
@@ -272,8 +272,9 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
|
||||
break;
|
||||
|
||||
case MAIN1:
|
||||
if(this.getPlayerTurn().isArchenemy())
|
||||
if (this.getPlayerTurn().isArchenemy()) {
|
||||
this.getPlayerTurn().setSchemeInMotion();
|
||||
}
|
||||
break;
|
||||
|
||||
case COMBAT_BEGIN:
|
||||
@@ -724,20 +725,20 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
|
||||
//is turned face down and put on the bottom of its owner's scheme
|
||||
//deck the next time a player would receive priority.
|
||||
//(This is a state-based action. See rule 704.)
|
||||
for (int i=0; i<game.getCardsIn(ZoneType.Command).size();i++) {
|
||||
for (int i = 0; i < game.getCardsIn(ZoneType.Command).size(); i++) {
|
||||
Card c = game.getCardsIn(ZoneType.Command).get(i);
|
||||
if(c.isScheme() && !c.isType("Ongoing"))
|
||||
{
|
||||
if (c.isScheme() && !c.isType("Ongoing")) {
|
||||
|
||||
boolean foundonstack = false;
|
||||
for(SpellAbilityStackInstance si : game.getStack().getStack()) {
|
||||
if(si.getSourceCard().equals(c))
|
||||
{
|
||||
for (SpellAbilityStackInstance si : game.getStack().getStack()) {
|
||||
if (si.getSourceCard().equals(c)) {
|
||||
|
||||
foundonstack = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!foundonstack)
|
||||
{
|
||||
if (!foundonstack) {
|
||||
|
||||
game.getTriggerHandler().suppressMode(TriggerType.ChangesZone);
|
||||
c.getController().getZone(ZoneType.Command).remove(c);
|
||||
i--;
|
||||
|
||||
Reference in New Issue
Block a user