mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Checkstyle.
This commit is contained in:
@@ -1986,38 +1986,38 @@ public class CombatUtil {
|
||||
c.setDamage(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gets a string for the GameLog regarding attackers
|
||||
* gets a string for the GameLog regarding attackers.
|
||||
*
|
||||
* @return a String
|
||||
*/
|
||||
public static String getCombatAttackForLog() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
|
||||
// Loop through Defenders
|
||||
// Append Defending Player/Planeswalker
|
||||
final Combat combat = AllZone.getCombat();
|
||||
final ArrayList<Object> defenders = combat.getDefenders();
|
||||
final CardList[] attackers = combat.sortAttackerByDefender();
|
||||
|
||||
|
||||
// Not a big fan of the triple nested loop here
|
||||
for (int def = 0; def < defenders.size(); def++) {
|
||||
if ((attackers[def] == null) || (attackers[def].size() == 0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
sb.append(combat.getAttackingPlayer()).append(" declared ");
|
||||
for (Card attacker : attackers[def]) {
|
||||
sb.append(attacker).append(" ");
|
||||
}
|
||||
|
||||
|
||||
sb.append("attacking ").append(defenders.get(def).toString()).append(".");
|
||||
}
|
||||
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gets a string for the GameLog regarding assigned blockers.
|
||||
*
|
||||
@@ -2025,7 +2025,7 @@ public class CombatUtil {
|
||||
*/
|
||||
public static String getCombatBlockForLog() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
|
||||
Card[] defend = null;
|
||||
|
||||
// Loop through Defenders
|
||||
@@ -2033,14 +2033,14 @@ public class CombatUtil {
|
||||
final Combat combat = AllZone.getCombat();
|
||||
final ArrayList<Object> defenders = combat.getDefenders();
|
||||
final CardList[] attackers = combat.sortAttackerByDefender();
|
||||
|
||||
|
||||
// Not a big fan of the triple nested loop here
|
||||
for (int def = 0; def < defenders.size(); def++) {
|
||||
final CardList list = attackers[def];
|
||||
|
||||
for (final Card attacker : list) {
|
||||
sb.append(combat.getDefendingPlayer()).append(" assigned ");
|
||||
|
||||
|
||||
defend = AllZone.getCombat().getBlockers(attacker).toArray();
|
||||
|
||||
if (defend.length > 0) {
|
||||
@@ -2051,11 +2051,11 @@ public class CombatUtil {
|
||||
} else {
|
||||
sb.append("<nothing> ");
|
||||
}
|
||||
|
||||
|
||||
sb.append("to block ").append(attacker).append(". ");
|
||||
} // loop through attackers
|
||||
}
|
||||
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -1851,7 +1851,7 @@ public class GameAction {
|
||||
}
|
||||
if (c.hasStartOfKeyword("May be played without paying its mana cost")) {
|
||||
final SpellAbility newSA = sa.copy();
|
||||
final Cost cost = new Cost("",c.getName(),false);
|
||||
final Cost cost = new Cost("", c.getName(), false);
|
||||
for (CostPart part : newSA.getPayCosts().getCostParts()) {
|
||||
if (!(part instanceof CostMana)) {
|
||||
cost.getCostParts().add(part);
|
||||
|
||||
@@ -588,7 +588,7 @@ public class PhaseUtil {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
AllZone.getGameLog().add("Combat", CombatUtil.getCombatAttackForLog(), 1);
|
||||
|
||||
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
||||
|
||||
@@ -303,18 +303,18 @@ public class ViewTabber extends FRoundedPanel {
|
||||
tar.setOpaque(false);
|
||||
tar.setBorder(border);
|
||||
tar.setFont(font);
|
||||
|
||||
|
||||
tar.setForeground(this.skin.getClrText());
|
||||
|
||||
tar.setFocusable(false);
|
||||
tar.setEditable(false);
|
||||
tar.setLineWrap(true);
|
||||
tar.setWrapStyleWord(true);
|
||||
|
||||
|
||||
JScrollPane jsp = new JScrollPane(tar);
|
||||
jsp.setOpaque(false);
|
||||
jsp.getViewport().setOpaque(false);
|
||||
|
||||
|
||||
this.pnlConsole.add(jsp, "w 95%!, gapleft 3%, gaptop 1%");
|
||||
}
|
||||
|
||||
@@ -657,12 +657,12 @@ public class ViewTabber extends FRoundedPanel {
|
||||
public void mousePressed(final MouseEvent e) {
|
||||
DevLabel.this.setBackground(DevLabel.this.pressedBG);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void mouseReleased(final MouseEvent e) {
|
||||
DevLabel.this.setBackground(DevLabel.this.defaultBG);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void mouseEntered(final MouseEvent e) {
|
||||
DevLabel.this.setBackground(DevLabel.this.hoverBG);
|
||||
|
||||
Reference in New Issue
Block a user