attempt to fix "notatarget"
notatarget must be allowed to target untargettable cards.
This commit is contained in:
@@ -240,6 +240,7 @@ public:
|
|||||||
int swapT;
|
int swapT;
|
||||||
bool isSwitchedPT;
|
bool isSwitchedPT;
|
||||||
bool isACopier;
|
bool isACopier;
|
||||||
|
bool bypassTC;
|
||||||
|
|
||||||
void eventattacked();
|
void eventattacked();
|
||||||
void eventattackedAlone();
|
void eventattackedAlone();
|
||||||
|
|||||||
@@ -1330,7 +1330,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
tcString = splitTarget[1];
|
tcString = splitTarget[1];
|
||||||
|
|
||||||
if (!isTarget)
|
if (!isTarget)
|
||||||
|
{
|
||||||
|
tc->targetter->bypassTC = true;
|
||||||
tc->targetter = NULL;
|
tc->targetter = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
tc->targetter->bypassTC = false;
|
||||||
sWithoutTc = splitTarget[0];
|
sWithoutTc = splitTarget[0];
|
||||||
sWithoutTc.append(splitTarget[2]);
|
sWithoutTc.append(splitTarget[2]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
|
|||||||
isCDA = false;
|
isCDA = false;
|
||||||
isSwitchedPT = false;
|
isSwitchedPT = false;
|
||||||
isACopier = false;
|
isACopier = false;
|
||||||
|
bypassTC = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
MTGCardInstance * MTGCardInstance::createSnapShot()
|
MTGCardInstance * MTGCardInstance::createSnapShot()
|
||||||
|
|||||||
@@ -855,10 +855,10 @@ bool TargetChooser::canTarget(Targetable * target, bool withoutProtections)
|
|||||||
|
|
||||||
if (source && targetter && card->isInPlay(observer) && !withoutProtections)
|
if (source && targetter && card->isInPlay(observer) && !withoutProtections)
|
||||||
{
|
{
|
||||||
if (card->has(Constants::SHROUD)) return false;
|
if (card->has(Constants::SHROUD)) return targetter->bypassTC;
|
||||||
if (card->protectedAgainst(targetter)) return false;
|
if (card->protectedAgainst(targetter)) return targetter->bypassTC;
|
||||||
if (card->CantBeTargetby(targetter)) return false;
|
if (card->CantBeTargetby(targetter)) return targetter->bypassTC;
|
||||||
if ((targetter->controller() != card->controller()) && card->has(Constants::OPPONENTSHROUD)) return false;
|
if ((targetter->controller() != card->controller()) && card->has(Constants::OPPONENTSHROUD)) return targetter->bypassTC;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user