Erwan
-fix for issue 489 (protection prevents some triggers to happen)
This commit is contained in:
@@ -469,6 +469,7 @@ sleeper_agent.txt
|
||||
slith_bloodletter.txt
|
||||
sneak_attack.txt
|
||||
soulblast.txt
|
||||
souls_attendant_i489.txt
|
||||
spark_elemental.txt
|
||||
sphinx_summoner.txt
|
||||
spirit_link.txt
|
||||
|
||||
@@ -137,9 +137,10 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string magicText, int
|
||||
found = end + 1;
|
||||
}
|
||||
toTcCard->setAllZones();
|
||||
toTcCard->targetter = NULL; //avoid protection from
|
||||
starget = starget.substr(found, end - found).insert(0, "*|");
|
||||
toTc = tcf.createTargetChooser(starget, card);
|
||||
toTc->targetter = NULL;
|
||||
toTc->targetter = NULL; //avoid protection from
|
||||
|
||||
TargetChooser *fromTc = NULL;
|
||||
TargetChooser * fromTcCard = NULL;
|
||||
@@ -158,10 +159,11 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string magicText, int
|
||||
found = end + 1;
|
||||
}
|
||||
fromTcCard->setAllZones();
|
||||
fromTcCard->targetter=NULL; //avoid protection from
|
||||
end = s.find(")", found);
|
||||
starget = s.substr(found, end - found).insert(0, "*|");
|
||||
fromTc = tcf.createTargetChooser(starget, card);
|
||||
fromTc->targetter = NULL;
|
||||
fromTc->targetter = NULL; //avoid protection from
|
||||
}
|
||||
return NEW TrCardAddedToZone(id, card, (TargetZoneChooser *) toTc, toTcCard, (TargetZoneChooser *) fromTc, fromTcCard);
|
||||
}
|
||||
|
||||
@@ -540,9 +540,12 @@ bool TargetChooser::canTarget(Targetable * target)
|
||||
tempcard = tempcard->previous;
|
||||
}
|
||||
}
|
||||
if (source && targetter && card->isInPlay() && (card->has(Constants::SHROUD) || card->protectedAgainst(targetter))) return false;
|
||||
if (source && targetter && card->isInPlay() && (targetter->controller() != card->controller()) && (card->has(
|
||||
Constants::OPPONENTSHROUD) || card->protectedAgainst(targetter))) return false;
|
||||
if (source && targetter && card->isInPlay())
|
||||
{
|
||||
if (card->has(Constants::SHROUD)) return false;
|
||||
if (card->protectedAgainst(targetter)) return false;
|
||||
if ((targetter->controller() != card->controller()) && card->has(Constants::OPPONENTSHROUD)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if (target->typeAsTarget() == TARGET_STACKACTION) return true;
|
||||
|
||||
Reference in New Issue
Block a user