In these days, svn code seems to have a problem with playing Momir mode.
Tokens going to graveyard after battle become stupid p/t and remains in play.
(I'm sorry if it is already reported. I don't have enough time to check forum.)
I guess that a WEventZoneChange should be thrown in such a case as follow
Code: Select all
Index: src/MTGGameZones.cpp
===================================================================
--- src/MTGGameZones.cpp (revision 517)
+++ src/MTGGameZones.cpp (working copy)
@@ -149,10 +149,11 @@
}
}
+ MTGCardInstance * ret = copy;
if (card->isToken){
if (to != g->players[0]->game->inPlay && to != g->players[1]->game->inPlay){
- garbage->addCard(copy);
- return NULL;
+ to = garbage;
+ ret = NULL;
}
}
@@ -162,7 +163,7 @@
WEvent * e = NEW WEventZoneChange(copy, from, to);
g->receiveEvent(e);
delete e;
- return copy;
+ return ret;
}
return card; //Error
}
On another matter,
there may be a potential misstake in the code handling MTGCardInstance::changedZoneRecently.
I'm not sure what happen with this, but it should be fixed as:
Code: Select all
Index: src/CardGui.cpp
===================================================================
--- src/CardGui.cpp (revision 517)
+++ src/CardGui.cpp (working copy)
@@ -234,6 +234,8 @@
if (card->changedZoneRecently){
if (mParticleSys) mParticleSys->Update(dt);
card->changedZoneRecently-= (5 *dt);
+ if (card->changedZoneRecently == 0)
+ card->changedZoneRecently-= dt;//must not become zero atm
if (card->changedZoneRecently < 0){
if (mParticleSys) mParticleSys->Stop();
}