Merge pull request #951 from kevlahnota/master
Show large images on grid deck view user option
This commit is contained in:
@@ -7995,7 +7995,7 @@ type=Enchantment
|
||||
[/card]
|
||||
[card]
|
||||
name=Awe for the Guilds
|
||||
auto=all(creature[-multicolor]) cantblock ueot
|
||||
auto=all(creature[-multicolor;-colorless]) cantblock ueot
|
||||
text=Monocolored creatures can't block this turn.
|
||||
mana={2}{R}
|
||||
type=Sorcery
|
||||
@@ -51183,7 +51183,7 @@ toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
name=Guardian of the Guildpact
|
||||
auto=protection from(*[-multicolor])
|
||||
auto=protection from(*[-multicolor;-colorless])
|
||||
text=Protection from monocolored
|
||||
mana={3}{W}
|
||||
type=Creature
|
||||
@@ -61893,8 +61893,7 @@ toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Kavu Runner
|
||||
abilities=haste
|
||||
auto=aslongas(creature[blue;white]|opponentBattlefield) -haste
|
||||
auto=aslongas(creature[blue;white]|opponentBattlefield) haste <1
|
||||
text=Kavu Runner has haste as long as no opponent controls a white or blue creature.
|
||||
mana={3}{R}
|
||||
type=Creature
|
||||
@@ -115127,7 +115126,7 @@ type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Sultai Charm
|
||||
auto=choice name(Destroy monocolored) destroy target(creature[-multicolor])
|
||||
auto=choice name(Destroy monocolored) destroy target(creature[-multicolor;-colorless])
|
||||
auto=choice name(destroy artifact or enchantment) destroy target(artifact,enchantment)
|
||||
auto=choice name(Draw 2 and discard 1) draw:2 && transforms((,newability[target(*|myhand) reject])) forever
|
||||
text=Choose one: -- Destroy target monocolored creature. -- Destroy target artifact or enchantment. -- Draw two cards, then discard a card.
|
||||
@@ -125144,7 +125143,7 @@ toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Ultimate Price
|
||||
target=creature[-multicolor]
|
||||
target=creature[-multicolor;-colorless]
|
||||
auto=destroy
|
||||
text=Destroy target monocolored creature.
|
||||
mana={1}{B}
|
||||
|
||||
@@ -44,9 +44,10 @@ public:
|
||||
CHEATMODE,
|
||||
OPTIMIZE_HAND,
|
||||
CHEATMODEAIDECK,
|
||||
OSD,
|
||||
BLKBORDER,
|
||||
SHOWTOKENS,
|
||||
GDVLARGEIMAGE,
|
||||
OSD,
|
||||
CLOSEDHAND,
|
||||
HANDDIRECTION,
|
||||
MANADISPLAY,
|
||||
|
||||
@@ -273,6 +273,8 @@ public:
|
||||
int cardistargetted;
|
||||
bool isTargetter();
|
||||
int cardistargetter;
|
||||
int forcedBorderA;
|
||||
int forcedBorderB;
|
||||
int myconvertedcost;
|
||||
ManaCost * computeNewCost(MTGCardInstance * card,ManaCost * oldCost, ManaCost * refCost,bool noTrinisphere = false);
|
||||
int countTrini;
|
||||
|
||||
@@ -2543,6 +2543,9 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
|
||||
if (card->hasType(Subtypes::TYPE_LEGENDARY) && game->inPlay->findByName(card->name))
|
||||
continue;
|
||||
|
||||
if (card->has(Constants::TREASON) && observer->getCurrentGamePhase() != MTG_PHASE_FIRSTMAIN)
|
||||
continue;
|
||||
|
||||
if (card->hasType(Subtypes::TYPE_PLANESWALKER) && card->types.size() > 0 && game->inPlay->hasTypeSpecificInt(Subtypes::TYPE_PLANESWALKER,card->types[1]))
|
||||
continue;
|
||||
|
||||
@@ -2691,6 +2694,9 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
|
||||
if (card->hasType(Subtypes::TYPE_LEGENDARY) && game->inPlay->findByName(card->name))
|
||||
continue;
|
||||
|
||||
if (card->has(Constants::TREASON) && observer->getCurrentGamePhase() != MTG_PHASE_FIRSTMAIN)
|
||||
continue;
|
||||
|
||||
if (card->hasType(Subtypes::TYPE_PLANESWALKER) && card->types.size() > 0 && game->inPlay->hasTypeSpecificInt(Subtypes::TYPE_PLANESWALKER,card->types[1]))
|
||||
continue;
|
||||
|
||||
@@ -2838,6 +2844,9 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
|
||||
if (card->hasType(Subtypes::TYPE_LEGENDARY) && game->inPlay->findByName(card->name))
|
||||
continue;
|
||||
|
||||
if (card->has(Constants::TREASON) && observer->getCurrentGamePhase() != MTG_PHASE_FIRSTMAIN)
|
||||
continue;
|
||||
|
||||
if (card->hasType(Subtypes::TYPE_PLANESWALKER) && card->types.size() > 0 && game->inPlay->hasTypeSpecificInt(Subtypes::TYPE_PLANESWALKER,card->types[1]))
|
||||
continue;
|
||||
|
||||
|
||||
@@ -241,6 +241,8 @@ void StackAbility::Render()
|
||||
MTGCardInstance * source = ability->source;
|
||||
string alt1 = source->getName();
|
||||
vector<JQuadPtr> mytargetQuads;
|
||||
vector<MTGCardInstance*> myClones;
|
||||
|
||||
int fmLibrary = 0;
|
||||
int force = 0;
|
||||
|
||||
@@ -262,6 +264,9 @@ void StackAbility::Render()
|
||||
{
|
||||
if( ((Damageable *)(tt))->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE )
|
||||
{
|
||||
//fill vector
|
||||
myClones.push_back(((MTGCardInstance*)(tt)));
|
||||
|
||||
if( source->has(Constants::HIDDENFACE) && !observer->isInLibrary(((MTGCardInstance *)(tt))) )
|
||||
mytargetQuads.push_back( ((Damageable *)(tt))->getIcon() );
|
||||
else if ( !source->has(Constants::HIDDENFACE) )
|
||||
@@ -293,6 +298,20 @@ void StackAbility::Render()
|
||||
}
|
||||
}
|
||||
|
||||
//setborder test
|
||||
if(myClones.size())
|
||||
{
|
||||
source->forcedBorderB = 1;
|
||||
for(unsigned int kk = 0; kk < myClones.size(); kk++)
|
||||
{
|
||||
if(myClones[kk])
|
||||
{
|
||||
myClones[kk]->forcedBorderA = 1;
|
||||
//JRenderer::GetInstance()->DrawLine(myClones[kk]->view->actX,myClones[kk]->view->actY,source->view->actX,source->view->actY,0.5f,ARGB(120, 255, 0, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(source->has(Constants::HIDDENFACE) && fmLibrary)
|
||||
force = MTGAbility::HIDDENVIEW;
|
||||
|
||||
|
||||
@@ -270,12 +270,12 @@ void CardGui::Render()
|
||||
//draw border for highlighting
|
||||
if (game)
|
||||
{
|
||||
if (card && card->isTargetted() && highlightborder)
|
||||
if (card && card->forcedBorderA && highlightborder)
|
||||
{
|
||||
highlightborder->SetColor(ARGB(95,255,0,0));
|
||||
renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
|
||||
}
|
||||
if (card && card->isTargetter() && highlightborder)
|
||||
if (card && card->forcedBorderB && highlightborder)
|
||||
{
|
||||
highlightborder->SetColor(ARGB(95,0,245,0));
|
||||
renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16);
|
||||
@@ -387,7 +387,7 @@ void CardGui::Render()
|
||||
}
|
||||
}
|
||||
|
||||
if (card && card->isTargetted())
|
||||
if (card && card->forcedBorderA)
|
||||
{
|
||||
if(card->isTapped())
|
||||
{
|
||||
@@ -399,7 +399,7 @@ void CardGui::Render()
|
||||
else
|
||||
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-2,actY - (scale * quad->mHeight / 2)-2, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 1.8f,ARGB(250,255,0,0));
|
||||
}
|
||||
if (card && card->isTargetter())
|
||||
if (card && card->forcedBorderB)
|
||||
{
|
||||
if(card->isTapped())
|
||||
{
|
||||
|
||||
@@ -654,6 +654,8 @@ void GameObserver::gameStateBasedEffects()
|
||||
{
|
||||
zone->cards[c]->cardistargetted = 0;
|
||||
zone->cards[c]->cardistargetter = 0;
|
||||
zone->cards[c]->forcedBorderA = 0;
|
||||
zone->cards[c]->forcedBorderB = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +20,10 @@ const string Options::optionNames[] = {
|
||||
"cheatmode",
|
||||
"optimizedhand",
|
||||
"cheatmodedecks",
|
||||
"displayOSD",
|
||||
"BlackBorder",
|
||||
"ShowTokens",
|
||||
"GDVLargeImages",
|
||||
"displayOSD",
|
||||
"closed_hand",
|
||||
"hand_direction",
|
||||
"mana_display",
|
||||
|
||||
@@ -51,13 +51,21 @@ void GameStateOptions::Start()
|
||||
// optionsList->Add(NEW OptionInteger(Options::INTERRUPTMYABILITIES, "Interrupt my abilities"));
|
||||
//this is a dev option, not meant for standard play. uncomment if you need to see abilities you own hitting the stack.
|
||||
optionsList->Add(NEW OptionInteger(Options::INTERRUPT_SECONDMAIN, "Interrupt opponent's end of turn"));
|
||||
optionsList->Add(NEW OptionInteger(Options::SHOWTOKENS, "Show Tokens in Editor"));
|
||||
optionsTabs = NEW WGuiTabMenu();
|
||||
optionsTabs->Add(optionsList);
|
||||
|
||||
optionsList = NEW WGuiList("Misc");
|
||||
optionsList->Add(NEW WGuiHeader("Card Display Options"));
|
||||
//black border
|
||||
optionsList->Add(NEW OptionInteger(Options::BLKBORDER, "All Black Border"));
|
||||
//show tokens in editor
|
||||
optionsList->Add(NEW OptionInteger(Options::SHOWTOKENS, "Show Tokens in Editor"));
|
||||
//show large images
|
||||
optionsList->Add(NEW OptionInteger(Options::GDVLARGEIMAGE, "Show Large Images in Grid Deck View (could crash PSP!)"));
|
||||
optionsTabs->Add(optionsList);
|
||||
|
||||
optionsList = NEW WGuiList("Game");
|
||||
optionsList->Add(NEW WGuiHeader("Interface Options"));
|
||||
optionsList->Add(NEW OptionInteger(Options::BLKBORDER, "All Black Border"));
|
||||
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::MANADISPLAY, "Mana display", 3, 1, 0)));
|
||||
@@ -82,7 +90,6 @@ void GameStateOptions::Start()
|
||||
optionsList->Add(NEW WGuiSplit(cPrf, cThm));
|
||||
optionsList->Add(cStyle);
|
||||
optionsList->Add(NEW WGuiButton(NEW WGuiHeader("New Profile"), -102, GameStateOptionsConst::kNewProfileID, this));
|
||||
|
||||
optionsList->Add(NEW WDecoCheat(NEW OptionInteger(Options::CHEATMODE, "Enable Cheat Mode")));
|
||||
optionsList->Add(NEW WDecoCheat(NEW OptionInteger(Options::OPTIMIZE_HAND, "Optimize Starting Hand")));
|
||||
optionsList->Add(NEW WDecoCheat(NEW OptionInteger(Options::CHEATMODEAIDECK, "Unlock All Ai Decks")));
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "PrecompiledHeader.h"
|
||||
#include "GridDeckView.h"
|
||||
|
||||
const float GridDeckView::scroll_animation_duration = 0.3f;
|
||||
@@ -125,17 +126,10 @@ void GridDeckView::Render()
|
||||
{
|
||||
if (WResourceManager::Instance()->IsThreaded())
|
||||
{
|
||||
#if !defined (PSP)
|
||||
WResourceManager::Instance()->RetrieveCard(mCards[i].card, RETRIEVE_NORMAL);
|
||||
#else
|
||||
WResourceManager::Instance()->RetrieveCard(mCards[i].card, RETRIEVE_THUMB);
|
||||
#endif
|
||||
}
|
||||
#if !defined (PSP)
|
||||
renderCard(i, 255, false, true);//for psp, use lowres images if you can.
|
||||
#else
|
||||
renderCard(i, 255, true, true);
|
||||
#endif
|
||||
bool mode = options[Options::GDVLARGEIMAGE].number?false:true;
|
||||
renderCard(i, 255, mode);//WARNING FOR PSP!!!
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -123,7 +123,7 @@ void GuiPlay::BattleField::reset(float x, float y)
|
||||
}
|
||||
void GuiPlay::BattleField::EnstackAttacker(CardView* card)
|
||||
{
|
||||
if(card->card->getObserver() && card->card->getObserver()->getCurrentGamePhase() == MTG_PHASE_COMBATDAMAGE)
|
||||
if(card->card->getObserver() && ((card->card->getObserver()->getCurrentGamePhase() >= MTG_PHASE_COMBATDAMAGE) && (card->card->getObserver()->getCurrentGamePhase() < MTG_PHASE_ENDOFTURN)))
|
||||
return;
|
||||
//card->x = CARD_WIDTH + 20 + (currentAttacker * (HORZWIDTH) / (attackers+1));
|
||||
card->x = x + (CARD_WIDTH/2.5f) + baseX;
|
||||
@@ -140,7 +140,7 @@ void GuiPlay::BattleField::EnstackAttacker(CardView* card)
|
||||
}
|
||||
void GuiPlay::BattleField::EnstackBlocker(CardView* card)
|
||||
{
|
||||
if(card->card->getObserver() && card->card->getObserver()->getCurrentGamePhase() == MTG_PHASE_COMBATDAMAGE)
|
||||
if(card->card->getObserver() && ((card->card->getObserver()->getCurrentGamePhase() >= MTG_PHASE_COMBATDAMAGE) && (card->card->getObserver()->getCurrentGamePhase() < MTG_PHASE_ENDOFTURN)))
|
||||
return;
|
||||
MTGCardInstance * c = card->card;
|
||||
if (!c)
|
||||
|
||||
@@ -71,6 +71,8 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
|
||||
LKItoughness = toughness;
|
||||
cardistargetted = 0;
|
||||
cardistargetter = 0;
|
||||
forcedBorderA = 0;
|
||||
forcedBorderB = 0;
|
||||
myconvertedcost = getManaCost()->getConvertedCost();
|
||||
revealedLast = NULL;
|
||||
MadnessPlay = false;
|
||||
|
||||
Reference in New Issue
Block a user