various files converted from CRLF to LF

This commit is contained in:
Evan Kranzler 2021-09-23 19:37:47 -04:00
parent ea561892f5
commit 3a3e3fda48
36 changed files with 8696 additions and 8696 deletions

View file

@ -1,62 +1,62 @@
package mage.abilities.dynamicvalue.common;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.filter.FilterPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
*
* @author LevelX2
*/
public class HighestCMCOfPermanentValue implements DynamicValue {
private final FilterPermanent filter;
private final boolean onlyIfCanBeSacrificed;
public HighestCMCOfPermanentValue(FilterPermanent filter, boolean onlyIfCanBeSacrificed) {
super();
this.filter = filter;
this.onlyIfCanBeSacrificed = onlyIfCanBeSacrificed;
}
public HighestCMCOfPermanentValue(final HighestCMCOfPermanentValue dynamicValue) {
this.filter = dynamicValue.filter;
this.onlyIfCanBeSacrificed = dynamicValue.onlyIfCanBeSacrificed;
}
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
int value = 0;
Player controller = game.getPlayer(sourceAbility.getControllerId());
if (controller != null) {
for (Permanent permanent : game.getBattlefield()
.getActivePermanents(filter, sourceAbility.getControllerId(), sourceAbility.getSourceId(), game)) {
if ((!onlyIfCanBeSacrificed || controller.canPaySacrificeCost(permanent, sourceAbility, sourceAbility.getControllerId(), game))
&& permanent.getManaValue() > value) {
value = permanent.getManaValue();
}
}
}
return value;
}
@Override
public HighestCMCOfPermanentValue copy() {
return new HighestCMCOfPermanentValue(this);
}
@Override
public String toString() {
return "X";
}
@Override
public String getMessage() {
return filter.getMessage();
}
}
package mage.abilities.dynamicvalue.common;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.filter.FilterPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
*
* @author LevelX2
*/
public class HighestCMCOfPermanentValue implements DynamicValue {
private final FilterPermanent filter;
private final boolean onlyIfCanBeSacrificed;
public HighestCMCOfPermanentValue(FilterPermanent filter, boolean onlyIfCanBeSacrificed) {
super();
this.filter = filter;
this.onlyIfCanBeSacrificed = onlyIfCanBeSacrificed;
}
public HighestCMCOfPermanentValue(final HighestCMCOfPermanentValue dynamicValue) {
this.filter = dynamicValue.filter;
this.onlyIfCanBeSacrificed = dynamicValue.onlyIfCanBeSacrificed;
}
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
int value = 0;
Player controller = game.getPlayer(sourceAbility.getControllerId());
if (controller != null) {
for (Permanent permanent : game.getBattlefield()
.getActivePermanents(filter, sourceAbility.getControllerId(), sourceAbility.getSourceId(), game)) {
if ((!onlyIfCanBeSacrificed || controller.canPaySacrificeCost(permanent, sourceAbility, sourceAbility.getControllerId(), game))
&& permanent.getManaValue() > value) {
value = permanent.getManaValue();
}
}
}
return value;
}
@Override
public HighestCMCOfPermanentValue copy() {
return new HighestCMCOfPermanentValue(this);
}
@Override
public String toString() {
return "X";
}
@Override
public String getMessage() {
return filter.getMessage();
}
}