* Convoke - Fixed that creatures with protection from color of convoke spell could not be tapped. Fixes #513-

This commit is contained in:
LevelX2 2014-08-15 12:42:56 +02:00
parent de6d1bf46b
commit 429e114f69
4 changed files with 164 additions and 16 deletions

View file

@ -87,9 +87,13 @@ public class TargetPermanent extends TargetObject {
//2. We need to check both source.getId() and source.getSourceId()
// first for protection from spells or abilities (e.g. protection from colored spells, r1753)
// second for protection from sources (e.g. protection from artifacts + equip ability)
return permanent.canBeTargetedBy(game.getObject(source.getId()), controllerId, game)
&& permanent.canBeTargetedBy(game.getObject(source.getSourceId()), controllerId, game)
&& filter.match(permanent, source.getSourceId(), controllerId, game);
if (!isNotTarget()) {
if (!permanent.canBeTargetedBy(game.getObject(source.getId()), controllerId, game) ||
!permanent.canBeTargetedBy(game.getObject(source.getSourceId()), controllerId, game)) {
return false;
}
}
return filter.match(permanent, source.getSourceId(), controllerId, game);
} else {
return filter.match(permanent, null, controllerId, game);
}