fixed a bug where "becomes(" was no longer giving more the a single ability to a card, example, inkmoth nexus would only gain flying, and not gain infect, this i imagine was due in part to a goof up...we split the string at the top by comma, in the refactor for this section it was changed to be either "" or becomesblah[2] <--this is incorrect, becuase what if a card would gain 2 abilities or more ...the we need to append the rest of the split portions back into the abilities string for adding.
also a piece that didn't get in my last commit, nothing big just 2 lines...not sure why on earth it didn't commit them before...
This commit is contained in:
@@ -501,7 +501,7 @@ int AAFizzler::resolve()
|
|||||||
{
|
{
|
||||||
ActionStack * stack = game->mLayers->stackLayer();
|
ActionStack * stack = game->mLayers->stackLayer();
|
||||||
//the next section helps Ai correctly recieve its targets for this effect
|
//the next section helps Ai correctly recieve its targets for this effect
|
||||||
if(!target)
|
if(!target && source->target)
|
||||||
{
|
{
|
||||||
//ai is casting a spell from it's hand to fizzle.
|
//ai is casting a spell from it's hand to fizzle.
|
||||||
target = stack->getAt(stack->getActionElementFromCard(source->target));
|
target = stack->getAt(stack->getActionElementFromCard(source->target));
|
||||||
@@ -515,7 +515,7 @@ int AAFizzler::resolve()
|
|||||||
MTGCardInstance* sCard = (MTGCardInstance*)sTarget->source;
|
MTGCardInstance* sCard = (MTGCardInstance*)sTarget->source;
|
||||||
if(!sCard || !sTarget || sCard->has(Constants::NOFIZZLE))
|
if(!sCard || !sTarget || sCard->has(Constants::NOFIZZLE))
|
||||||
return 0;
|
return 0;
|
||||||
game->mLayers->stackLayer()->Fizzle(sTarget);
|
stack->Fizzle(sTarget);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1956,8 +1956,16 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
newToughness = pt[1];
|
newToughness = pt[1];
|
||||||
ptFound = true;
|
ptFound = true;
|
||||||
}
|
}
|
||||||
string sabilities = (becomesParameters.size() > 2) ? becomesParameters[2] : "";
|
string sabilities = "";
|
||||||
|
if(becomesParameters.size() > 2)
|
||||||
|
{
|
||||||
|
for(unsigned int i = 2;i < becomesParameters.size();i++)
|
||||||
|
{
|
||||||
|
sabilities.append(becomesParameters[i].c_str());
|
||||||
|
if(i+1 < becomesParameters.size())
|
||||||
|
sabilities.append(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
if (oneShot || forceUEOT)
|
if (oneShot || forceUEOT)
|
||||||
return NEW ATransformerInstant(id, card, target, stypes, sabilities,newPower,ptFound,newToughness,ptFound,vector<string>(),false,forceFOREVER);
|
return NEW ATransformerInstant(id, card, target, stypes, sabilities,newPower,ptFound,newToughness,ptFound,vector<string>(),false,forceFOREVER);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user