zpos and zone display
added zone position (adjust dynamically), also inverts the display of the zone so we always get the top/recent one... the library zpos is inverted so if we choose to target the top 5 zpos like target(*[zpos>=5|mylibrary), it will do from top to bottom... this is only for AI so we can add alternate code for them since they cant use reveal atm, we can make them target within allowed range... Also this commit disabled the new legend and planeswalker rule since it conflicts with reveal ability, unless I/We figure it out, I recommend to use the old one...
This commit is contained in:
@@ -18,6 +18,8 @@ CardDescriptor::CardDescriptor()
|
||||
manacostComparisonMode = COMPARISON_NONE;
|
||||
counterComparisonMode = COMPARISON_NONE;
|
||||
convertedManacost = -1;
|
||||
zposComparisonMode = COMPARISON_NONE;
|
||||
zposition = -1;
|
||||
compareName ="";
|
||||
nameComparisonMode = COMPARISON_NONE;
|
||||
colorComparisonMode = COMPARISON_NONE;
|
||||
@@ -26,12 +28,12 @@ CardDescriptor::CardDescriptor()
|
||||
CDdamager = 0;
|
||||
CDgeared = 0;
|
||||
CDblocked = 0;
|
||||
CDcanProduceC = 0;
|
||||
/*CDcanProduceC = 0;
|
||||
CDcanProduceG = 0;
|
||||
CDcanProduceU = 0;
|
||||
CDcanProduceR = 0;
|
||||
CDcanProduceB = 0;
|
||||
CDcanProduceW = 0;
|
||||
CDcanProduceW = 0;*/
|
||||
CDnocolor = 0;
|
||||
}
|
||||
|
||||
@@ -145,6 +147,8 @@ MTGCardInstance * CardDescriptor::match_or(MTGCardInstance * card)
|
||||
return NULL;
|
||||
if (manacostComparisonMode && !valueInRange(manacostComparisonMode, card->myconvertedcost, convertedManacost))
|
||||
return NULL;
|
||||
if (zposComparisonMode && !valueInRange(zposComparisonMode, card->zpos, zposition))
|
||||
return NULL;
|
||||
if (nameComparisonMode && compareName != card->name)
|
||||
return NULL;
|
||||
return card;
|
||||
@@ -186,6 +190,8 @@ MTGCardInstance * CardDescriptor::match_and(MTGCardInstance * card)
|
||||
match = NULL;
|
||||
if (manacostComparisonMode && !valueInRange(manacostComparisonMode, card->myconvertedcost, convertedManacost))
|
||||
match = NULL;
|
||||
if (zposComparisonMode && !valueInRange(zposComparisonMode, card->zpos, zposition))
|
||||
match = NULL;
|
||||
if(nameComparisonMode && compareName != card->name)
|
||||
match = NULL;
|
||||
|
||||
@@ -256,7 +262,7 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
|
||||
match = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if ((CDcanProduceC == -1 && card->canproduceC == 1) || (CDcanProduceC == 1 && card->canproduceC == 0))
|
||||
{
|
||||
match = NULL;
|
||||
@@ -286,7 +292,7 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
|
||||
{
|
||||
match = NULL;
|
||||
}
|
||||
|
||||
*/
|
||||
if ((CDnocolor == -1 && card->getColor() == 0))
|
||||
{
|
||||
match = NULL;
|
||||
|
||||
Reference in New Issue
Block a user