mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Two small fixes for Damage Assignment related to Banding creatures
This commit is contained in:
@@ -563,6 +563,7 @@ public class Combat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final boolean assignBlockersDamage(boolean firstStrikeDamage) {
|
private final boolean assignBlockersDamage(boolean firstStrikeDamage) {
|
||||||
|
// Assign damage by Blockers
|
||||||
final List<Card> blockers = this.getAllBlockers();
|
final List<Card> blockers = this.getAllBlockers();
|
||||||
boolean assignedDamage = false;
|
boolean assignedDamage = false;
|
||||||
|
|
||||||
@@ -586,7 +587,7 @@ public class Combat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assignedDamage = true;
|
assignedDamage = true;
|
||||||
Map<Card, Integer> map = blocker.getController().getController().assignCombatDamage(blocker, attackers, damage, null, assigningPlayer != blocker.getController());
|
Map<Card, Integer> map = assigningPlayer.getController().assignCombatDamage(blocker, attackers, damage, null, assigningPlayer != blocker.getController());
|
||||||
for (Entry<Card, Integer> dt : map.entrySet()) {
|
for (Entry<Card, Integer> dt : map.entrySet()) {
|
||||||
dt.getKey().addAssignedDamage(dt.getValue(), blocker);
|
dt.getKey().addAssignedDamage(dt.getValue(), blocker);
|
||||||
dt.getKey().updateObservers();
|
dt.getKey().updateObservers();
|
||||||
@@ -599,6 +600,7 @@ public class Combat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final boolean assignAttackersDamage(boolean firstStrikeDamage) {
|
private final boolean assignAttackersDamage(boolean firstStrikeDamage) {
|
||||||
|
// Assign damage by Attackers
|
||||||
this.defendingDamageMap.clear(); // this should really happen in deal damage
|
this.defendingDamageMap.clear(); // this should really happen in deal damage
|
||||||
List<Card> blockers = null;
|
List<Card> blockers = null;
|
||||||
final List<Card> attackers = this.getAttackers();
|
final List<Card> attackers = this.getAttackers();
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ public enum CMatchUI {
|
|||||||
|
|
||||||
// If the first blocker can absorb all of the damage, don't show the Assign Damage Frame
|
// If the first blocker can absorb all of the damage, don't show the Assign Damage Frame
|
||||||
Card firstBlocker = blockers.get(0);
|
Card firstBlocker = blockers.get(0);
|
||||||
if (!attacker.hasKeyword("Deathtouch") && firstBlocker.getLethalDamage() >= damage) {
|
if (!overrideOrder && !attacker.hasKeyword("Deathtouch") && firstBlocker.getLethalDamage() >= damage) {
|
||||||
Map<Card, Integer> res = new HashMap<Card, Integer>();
|
Map<Card, Integer> res = new HashMap<Card, Integer>();
|
||||||
res.put(firstBlocker, damage);
|
res.put(firstBlocker, damage);
|
||||||
return res;
|
return res;
|
||||||
|
|||||||
Reference in New Issue
Block a user