From f4401b32f95d54c9ffdb6488fb803238a451627e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 28 Jan 2019 18:58:02 -0500 Subject: [PATCH] fixed High Alert allowing opposing defenders to attack --- .../CanAttackAsThoughItDidntHaveDefenderAllEffect.java | 8 ++++---- .../ruleModifying/CombatDamageByToughnessEffect.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderAllEffect.java index 6ee0830377..81532ccc94 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderAllEffect.java @@ -7,7 +7,7 @@ import mage.constants.AsThoughEffectType; import mage.constants.Duration; import mage.constants.Outcome; import mage.filter.FilterPermanent; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; @@ -21,7 +21,7 @@ public class CanAttackAsThoughItDidntHaveDefenderAllEffect extends AsThoughEffec private final FilterPermanent filter; public CanAttackAsThoughItDidntHaveDefenderAllEffect(Duration duration) { - this(duration, new FilterCreaturePermanent()); + this(duration, StaticFilters.FILTER_PERMANENT_CREATURE); } public CanAttackAsThoughItDidntHaveDefenderAllEffect(Duration duration, FilterPermanent filter) { @@ -30,7 +30,7 @@ public class CanAttackAsThoughItDidntHaveDefenderAllEffect extends AsThoughEffec this.staticText = getText(); } - public CanAttackAsThoughItDidntHaveDefenderAllEffect(final CanAttackAsThoughItDidntHaveDefenderAllEffect effect) { + private CanAttackAsThoughItDidntHaveDefenderAllEffect(final CanAttackAsThoughItDidntHaveDefenderAllEffect effect) { super(effect); this.filter = effect.filter.copy(); } @@ -48,7 +48,7 @@ public class CanAttackAsThoughItDidntHaveDefenderAllEffect extends AsThoughEffec @Override public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { Permanent permanent = game.getPermanent(objectId); - return permanent != null && filter.match(permanent, game); + return permanent != null && filter.match(permanent, source.getSourceId(), affectedControllerId, game); } private String getText() { diff --git a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessEffect.java index 3afcf0161f..a72ec5c1e6 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessEffect.java @@ -27,7 +27,7 @@ public class CombatDamageByToughnessEffect extends ContinuousEffectImpl { " assigns combat damage equal to its toughness rather than its power"; } - public CombatDamageByToughnessEffect(final CombatDamageByToughnessEffect effect) { + private CombatDamageByToughnessEffect(final CombatDamageByToughnessEffect effect) { super(effect); this.filter = effect.filter; this.onlyControlled = effect.onlyControlled;