2 things,

fixed a bug with Withering Wisps, moved the parsing of the limit string into the isreactingtoclick function, this allows word varibles such as type: to be used.

2nd, removed a varible isTempPhased, it *appear* it might not be needed, tho i didn't handle phasing the way im converting it to for a reason, so cross your fingers and hope all goes well.
BTW: do not email me about any bugs that ariase with phasing or phased out creature, im not excepting bug reports on it to my email box...instead open a ticket with a repro method and mark it as critical.
This commit is contained in:
omegablast2002@yahoo.com
2011-04-03 12:24:21 +00:00
parent 4cd0953ebc
commit 2eca724001
6 changed files with 32 additions and 16 deletions

View File

@@ -930,11 +930,11 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return amp;
}
int limit = 0;
string limit = "";
size_t limit_str = sWithoutTc.find("limit:");
if (limit_str != string::npos)
{
limit = atoi(sWithoutTc.substr(limit_str + 6).c_str());
limit = sWithoutTc.substr(limit_str + 6);
}
AEquip *ae = dynamic_cast<AEquip*> (a);
@@ -3184,7 +3184,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell)
if (spell->getNbTargets() == 1)
{
card->target = spell->getNextCardTarget();
if (card->target && (!spell->tc->canTarget(card->target) || card->target->isTempPhased))
if (card->target && (!spell->tc->canTarget(card->target) || card->target->isPhased))
{
MTGPlayerCards * zones = card->controller()->game;
zones->putInZone(card, spell->from, card->owner->game->graveyard);
@@ -4195,7 +4195,7 @@ int TargetAbility::resolve()
ability->target = t;
//do nothing if the target controller responded by phasing out the target.
MTGCardInstance * targeted = (MTGCardInstance*)t;
if (targeted->typeAsTarget() == TARGET_CARD && targeted->isTempPhased)
if (targeted->typeAsTarget() == TARGET_CARD && targeted->isPhased)
return 0;
if (ability->oneShot)