-Fixed a bug with moveTo keyword (cf: Doomed necromancer test)
This commit is contained in:
wagic.the.homebrew
2009-02-05 13:34:40 +00:00
parent ba3b272558
commit 9439d5e6dd
4 changed files with 24 additions and 4 deletions
+3 -3
View File
@@ -150,7 +150,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
if (delimiter!= string::npos){
cost = ManaCost::parseManaCost(line.substr(0,delimiter+1));
}
OutputDebugString("Pqrsing cost\n");
OutputDebugString("Parsing cost\n");
if (cost && cost->isNull()){
OutputDebugString("Cost is null\n");
SAFE_DELETE(cost);
@@ -192,7 +192,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
//Target Abilities
found = s.find("target(");
if (found != string::npos){
int end = s.find(")");
int end = s.find(")", found);
string starget = s.substr(found + 7,end - found - 7);
TargetChooserFactory tcf;
tc = tcf.createTargetChooser(starget, card);
@@ -298,7 +298,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
string szone = s.substr(found + 7,end - found - 7);
if (tc){
if (cost){
game->addObserver(NEW AZoneMover(id,card,tc,szone,cost));
game->addObserver(NEW AZoneMover(id,card,tc,szone,cost,doTap));
}
}else{
MTGGameZone * fromZone = target->getCurrentZone();//this is technically incorrect. The initial zone should be as described in the targetchooser