mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 02:52:02 -08:00
fixed issue 107
This commit is contained in:
parent
09be5934f5
commit
c92c506878
1 changed files with 11 additions and 1 deletions
|
|
@ -200,7 +200,9 @@ public class CombatGroup implements Serializable, Copyable<CombatGroup> {
|
||||||
Permanent attacker = game.getPermanent(attackers.get(0));
|
Permanent attacker = game.getPermanent(attackers.get(0));
|
||||||
Player player = game.getPlayer(attacker.getControllerId());
|
Player player = game.getPlayer(attacker.getControllerId());
|
||||||
int damage = attacker.getPower().getValue();
|
int damage = attacker.getPower().getValue();
|
||||||
if (attacker != null && canDamage(attacker, first)) {
|
if (attacker == null)
|
||||||
|
return;
|
||||||
|
if (canDamage(attacker, first)) {
|
||||||
Map<UUID, Integer> assigned = new HashMap<UUID, Integer>();
|
Map<UUID, Integer> assigned = new HashMap<UUID, Integer>();
|
||||||
for (UUID blockerId: blockerOrder) {
|
for (UUID blockerId: blockerOrder) {
|
||||||
Permanent blocker = game.getPermanent(blockerId);
|
Permanent blocker = game.getPermanent(blockerId);
|
||||||
|
|
@ -237,6 +239,14 @@ public class CombatGroup implements Serializable, Copyable<CombatGroup> {
|
||||||
blocker.damage(entry.getValue(), attacker.getId(), game, true, true);
|
blocker.damage(entry.getValue(), attacker.getId(), game, true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
for (UUID blockerId: blockerOrder) {
|
||||||
|
Permanent blocker = game.getPermanent(blockerId);
|
||||||
|
if (canDamage(blocker, first)) {
|
||||||
|
attacker.damage(blocker.getPower().getValue(), blocker.getId(), game, true, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void defenderDamage(Permanent attacker, int amount, Game game) {
|
private void defenderDamage(Permanent attacker, int amount, Game game) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue