Erwan
- Added name effect for Momir - Fixed a couple bugs with "moveTo", see test/Amugaba.txt
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user