4 DFT + 7 DRC cards (#6850)

* Support Aetheric Amplifier
This commit is contained in:
Fulgur14
2025-01-25 14:56:39 +01:00
committed by GitHub
parent 9bda7134d0
commit 5385678076
12 changed files with 125 additions and 11 deletions

View File

@@ -3,6 +3,7 @@ package forge.game.ability.effects;
import java.util.Map;
import forge.game.Game;
import forge.game.GameEntity;
import forge.game.GameEntityCounterTable;
import forge.game.ability.SpellAbilityEffect;
import forge.game.card.Card;
@@ -28,7 +29,7 @@ public class CountersMultiplyEffect extends SpellAbilityEffect {
}
sb.append(" on ");
sb.append(Lang.joinHomogenous(getTargetCards(sa)));
sb.append(Lang.joinHomogenous(getTargetEntities(sa)));
sb.append(".");
@@ -45,19 +46,23 @@ public class CountersMultiplyEffect extends SpellAbilityEffect {
final int n = Integer.parseInt(sa.getParamOrDefault("Multiplier", "2")) - 1;
GameEntityCounterTable table = new GameEntityCounterTable();
for (final Card tgtCard : getTargetCards(sa)) {
Card gameCard = game.getCardState(tgtCard, null);
// gameCard is LKI in that case, the card is not in game anymore
// or the timestamp did change
// this should check Self too
if (gameCard == null || !tgtCard.equalsWithGameTimestamp(gameCard)) {
continue;
for (GameEntity ge : getTargetEntities(sa)) {
if (ge instanceof Card) {
Card gameCard = game.getCardState((Card) ge, null);
// gameCard is LKI in that case, the card is not in game anymore
// or the timestamp did change
// this should check Self too
if (gameCard == null || !((Card) ge).equalsWithGameTimestamp(gameCard)) {
continue;
}
ge = gameCard;
}
if (counterType != null) {
gameCard.addCounter(counterType, gameCard.getCounters(counterType) * n, player, table);
ge.addCounter(counterType, ge.getCounters(counterType) * n, player, table);
} else {
for (Map.Entry<CounterType, Integer> e : gameCard.getCounters().entrySet()) {
gameCard.addCounter(e.getKey(), e.getValue() * n, player, table);
for (Map.Entry<CounterType, Integer> e : ge.getCounters().entrySet()) {
ge.addCounter(e.getKey(), e.getValue() * n, player, table);
}
}
}