mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00: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));
|
||||
Player player = game.getPlayer(attacker.getControllerId());
|
||||
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>();
|
||||
for (UUID blockerId: blockerOrder) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue