This commit is contained in:
Anthony Calosa
2019-09-03 22:13:35 +08:00
parent 38b07d6185
commit efa606783c
6 changed files with 558 additions and 197 deletions

View File

@@ -607,7 +607,6 @@ public class AiAttackController {
}
return false;
}
private final GameEntity chooseDefender(final Combat c, final boolean bAssault) {

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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;

View File

@@ -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\\";