* Fixed player Hexproof ThoughtAsIf handling (fixes #5796).

This commit is contained in:
LevelX2 2019-05-15 17:33:34 +02:00
parent 1dcdff58d2
commit bf8dd78b6e
2 changed files with 37 additions and 39 deletions

View file

@ -72,12 +72,12 @@ class DetectionTowerEffect extends AsThoughEffectImpl {
}
@Override
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
if (affectedControllerId.equals(source.getControllerId())) {
if (game.getOpponents(source.getControllerId()).contains(sourceId)) {
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
if (affectedControllerId.equals(source.getControllerId())) { //
if (game.getOpponents(source.getControllerId()).contains(objectId)) {
return true;
}
Permanent creature = game.getPermanent(sourceId);
Permanent creature = game.getPermanent(objectId);
if (creature != null
&& game.getOpponents(source.getControllerId()).contains(creature.getControllerId())) {
return true;