forked from External/mage
Implement Damage Batch for Permanent event (#11841)
* implement [WHO] Donna Noble * Changed trigger to DAMAGED_BATCH_FOR_PERMANENTS, check for need of separate targets * fix short circuit operator * simplify control path in paired damage trigger * Initial commit, missing tests * use CardUtil.getEventTargets * Implement Donna Noble using DamagedBatchForOnePermanentEvent * fix double-effect bug * remove unnecessary custom effect * Fix addSimultaneousDamage to avoid adding damage events to existing DamagedBatchForOnePlayerEvent instances when they shouldnt * Add clarifying comment * Incorporate batching of DAMAGED_BATCH_FOR_ONE_PERMANENT into if-else if tree to match new logic * Add tests * make ability inline * Move DamageBatchTests * Change batch events to take first event in constructor
This commit is contained in:
parent
b2aa8abba2
commit
67286aa1a0
11 changed files with 365 additions and 12 deletions
|
|
@ -1,14 +1,13 @@
|
|||
package mage.game.events;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class DamagedBatchForOnePlayerEvent extends DamagedBatchEvent {
|
||||
|
||||
public DamagedBatchForOnePlayerEvent(UUID playerId) {
|
||||
public DamagedBatchForOnePlayerEvent(DamagedEvent firstEvent) {
|
||||
super(EventType.DAMAGED_BATCH_FOR_ONE_PLAYER, DamagedPlayerEvent.class);
|
||||
this.setPlayerId(playerId);
|
||||
setPlayerId(firstEvent.getPlayerId());
|
||||
addEvent(firstEvent);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue