forked from External/mage
Change all line endings to LF
This commit is contained in:
parent
13d9a56b7a
commit
430ae503c7
17069 changed files with 1263498 additions and 1263497 deletions
|
|
@ -1,45 +1,45 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.DiscardCardCost;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.cards.Card;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class DiscardCostCardConvertedMana implements DynamicValue {
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
for (Cost cost : sourceAbility.getCosts()) {
|
||||
if (cost instanceof DiscardCardCost) {
|
||||
DiscardCardCost discardCost = (DiscardCardCost) cost;
|
||||
int cmc = 0;
|
||||
for (Card card : discardCost.getCards()) {
|
||||
cmc += card.getManaCost().convertedManaCost();
|
||||
}
|
||||
return cmc;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DiscardCostCardConvertedMana copy() {
|
||||
return new DiscardCostCardConvertedMana();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "the discarded card's converted mana cost";
|
||||
}
|
||||
}
|
||||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.DiscardCardCost;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.cards.Card;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class DiscardCostCardConvertedMana implements DynamicValue {
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
for (Cost cost : sourceAbility.getCosts()) {
|
||||
if (cost instanceof DiscardCardCost) {
|
||||
DiscardCardCost discardCost = (DiscardCardCost) cost;
|
||||
int cmc = 0;
|
||||
for (Card card : discardCost.getCards()) {
|
||||
cmc += card.getManaCost().convertedManaCost();
|
||||
}
|
||||
return cmc;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DiscardCostCardConvertedMana copy() {
|
||||
return new DiscardCostCardConvertedMana();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "the discarded card's converted mana cost";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue