few changes here, mostly small bug fixes,

recoded altercost, its finally not using a dirty clean up.
this fixes the bug with it not effecting ai also and the bug where it was ineffective when combined with affinity creatures...

removed a aspect of the wolf class...
soft coded support for aspect of the wolf...using word variable subkeyword "halfup" and "halfdown"
it can go anywhere a parsable word vairable is stringing...i preffer the front of it...
these are Wparsedint subkeywords, not keywords you can use with standard abilities...
its meant to return half the varible rounds up, or down...

fixed player not losing with cantlifelose when they have 10 or more poison...the player should die.

reworked taplandformana, i send the main card as a target now, check against the cost if its affordable...anyways, i discussed this bool function a while back with devs and wololo saw the same issues i saw in it...he then removed it from being used as an if statement...i changed it back to an if statement with the new checks...we are either going to go back to a void, or go all the way bool, but not inbetween.
This commit is contained in:
omegablast2002@yahoo.com
2011-04-16 17:00:51 +00:00
parent 278e2f968c
commit 1b6991107b
11 changed files with 199 additions and 125 deletions

View File

@@ -487,7 +487,7 @@ void GameObserver::gameStateBasedEffects()
for (int j = 0; j < nbcards; ++j)
{
MTGCardInstance * c = z->cards[j];
if (c->has(Constants::CANTLOSE) || c->has(Constants::CANTLIFELOSE))
if (c->has(Constants::CANTLOSE) || (c->has(Constants::CANTLIFELOSE && players[i]->poisonCount < 10)))
{
cantlosers++;
}
@@ -710,6 +710,17 @@ void GameObserver::Affinity()
int color = 0;
string type = "";
//only do any of the following if a card with the stated ability is in your hand.
ManaCost * original = NEW ManaCost();
original->copy(card->model->data->getManaCost());
//have to run alter cost before affinity or the 2 cancel each other out.
if(card && (card->getIncreasedManaCost()->getConvertedCost()||card->getReducedManaCost()->getConvertedCost()))
{
if(card->getIncreasedManaCost()->getConvertedCost())
original->add(card->getIncreasedManaCost());
if(card->getReducedManaCost()->getConvertedCost())
original->remove(card->getReducedManaCost());
card->getManaCost()->copy(original);
}
if(card &&
(card->has(Constants::AFFINITYARTIFACTS)||
card->has(Constants::AFFINITYFOREST)||
@@ -747,7 +758,6 @@ void GameObserver::Affinity()
color = 1;
type = "creature";
}
ManaCost * original = card->model->data->getManaCost();
card->getManaCost()->copy(original);
int reduce = 0;
if(card->has(Constants::AFFINITYGREENCREATURES))
@@ -767,6 +777,8 @@ void GameObserver::Affinity()
card->getManaCost()->remove(color,1);
}
}
if(original)
delete original;
}
}
}