From 503159ff6f51465f404d7961f6218a17c68e389f Mon Sep 17 00:00:00 2001 From: zethfoxster Date: Sun, 19 Jun 2016 09:25:41 -0400 Subject: [PATCH 1/2] adding hints that seemed to have disappeared --- projects/mtg/bin/Res/ai/baka/deck104.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/mtg/bin/Res/ai/baka/deck104.txt b/projects/mtg/bin/Res/ai/baka/deck104.txt index 127beade2..896c2034a 100644 --- a/projects/mtg/bin/Res/ai/baka/deck104.txt +++ b/projects/mtg/bin/Res/ai/baka/deck104.txt @@ -1,5 +1,11 @@ #NAME:Kill by Numbers #DESC:They just keep multiplying. +#HINT:castpriority(enchantment,instant,sorcery,artifact,creature) +#HINT:dontattackwith(Rhys the Redeemed) +#HINT:dontblockwith(Rhys the Redeemed) +#HINT:dontattackwith(Kazandu Tuskcaller) +#HINT:dontblockwith(Kazandu Tuskcaller) + Mox Emerald (LEA) *2 Mox Pearl (LEA) *2 Forest (LEA) *15 From 7b6de7bbd8064a7a73f92a117f88acba32be2244 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 20 Jun 2016 03:03:35 +0800 Subject: [PATCH 2/2] Update StorageOptions.java forcemount if you have forcemount file --- .../src/net/wagic/utils/StorageOptions.java | 60 ++++++++++++++----- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java b/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java index 95b712017..e90a5fa7a 100644 --- a/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java +++ b/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java @@ -25,10 +25,14 @@ public class StorageOptions public static void determineStorageOptions() { initializeMountPoints(); - readMountsFileTest(); + if (findForcemount()){ + readMountsFileTest(); + } readMountsFile(); readVoldFile(); - removeDuplicates(mMounts); + if (findForcemount()){ + removeDuplicates(mMounts); + } compareMountsWithVold(); testAndCleanMountsList(); setProperties(); @@ -201,7 +205,7 @@ public class StorageOptions mMounts.remove(i--); } - if (t == 0 && Build.VERSION.SDK_INT >= 16) + if (t == 0 && Build.VERSION.SDK_INT >= 16 && findForcemount()) {//if none is found lets force it for Jellybean and above... if (System.getenv("EXTERNAL_STORAGE") != null) { @@ -210,7 +214,7 @@ public class StorageOptions { if(!isRooted()) { - File folder = new File(System.getenv("EXTERNAL_STORAGE")+"/Android/data/net.wagic.app/files"); + File folder = new File(System.getenv("EXTERNAL_STORAGE")+"/Android/data/net.wagic.app"); folder.mkdirs(); mMounts.add(folder.toString()); } @@ -228,7 +232,7 @@ public class StorageOptions { if(!isRooted()) { - File folder = new File(System.getenv("SECONDARY_STORAGE")+"/Android/data/net.wagic.app/files"); + File folder = new File(System.getenv("SECONDARY_STORAGE")+"/Android/data/net.wagic.app"); folder.mkdirs(); mMounts.add(folder.toString()); } @@ -250,16 +254,28 @@ public class StorageOptions ArrayList mLabels = new ArrayList(); int i = 1; - for (String path : mMounts) - { // TODO: /mnt/sdcard is assumed to always mean internal storage. Use this comparison until there is a better way to do this - if ("/mnt/sdcard".equalsIgnoreCase(path) || "/storage/sdcard0".equalsIgnoreCase(path)) - mLabels.add("Internal SD " + "[" + path + "]"); - else if (path.contains("emulated")) - mLabels.add("Emulated SD " + " [" + path + "]"); - else - mLabels.add("External SD " + " [" + path + "]"); + if(findForcemount()){ + for (String path : mMounts) + {//with forcemount menu + if ("/mnt/sdcard".equalsIgnoreCase(path) || "/storage/sdcard0".equalsIgnoreCase(path)) + mLabels.add("Internal SD " + "[" + path + "]"); + else if (path.contains("emulated")) + mLabels.add("Emulated SD " + " [" + path + "]"); + else + mLabels.add("External SD " + " [" + path + "]"); + } } - + else + { + for (String path : mMounts) + { // TODO: /mnt/sdcard is assumed to always mean internal storage. Use this comparison until there is a better way to do this + if ("/mnt/sdcard".equalsIgnoreCase(path)) + mLabels.add("Built-in Storage"); + else + mLabels.add("External SD Card " + i++); + } + } + labels = new String[mLabels.size()]; mLabels.toArray(labels); @@ -358,4 +374,20 @@ public class StorageOptions return executedSuccesfully; } + + private static boolean findForcemount(){ + try + { + File file = new File(System.getenv("EXTERNAL_STORAGE")+"/forcemount"); + if (file.exists()) + { + return true; + } + } + catch (Exception e1) + { + return false; + } + return false; + } }