Improved AI: now it can cast spells from graveyard using thier Flashback and Retrace costs, fixed a crash in Deck Editor stats loader when a card ability contains some "add" substrings (e.g. "counteradded" followed by "restriction{"), added/fixed primitives.

This commit is contained in:
Vittorio Alfieri
2021-02-18 12:48:59 +01:00
parent bc9142ad6e
commit 17d6860505
6 changed files with 104 additions and 65 deletions

View File

@@ -493,7 +493,7 @@ void StatsWrapper::updateStats(DeckDataWrapper *myDeck)
for (int v = 0; v < (int) abilitiesVector.size(); v++)
{
string s = abilitiesVector[v];
size_t t = s.find("add");
size_t t = s.find("add{"); //Fix crash when ability contains "counteradded" or similar substring.
if (t != string::npos)
{
s = s.substr(t + 3);