forked from External/mage
rewrote some streams and optionals
This commit is contained in:
parent
d0bf77cedf
commit
594ffa2754
29 changed files with 199 additions and 273 deletions
|
|
@ -27,8 +27,6 @@
|
|||
*/
|
||||
package mage.game.stack;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.Mana;
|
||||
|
|
@ -60,6 +58,11 @@ import mage.game.permanent.PermanentCard;
|
|||
import mage.players.Player;
|
||||
import mage.util.GameLog;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
|
@ -331,8 +334,8 @@ public class Spell extends StackObjImpl implements Card {
|
|||
* determine whether card was kicked or not. E.g. Desolation Angel
|
||||
*/
|
||||
private void updateOptionalCosts(int index) {
|
||||
Ability abilityOrig = spellCards.get(index).getAbilities().get(spellAbilities.get(index).getId());
|
||||
if (abilityOrig != null) {
|
||||
spellCards.get(index).getAbilities().get(spellAbilities.get(index).getId()).ifPresent(abilityOrig ->
|
||||
{
|
||||
for (Object object : spellAbilities.get(index).getOptionalCosts()) {
|
||||
Cost cost = (Cost) object;
|
||||
for (Cost costOrig : abilityOrig.getOptionalCosts()) {
|
||||
|
|
@ -346,7 +349,7 @@ public class Spell extends StackObjImpl implements Card {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue