forked from External/mage
* Howlpack Avenger - fixed game error on usage (#9781)
This commit is contained in:
parent
b632d89caa
commit
a648268c4c
6 changed files with 23 additions and 4 deletions
|
|
@ -812,16 +812,19 @@ public class GameState implements Serializable, Copyable<GameState> {
|
|||
}
|
||||
|
||||
public void addSimultaneousDamage(DamagedEvent damagedEvent, Game game) {
|
||||
// combine damages per type (player or permanent)
|
||||
boolean flag = false;
|
||||
for (GameEvent event : simultaneousEvents) {
|
||||
if ((event instanceof DamagedBatchEvent)
|
||||
&& ((DamagedBatchEvent) event).getDamageClazz().isInstance(damagedEvent)) {
|
||||
// old batch
|
||||
((DamagedBatchEvent) event).addEvent(damagedEvent);
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
// new batch
|
||||
addSimultaneousEvent(DamagedBatchEvent.makeEvent(damagedEvent), game);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue