forked from External/mage
Fixed that combat damage triggered abilities go to stack during the related combat step.
This commit is contained in:
parent
2f016c8ea6
commit
f5499531c7
5 changed files with 26 additions and 15 deletions
|
|
@ -25,13 +25,13 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.game.turn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.game.Game;
|
||||
import mage.game.combat.CombatGroup;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
||||
/**
|
||||
|
|
@ -51,6 +51,12 @@ public class CombatDamageStep extends Step {
|
|||
super(step);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void priority(Game game, UUID activePlayerId, boolean resuming) {
|
||||
game.fireEvent(new GameEvent(EventType.COMBAT_DAMAGE_STEP_PRIORITY, null, null, activePlayerId));
|
||||
super.priority(game, activePlayerId, resuming);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean skipStep(Game game, UUID activePlayerId) {
|
||||
if (game.getCombat().noAttackers()) {
|
||||
|
|
@ -62,14 +68,14 @@ public class CombatDamageStep extends Step {
|
|||
@Override
|
||||
public void beginStep(Game game, UUID activePlayerId) {
|
||||
super.beginStep(game, activePlayerId);
|
||||
for (CombatGroup group: game.getCombat().getGroups()) {
|
||||
for (CombatGroup group : game.getCombat().getGroups()) {
|
||||
group.assignDamageToBlockers(false, game);
|
||||
}
|
||||
for (CombatGroup group : game.getCombat().getBlockingGroups()) {
|
||||
group.assignDamageToAttackers(false, game);
|
||||
}
|
||||
|
||||
for (CombatGroup group: game.getCombat().getGroups()) {
|
||||
for (CombatGroup group : game.getCombat().getGroups()) {
|
||||
group.applyDamage(game);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue