This commit is contained in:
tool4EvEr
2022-11-22 12:26:29 +01:00
parent f004280791
commit a10f8f4cb7
10 changed files with 19 additions and 19 deletions

View File

@@ -2430,7 +2430,7 @@ public class GameAction {
}
if (c.isPlaneswalker()) {
int lethalPW = c.getCurrentLoyalty();
// 120.10
// CR 120.10
lethal = c.isCreature() ? Math.min(lethal, lethalPW) : lethalPW;
}
lethalDamage.put(c, lethal);
@@ -2442,6 +2442,7 @@ public class GameAction {
sourceLKI.getDamageHistory().registerDamage(e.getValue(), isCombat, sourceLKI, e.getKey(), lkiCache);
}
// CR 702.15e
if (sum > 0 && sourceLKI.hasKeyword(Keyword.LIFELINK)) {
sourceLKI.getController().gainLife(sum, sourceLKI, cause);
}

View File

@@ -27,6 +27,7 @@ import forge.game.trigger.Trigger;
import forge.game.trigger.TriggerHandler;
import forge.game.trigger.TriggerType;
import forge.game.zone.ZoneType;
import forge.util.CardTranslation;
import forge.util.TextUtil;
import forge.util.collect.FCollection;
@@ -113,7 +114,7 @@ public class EffectEffect extends SpellAbilityEffect {
String name = sa.getParam("Name");
if (name == null) {
name = hostCard.getName() + (sa.hasParam("Boon") ? "'s Boon" : "'s Effect");
name = CardTranslation.getTranslatedName(hostCard.getName()) + (sa.hasParam("Boon") ? "'s Boon" : "'s Effect");
}
// Unique Effects shouldn't be duplicated

View File

@@ -5636,7 +5636,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
@Override
public final int addDamageAfterPrevention(final int damageIn, final Card source, final boolean isCombat, GameEntityCounterTable counterTable) {
if (damageIn <= 0) {
return 0; // Rule 119.8
return 0; // 120.8
}
// 120.1a Damage cant be dealt to an object thats neither a creature nor a planeswalker.

View File

@@ -160,7 +160,7 @@ public class PlayerProperty {
return false;
}
} else if (property.equals("Defending")) {
if (!game.getCombat().getAttackersAndDefenders().values().contains(player)) {
if (game.getCombat() == null || !game.getCombat().getAttackersAndDefenders().values().contains(player)) {
return false;
}
} else if (property.equals("LostLifeThisTurn")) {

View File

@@ -29,7 +29,6 @@ public class StaticAbilityNumLoyaltyAct {
}
public static boolean applyLimitIncrease(final StaticAbility stAb, final Card card) {
if (!stAb.matchesValidParam("ValidCard", card)) {
return false;
}
@@ -58,7 +57,7 @@ public class StaticAbilityNumLoyaltyAct {
}
}
int more = AbilityUtils.calculateAmount(card, stAb.getParam("Additional"), stAb);
addl = addl + more;
addl += more;
}
}
}