Revision: 4891
Author: pankdm
Date: Fri Oct 18 06:38:15 2013 UTC
Log: Small fixes (misstype, formatting, target p2)
http://code.google.com/p/wagic/source/detail?r=4891
Modified:
/trunk/projects/mtg/bin/Res/sets/primitives/mtg.txt
/trunk/projects/mtg/bin/Res/test/spoils_of_evil.txt
/trunk/projects/mtg/include/AllAbilities.h
/trunk/projects/mtg/src/MTGAbility.cpp
/trunk/projects/mtg/src/MTGGameZones.cpp
/trunk/projects/mtg/src/TargetChooser.cpp
=======================================
--- /trunk/projects/mtg/bin/Res/sets/primitives/mtg.txt Fri Oct 18 06:37:53
2013 UTC
+++ /trunk/projects/mtg/bin/Res/sets/primitives/mtg.txt Fri Oct 18 06:38:15
2013 UTC
File is too large to display a diff.
=======================================
--- /trunk/projects/mtg/bin/Res/test/spoils_of_evil.txt Sat Jul 11 15:59:51
2009 UTC
+++ /trunk/projects/mtg/bin/Res/test/spoils_of_evil.txt Fri Oct 18 06:38:15
2013 UTC
@@ -9,6 +9,7 @@
graveyard:swamp,grizzly bears,dragon engine
[DO]
Spoils Of Evil
+p2
[ASSERT]
FIRSTMAIN
[PLAYER1]
=======================================
--- /trunk/projects/mtg/include/AllAbilities.h Fri Oct 18 06:38:03 2013 UTC
+++ /trunk/projects/mtg/include/AllAbilities.h Fri Oct 18 06:38:15 2013 UTC
@@ -199,7 +199,7 @@
for (int k = 0; k < 4; k++)
{
MTGGameZone * zone = zones[k];
- if (tc->targetsZone(zone, target))
+ if (tc->targetsZone(zone, card))
{
if (color)
{
=======================================
--- /trunk/projects/mtg/src/MTGAbility.cpp Fri Oct 18 06:38:03 2013 UTC
+++ /trunk/projects/mtg/src/MTGAbility.cpp Fri Oct 18 06:38:15 2013 UTC
@@ -1777,7 +1777,7 @@
found = s.find("compare");
if (found != string::npos)
{
- compareZone = true;
+ compareZone = true;
}
switch (i)
@@ -1810,7 +1810,7 @@
{
result->oneShot = oneShot;
a->forcedAlive = forcedalive;
- if(neverRemove)
+ if (neverRemove)
{
result->oneShot = false;
result->forceDestroy = -1;
=======================================
--- /trunk/projects/mtg/src/MTGGameZones.cpp Fri Oct 18 06:37:09 2013 UTC
+++ /trunk/projects/mtg/src/MTGGameZones.cpp Fri Oct 18 06:38:15 2013 UTC
@@ -554,7 +554,7 @@
int result = 0;
for (int i = 0; i < (nb_cards); i++)
{
- if (tc->canTarget(cards[i]), withoutProtections)
+ if (tc->canTarget(cards[i], withoutProtections))
{
result++;
}
@@ -572,7 +572,7 @@
int result = 0;
for (int i = 0; i < nb_cards; i++)
{
- if (tc->canTarget(cards[i]), withoutProtections)
+ if (tc->canTarget(cards[i], withoutProtections))
{
result += cards[i]->getManaCost()->getManaSymbols(color);
}
@@ -947,7 +947,7 @@
{
//bug or bug case default to
p2 = source->controller();
- target = source;
+ target = source;
}
}
else
=======================================
--- /trunk/projects/mtg/src/TargetChooser.cpp Fri Oct 18 06:38:03 2013 UTC
+++ /trunk/projects/mtg/src/TargetChooser.cpp Fri Oct 18 06:38:15 2013 UTC
@@ -1258,10 +1258,11 @@
if (MTGGameZone::intToZone(Owner->getObserver(), zones[i], source)
== z) return true;
return false;
}
+
bool TargetZoneChooser::targetsZone(MTGGameZone * z,MTGCardInstance *
mSource)
{
-if(mSource)
-source = mSource;
+ if (mSource)
+ source = mSource;
for (int i = 0; i < nbzones; i++)
if (MTGGameZone::intToZone(source->owner->getObserver(), zones[i],
source) == z) return true;
return false;