Fixed issue #1054 (opened by @ranger7271), fixed/added primitives with "scry" ability, improved scry ability for both Human and AI player, added a new ability to replace the scry ability with some actions (e.g. Eligeth, Crossroads Augur).

This commit is contained in:
Vittorio Alfieri
2021-02-08 17:08:20 +01:00
parent a858ed405f
commit eb8da4d4b2
13 changed files with 320 additions and 289 deletions

View File

@@ -852,10 +852,9 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
{
vector<string>getPaid = parseBetween(restriction[i].c_str(),"paid(",")");
string paid = getPaid[1];
for (size_t j = 0; j < sizeof(kAlternateCostIds)/sizeof(kAlternateCostIds[0]); ++j)
{
string keyword = kAlternateCostKeywords[j];
string keyword = kAlternateCostKeywords[j];
if (paid.find(keyword) != string::npos)
{
if (!(card->alternateCostPaid[j] > 0 ))
@@ -864,8 +863,10 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
}
}
}
}
check = restriction[i].find("never");
if(check != string::npos)
return 0;
}
return 1;
}