add options show tokens
you can display tokens in editor (show tokens and choose 0 manacost) but you can't add them, useful for tracking missing images...
This commit is contained in:
@@ -46,6 +46,7 @@ public:
|
|||||||
CHEATMODEAIDECK,
|
CHEATMODEAIDECK,
|
||||||
OSD,
|
OSD,
|
||||||
BLKBORDER,
|
BLKBORDER,
|
||||||
|
SHOWTOKENS,
|
||||||
CLOSEDHAND,
|
CLOSEDHAND,
|
||||||
HANDDIRECTION,
|
HANDDIRECTION,
|
||||||
MANADISPLAY,
|
MANADISPLAY,
|
||||||
|
|||||||
@@ -233,8 +233,8 @@ public:
|
|||||||
;
|
;
|
||||||
WCFilterSet(string arg);
|
WCFilterSet(string arg);
|
||||||
bool isMatch(MTGCard *c)
|
bool isMatch(MTGCard *c)
|
||||||
{
|
{//exclude negative id's and tokens
|
||||||
return (setid == MTGSets::ALL_SETS || c->setId == setid) && (c->getRarity() != Constants::RARITY_T); //removes viewing of card tokens. tokens will not display on spoiler and should not affect gameplay :)
|
return (setid == MTGSets::ALL_SETS || c->setId == setid) && ((c->getId() > 0) && (c->getRarity() != Constants::RARITY_T));
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
string getCode();
|
string getCode();
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ const string Options::optionNames[] = {
|
|||||||
"cheatmodedecks",
|
"cheatmodedecks",
|
||||||
"displayOSD",
|
"displayOSD",
|
||||||
"BlackBorder",
|
"BlackBorder",
|
||||||
|
"ShowTokens",
|
||||||
"closed_hand",
|
"closed_hand",
|
||||||
"hand_direction",
|
"hand_direction",
|
||||||
"mana_display",
|
"mana_display",
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ void GameStateOptions::Start()
|
|||||||
optionsList = NEW WGuiList("Game");
|
optionsList = NEW WGuiList("Game");
|
||||||
optionsList->Add(NEW WGuiHeader("Interface Options"));
|
optionsList->Add(NEW WGuiHeader("Interface Options"));
|
||||||
optionsList->Add(NEW OptionInteger(Options::BLKBORDER, "All Black Border"));
|
optionsList->Add(NEW OptionInteger(Options::BLKBORDER, "All Black Border"));
|
||||||
|
optionsList->Add(NEW OptionInteger(Options::SHOWTOKENS, "Show Tokens in Editor"));
|
||||||
optionsList->Add(NEW WDecoEnum(NEW OptionInteger(Options::CLOSEDHAND, "Closed hand", 1, 1, 0)));
|
optionsList->Add(NEW WDecoEnum(NEW OptionInteger(Options::CLOSEDHAND, "Closed hand", 1, 1, 0)));
|
||||||
optionsList->Add(NEW WDecoEnum(NEW OptionInteger(Options::HANDDIRECTION, "Hand direction", 1, 1, 0)));
|
optionsList->Add(NEW WDecoEnum(NEW OptionInteger(Options::HANDDIRECTION, "Hand direction", 1, 1, 0)));
|
||||||
optionsList->Add(NEW WDecoEnum(NEW OptionInteger(Options::MANADISPLAY, "Mana display", 3, 1, 0)));
|
optionsList->Add(NEW WDecoEnum(NEW OptionInteger(Options::MANADISPLAY, "Mana display", 3, 1, 0)));
|
||||||
|
|||||||
@@ -28,12 +28,18 @@ GuiAvatar::GuiAvatar(float x, float y, bool hasFocus, Player * player, Corner co
|
|||||||
|
|
||||||
void GuiAvatar::Render()
|
void GuiAvatar::Render()
|
||||||
{
|
{
|
||||||
|
GameObserver * game = player->getObserver();
|
||||||
JRenderer * r = JRenderer::GetInstance();
|
JRenderer * r = JRenderer::GetInstance();
|
||||||
int life = player->life;
|
int life = player->life;
|
||||||
int poisonCount = player->poisonCount;
|
int poisonCount = player->poisonCount;
|
||||||
int energyCount = player->energyCount;
|
int energyCount = player->energyCount;
|
||||||
WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT);
|
WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT);
|
||||||
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
|
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
|
||||||
|
TargetChooser * tc = NULL;
|
||||||
|
|
||||||
|
if (game)
|
||||||
|
tc = game->getCurrentTargetChooser();
|
||||||
|
|
||||||
//Avatar
|
//Avatar
|
||||||
int lifeDiff = life - currentLife;
|
int lifeDiff = life - currentLife;
|
||||||
if (lifeDiff < 0 && currentLife > 0)
|
if (lifeDiff < 0 && currentLife > 0)
|
||||||
@@ -74,6 +80,10 @@ void GuiAvatar::Render()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
player->getIcon()->SetColor(ARGB((int)actA, 255, avatarRed, avatarRed));
|
player->getIcon()->SetColor(ARGB((int)actA, 255, avatarRed, avatarRed));
|
||||||
|
if (tc && !tc->canTarget(player))
|
||||||
|
{
|
||||||
|
player->getIcon()->SetColor(ARGB((int)actA, 50, 50, 50));
|
||||||
|
}
|
||||||
r->RenderQuad(player->getIcon().get(), actX, actY, actT, Width/player->getIcon()->mWidth*actZ, Height/player->getIcon()->mHeight*actZ);
|
r->RenderQuad(player->getIcon().get(), actX, actY, actT, Width/player->getIcon()->mWidth*actZ, Height/player->getIcon()->mHeight*actZ);
|
||||||
if (mHasFocus)
|
if (mHasFocus)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -295,8 +295,15 @@ void WSrcCards::validate()
|
|||||||
updateCounts();
|
updateCounts();
|
||||||
if (!filtersRoot) return;
|
if (!filtersRoot) return;
|
||||||
for (size_t t = 0; t < cards.size(); t++)
|
for (size_t t = 0; t < cards.size(); t++)
|
||||||
{//don't add tokens or negative id
|
{
|
||||||
if (matchesFilters(cards[t]) && (cards[t]->getId() > 0) && (cards[t]->getRarity() != Constants::RARITY_T)) validated.push_back(t);
|
if(!options[Options::SHOWTOKENS].number)
|
||||||
|
{//don't add tokens or negative id
|
||||||
|
if (matchesFilters(cards[t]) && (cards[t]->getId() > 0) && (cards[t]->getRarity() != Constants::RARITY_T)) validated.push_back(t);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{//show but you cant add
|
||||||
|
if (matchesFilters(cards[t])) validated.push_back(t);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -391,8 +398,15 @@ WSrcUnlockedCards::WSrcUnlockedCards(float delay) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (it = ac->collection.begin(); it != ac->collection.end(); it++)
|
for (it = ac->collection.begin(); it != ac->collection.end(); it++)
|
||||||
{//no tokens or negative id's
|
{
|
||||||
if (it->second && unlocked[it->second->setId] && (it->second->getId() > 0) && (it->second->getRarity() != Constants::RARITY_T)) cards.push_back(it->second);
|
if(!options[Options::SHOWTOKENS].number)
|
||||||
|
{//dont show tokens & negative id's
|
||||||
|
if (it->second && unlocked[it->second->setId] && (it->second->getId() > 0) && (it->second->getRarity() != Constants::RARITY_T)) cards.push_back(it->second);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{//show but you cant add
|
||||||
|
if (it->second && unlocked[it->second->setId]) cards.push_back(it->second);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (unlocked)
|
if (unlocked)
|
||||||
{
|
{
|
||||||
@@ -416,10 +430,21 @@ int WSrcDeck::loadMatches(MTGDeck * deck)
|
|||||||
for (it = deck->cards.begin(); it != deck->cards.end(); it++)
|
for (it = deck->cards.begin(); it != deck->cards.end(); it++)
|
||||||
{
|
{
|
||||||
MTGCard * c = deck->getCardById(it->first);
|
MTGCard * c = deck->getCardById(it->first);
|
||||||
if (c && matchesFilters(c) && (c->getId() > 0) && (c->getRarity() != Constants::RARITY_T))
|
if(!options[Options::SHOWTOKENS].number)
|
||||||
{
|
{//dont show tokens & negative id's
|
||||||
Add(c, it->second);
|
if (c && matchesFilters(c) && (c->getId() > 0) && (c->getRarity() != Constants::RARITY_T))
|
||||||
count++;
|
{
|
||||||
|
Add(c, it->second);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{//show but you cant add
|
||||||
|
if (c && matchesFilters(c))
|
||||||
|
{
|
||||||
|
Add(c, it->second);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
validate();
|
validate();
|
||||||
|
|||||||
Reference in New Issue
Block a user