passing the storedcard for use by instants and sorceries with extracost in thier manacost, also fixed a parsing oversight with stored values parsing, "-" would throw off the value of s string parsed for stored by 1, returning 0 for these....this is corrected now.
This commit is contained in:
@@ -292,6 +292,7 @@ Spell::~Spell()
|
||||
|
||||
int Spell::resolve()
|
||||
{
|
||||
MTGCardInstance * oldStored = source->storedCard;
|
||||
if (!source->hasType(Subtypes::TYPE_INSTANT) && !source->hasType(Subtypes::TYPE_SORCERY) && source->name.size())
|
||||
{
|
||||
Player * p = source->controller();
|
||||
@@ -305,7 +306,7 @@ int Spell::resolve()
|
||||
source->backupTargets = backupTgt;
|
||||
from = p->game->battlefield;
|
||||
}
|
||||
|
||||
source->storedCard = oldStored;
|
||||
//Play SFX
|
||||
if (options[Options::SFXVOLUME].number > 0)
|
||||
{
|
||||
|
||||
@@ -81,6 +81,7 @@ void MTGCardInstance::copy(MTGCardInstance * card)
|
||||
int backupid = mtgid;
|
||||
int castMethodBackUP = this->castMethod;
|
||||
mtgid = source->getId();
|
||||
MTGCardInstance * oldStored = this->storedCard;
|
||||
Spell * spell = NEW Spell(observer, this);
|
||||
observer = card->observer;
|
||||
AbilityFactory af(observer);
|
||||
@@ -89,6 +90,7 @@ void MTGCardInstance::copy(MTGCardInstance * card)
|
||||
mtgid = backupid;
|
||||
castMethod = castMethodBackUP;
|
||||
backupTargets = this->backupTargets;
|
||||
storedCard = oldStored;
|
||||
}
|
||||
|
||||
MTGCardInstance::~MTGCardInstance()
|
||||
|
||||
@@ -474,6 +474,7 @@ MTGCardInstance * MTGGameZone::removeCard(MTGCardInstance * card, int createCopy
|
||||
copy->X = card->X;
|
||||
copy->castX = card->castX;
|
||||
copy->kicked = card->kicked;
|
||||
copy->storedCard = card->storedCard;
|
||||
|
||||
//stupid bug with tokens...
|
||||
if (card->model == card)
|
||||
|
||||
Reference in New Issue
Block a user