forked from External/mage
[MID] Implemented Geistflame Reservoir
This commit is contained in:
parent
eef6160a4c
commit
03dfa50f23
4 changed files with 72 additions and 12 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -15,11 +14,12 @@ public enum GetXValue implements DynamicValue {
|
|||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
int amount = 0;
|
||||
for (VariableCost cost : sourceAbility.getCosts().getVariableCosts()) {
|
||||
amount += cost.getAmount();
|
||||
}
|
||||
return amount;
|
||||
return sourceAbility
|
||||
.getCosts()
|
||||
.getVariableCosts()
|
||||
.stream()
|
||||
.mapToInt(VariableCost::getAmount)
|
||||
.sum();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue