mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Checkstyle
This commit is contained in:
@@ -62,7 +62,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
/**
|
||||
* Sets the state.
|
||||
*
|
||||
* @param state the state
|
||||
* @param state
|
||||
* the state
|
||||
* @return true, if successful
|
||||
*/
|
||||
public boolean setState(final String state) {
|
||||
@@ -104,8 +105,10 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
/**
|
||||
* Switch states.
|
||||
*
|
||||
* @param from the from
|
||||
* @param to the to
|
||||
* @param from
|
||||
* the from
|
||||
* @param to
|
||||
* the to
|
||||
*/
|
||||
public void switchStates(final String from, final String to) {
|
||||
final CardCharacteristics tmp = this.characteristicsMap.get(from);
|
||||
@@ -116,7 +119,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
/**
|
||||
* Clear states.
|
||||
*
|
||||
* @param state the state
|
||||
* @param state
|
||||
* the state
|
||||
*/
|
||||
public void clearStates(final String state) {
|
||||
this.characteristicsMap.remove(state);
|
||||
@@ -124,6 +128,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
|
||||
/**
|
||||
* Turn face down.
|
||||
*
|
||||
* @return true, if successful
|
||||
*/
|
||||
public boolean turnFaceDown() {
|
||||
if (!this.isDoubleFaced) {
|
||||
@@ -136,6 +142,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
|
||||
/**
|
||||
* Turn face up.
|
||||
*
|
||||
* @return true, if successful
|
||||
*/
|
||||
public boolean turnFaceUp() {
|
||||
if (this.curCharacteristics.equals("FaceDown")) {
|
||||
@@ -162,7 +170,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
/**
|
||||
* Gets the state.
|
||||
*
|
||||
* @param state the state
|
||||
* @param state
|
||||
* the state
|
||||
* @return the state
|
||||
*/
|
||||
public CardCharacteristics getState(final String state) {
|
||||
@@ -181,7 +190,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
/**
|
||||
* addAlternateState.
|
||||
*
|
||||
* @param state the state
|
||||
* @param state
|
||||
* the state
|
||||
*/
|
||||
public final void addAlternateState(final String state) {
|
||||
this.characteristicsMap.put(state, new CardCharacteristics());
|
||||
@@ -2911,7 +2921,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
/**
|
||||
* Sets the regenerated this turn.
|
||||
*
|
||||
* @param n the new regenerated this turn
|
||||
* @param n
|
||||
* the new regenerated this turn
|
||||
*/
|
||||
public final void setRegeneratedThisTurn(final int n) {
|
||||
this.regeneratedThisTurn = n;
|
||||
@@ -8089,7 +8100,9 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
this.getCharacteristics().setCardColorsOverridden(cardColorsOverridden0);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see forge.GameEntity#hasProtectionFrom(forge.Card)
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -187,7 +187,7 @@ public class AbilityFactorySetState {
|
||||
abilityFactory.getMapParams().get("Defined"), sa);
|
||||
}
|
||||
|
||||
boolean remChanged = abilityFactory.getMapParams().containsKey("RememberChanged");
|
||||
final boolean remChanged = abilityFactory.getMapParams().containsKey("RememberChanged");
|
||||
|
||||
for (final Card tgt : tgtCards) {
|
||||
if (abilityFactory.getAbTgt() != null) {
|
||||
@@ -195,7 +195,7 @@ public class AbilityFactorySetState {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
String mode = abilityFactory.getMapParams().get("Mode");
|
||||
final String mode = abilityFactory.getMapParams().get("Mode");
|
||||
if (mode != null) {
|
||||
if (mode.equals("Transform")) {
|
||||
if (tgt.isDoubleFaced()) {
|
||||
@@ -203,35 +203,30 @@ public class AbilityFactorySetState {
|
||||
if (tgt.setState("Transformed") && remChanged) {
|
||||
abilityFactory.getHostCard().addRemembered(tgt);
|
||||
}
|
||||
}
|
||||
else if(tgt.getCurState().equals("Transformed")) {
|
||||
} else if (tgt.getCurState().equals("Transformed")) {
|
||||
if (tgt.setState("Original") && remChanged) {
|
||||
abilityFactory.getHostCard().addRemembered(tgt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(mode.equals("Flip")) {
|
||||
} else if (mode.equals("Flip")) {
|
||||
if (tgt.isFlip()) {
|
||||
if (tgt.getCurState().equals("Original")) {
|
||||
if (tgt.setState("Flipped") && remChanged) {
|
||||
abilityFactory.getHostCard().addRemembered(tgt);
|
||||
}
|
||||
}
|
||||
else if(tgt.getCurState().equals("Flipped")) {
|
||||
} else if (tgt.getCurState().equals("Flipped")) {
|
||||
if (tgt.setState("Original") && remChanged) {
|
||||
abilityFactory.getHostCard().addRemembered(tgt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(mode.equals("TurnFace")) {
|
||||
} else if (mode.equals("TurnFace")) {
|
||||
if (tgt.getCurState().equals("Original")) {
|
||||
if (tgt.turnFaceDown() && remChanged) {
|
||||
abilityFactory.getHostCard().addRemembered(tgt);
|
||||
}
|
||||
}
|
||||
else if(tgt.getCurState().equals("FaceDown")) {
|
||||
} else if (tgt.getCurState().equals("FaceDown")) {
|
||||
if (tgt.turnFaceUp() && remChanged) {
|
||||
abilityFactory.getHostCard().addRemembered(tgt);
|
||||
}
|
||||
@@ -384,7 +379,7 @@ public class AbilityFactorySetState {
|
||||
}
|
||||
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
String mode = abilityFactory.getMapParams().get("Mode");
|
||||
final String mode = abilityFactory.getMapParams().get("Mode");
|
||||
if (mode != null) {
|
||||
if (mode.equals("Transform")) {
|
||||
if (list.get(i).isDoubleFaced()) {
|
||||
@@ -392,35 +387,30 @@ public class AbilityFactorySetState {
|
||||
if (list.get(i).setState("Transformed") && remChanged) {
|
||||
abilityFactory.getHostCard().addRemembered(tgt);
|
||||
}
|
||||
}
|
||||
else if(list.get(i).getCurState().equals("Transformed")) {
|
||||
} else if (list.get(i).getCurState().equals("Transformed")) {
|
||||
if (list.get(i).setState("Original") && remChanged) {
|
||||
abilityFactory.getHostCard().addRemembered(tgt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(mode.equals("Flip")) {
|
||||
} else if (mode.equals("Flip")) {
|
||||
if (list.get(i).isFlip()) {
|
||||
if (list.get(i).getCurState().equals("Original")) {
|
||||
if (list.get(i).setState("Flipped") && remChanged) {
|
||||
abilityFactory.getHostCard().addRemembered(tgt);
|
||||
}
|
||||
}
|
||||
else if(list.get(i).getCurState().equals("Flipped")) {
|
||||
} else if (list.get(i).getCurState().equals("Flipped")) {
|
||||
if (list.get(i).setState("Original") && remChanged) {
|
||||
abilityFactory.getHostCard().addRemembered(tgt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(mode.equals("TurnFace")) {
|
||||
} else if (mode.equals("TurnFace")) {
|
||||
if (list.get(i).getCurState().equals("Original")) {
|
||||
if (list.get(i).turnFaceDown() && remChanged) {
|
||||
abilityFactory.getHostCard().addRemembered(tgt);
|
||||
}
|
||||
}
|
||||
else if(list.get(i).getCurState().equals("FaceDown")) {
|
||||
} else if (list.get(i).getCurState().equals("FaceDown")) {
|
||||
if (list.get(i).turnFaceUp() && remChanged) {
|
||||
abilityFactory.getHostCard().addRemembered(tgt);
|
||||
}
|
||||
@@ -447,8 +437,7 @@ public class AbilityFactorySetState {
|
||||
|
||||
if (params.containsKey("Mode")) {
|
||||
sb.append(params.get("Mode"));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
sb.append(params.get("NewState"));
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public class TriggerHandler {
|
||||
* </p>
|
||||
*/
|
||||
public final void clearDelayedTrigger() {
|
||||
delayedTriggers.clear();
|
||||
this.delayedTriggers.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user