mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- CheckStyle.
This commit is contained in:
@@ -99,7 +99,7 @@ public class ReplacementHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (chosenRE != null) {
|
if (chosenRE != null) {
|
||||||
if(executeReplacement(runParams, chosenRE, decider)) {
|
if (executeReplacement(runParams, chosenRE, decider)) {
|
||||||
AllZone.getGameLog().add("ReplacementEffect", chosenRE.toString(), 2);
|
AllZone.getGameLog().add("ReplacementEffect", chosenRE.toString(), 2);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -124,7 +124,7 @@ public class ReplacementHandler {
|
|||||||
|
|
||||||
SpellAbility effectSA = null;
|
SpellAbility effectSA = null;
|
||||||
|
|
||||||
if(mapParams.containsKey("ReplaceWith")) {
|
if (mapParams.containsKey("ReplaceWith")) {
|
||||||
String effectSVar = mapParams.get("ReplaceWith");
|
String effectSVar = mapParams.get("ReplaceWith");
|
||||||
String effectAbString = replacementEffect.getHostCard().getSVar(effectSVar);
|
String effectAbString = replacementEffect.getHostCard().getSVar(effectSVar);
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ public class ReplacementHandler {
|
|||||||
//Decider gets to choose wether or not to apply the replacement.
|
//Decider gets to choose wether or not to apply the replacement.
|
||||||
if (replacementEffect.getMapParams().containsKey("Optional")) {
|
if (replacementEffect.getMapParams().containsKey("Optional")) {
|
||||||
Player optDecider = decider;
|
Player optDecider = decider;
|
||||||
if(mapParams.containsKey("OptionalDecider") && effectSA != null) {
|
if (mapParams.containsKey("OptionalDecider") && effectSA != null) {
|
||||||
optDecider = AbilityFactory.getDefinedPlayers(replacementEffect.getHostCard(), mapParams.get("OptionalDecider"), effectSA).get(0);
|
optDecider = AbilityFactory.getDefinedPlayers(replacementEffect.getHostCard(), mapParams.get("OptionalDecider"), effectSA).get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,7 +153,7 @@ public class ReplacementHandler {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//AI-logic
|
//AI-logic
|
||||||
if(!replacementEffect.aiShouldRun(effectSA)) {
|
if (!replacementEffect.aiShouldRun(effectSA)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -310,7 +310,11 @@ public class FModel {
|
|||||||
return this.gameState;
|
return this.gameState;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** TODO: Needs to be reworked for efficiency with rest of prefs saves in codebase. */
|
/**
|
||||||
|
* TODO: Needs to be reworked for efficiency with rest of prefs saves in codebase.
|
||||||
|
*
|
||||||
|
* @return a boolean.
|
||||||
|
*/
|
||||||
public final boolean savePrefs() {
|
public final boolean savePrefs() {
|
||||||
final ForgePreferences fp = preferences;
|
final ForgePreferences fp = preferences;
|
||||||
final List<ViewField> fieldViews = Singletons.getView().getMatchView().getFieldViews();
|
final List<ViewField> fieldViews = Singletons.getView().getMatchView().getFieldViews();
|
||||||
@@ -354,7 +358,11 @@ public class FModel {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** TODO: Needs to be reworked for efficiency with rest of prefs loads in codebase. */
|
/**
|
||||||
|
* TODO: Needs to be reworked for efficiency with rest of prefs loads in codebase.
|
||||||
|
*
|
||||||
|
* @return a boolean.
|
||||||
|
*/
|
||||||
public final boolean loadPrefs() {
|
public final boolean loadPrefs() {
|
||||||
final ForgePreferences fp = Singletons.getModel().getPreferences();
|
final ForgePreferences fp = Singletons.getModel().getPreferences();
|
||||||
final List<ViewField> fieldViews = Singletons.getView().getMatchView().getFieldViews();
|
final List<ViewField> fieldViews = Singletons.getView().getMatchView().getFieldViews();
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public class SectionUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Map<String, String> parseKvPairs(List<String> lines) {
|
public static Map<String, String> parseKvPairs(List<String> lines) {
|
||||||
Map<String,String> result = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
|
Map<String, String> result = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
|
||||||
|
|
||||||
for (final String dd : lines) {
|
for (final String dd : lines) {
|
||||||
final String[] v = dd.split(":", 2);
|
final String[] v = dd.split(":", 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user