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