mirror of
https://github.com/magefree/mage.git
synced 2025-12-29 06:52:02 -08:00
clean DamagedBatchCouldHaveFiredEvent isCombat
no longer flag to be more in line with other damage events
This commit is contained in:
parent
f24b3d988d
commit
ab69e05115
2 changed files with 11 additions and 4 deletions
|
|
@ -819,9 +819,11 @@ public class GameState implements Serializable, Copyable<GameState> {
|
|||
}
|
||||
|
||||
// There might be no damage dealt, but we want to fire that damage (in a batch) could have been dealt.
|
||||
// Of note, DamagedBatchCouldHaveFiredEvent is not a batch event in the sense it doesn't contain sub events.
|
||||
public void addBatchDamageCouldHaveBeenFired(boolean combat, Game game) {
|
||||
for (GameEvent event : simultaneousEvents) {
|
||||
if (event instanceof DamagedBatchCouldHaveFiredEvent && event.getFlag() == combat) {
|
||||
if (event instanceof DamagedBatchCouldHaveFiredEvent
|
||||
&& ((DamagedBatchCouldHaveFiredEvent) event).isCombat() == combat) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package mage.game.events;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
||||
/**
|
||||
* Does not contain any info on damage events, and can fire even when all damage is prevented.
|
||||
* Fire any time a DAMAGED_BATCH_FOR_ALL could have fired (combat & noncombat).
|
||||
|
|
@ -11,7 +9,14 @@ import mage.abilities.Ability;
|
|||
*/
|
||||
public class DamagedBatchCouldHaveFiredEvent extends GameEvent {
|
||||
|
||||
private final boolean isCombat;
|
||||
|
||||
public DamagedBatchCouldHaveFiredEvent(boolean combat) {
|
||||
super(EventType.DAMAGED_BATCH_COULD_HAVE_FIRED, null, (Ability) null, null, 0, combat);
|
||||
super(EventType.DAMAGED_BATCH_COULD_HAVE_FIRED, null, null, null);
|
||||
this.isCombat = combat;
|
||||
}
|
||||
|
||||
public boolean isCombat() {
|
||||
return isCombat;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue