removed a unused variable and correct a bug with [share] spells tc's are deleted as they resolve so these effects couldnt take adventage of this type of targeting when the effect ability was a fizzle.

This commit is contained in:
omegablast2002@yahoo.com
2011-01-23 17:29:26 +00:00
parent 12bdaffac1
commit ee29fbc237
5 changed files with 16 additions and 3 deletions
+10
View File
@@ -451,6 +451,16 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
size_t start = attribute.find("share!");
size_t end = attribute.find("!");
string CDtype = attribute.substr(start + 6,end - start);
if(card->isSpell() && card->backupTargets[0]->typeAsTarget() == TARGET_STACKACTION)
{
//spells always store their targets in :targets[]
//however they are all erased as the spell resolves
//added a array to store these backups incase theyre needed
//again for effects such as these.
Spell * spell;
spell = (Spell*)card->backupTargets[0];
card->target = spell->source;
}
if( CDtype.find("name") != string::npos )
{
if(card->target)