show large images on grid deck view user option

also forced border targets and target source
This commit is contained in:
Anthony Calosa
2017-03-05 19:43:49 +08:00
parent f205de7205
commit 4bf5943ac5
9 changed files with 37 additions and 16 deletions

View File

@@ -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->forcedBorder2 = 1;
for(unsigned int kk = 0; kk < myClones.size(); kk++)
{
if(myClones[kk])
{
myClones[kk]->forcedBorder = 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;