Changes to Random modes and improved filters
Improved search restriction by type, allow you to search for "enchantment creature" or "legendary artifact", the engine no longer excludes or prevents searching two "types".
This commit is contained in:
+12
-11
@@ -368,12 +368,12 @@ Player * Rules::loadPlayerRandomThree(GameObserver* observer, int isAI)
|
|||||||
string lands[] = { "", "forest", "island", "mountain", "swamp", "plains", "" };
|
string lands[] = { "", "forest", "island", "mountain", "swamp", "plains", "" };
|
||||||
|
|
||||||
MTGDeck * tempDeck = NEW MTGDeck(MTGCollection());
|
MTGDeck * tempDeck = NEW MTGDeck(MTGCollection());
|
||||||
tempDeck->addRandomCards(4, 0, 0, -1, lands[color1].c_str());
|
tempDeck->addRandomCards(5, 0, 0, -1, lands[color1].c_str());
|
||||||
tempDeck->addRandomCards(4, 0, 0, -1, lands[color2].c_str());
|
tempDeck->addRandomCards(5, 0, 0, -1, lands[color2].c_str());
|
||||||
tempDeck->addRandomCards(4, 0, 0, -1, lands[color3].c_str());
|
tempDeck->addRandomCards(5, 0, 0, -1, lands[color3].c_str());
|
||||||
tempDeck->addRandomCards(4, 0, 0, 'R', lands[color1].c_str());
|
tempDeck->addRandomCards(3, 0, 0, 'R', lands[color1].c_str());
|
||||||
tempDeck->addRandomCards(4, 0, 0, 'R', lands[color2].c_str());
|
tempDeck->addRandomCards(3, 0, 0, 'R', lands[color2].c_str());
|
||||||
tempDeck->addRandomCards(4, 0, 0, 'R', lands[color3].c_str());
|
tempDeck->addRandomCards(3, 0, 0, 'R', lands[color3].c_str());
|
||||||
tempDeck->addRandomCards(1, 0, 0, 'U', "land");
|
tempDeck->addRandomCards(1, 0, 0, 'U', "land");
|
||||||
tempDeck->addRandomCards(1, 0, 0, 'R', "land");
|
tempDeck->addRandomCards(1, 0, 0, 'R', "land");
|
||||||
tempDeck->addRandomCards(18, 0, 0, -1, "creature", colors, nbcolors);
|
tempDeck->addRandomCards(18, 0, 0, -1, "creature", colors, nbcolors);
|
||||||
@@ -401,9 +401,9 @@ Player * Rules::loadPlayerRandomFive(GameObserver* observer, int isAI)
|
|||||||
{
|
{
|
||||||
MTGDeck * tempDeck = NEW MTGDeck(MTGCollection());
|
MTGDeck * tempDeck = NEW MTGDeck(MTGCollection());
|
||||||
|
|
||||||
tempDeck->addRandomCards(20, 0, 0, -1, "land");
|
tempDeck->addRandomCards(24, 0, 0, -1, "land");
|
||||||
tempDeck->addRandomCards(10, 0, 0, -1, "legendary");
|
tempDeck->addRandomCards(10, 0, 0, -1, "legendary");
|
||||||
tempDeck->addRandomCards(30, 0, 0, -1, "");
|
tempDeck->addRandomCards(26, 0, 0, -1, "");
|
||||||
|
|
||||||
string deckFile = "random";
|
string deckFile = "random";
|
||||||
string deckFileSmall = "random";
|
string deckFileSmall = "random";
|
||||||
@@ -465,12 +465,13 @@ Player * Rules::loadPlayerHorde(GameObserver* observer, int isAI)
|
|||||||
|
|
||||||
MTGDeck * tempDeck = NEW MTGDeck(MTGCollection());
|
MTGDeck * tempDeck = NEW MTGDeck(MTGCollection());
|
||||||
tempDeck->addRandomCards(14, 0, 0, -1, lands[tribeColor[0]].c_str());
|
tempDeck->addRandomCards(14, 0, 0, -1, lands[tribeColor[0]].c_str());
|
||||||
tempDeck->addRandomCards(5, 0, 0, 'R', lands[tribeColor[0]].c_str());
|
tempDeck->addRandomCards(6, 0, 0, 'R', lands[tribeColor[0]].c_str());
|
||||||
tempDeck->addRandomCards(5, 0, 0, -1, "land");
|
tempDeck->addRandomCards(4, 0, 0, -1, "land");
|
||||||
tempDeck->addRandomCards(21, 0, 0, -1, randomTribe);
|
tempDeck->addRandomCards(20, 0, 0, -1, randomTribe);
|
||||||
tempDeck->addRandomCards(5, 0, 0, -1, "enchantment", tribeColor, nbColors);
|
tempDeck->addRandomCards(5, 0, 0, -1, "enchantment", tribeColor, nbColors);
|
||||||
tempDeck->addRandomCards(5, 0, 0, -1, "instant", tribeColor, nbColors);
|
tempDeck->addRandomCards(5, 0, 0, -1, "instant", tribeColor, nbColors);
|
||||||
tempDeck->addRandomCards(5, 0, 0, -1, "sorcery", tribeColor, nbColors);
|
tempDeck->addRandomCards(5, 0, 0, -1, "sorcery", tribeColor, nbColors);
|
||||||
|
tempDeck->addRandomCards(1, 0, 0, -1, "artifact", tribeColor, nbColors);
|
||||||
|
|
||||||
string deckFile = "random";
|
string deckFile = "random";
|
||||||
string deckFileSmall = "random";
|
string deckFileSmall = "random";
|
||||||
|
|||||||
@@ -1967,6 +1967,7 @@ bool WGuiFilters::isAvailable(int type)
|
|||||||
if (!wgfi || wgfi->mState != WGuiFilterItem::STATE_FINISHED) continue;
|
if (!wgfi || wgfi->mState != WGuiFilterItem::STATE_FINISHED) continue;
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
case WGuiFilterItem::FILTER_TYPE:
|
||||||
case WGuiFilterItem::FILTER_SUBTYPE:
|
case WGuiFilterItem::FILTER_SUBTYPE:
|
||||||
case WGuiFilterItem::FILTER_BASIC:
|
case WGuiFilterItem::FILTER_BASIC:
|
||||||
return true;
|
return true;
|
||||||
@@ -2166,7 +2167,7 @@ void WGuiFilterItem::updateValue()
|
|||||||
}
|
}
|
||||||
else if (filterType == FILTER_TOUGH)
|
else if (filterType == FILTER_TOUGH)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 17; i++)
|
for (int i = 0; i < 18; i++)
|
||||||
{
|
{
|
||||||
sprintf(buf_code, "tgh:%i;", i);
|
sprintf(buf_code, "tgh:%i;", i);
|
||||||
sprintf(buf_name, "%i toughness", i);
|
sprintf(buf_name, "%i toughness", i);
|
||||||
|
|||||||
Reference in New Issue
Block a user