...
 
Commits (15)
......@@ -6,7 +6,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-ai</artifactId>
......
......@@ -6,7 +6,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-core</artifactId>
......
......@@ -6,7 +6,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-game</artifactId>
......
......@@ -72,6 +72,7 @@ public class PlayEffect extends SpellAbilityEffect {
final Player controller = activator;
CardCollection tgtCards;
CardCollection showCards = new CardCollection();
if (sa.hasParam("Valid")) {
ZoneType zone = ZoneType.Hand;
......@@ -81,6 +82,9 @@ public class PlayEffect extends SpellAbilityEffect {
tgtCards = new CardCollection(
AbilityUtils.filterListByType(game.getCardsIn(zone), sa.getParam("Valid"), sa)
);
if ( sa.hasParam("ShowCards") ) {
showCards = new CardCollection(AbilityUtils.filterListByType(game.getCardsIn(zone), sa.getParam("ShowCards"), sa));
}
}
else if (sa.hasParam("AnySupportedCard")) {
List<PaperCard> cards = Lists.newArrayList(StaticData.instance().getCommonCards().getUniqueCards());
......@@ -140,7 +144,9 @@ public class PlayEffect extends SpellAbilityEffect {
final CardCollection saidNoTo = new CardCollection();
while (tgtCards.size() > saidNoTo.size() && saidNoTo.size() < amount && amount > 0) {
activator.getController().tempShowCards(showCards);
Card tgtCard = controller.getController().chooseSingleEntityForEffect(tgtCards, sa, "Select a card to play");
activator.getController().endTempShowCards();
if (tgtCard == null) {
return;
}
......
......@@ -6,7 +6,7 @@
<packaging.type>jar</packaging.type>
<build.min.memory>-Xms1024m</build.min.memory>
<build.max.memory>-Xmx1536m</build.max.memory>
<alpha-version>1.6.20.001</alpha-version>
<alpha-version>1.6.21.001</alpha-version>
<sign.keystore>keystore</sign.keystore>
<sign.alias>alias</sign.alias>
<sign.storepass>storepass</sign.storepass>
......@@ -19,7 +19,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-gui-android</artifactId>
......
......@@ -4,7 +4,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-gui-desktop</artifactId>
......
......@@ -82,7 +82,10 @@ public class GridArchetype {
}
public String getSeedDir(){
return set.getSetDir()+"/Seeds/"+archName.replace("_Seeded","");
String s = set.getSetDir()+"/Seeds/"+archName.replace("_Seeded","");
if (hasKeyword() && !keyword().equals(getCompName()))
s += "_"+keyword();
return s;
}
public void setSave() {
......@@ -123,9 +126,11 @@ public class GridArchetype {
}
public boolean isSeeded(){
boolean ret = false;
if (archName.contains("_Seeded"))
return true;
return false;
ret = true;
//System.out.println(archName + " isSeeded: "+ret);
return ret;
}
public void setKeyword(String value){
......@@ -133,6 +138,17 @@ public class GridArchetype {
setSave();
}
public GridArchetype(GridSet rs, String n, String k) {
tourney = rs.tourney;
format = rs.format;
set = rs;
archName = n;
setKeyword(k);
GridUtilities.loadProperties(archProperties, getArchDir() + "/archProperties.properties");
loadTribes();
}
public GridArchetype(GridSet rs, String n) {
tourney = rs.tourney;
format = rs.format;
......@@ -178,7 +194,7 @@ public class GridArchetype {
}
if (!colourWheels.containsKey(RenColour.Rainbow)) initWheel("Rainbow");
}
/*
if (archName.equals("Aggro")) {
if (!colourWheels.containsKey(RenColour.White)) initWheel("White");
if (!colourWheels.containsKey(RenColour.Blue)) initWheel("Blue");
......@@ -228,7 +244,6 @@ public class GridArchetype {
}else
initWheel(MTGFaction.tryValue(getCompName()).colour + "");
}
*/
}
......@@ -252,7 +267,7 @@ public class GridArchetype {
found = true;
else if (gt.blocked)
found = true;
else if (gt.getRunCount()>=10)
else if (gt.getRunCount()>=gt.getMinRuns())
found2 = true;
}
if (!found){
......@@ -263,7 +278,7 @@ public class GridArchetype {
if (!rx.contains(rc) || rc == rx)
continue;
for (GridTribe gt : colourWheels.get(rx).tribes){
if (found2 && gt.getRunCount()<10)
if (found2 && gt.getRunCount()<gt.getMinRuns())
continue;
if (GridTribe.tribeList.contains(gt))
GridTribe.tribeList.remove(gt);
......@@ -277,6 +292,8 @@ public class GridArchetype {
}
public void loadSeeds(){
if (!isSeeded())
return;
String[] seedFiles = GridUtilities.getFiles(getSeedDir());
GridSeed gs;
GridSeed sub;
......@@ -360,7 +377,30 @@ public class GridArchetype {
}
}
if (cw.tribes.size()<(cw.minElo()-1000)/100){
double count = cw.greatEloCount() + cw.greatRankCount();
GridTribe testTribe = cw.tribes.get(0);
GridArchetype testArch = testTribe.archetype;
if (testTribe.colour == RenColour.Red)
count ++;
if (testArch.keyword().equals("Aggro"))
count ++;
if (testArch.keyword().equals("Burn") && testTribe.colour.contains(RenColour.Red))
count ++;
if (testArch.keyword().equals("Control") && testArch.isSeeded()) {
if (testTribe.colour.contains(RenColour.Blue) || testTribe.colour.contains(RenColour.White)
|| testTribe.colour.contains(RenColour.Black))
count++;
}
if (isMeta())
count += 2;
count += cw.greatEloCount();
count += cw.greatRankCount();
//if (testTribe.getLadderRank().ordinal() > LadderRank.Gold.ordinal())
// count += testTribe.getLadderRank().ordinal() - LadderRank.Gold.ordinal();
if (cw.tribes.size()<count){
rt = getTribe(rc,tribeList.length,true);
}
}
......@@ -406,12 +446,20 @@ public class GridArchetype {
s = archName.replace("_Seeded","");
s = s.replace("SBMTG ","");
s = s.replace("Pro ","");
s = s.replace("Meta ","");
s = s.replace("Player ","");
s = s.replace("Advance ","");
s = s.replace("Legacy ","");
s = s.replace("Opponent ","");
return s;
}
public boolean isMeta() {
if (archName.contains("Meta") || archName.contains("Pro") ||
archName.contains("Player"))
return true;
return false;
}
/*
public RenewSeed getSeed(RenColour colour) {
ColourWheel cw;
......
......@@ -219,8 +219,8 @@ public class GridBoORound implements Runnable{
tribes[0].loadAllDecks();
tribes[1].loadAllDecks();
deadTier(tribes[0]);
deadTier(tribes[1]);
//deadTier(tribes[0]);
//deadTier(tribes[1]);
GridUtilities.Log(tribes[0].getViewName() +" ["+tribes[0].getElo()+"] vs "+tribes[1].getViewName()+" ["+tribes[1].getElo()+"]");
......@@ -229,24 +229,40 @@ public class GridBoORound implements Runnable{
GridDeck[] a2 = new GridDeck[2];
GridDeck buff;
int minTeir = Math.min(tribes[0].tier(), tribes[1].tier());
for (int x=0; x<13; x++) {
if (x == 12)
match = createMatch(tribes[0].decks[x], tribes[1].decks[x]);
else {
a1 = sortDecks(tribes[0].decks[x],tribes[0].decks[24-x]);
a2 = sortDecks(tribes[1].decks[x],tribes[1].decks[24-x]);
// if the weaker decks are both kicked out...
if (a1[1].getBoOLosses()>=3 && a2[1].getBoOLosses()>=3){
// we only pair the first ones
match = createMatch(a1[0], a2[0]);
} else {
// pair better with weaker
match = createMatch(a1[0], a2[1]);
match = createMatch(a1[1], a2[0]);
if (tribes[0].getLadderRank().ordinal() <= LadderRank.Gold.ordinal() &&
tribes[1].getLadderRank().ordinal() <= LadderRank.Gold.ordinal()) {
for (int x = 0; x < 13; x++) {
if (x == 12)
match = createMatch(tribes[0].decks[x], tribes[1].decks[x]);
else {
a1 = sortDecks(tribes[0].decks[x], tribes[0].decks[24 - x]);
a2 = sortDecks(tribes[1].decks[x], tribes[1].decks[24 - x]);
// if the weaker decks are both kicked out...
if (a1[1].getBoOLosses() >= 3 && a2[1].getBoOLosses() >= 3) {
// we only pair the first ones
match = createMatch(a1[0], a2[0]);
} else {
// pair better with weaker
match = createMatch(a1[0], a2[1]);
match = createMatch(a1[1], a2[0]);
}
}
}
} else {
ArrayList<GridDeck> list0 = new ArrayList();
ArrayList<GridDeck> list1 = new ArrayList();
for (int x = 0; x < tribes[0].decks.length; x++) {
list0.add(tribes[0].decks[x]);
list1.add(tribes[1].decks[x]);
}
list0.sort(GridDeck.LadderComparitor);
list1.sort(GridDeck.LadderComparitor);
for (int x = 0; x < Math.min(list0.size(), list1.size()); x++) {
match = createMatch(list0.get(x), list1.get(x));
}
}
while (!finished) {
pending(maxGames);
try {
......
package forge.screens.home.gengrid;
import com.sun.org.apache.bcel.internal.generic.LADD;
import java.util.ArrayList;
/**
......@@ -37,6 +39,42 @@ public class GridColourWheel {
}
return ohm;
}
public int greatEloCount(){
int ret =0;
int size = tribes.size();
int[] Counts = new int[10];
int test;
for (GridTribe rt : tribes){
test = Math.floorDiv((int)(rt.getElo()-1000),100);
for (int x = 0; x < test; x++){
Counts[x]++;
}
}
for (int x = 0; x < Counts.length; x++){
if (Counts[x] > x)
ret ++;
}
return ret;
}
public int greatRankCount(){
int ret =0;
int size = tribes.size();
int[] Counts = new int[3];
int test;
for (GridTribe rt : tribes){
test = rt.getLadderRank().ordinal() - LadderRank.Gold.ordinal();
if (test > 0) {
for (int x = 0; x < test; x++) {
Counts[x]++;
}
}
}
for (int x = 0; x < Counts.length; x++){
if (Counts[x] > x)
ret ++;
}
return ret;
}
//public void sortTribes(){
// tribes.sort(GridTribe.tribeAdjustedRunComparator);
......
......@@ -586,11 +586,11 @@ public class GridSet {
*/
if (newArch.size() >= 5)
return false;
return true;
return false; //change to if it's the newest set
}
public void loadArchetypes(GridTourney rt){
if (allowedColours.getIdent().length < 2)
if ( allowedColours.getIdent().length < 2)
return;
if (format.ordinal() > rt.highestBase.ordinal())
return;
......@@ -623,33 +623,28 @@ public class GridSet {
}
//}
/*if (setName.equals("M15")){
checkThemeColours("Selesnya");
}*/
/*
if (allowedColours.equals(RenColour.Rainbow)) {
if (!archetypes.containsKey("Aggro") && canCreateNewArch()){
getArchetype(rt, "Aggro");
}
if (!archetypes.containsKey("Control") && canCreateNewArch()) {
getArchetype(rt, "Control");
}
if (canCreateNewArch()) {
if (allowedColours.equals(RenColour.Rainbow)) {
if (!archetypes.containsKey("Aggro") && canCreateNewArch()) {
getArchetype(rt, "Aggro");
}
if (!archetypes.containsKey("Control") && canCreateNewArch()) {
getArchetype(rt, "Control");
}
if (allowedColours.equals(RenColour.Rainbow) && cardList.size() >= 200) {
if (!archetypes.containsKey("Budget") && canCreateNewArch())
getArchetype(rt, "Budget");
if (allowedColours.equals(RenColour.Rainbow) && cardList.size() >= 200) {
if (!archetypes.containsKey("Budget") && canCreateNewArch())
getArchetype(rt, "Budget");
if (!archetypes.containsKey("Rare") && canCreateNewArch())
getArchetype(rt, "Rare");
if (!archetypes.containsKey("Rare") && canCreateNewArch())
getArchetype(rt, "Rare");
if (!archetypes.containsKey("Mythic") && canCreateNewArch())`
if (!archetypes.containsKey("Mythic") && canCreateNewArch())
getArchetype(rt, "Mythic");
}
}
findThemes(rt);
}
findThemes(rt);
*/
//System.exit(1337);
}
......@@ -781,7 +776,7 @@ public class GridSet {
"Search","Draw","Exile","LifeGain","Graveyard","Prowess","Skulk","Deathtouch","Discard","Sacrifice",
"Deathtouch","Wall","Copy","Land","Devil","Bat","Return","Enters","Defender","Sea","Undead","Fiendish","Elfball","Aether","Lifelink","Blocker",
"Colourless","Reanimator","Drain","Prevent","Dies","Battlefield","Freebies","Indestructible", "Abilities",
"Multicolor"};
"Multicolor","Dies"};
String seed = themes[rand.nextInt(themes.length)];
checkThemeColours(seed);
}
......@@ -812,16 +807,30 @@ public class GridSet {
//} else {}
}
public GridArchetype getArchetype(GridTourney rt, String archName){
if (archName.equals("Bolas"))
archName = "Nicol Bolas";
if (!archetypes.containsKey(archName)) {
GridArchetype ra;
ra = new GridArchetype(this, archName);
archetypes.put(archName, ra);
public GridArchetype getArchetype(GridTourney rt, String archName) {
String s = archName;
boolean isSeed = s.contains("_Seeded");
if (isSeed)
s = s.replace("_Seeded", "");
GridArchetype ra;
if (s.equals("Bolas"))
s = "Nicol Bolas";
String sa[] = s.split("_");
s = sa[0];
if (isSeed)
s += "_Seeded";
if (!archetypes.containsKey(s)) {
if (sa.length > 1)
ra = new GridArchetype(this, s, sa[1]);
else
ra = new GridArchetype(this, s);
archetypes.put(s, ra);
}
ra = archetypes.get(s);
// System.exit(1);
return archetypes.get(archName);
return ra;
}
public Integer[] colourCounts;
......
......@@ -24,7 +24,7 @@ public class GridTourney implements Runnable {
public static final boolean viewGames = true;
public static ArchID forceArch = null;//new ArchID(GridFormat.Arena, RenColour.Simic, "Extra Turn");
public static GridFormat highestBase = GridFormat.Origin;
public static GridFormat highestBase = GridFormat.Year;
public static final boolean loadPreBase = false;//ShivaUtility.rand.nextBoolean();
public static final boolean loadDerp = false;// !viewGames;
public static boolean useAdjustedForBest = true;//doBestDeck ? false : true;//!viewGames;
......@@ -368,6 +368,8 @@ public class GridTourney implements Runnable {
}
possibleCompetitors.sort(GridTribe.tribeAdjustedRunComparator);
}
if (doBestTribe || doBestDeck && possibleCompetitors.size() < 4)
possibleCompetitors.clear();
if (possibleCompetitors.size() == 0) {
if (loop >= 5) {
if (GridSet.sub10.size() > 0)
......@@ -393,7 +395,7 @@ public class GridTourney implements Runnable {
String elo = ((int) Math.round(t.getElo())) + "";
while (elo.length() < 4)
elo += " ";
GridUtilities.Log("TribeList", String.format("%s\t%f\t%s\t%d\tTier:%d\t%f", t.getMarginName(), t.adjustedNumTourneys(0), elo, t.getRunCount(), t.tier(), t.getBestTrueElo()));
GridUtilities.Log("TribeList", String.format("%s\t%f\t%s\t%d\t%f\t%s", t.getMarginName(), t.adjustedNumTourneys(0), elo, t.getRunCount(), t.getBestTrueElo(),t.getLadderDisplay()));
}
if (possibleCompetitors.get(0).getRunCount() % 10 == 0)
main = possibleCompetitors.get(0);
......@@ -405,9 +407,9 @@ public class GridTourney implements Runnable {
//choice = 4;
main = possibleCompetitors.get(choice);
if (possibleCompetitors.size() > 3 && choice != 0) {
if (main.getRunCount() <= 10 && possibleCompetitors.get(0).tier() > main.tier())
if (main.getRunCount() <= main.getMinRuns() && possibleCompetitors.get(0).tier() > main.tier())
main = possibleCompetitors.get(0);
else if (main.getRunCount() > 10 && possibleCompetitors.get(0).tier() < main.tier())
else if (main.getRunCount() > main.getMinRuns() && possibleCompetitors.get(0).tier() < main.tier())
main = possibleCompetitors.get(0);
else if (Math.floor(main.getRecordRunCount()/50) > Math.floor(possibleCompetitors.get(0).getRecordRunCount()/50))
main = possibleCompetitors.get(0);
......@@ -447,9 +449,14 @@ public class GridTourney implements Runnable {
ArrayList<GridTribe> possibleCompetitors = new ArrayList<>();
for (GridTribe tribe : GridTribe.tribeList) {
if (tribe == main)
continue;
if (!tribe.isMeta() || rand.nextInt(100)<60)
continue;
if (!CompatibleFormats(main.set.format, tribe.set.format))
continue;
if (main.playedThisRun.contains(tribe)){
if (!tribe.isMeta() || rand.nextInt(100)<60)
continue;
}
diff = Math.abs(tribe.getElo() - main.getElo());
if (tribe.getElo() > main.getElo())
diff /= 2;
......@@ -467,7 +474,7 @@ public class GridTourney implements Runnable {
GridTribe temp = null;
for (int x = 0; x<possibleCompetitors.size(); x++){
temp = possibleCompetitors.get(x);
if (temp.getElo() > main.getElo()){
if (temp.getElo() > main.getElo() && temp.getLadderRank() == main.getLadderRank()){
possibleCompetitors.remove(temp);
possibleCompetitors.add(0, temp);
break;
......@@ -476,25 +483,28 @@ public class GridTourney implements Runnable {
if (possibleCompetitors.size() == 0)
tokenAndQuit("Not enough competitors",-42);
GridTribe foe = possibleCompetitors.get(rand.nextInt(Math.min(3,possibleCompetitors.size())));
if (foe.tier() != main.tier() && possibleCompetitors.get(0).tier() == main.tier())
if (foe.getLadderRank() != main.getLadderRank() && possibleCompetitors.get(0).getLadderRank() == main.getLadderRank())
foe = possibleCompetitors.get(0);
foe.checkBreed();
System.out.println("Foe: "+foe.getViewName()+"\t["+foe.tier()+"]");
if (foe == main){
main.playedThisRun.add(foe);
foe.playedThisRun.add(main);
if (foe == main && rand.nextInt(100)<60) {
getFoe(main);
return;
}
if (foe.tier() != main.tier()) {
/*if (foe.tier() != main.tier()) {
for (GridTribe gt : possibleCompetitors){
if (gt.tier() == main.tier()){
foe = gt;
break;
}
}
}
}*/
main.miniBreaker();
foe.miniBreaker();
......@@ -502,6 +512,7 @@ public class GridTourney implements Runnable {
startBoORound(main, foe);
}
public void startBoORound(GridTribe main, GridTribe foe){
GridBoORound rr = new GridBoORound(main, foe, doBestTribe ? 16 : 8, viewGames);
Thread t = new Thread(rr);
......
......@@ -166,6 +166,8 @@ public class GridUtilities {
public static void Log(String val){Log(lastKey,val);}
public static void Log(String key, String val){
//if (key.equals("save")) return;
if (!GridTourney.activeTourney.viewGames)
return;
String prev = lastKey;
lastKey = key;
......@@ -490,6 +492,8 @@ public class GridUtilities {
if (theme.equals("Tokens")) {
if (textSearch(pc, "fabricate"))
return true;
if (textSearch(pc, "afterlife"))
return true;
return checkTheme(pc, "Token");
}
if (theme.equals("PlusPlus")) {
......@@ -836,7 +840,8 @@ public class GridUtilities {
return true;
}
if (s.equals("Cat") || s.equals("Bat") || s.equals("Rat") || s.equals("Orc") || s.equals("Sea") || s.equals("Imp")){
if (s.equals("Cat") || s.equals("Bat") || s.equals("Rat") || s.equals("Orc") ||
s.equals("Sea") || s.equals("Imp") || s.equals("Die")){
if (textSearch(icf,s+"s "))
return true;
s = " "+s+" ";
......@@ -850,6 +855,13 @@ public class GridUtilities {
if (textSearch(icf, "Dwarves"))
return true;
if (s.equals("Dies")) {
if (textSearch(icf, "Die"))
return true;
if (textSearch(icf, "Dying"))
return true;
}
String n = icf.getOracleText().toLowerCase();
String t = s.toLowerCase();
......
package forge.screens.home.gengrid;
/**
* Created by AquamentosGames on 23/02/2019.
*/
public enum LadderRank {
Bronze (2,0,4),
Silver (2,1,5),
Gold (1,1,6),
Platinum (1,1,7),
Diamond (1,1,7),
Mythic (1,1,10);
public static final LadderRank values[] = values();
public int gain;
public int loss;
public int steps;
LadderRank(int gain, int loss, int steps){
this.gain = gain;
this.loss = loss;
this.steps = steps;
}
}
......@@ -83,6 +83,10 @@ public enum RenewGeneType {
}
else if (this == planeswalker){
if (pc.getRules().getType().isPlaneswalker()) return true;
if (pc.getRules().getOtherPart() != null &&
pc.getRules().getOtherPart().getType().isPlaneswalker())
return true;
if (pc.getName().equals("The Immortal Sun")) return true;
}
else if (this == control){
if (planeswalker.isType(pc)) return false;
......
......@@ -6,13 +6,13 @@
<packaging.type>jar</packaging.type>
<build.min.memory>-Xms128m</build.min.memory>
<build.max.memory>-Xmx2048m</build.max.memory>
<alpha-version>1.6.20.001</alpha-version>
<alpha-version>1.6.21.001</alpha-version>
</properties>
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-gui-ios</artifactId>
......
......@@ -4,7 +4,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-gui-mobile-dev</artifactId>
......
......@@ -4,7 +4,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-gui-mobile</artifactId>
......
......@@ -34,7 +34,7 @@ import java.util.List;
import java.util.Stack;
public class Forge implements ApplicationListener {
public static final String CURRENT_VERSION = "1.6.20.001";
public static final String CURRENT_VERSION = "1.6.21.001";
private static final ApplicationListener app = new Forge();
private static Clipboard clipboard;
......
......@@ -4,7 +4,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-gui</artifactId>
......
- Ordering Pop-up Zones -
In the desktop interface the pop-up windows showing players' zones can be ordered as the cards in the zone are or by card name. Right click in the window title to toggle between the two orderings.
- Bug fixes -
As always, this release of Forge features an assortment of bug fixes and improvements based on user feedback during the previous release run.
......@@ -5,7 +5,7 @@ T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$
SVar:TrigEnergy:DB$ PutCounter | Defined$ You | CounterType$ ENERGY | CounterNum$ 1
A:AB$ PeekAndReveal | Cost$ T PayEnergy<6> | Defined$ You | PeekAmount$ 6 | NoReveal$ True | RememberPeeked$ True | SubAbility$ DBPlay | SpellDescription$ Look at the top six cards of your library. You may cast a card from among them without paying its mana cost. Put the rest on the bottom of your library in a random order.
SVar:DBPlay:DB$ Play | ValidZone$ Library | Valid$ Card.IsRemembered+nonLand | Controller$ You | WithoutManaCost$ True | Optional$ True | Amount$ 1 | ForgetTargetRemembered$ True | SubAbility$ DBRestRandomOrder
SVar:DBRestRandomOrder:DB$ ChangeZone | Defined$ Remembered | AtRandom$ True | Origin$ Library | Destination$ Library | LibraryPosition$ -1 | SubAbility$ DBCleanup
SVar:DBRestRandomOrder:DB$ ChangeZone | Defined$ Remembered | AtRandom$ True | Origin$ Library | Destination$ Library | LibraryPosition$ -1 | Shuffle$ False | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/aetherworks_marvel.jpg
Oracle:Whenever a permanent you control is put into a graveyard, you get {E} (an energy counter).\n{T}, Pay {E}{E}{E}{E}{E}{E}: Look at the top six cards of your library. You may cast a card from among them without paying its mana cost. Put the rest on the bottom of your library in a random order.
......@@ -17,5 +17,5 @@ SVar:DBSac:DB$ Sacrifice | Defined$ Player.IsRemembered | SacValid$ Card.ChosenC
SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X | References$ X | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:RememberedLKI$CardPower
SVar:NeedsToPlay:Creature.OppCtrl
SVar:SplitNeedsToPlay:Creature.OppCtrl
Oracle:Target player sacrifices a creature with the greatest power among creatures they control. You gain life equal to its power.
\ No newline at end of file
......@@ -2,10 +2,10 @@ Name:Sunbird's Invocation
ManaCost:5 R
Types:Enchantment
T:Mode$ SpellCast | ValidCard$ Card.wasCastFromHand | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDig | TriggerDescription$ Whenever you cast a spell from your hand, reveal the top X cards of your library, where X is that spell's converted mana cost. You may cast a card revealed this way with converted mana cost X or less without paying its mana cost. Put the rest on the bottom of your library in a random order.
SVar:TrigDig:DB$ Dig | DigNum$ X | Reveal$ True | RememberRevealed$ True | ChangeNum$ 0 | RestRandomOrder$ True | References$ X | SubAbility$ DBPlay
SVar:DBPlay:DB$ Play | Valid$ Card.nonLand+IsRemembered+cmcLEX | WithoutManaCost$ True | Optional$ True | Amount$ 1 | ValidZone$ Library | SubAbility$ DBCleanup
SVar:TrigDig:DB$ PeekAndReveal | Defined$ You | PeekAmount$ X | RememberRevealed$ True | SubAbility$ DBPlay
SVar:DBPlay:DB$ Play | ValidZone$ Library | Valid$ Card.nonLand+IsRemembered+cmcLEX | WithoutManaCost$ True | Optional$ True | Amount$ 1 | ShowCards$ Card.IsRemembered | ForgetTargetRemembered$ True | SubAbility$ DBRestRandomOrder
SVar:DBRestRandomOrder:DB$ ChangeZone | Defined$ Remembered | AtRandom$ True | Origin$ Library | Destination$ Library | LibraryPosition$ -1 | Shuffle$ False | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:TriggerCount$CastSACMC
SVar:Y:Number$0
SVar:Picture:http://media.wizards.com/2017/xln/en_wZkZ5jvNGp.png
Oracle:Whenever you cast a spell from your hand, reveal the top X cards of your library, where X is that spell's converted mana cost. You may cast a card revealed this way with converted mana cost X or less without paying its mana cost. Put the rest on the bottom of your library in a random order.
\ No newline at end of file
Oracle:Whenever you cast a spell from your hand, reveal the top X cards of your library, where X is that spell's converted mana cost. You may cast a card revealed this way with converted mana cost X or less without paying its mana cost. Put the rest on the bottom of your library in a random order.
......@@ -135,7 +135,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
return mayLookAtAllCards;
}
private final Set<Card> tempShownCards = Sets.newHashSet();
private final ArrayList<Card> tempShownCards = new ArrayList<Card>();
public <T> void tempShow(final Iterable<T> objects) {
for (final T t : objects) {
......@@ -158,10 +158,6 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
@Override
public void tempShowCards(final Iterable<Card> cards) {
if (mayLookAtAllCards) {
return;
} // no needed if this is set
for (final Card c : cards) {
tempShowCard(c);
}
......
......@@ -5,7 +5,7 @@
<artifactId>forge</artifactId>
<packaging>pom</packaging>
<name>Forge Parent</name>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
<description>
Forge lets you play the card game Magic: The Gathering against a computer opponent using all of the rules.
......