mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
fixed Growth Cycle not correctly boosting creatures
This commit is contained in:
parent
2ec3036abe
commit
b28281db09
1 changed files with 4 additions and 7 deletions
|
@ -4,7 +4,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -14,7 +13,6 @@ import mage.players.Player;
|
|||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
|
@ -52,15 +50,14 @@ enum GrowthCycleValue implements DynamicValue {
|
|||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
Player player = game.getPlayer(sourceAbility.getControllerId());
|
||||
if (player == null) {
|
||||
return 0;
|
||||
return 3;
|
||||
}
|
||||
return player
|
||||
return 3 + player
|
||||
.getGraveyard()
|
||||
.getCards(game)
|
||||
.stream()
|
||||
.map(Card::getName)
|
||||
.filter(s -> s.equals("Growth Cycle"))
|
||||
.collect(Collectors.reducing(0, e -> 1, Integer::sum));
|
||||
.mapToInt(card -> "Growth Cycle".equals(card.getName()) ? 2 : 0)
|
||||
.sum();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue