diff --git a/forge-game/src/main/java/forge/game/GameAction.java b/forge-game/src/main/java/forge/game/GameAction.java index 799eb71482c..6c968147ba2 100644 --- a/forge-game/src/main/java/forge/game/GameAction.java +++ b/forge-game/src/main/java/forge/game/GameAction.java @@ -2216,7 +2216,7 @@ public class GameAction { // publicize the decision game.fireEvent(new GameEventScry(p, numToTop, numToBottom)); } - // do the moves after all the decisions (maybe not necesssary, but let's + // do the moves after all the decisions (maybe not necessary, but let's // do it the official way) for (Map.Entry> e : decisions.entrySet()) { // no good iterate simultaneously in Java diff --git a/forge-game/src/main/java/forge/game/card/Card.java b/forge-game/src/main/java/forge/game/card/Card.java index 2b6358ecd8a..181b334dae1 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -5199,6 +5199,12 @@ public class Card extends GameEntity implements Comparable, IHasSVars { // this is the minimal damage a trampling creature has to assign to a blocker public final int getLethalDamage() { + // CR 702.2c + for (Card c : getAssignedDamageMap().keySet()) { + if (c.hasKeyword(Keyword.DEATHTOUCH)) { + return 0; + } + } return getLethal() - getDamage() - getTotalAssignedDamage(); } @@ -5224,8 +5230,9 @@ public class Card extends GameEntity implements Comparable, IHasSVars { } public final void addAssignedDamage(int assignedDamage0, final Card sourceCard) { - if (assignedDamage0 < 0) { - assignedDamage0 = 0; + // 510.1a Creatures that would assign 0 or less damage don’t assign combat damage at all. + if (assignedDamage0 <= 0) { + return; } Log.debug(this + " - was assigned " + assignedDamage0 + " damage, by " + sourceCard); if (!assignedDamageMap.containsKey(sourceCard)) { diff --git a/forge-gui-desktop/src/main/java/forge/screens/match/CMatchUI.java b/forge-gui-desktop/src/main/java/forge/screens/match/CMatchUI.java index abef410190b..619cafdcd84 100644 --- a/forge-gui-desktop/src/main/java/forge/screens/match/CMatchUI.java +++ b/forge-gui-desktop/src/main/java/forge/screens/match/CMatchUI.java @@ -1056,7 +1056,6 @@ public final class CMatchUI return result.get(); } - @Override public void openView(final TrackableCollection myPlayers) { final GameView gameView = getGameView(); diff --git a/forge-gui-desktop/src/main/java/forge/screens/match/VAssignCombatDamage.java b/forge-gui-desktop/src/main/java/forge/screens/match/VAssignCombatDamage.java index bd844c2b8fc..9fe31a827fa 100644 --- a/forge-gui-desktop/src/main/java/forge/screens/match/VAssignCombatDamage.java +++ b/forge-gui-desktop/src/main/java/forge/screens/match/VAssignCombatDamage.java @@ -283,7 +283,7 @@ public class VAssignCombatDamage { * @param isLMB */ private void assignDamageTo(CardView source, final boolean meta, final boolean isAdding) { - if ( !damage.containsKey(source) ) + if (!damage.containsKey(source)) source = null; // If trying to assign to the defender, follow the normal assignment rules @@ -391,7 +391,6 @@ public class VAssignCombatDamage { dt.damage = Math.max(0, addedDamage + dt.damage); } - /** * TODO: Write javadoc for this method. * @return @@ -410,8 +409,7 @@ public class VAssignCombatDamage { int damageLeft = totalDamageToAssign; boolean allHaveLethal = true; - for (DamageTarget dt : defenders) - { + for (DamageTarget dt : defenders) { int dmg = dt.damage; damageLeft -= dmg; int lethal = getDamageToKill(dt.card); diff --git a/forge-gui/res/cardsfolder/f/fireflux_squad.txt b/forge-gui/res/cardsfolder/f/fireflux_squad.txt index edf2d2d9f9c..109e966512c 100755 --- a/forge-gui/res/cardsfolder/f/fireflux_squad.txt +++ b/forge-gui/res/cardsfolder/f/fireflux_squad.txt @@ -3,7 +3,7 @@ ManaCost:3 R Types:Creature Human Soldier PT:4/3 K:Haste -T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigExile | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Whenever CARDNAME attacks, you may exile another target attacking creature you control. If you do, reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield tapped and flying and the rest on the bottom of your library in a random order. +T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigExile | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Whenever CARDNAME attacks, you may exile another target attacking creature you control. If you do, reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield tapped and attacking and the rest on the bottom of your library in a random order. SVar:TrigExile:DB$ ChangeZone | ValidTgts$ Creature.attacking+Other+YouCtrl | TgtPrompt$ Select another target attacking creature you control | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True | SubAbility$ DBDigUntil SVar:DBDigUntil:DB$ DigUntil | Valid$ Creature | ValidDescription$ Creature | FoundDestination$ Battlefield | Tapped$ True | Attacking$ True | GainControl$ True | RevealedDestination$ Library | RevealedLibraryPosition$ -1 | RevealRandomOrder$ True | ConditionCheckSVar$ X | ConditionSVarCompare$ GE1 | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True diff --git a/forge-gui/res/cardsfolder/p/pathway_arrows.txt b/forge-gui/res/cardsfolder/p/pathway_arrows.txt index 399acc1fccf..7ec04f39e08 100644 --- a/forge-gui/res/cardsfolder/p/pathway_arrows.txt +++ b/forge-gui/res/cardsfolder/p/pathway_arrows.txt @@ -2,7 +2,7 @@ Name:Pathway Arrows ManaCost:1 Types:Artifact Equipment S:Mode$ Continuous | Affected$ Card.EquippedBy | AddAbility$ Damage | AddSVar$ PathwayTapAll & PathwayCleanup | Description$ Equipped creature has "{2}, {T}: This creature deals 1 damage to target creature. If a colorless creature is dealt damage this way, tap it." -SVar:Damage:AB$DealDamage | Cost$ 2 T | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 1 | RememberDamaged$ True | SubAbility$ PathwayTapAll | SpellDescription$ CARDNAME deals 1 damage to target creature. If a colorless creature is dealt damage this way, tap it. +SVar:Damage:AB$ DealDamage | Cost$ 2 T | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 1 | RememberDamaged$ True | SubAbility$ PathwayTapAll | SpellDescription$ CARDNAME deals 1 damage to target creature. If a colorless creature is dealt damage this way, tap it. SVar:PathwayTapAll:DB$ TapAll | ValidCards$ Creature.IsRemembered+Colorless | SubAbility$ PathwayCleanup SVar:PathwayCleanup:DB$ Cleanup | ClearRemembered$ True K:Equip:2