- Added name effect for Momir
- Fixed a couple bugs with "moveTo", see test/Amugaba.txt
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-04-11 03:59:46 +00:00
parent 12bd665409
commit fab150414b
10 changed files with 114 additions and 18 deletions
+13 -6
View File
@@ -310,24 +310,31 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
//MoveTo Move a card from a zone to another
found = s.find("moveto(");
if (found != string::npos){
OutputDebugString("may!\n");
if (dryMode) return BAKA_EFFECT_BAD; //TODO : depends on where from, where to...
int end = s.find(")");
int end = s.find(")",found+1);
string szone = s.substr(found + 7,end - found - 7);
if (tc){
//if (cost){
AZoneMover * a = NEW AZoneMover(id,card,tc,szone,cost,doTap);
if (may){
game->addObserver(NEW MayAbility(id,a,card));
OutputDebugString("may!\n");
}else{
game->addObserver(a);
}
// }
}else{
MTGGameZone * fromZone = target->getCurrentZone();//this is technically incorrect. The initial zone should be as described in the targetchooser
MTGGameZone * destZone = MTGGameZone::stringToZone(szone, card, target);
target->controller()->game->putInZone(target,fromZone,destZone);
if (cost){
MTGAbility * a = NEW AZoneSelfMover(id,card,szone,cost,doTap);
if (may){
game->addObserver(NEW MayAbility(id,a,card));
}else{
game->addObserver(a);
}
}else{
MTGGameZone * fromZone = target->getCurrentZone();//this is technically incorrect. The initial zone should be as described in the targetchooser
MTGGameZone * destZone = MTGGameZone::stringToZone(szone, card, target);
target->controller()->game->putInZone(target,fromZone,destZone);
}
}
result++;
continue;