mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Fix Reverse Polarity
This commit is contained in:
@@ -18,6 +18,7 @@ import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import com.google.common.base.Functions;
|
||||
import com.google.common.base.Predicate;
|
||||
|
||||
import forge.card.CardStateName;
|
||||
@@ -2404,8 +2405,10 @@ public class AbilityUtils {
|
||||
List<Integer> dmgInstances = game.getDamageDoneThisTurn(isCombat, false, props[1], props[2], c, player, ctb);
|
||||
if (!dmgInstances.isEmpty() && sq[0].contains("Max")) {
|
||||
num = Collections.max(dmgInstances);
|
||||
} else {
|
||||
} else if (sq[0].startsWith("Num")) {
|
||||
num = dmgInstances.size();
|
||||
} else {
|
||||
num = Aggregates.sum(dmgInstances, Functions.identity());
|
||||
}
|
||||
return doXMath(num, expr, c, ctb);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Reverse Polarity
|
||||
ManaCost:W W
|
||||
Types:Instant
|
||||
A:SP$ GainLife | Cost$ W W | Defined$ You | LifeAmount$ X | SpellDescription$ You gain X life, where X is twice the damage dealt to you so far this turn by artifacts.
|
||||
SVar:X:Count$YourTypeDamageThisTurn Artifact/Times.2
|
||||
SVar:X:Count$DamageThisTurn Artifact You/Times.2
|
||||
AI:RemoveDeck:Random
|
||||
DeckHas:Ability$LifeGain
|
||||
Oracle:You gain X life, where X is twice the damage dealt to you so far this turn by artifacts.
|
||||
|
||||
Reference in New Issue
Block a user