it was reported to me that cards such as Isleback Spawn were not actually working correctly, to fix these i added a compareZone function to aslongas and a tag to use when you want to compare different like zones, example:
lets say in the case of Isleback Spawn you want to see if ANY player has less then 20 cards. auto=aslongas(*|library) 4/8 <21 compare this will check if either you or your opponent has less then 20 cards. rather then adding the total cards in both libraries. over the last weeks ive seen this cards code change atleast 3 times. this should be the final version for it and any other cards like it.
This commit is contained in:
@@ -1304,6 +1304,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
int maxi = 0;
|
||||
bool miniFound = false;
|
||||
bool maxiFound = false;
|
||||
bool compareZone = false;
|
||||
|
||||
found = s.find(" >");
|
||||
if (found != string::npos)
|
||||
@@ -1318,7 +1319,13 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
maxi = atoi(s.substr(found + 2, 3).c_str());
|
||||
maxiFound = true;
|
||||
}
|
||||
|
||||
|
||||
found = s.find("compare");
|
||||
if (found != string::npos)
|
||||
{
|
||||
compareZone = true;
|
||||
}
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
@@ -1333,7 +1340,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
{
|
||||
miniFound = true;
|
||||
}
|
||||
result = NEW AAsLongAs(id, card, _target, lordTargets, lordIncludeSelf, a, mini, maxi,miniFound,maxiFound);
|
||||
result = NEW AAsLongAs(id, card, _target, lordTargets, lordIncludeSelf, a, mini, maxi,miniFound,maxiFound,compareZone);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
|
||||
Reference in New Issue
Block a user