Erwan
-Fixed a bug with moveTo keyword (cf: Doomed necromancer test)
This commit is contained in:
@@ -27,6 +27,7 @@ counsel_of_the_soratami.txt
|
|||||||
counterspell.txt
|
counterspell.txt
|
||||||
counterspell2.txt
|
counterspell2.txt
|
||||||
creature_bond.txt
|
creature_bond.txt
|
||||||
|
doomed_necromancer.txt
|
||||||
drain_life.txt
|
drain_life.txt
|
||||||
flare.txt
|
flare.txt
|
||||||
force_of_nature.txt
|
force_of_nature.txt
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#Testing Doomed Necromancer's ability on a brass man in graveyard
|
||||||
|
[INIT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:129880
|
||||||
|
graveyard:1099
|
||||||
|
manapool:{B}
|
||||||
|
[PLAYER2]
|
||||||
|
[DO]
|
||||||
|
129880
|
||||||
|
1099
|
||||||
|
[ASSERT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:1099
|
||||||
|
graveyard:129880
|
||||||
|
manapool:{0}
|
||||||
|
[PLAYER2]
|
||||||
|
[END]
|
||||||
@@ -164,7 +164,7 @@ class AZoneMover:public TargetAbility{
|
|||||||
public:
|
public:
|
||||||
string destinationZone;
|
string destinationZone;
|
||||||
|
|
||||||
AZoneMover(int _id, MTGCardInstance * _source, TargetChooser * _tc,string destZone, ManaCost * _cost = NULL):TargetAbility(_id,_source, _tc,_cost){
|
AZoneMover(int _id, MTGCardInstance * _source, TargetChooser * _tc,string destZone, ManaCost * _cost = NULL, int _tap=0):TargetAbility(_id,_source, _tc,_cost,0,_tap){
|
||||||
destinationZone = destZone;
|
destinationZone = destZone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
|
|||||||
if (delimiter!= string::npos){
|
if (delimiter!= string::npos){
|
||||||
cost = ManaCost::parseManaCost(line.substr(0,delimiter+1));
|
cost = ManaCost::parseManaCost(line.substr(0,delimiter+1));
|
||||||
}
|
}
|
||||||
OutputDebugString("Pqrsing cost\n");
|
OutputDebugString("Parsing cost\n");
|
||||||
if (cost && cost->isNull()){
|
if (cost && cost->isNull()){
|
||||||
OutputDebugString("Cost is null\n");
|
OutputDebugString("Cost is null\n");
|
||||||
SAFE_DELETE(cost);
|
SAFE_DELETE(cost);
|
||||||
@@ -192,7 +192,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
|
|||||||
//Target Abilities
|
//Target Abilities
|
||||||
found = s.find("target(");
|
found = s.find("target(");
|
||||||
if (found != string::npos){
|
if (found != string::npos){
|
||||||
int end = s.find(")");
|
int end = s.find(")", found);
|
||||||
string starget = s.substr(found + 7,end - found - 7);
|
string starget = s.substr(found + 7,end - found - 7);
|
||||||
TargetChooserFactory tcf;
|
TargetChooserFactory tcf;
|
||||||
tc = tcf.createTargetChooser(starget, card);
|
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);
|
string szone = s.substr(found + 7,end - found - 7);
|
||||||
if (tc){
|
if (tc){
|
||||||
if (cost){
|
if (cost){
|
||||||
game->addObserver(NEW AZoneMover(id,card,tc,szone,cost));
|
game->addObserver(NEW AZoneMover(id,card,tc,szone,cost,doTap));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
MTGGameZone * fromZone = target->getCurrentZone();//this is technically incorrect. The initial zone should be as described in the targetchooser
|
MTGGameZone * fromZone = target->getCurrentZone();//this is technically incorrect. The initial zone should be as described in the targetchooser
|
||||||
|
|||||||
Reference in New Issue
Block a user