removed redundant calls to copy()

This commit is contained in:
BetaSteward 2011-08-19 22:18:23 -04:00
parent 2d0842f320
commit 35d993c3c1
8 changed files with 11 additions and 11 deletions

View file

@ -93,7 +93,7 @@ public class GainAbilityAllEffect extends ContinuousEffectImpl<GainAbilityAllEff
for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter)) {
if (!this.affectedObjectsSet || objects.contains(perm.getId())) {
if (!(excludeSource && perm.getId().equals(source.getSourceId()))) {
perm.addAbility(ability.copy());
perm.addAbility(ability);
}
}
}

View file

@ -71,7 +71,7 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl<GainAbilityA
if (equipment != null && equipment.getAttachedTo() != null) {
Permanent creature = game.getPermanent(equipment.getAttachedTo());
if (creature != null)
creature.addAbility(ability.copy());
creature.addAbility(ability);
}
return true;
}

View file

@ -93,7 +93,7 @@ public class GainAbilityControlledEffect extends ContinuousEffectImpl<GainAbilit
for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter, source.getControllerId())) {
if (!this.affectedObjectsSet || objects.contains(perm.getId())) {
if (!(excludeSource && perm.getId().equals(source.getSourceId()))) {
perm.addAbility(ability.copy());
perm.addAbility(ability);
}
}
}

View file

@ -73,7 +73,7 @@ public class GainAbilitySourceEffect extends ContinuousEffectImpl<GainAbilitySou
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
permanent.addAbility(ability.copy());
permanent.addAbility(ability);
return true;
}
return false;

View file

@ -69,7 +69,7 @@ public class GainAbilityTargetEffect extends ContinuousEffectImpl {
for (UUID permanentId : source.getTargets().get(0).getTargets()) {
Permanent permanent = game.getPermanent(permanentId);
if (permanent != null) {
permanent.addAbility(ability.copy());
permanent.addAbility(ability);
affectedTargets++;
}
}