forked from External/mage
[filters] replaced Name condition with Predicate
This commit is contained in:
parent
3d1f23e03b
commit
98feeb9968
28 changed files with 120 additions and 83 deletions
|
|
@ -28,20 +28,17 @@
|
|||
|
||||
package mage.abilities.effects.common.continious;
|
||||
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.effects.WhileConditionContiniousEffect;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Layer;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.SubLayer;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.effects.WhileConditionContiniousEffect;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
|
@ -50,13 +47,13 @@ public class BoostSourceWhileControlsEffect extends WhileConditionContiniousEffe
|
|||
|
||||
private int power;
|
||||
private int toughness;
|
||||
private List<String> filterDescription;
|
||||
private String filterDescription;
|
||||
|
||||
public BoostSourceWhileControlsEffect(FilterPermanent filter, int power, int toughness) {
|
||||
super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, new ControlsPermanentCondition(filter), Outcome.BoostCreature);
|
||||
this.power = power;
|
||||
this.toughness = toughness;
|
||||
this.filterDescription = filter.getName();
|
||||
this.filterDescription = filter.getMessage();
|
||||
staticText = "{this} gets " + String.format("%1$+d/%2$+d", power, toughness) + " as long as you control a " + filterDescription;
|
||||
}
|
||||
|
||||
|
|
@ -64,8 +61,7 @@ public class BoostSourceWhileControlsEffect extends WhileConditionContiniousEffe
|
|||
super(effect);
|
||||
this.power = effect.power;
|
||||
this.toughness = effect.toughness;
|
||||
this.filterDescription = new ArrayList<String>();
|
||||
this.filterDescription.addAll(effect.filterDescription);
|
||||
this.filterDescription = effect.filterDescription;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue