mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 17:58:01 +00:00
Cleanup
This commit is contained in:
@@ -607,7 +607,6 @@ public class AiAttackController {
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
private final GameEntity chooseDefender(final Combat c, final boolean bAssault) {
|
||||
|
||||
@@ -1645,7 +1645,6 @@ public class AiController {
|
||||
// For non-converted triggers (such as Cumulative Upkeep) that don't have costs or targets to worry about
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1107,8 +1107,10 @@ public class ComputerUtil {
|
||||
creatures2.add(creatures.get(i));
|
||||
}
|
||||
}
|
||||
return ((creatures2.size() + CardUtil.getThisTurnCast("Creature.YouCtrl", vengevines.get(0)).size()) > 1)
|
||||
&& card.isCreature() && card.getManaCost().getCMC() <= 3;
|
||||
if (((creatures2.size() + CardUtil.getThisTurnCast("Creature.YouCtrl", vengevines.get(0)).size()) > 1)
|
||||
&& card.isCreature() && card.getManaCost().getCMC() <= 3) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -79,7 +79,7 @@ public class Forge implements ApplicationListener {
|
||||
to prevent rendering issue when you try to restart
|
||||
the app again (seems it doesnt dispose correctly...?!?)
|
||||
*/
|
||||
Gdx.input.setCatchBackKey(true);
|
||||
Gdx.input.setCatchKey(Keys.BACK, true);
|
||||
destroyThis = true; //Prevent back()
|
||||
ForgePreferences prefs = new ForgePreferences();
|
||||
|
||||
@@ -126,8 +126,7 @@ public class Forge implements ApplicationListener {
|
||||
|
||||
SoundSystem.instance.setBackgroundMusic(MusicPlaylist.MENUS); //start background music
|
||||
destroyThis = false; //Allow back()
|
||||
Gdx.input.setCatchBackKey(true);
|
||||
Gdx.input.setCatchMenuKey(true);
|
||||
Gdx.input.setCatchKey(Keys.MENU, true);
|
||||
openScreen(HomeScreen.instance);
|
||||
splashScreen = null;
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.ConnectException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.InetSocketAddress;
|
||||
@@ -29,6 +30,7 @@ import java.net.MalformedURLException;
|
||||
import java.net.Proxy;
|
||||
import java.net.URL;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
@@ -265,7 +267,9 @@ public abstract class GuiDownloadService implements Runnable {
|
||||
cardSkipped = true; //assume skipped unless saved successfully
|
||||
String url = kv.getValue();
|
||||
//decode URL Key
|
||||
String decodedKey = URLDecoder.decode(kv.getKey());
|
||||
String decodedKey = "";
|
||||
try { decodedKey = URLDecoder.decode(kv.getKey(), StandardCharsets.UTF_8.toString()); }
|
||||
catch (UnsupportedEncodingException e) { Log.error("UTF-8 is unknown", e); }
|
||||
final File fileDest = new File(decodedKey);
|
||||
final String filePath = fileDest.getPath();
|
||||
final String subLastIndex = filePath.contains("pics") ? "\\pics\\" : "\\db\\";
|
||||
|
||||
Reference in New Issue
Block a user