mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Added a test. Some minor changes.
This commit is contained in:
parent
0c229321a6
commit
768d7f1ceb
4 changed files with 94 additions and 11 deletions
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.condition;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -34,14 +33,15 @@ import mage.abilities.Ability;
|
|||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* Combines conditions to one compound conditon, all single conditons
|
||||
* must be true to return true for the compound condtion.
|
||||
* Combines conditions to one compound conditon, all single conditons must be
|
||||
* true to return true for the compound condtion.
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class CompoundCondition implements Condition {
|
||||
|
||||
private final ArrayList<Condition> conditions = new ArrayList();
|
||||
private final ArrayList<Condition> conditions = new ArrayList<>();
|
||||
|
||||
private final String text;
|
||||
|
||||
public CompoundCondition(Condition... conditions) {
|
||||
|
|
@ -55,7 +55,7 @@ public class CompoundCondition implements Condition {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Condition condition: conditions) {
|
||||
for (Condition condition : conditions) {
|
||||
if (!condition.apply(game, source)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class BoostControlledEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
|
||||
public BoostControlledEffect(int power, int toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource) {
|
||||
this(new StaticValue(power), new StaticValue(toughness), duration, filter, excludeSource);
|
||||
this(new StaticValue(power), new StaticValue(toughness), duration, filter, excludeSource, true);
|
||||
}
|
||||
|
||||
public BoostControlledEffect(DynamicValue power, DynamicValue toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue