* Fixed a bug that self scope were checked for non relevant events (fixes #1350).

This commit is contained in:
LevelX2 2015-11-07 13:32:15 +01:00
parent b1c3d690f5
commit d596a1ef83
5 changed files with 38 additions and 32 deletions

View file

@ -388,7 +388,9 @@ public class ContinuousEffects implements Serializable {
// for replacment effects of static abilities do not use LKI to check if to apply
if (ability.getAbilityType() != AbilityType.STATIC || ability.isInUseableZone(game, null, event)) {
if (effect.getDuration() != Duration.OneUse || !effect.isUsed()) {
if (!game.getScopeRelevant() || effect.hasSelfScope() || !event.getTargetId().equals(ability.getSourceId())) {
if (!game.getScopeRelevant()
|| effect.hasSelfScope()
|| !event.getTargetId().equals(ability.getSourceId())) {
if (effect.applies(event, ability, game)) {
applicableAbilities.add(ability);
}