mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
checkstyle
This commit is contained in:
@@ -130,6 +130,10 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
|
|||||||
*
|
*
|
||||||
* @see forge.IPlayerZone#contains(forge.Card)
|
* @see forge.IPlayerZone#contains(forge.Card)
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* @return boolean
|
||||||
|
* @param c Card
|
||||||
|
*/
|
||||||
public final boolean contains(final Card c) {
|
public final boolean contains(final Card c) {
|
||||||
return cards.contains(c);
|
return cards.contains(c);
|
||||||
}
|
}
|
||||||
@@ -359,7 +363,8 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
|
|||||||
* equals
|
* equals
|
||||||
* (
|
* (
|
||||||
* 'Any')
|
* 'Any')
|
||||||
*/) {
|
*/)
|
||||||
|
{
|
||||||
ret.add(cardsAddedThisTurn.get(i));
|
ret.add(cardsAddedThisTurn.get(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -638,8 +638,9 @@ public abstract class Player extends GameEntity {
|
|||||||
if (AllZoneUtil.isCardInPlay("Benevolent Unicorn") && source.isSpell()) {
|
if (AllZoneUtil.isCardInPlay("Benevolent Unicorn") && source.isSpell()) {
|
||||||
int amount = AllZoneUtil.getCardsIn(Zone.Battlefield, "Benevolent Unicorn").size();
|
int amount = AllZoneUtil.getCardsIn(Zone.Battlefield, "Benevolent Unicorn").size();
|
||||||
for (int i = 0; i < amount; i++) {
|
for (int i = 0; i < amount; i++) {
|
||||||
if (restDamage > 0)
|
if (restDamage > 0) {
|
||||||
restDamage -= 1;
|
restDamage -= 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2141,8 +2142,9 @@ public abstract class Player extends GameEntity {
|
|||||||
final String excR = incR[1];
|
final String excR = incR[1];
|
||||||
String[] exR = excR.split("\\+"); // Exclusive Restrictions are ...
|
String[] exR = excR.split("\\+"); // Exclusive Restrictions are ...
|
||||||
for (int j = 0; j < exR.length; j++) {
|
for (int j = 0; j < exR.length; j++) {
|
||||||
if (hasProperty(exR[j], sourceController, source) == false)
|
if (hasProperty(exR[j], sourceController, source) == false) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -193,8 +193,8 @@ public class AbilityFactory_Attach {
|
|||||||
* the mandatory
|
* the mandatory
|
||||||
* @return true, if successful
|
* @return true, if successful
|
||||||
*/
|
*/
|
||||||
public static boolean attachPreference(final AbilityFactory af, final SpellAbility sa, final Map<String, String> params, final Target tgt,
|
public static boolean attachPreference(final AbilityFactory af, final SpellAbility sa,
|
||||||
final boolean mandatory) {
|
final Map<String, String> params, final Target tgt, final boolean mandatory) {
|
||||||
Object o;
|
Object o;
|
||||||
if (tgt.canTgtPlayer()) {
|
if (tgt.canTgtPlayer()) {
|
||||||
o = attachToPlayerAIPreferences(af, sa, mandatory);
|
o = attachToPlayerAIPreferences(af, sa, mandatory);
|
||||||
@@ -223,8 +223,8 @@ public class AbilityFactory_Attach {
|
|||||||
* the mandatory
|
* the mandatory
|
||||||
* @return the card
|
* @return the card
|
||||||
*/
|
*/
|
||||||
public static Card attachToCardAIPreferences(final AbilityFactory af, final SpellAbility sa, final Map<String, String> params,
|
public static Card attachToCardAIPreferences(final AbilityFactory af, final SpellAbility sa,
|
||||||
final boolean mandatory) {
|
final Map<String, String> params, final boolean mandatory) {
|
||||||
Target tgt = sa.getTarget();
|
Target tgt = sa.getTarget();
|
||||||
Card attachSource = sa.getSourceCard();
|
Card attachSource = sa.getSourceCard();
|
||||||
// TODO AttachSource is currently set for the Source of the Spell, but
|
// TODO AttachSource is currently set for the Source of the Spell, but
|
||||||
@@ -272,8 +272,8 @@ public class AbilityFactory_Attach {
|
|||||||
* the logic
|
* the logic
|
||||||
* @return the card
|
* @return the card
|
||||||
*/
|
*/
|
||||||
public static Card attachGeneralAI(final SpellAbility sa, final CardList list, final boolean mandatory, final Card attachSource,
|
public static Card attachGeneralAI(final SpellAbility sa, final CardList list, final boolean mandatory,
|
||||||
final String logic) {
|
final Card attachSource, final String logic) {
|
||||||
Player prefPlayer = "Pump".equals(logic) ? AllZone.getComputerPlayer() : AllZone.getHumanPlayer();
|
Player prefPlayer = "Pump".equals(logic) ? AllZone.getComputerPlayer() : AllZone.getHumanPlayer();
|
||||||
// Some ChangeType cards are beneficial, and PrefPlayer should be
|
// Some ChangeType cards are beneficial, and PrefPlayer should be
|
||||||
// changed to represent that
|
// changed to represent that
|
||||||
@@ -411,7 +411,8 @@ public class AbilityFactory_Attach {
|
|||||||
* the attach source
|
* the attach source
|
||||||
* @return the card
|
* @return the card
|
||||||
*/
|
*/
|
||||||
public static Card attachAIPumpPreference(final SpellAbility sa, final CardList list, final boolean mandatory, final Card attachSource) {
|
public static Card attachAIPumpPreference(final SpellAbility sa, final CardList list, final boolean mandatory,
|
||||||
|
final Card attachSource) {
|
||||||
// AI For choosing a Card to Pump
|
// AI For choosing a Card to Pump
|
||||||
Card c = null;
|
Card c = null;
|
||||||
CardList magnetList = null;
|
CardList magnetList = null;
|
||||||
@@ -707,8 +708,8 @@ public class AbilityFactory_Attach {
|
|||||||
* the attach source
|
* the attach source
|
||||||
* @return the card
|
* @return the card
|
||||||
*/
|
*/
|
||||||
public static Card attachAIKeepTappedPreference(final SpellAbility sa, final CardList list, final boolean mandatory,
|
public static Card attachAIKeepTappedPreference(final SpellAbility sa, final CardList list,
|
||||||
final Card attachSource) {
|
final boolean mandatory, final Card attachSource) {
|
||||||
// AI For Cards like Paralyzing Grasp and Glimmerdust Nap
|
// AI For Cards like Paralyzing Grasp and Glimmerdust Nap
|
||||||
CardList prefList = list.filter(new CardListFilter() {
|
CardList prefList = list.filter(new CardListFilter() {
|
||||||
@Override
|
@Override
|
||||||
@@ -761,7 +762,8 @@ public class AbilityFactory_Attach {
|
|||||||
* the mandatory
|
* the mandatory
|
||||||
* @return the player
|
* @return the player
|
||||||
*/
|
*/
|
||||||
public static Player attachToPlayerAIPreferences(final AbilityFactory af, final SpellAbility sa, final boolean mandatory) {
|
public static Player attachToPlayerAIPreferences(final AbilityFactory af, final SpellAbility sa,
|
||||||
|
final boolean mandatory) {
|
||||||
Target tgt = sa.getTarget();
|
Target tgt = sa.getTarget();
|
||||||
Player p;
|
Player p;
|
||||||
if (tgt.canOnlyTgtOpponent()) {
|
if (tgt.canOnlyTgtOpponent()) {
|
||||||
@@ -935,11 +937,10 @@ public class AbilityFactory_Attach {
|
|||||||
// handle being scripted
|
// handle being scripted
|
||||||
boolean gainControl = "GainControl".equals(af.getMapParams().get("AILogic"));
|
boolean gainControl = "GainControl".equals(af.getMapParams().get("AILogic"));
|
||||||
handleAura(card, c, gainControl);
|
handleAura(card, c, gainControl);
|
||||||
} else if (card.isEquipment())
|
} else if (card.isEquipment()) {
|
||||||
{
|
|
||||||
card.equipCard(c);
|
card.equipCard(c);
|
||||||
// else if (card.isFortification())
|
// else if (card.isFortification())
|
||||||
// card.fortifyCard(c);
|
// card.fortifyCard(c);
|
||||||
}
|
}
|
||||||
} else if (o instanceof Player) {
|
} else if (o instanceof Player) {
|
||||||
// Currently, a few cards can enchant players
|
// Currently, a few cards can enchant players
|
||||||
|
|||||||
@@ -210,8 +210,9 @@ public class CardFactory_Instants {
|
|||||||
Pile1.add(Random);
|
Pile1.add(Random);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < Count; i++) {
|
for (int i = 0; i < Count; i++) {
|
||||||
if (!Pile1.contains(library.get(i)))
|
if (!Pile1.contains(library.get(i))) {
|
||||||
Pile2.add(library.get(i));
|
Pile2.add(library.get(i));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("Choose a pile to add to your hand: " + "\r\n" + "\r\n");
|
sb.append("Choose a pile to add to your hand: " + "\r\n" + "\r\n");
|
||||||
|
|||||||
@@ -928,7 +928,6 @@ public class CardFactory_Planeswalkers {
|
|||||||
|
|
||||||
// TODO: improve this:
|
// TODO: improve this:
|
||||||
if (land.size() > 4 && c.isLand()) {
|
if (land.size() > 4 && c.isLand()) {
|
||||||
;
|
|
||||||
} else {
|
} else {
|
||||||
AllZone.getGameAction().moveToBottomOfLibrary(c);
|
AllZone.getGameAction().moveToBottomOfLibrary(c);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -564,7 +564,7 @@ public class Gui_HomeScreen {
|
|||||||
cmdDeckSelect.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null));
|
cmdDeckSelect.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null));
|
||||||
cmdDeckSelect.setBackground(new Color(255, 222, 173));
|
cmdDeckSelect.setBackground(new Color(255, 222, 173));
|
||||||
cmdDeckSelect.addActionListener(new ActionListener() {
|
cmdDeckSelect.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(final ActionEvent e) {
|
||||||
doDeckSelect();
|
doDeckSelect();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user