mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
checkstyle
This commit is contained in:
@@ -361,8 +361,6 @@ public class CombatUtil {
|
|||||||
*
|
*
|
||||||
* @param attacker
|
* @param attacker
|
||||||
* a {@link forge.Card} object.
|
* a {@link forge.Card} object.
|
||||||
* @param combat
|
|
||||||
* a {@link forge.Combat} object.
|
|
||||||
* @return a boolean.
|
* @return a boolean.
|
||||||
*/
|
*/
|
||||||
public static int needsBlockers(final Card attacker) {
|
public static int needsBlockers(final Card attacker) {
|
||||||
@@ -2362,12 +2360,8 @@ public class CombatUtil {
|
|||||||
CardList enchantments = c.getController().getCardsIn(Zone.Library);
|
CardList enchantments = c.getController().getCardsIn(Zone.Library);
|
||||||
enchantments = enchantments.filter(new CardListFilter() {
|
enchantments = enchantments.filter(new CardListFilter() {
|
||||||
@Override
|
@Override
|
||||||
public boolean addCard(final Card c) {
|
public boolean addCard(final Card card) {
|
||||||
if (c.isEnchantment() && (c.getCMC() <= 3)) {
|
return (card.isEnchantment() && (card.getCMC() <= 3));
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -485,11 +485,7 @@ public final class GameActionUtil {
|
|||||||
answer = JOptionPane.showConfirmDialog(null, question, title.toString(), JOptionPane.YES_NO_OPTION);
|
answer = JOptionPane.showConfirmDialog(null, question, title.toString(), JOptionPane.YES_NO_OPTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (answer == JOptionPane.YES_OPTION) {
|
return answer == JOptionPane.YES_OPTION;
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -565,11 +561,7 @@ public final class GameActionUtil {
|
|||||||
|
|
||||||
q = GuiUtils.getChoiceOptional("Use " + c + " Landfall?", choices);
|
q = GuiUtils.getChoiceOptional("Use " + c + " Landfall?", choices);
|
||||||
|
|
||||||
if ((q == null) || q.equals("No")) {
|
return (q == null) || q.equals("No");
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -19,10 +19,11 @@ package forge;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
//handles "until next untap", "until your next untap" and "at beginning of untap" commands from cards
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Untap class.
|
* Untap class.
|
||||||
|
* Handles "until next untap", "until your next untap" and "at beginning of untap"
|
||||||
|
* commands from cards.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author Forge
|
* @author Forge
|
||||||
|
|||||||
@@ -340,11 +340,7 @@ public class AbilityFactoryDealDamage {
|
|||||||
if (source.getName().equals("Stuffy Doll")) {
|
if (source.getName().equals("Stuffy Doll")) {
|
||||||
// Now stuffy sits around for blocking
|
// Now stuffy sits around for blocking
|
||||||
// TODO(sol): this should also happen if Stuffy is going to die
|
// TODO(sol): this should also happen if Stuffy is going to die
|
||||||
if (AllZone.getPhase().is(Constant.Phase.END_OF_TURN, AllZone.getHumanPlayer())) {
|
return AllZone.getPhase().is(Constant.Phase.END_OF_TURN, AllZone.getHumanPlayer());
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.abilityFactory.isAbility()) {
|
if (this.abilityFactory.isAbility()) {
|
||||||
|
|||||||
@@ -1026,11 +1026,9 @@ public class CardFactorySorceries {
|
|||||||
public boolean addCard(final Card c) {
|
public boolean addCard(final Card c) {
|
||||||
if (c.getName().contains("Dryad Arbor")) {
|
if (c.getName().contains("Dryad Arbor")) {
|
||||||
return true;
|
return true;
|
||||||
} else if (!(c.isType("Forest") || c.isType("Plains") || c.isType("Mountain")
|
|
||||||
|| c.isType("Island") || c.isType("Swamp"))) {
|
|
||||||
return true;
|
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return (!(c.isType("Forest") || c.isType("Plains") || c.isType("Mountain")
|
||||||
|
|| c.isType("Island") || c.isType("Swamp")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1116,11 +1114,9 @@ public class CardFactorySorceries {
|
|||||||
public boolean addCard(final Card c) {
|
public boolean addCard(final Card c) {
|
||||||
if (c.getName().contains("Dryad Arbor")) {
|
if (c.getName().contains("Dryad Arbor")) {
|
||||||
return true;
|
return true;
|
||||||
} else if (!(c.isType("Forest") || c.isType("Plains") || c.isType("Mountain")
|
|
||||||
|| c.isType("Island") || c.isType("Swamp"))) {
|
|
||||||
return true;
|
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return (!(c.isType("Forest") || c.isType("Plains") || c.isType("Mountain")
|
||||||
|
|| c.isType("Island") || c.isType("Swamp")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1451,11 +1447,7 @@ public class CardFactorySorceries {
|
|||||||
CardList list = AllZone.getComputerPlayer().getCardsIn(Zone.Hand);
|
CardList list = AllZone.getComputerPlayer().getCardsIn(Zone.Hand);
|
||||||
|
|
||||||
list = list.getType("Land");
|
list = list.getType("Land");
|
||||||
if (list.size() > 0) {
|
return list.size() > 0;
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ public class MultiPhaseProgressMonitorWithETA extends BaseProgressMonitor {
|
|||||||
*
|
*
|
||||||
* @param numUnits
|
* @param numUnits
|
||||||
* cannot be higher than Integer.MAX_VALUE
|
* cannot be higher than Integer.MAX_VALUE
|
||||||
* @see net.slightlymagic.braids.util.progress_monitor.ProgressMonitor#setTotalUnitsThisPhase(long)
|
* @see net.slightlymagic.braids.util.progress_monitor.BraidsProgressMonitor#setTotalUnitsThisPhase(long)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public final void setTotalUnitsThisPhase(final long numUnits) {
|
public final void setTotalUnitsThisPhase(final long numUnits) {
|
||||||
@@ -224,7 +224,7 @@ public class MultiPhaseProgressMonitorWithETA extends BaseProgressMonitor {
|
|||||||
*
|
*
|
||||||
* @param numUnits
|
* @param numUnits
|
||||||
* the num units
|
* the num units
|
||||||
* @see net.slightlymagic.braids.util.progress_monitor.ProgressMonitor#incrementUnitsCompletedThisPhase(long)
|
* @see net.slightlymagic.braids.util.progress_monitor.BraidsProgressMonitor#incrementUnitsCompletedThisPhase(long)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public final void incrementUnitsCompletedThisPhase(final long numUnits) {
|
public final void incrementUnitsCompletedThisPhase(final long numUnits) {
|
||||||
|
|||||||
@@ -407,12 +407,8 @@ public class BaseProgressMonitor implements BraidsProgressMonitor {
|
|||||||
doctorStartTimes();
|
doctorStartTimes();
|
||||||
long nowTime = (new Date().getTime() / 1000);
|
long nowTime = (new Date().getTime() / 1000);
|
||||||
|
|
||||||
if (nowTime - this.lastUIUpdateTime >= this.minUIUpdateIntervalSec
|
return (nowTime - this.lastUIUpdateTime >= this.minUIUpdateIntervalSec
|
||||||
|| (this.getUnitsCompletedSoFarThisPhase() == this.getTotalUnitsThisPhase())) {
|
|| (this.getUnitsCompletedSoFarThisPhase() == this.getTotalUnitsThisPhase()));
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user