mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Some multi-blocker damage changes
Fixes situations like "two-man band with Viscera Seer gets blocked, Viscera Seer sacs itself afterwards" - before, the blocker would deal its damage twice to the remaining attacker.
This commit is contained in:
parent
74a47bc63a
commit
77762cbf59
1 changed files with 9 additions and 9 deletions
|
@ -173,21 +173,16 @@ public class CombatGroup implements Serializable, Copyable<CombatGroup> {
|
|||
public void assignDamageToAttackers(boolean first, Game game) {
|
||||
if (!blockers.isEmpty() && (!first || hasFirstOrDoubleStrike(game))) {
|
||||
// this should only come up if Butcher Orgg is granted the ability to block multiple blockers
|
||||
boolean altDamageMethod = false;
|
||||
for (UUID blockerId : blockers) {
|
||||
Permanent blocker = game.getPermanent(blockerId);
|
||||
if (assignsDefendingPlayerAndOrDefendingCreaturesDividedDamage(blocker, blocker.getControllerId(), first, game, false)) {
|
||||
altDamageMethod = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (altDamageMethod) {
|
||||
// this could be necessary to remake in the future (banding with Butcher Orgg?)
|
||||
return;
|
||||
}
|
||||
if (attackers.size() == 1) {
|
||||
singleAttackerDamage(first, game);
|
||||
} else {
|
||||
if (attackers.size() != 1) {
|
||||
multiAttackerDamage(first, game);
|
||||
// } else {
|
||||
// singleAttackerDamage(first, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -462,10 +457,15 @@ public class CombatGroup implements Serializable, Copyable<CombatGroup> {
|
|||
* {@link #singleBlockerDamage}.
|
||||
*
|
||||
* Handles abilities like "{this} an block any number of creatures.".
|
||||
*
|
||||
* Blocker damage for blockers blocking single creatures is handled in
|
||||
* the single/multi blocker methods, so this shouldn't be used anymore.
|
||||
*
|
||||
* @param first
|
||||
* @param game
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
private void singleAttackerDamage(boolean first, Game game) {
|
||||
Permanent blocker = game.getPermanent(blockers.get(0));
|
||||
Permanent attacker = game.getPermanent(attackers.get(0));
|
||||
|
|
Loading…
Reference in a new issue