mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 22:42:03 -08:00
simplify constructors in GainAbilityAllEffect
This commit is contained in:
parent
869de1eac6
commit
70bf68a5a4
2 changed files with 2 additions and 12 deletions
|
|
@ -29,10 +29,6 @@ public class GainAbilityAllEffect extends ContinuousEffectImpl {
|
|||
protected FilterPermanent filter;
|
||||
protected boolean forceQuotes = false;
|
||||
|
||||
public GainAbilityAllEffect(Ability ability, Duration duration) {
|
||||
this(ability, duration, new FilterPermanent());
|
||||
}
|
||||
|
||||
public GainAbilityAllEffect(Ability ability, Duration duration, FilterPermanent filter) {
|
||||
this(ability, duration, filter, false);
|
||||
}
|
||||
|
|
@ -43,11 +39,7 @@ public class GainAbilityAllEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
|
||||
public GainAbilityAllEffect(Ability ability, Duration duration, FilterPermanent filter, boolean excludeSource) {
|
||||
this(ability, duration, filter, excludeSource, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA);
|
||||
}
|
||||
|
||||
public GainAbilityAllEffect(Ability ability, Duration duration, FilterPermanent filter, boolean excludeSource, Layer layer, SubLayer subLayer) {
|
||||
super(duration, layer, subLayer, Outcome.AddAbility);
|
||||
super(duration, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
|
||||
this.ability = ability.copy();
|
||||
this.ability.newId();
|
||||
this.filter = filter;
|
||||
|
|
|
|||
|
|
@ -65,8 +65,6 @@ public class GainProtectionFromColorAllEffect extends GainAbilityAllEffect {
|
|||
return staticText;
|
||||
}
|
||||
|
||||
String text = "Choose a color. " + filter.getMessage() + " gain protection from the chosen color " + duration.toString();
|
||||
|
||||
return text;
|
||||
return "Choose a color. " + filter.getMessage() + " gain protection from the chosen color " + duration.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue