mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
[KLD] Added Panharmonicon.
This commit is contained in:
parent
5e7a4d265e
commit
959eaf6dab
3 changed files with 114 additions and 4 deletions
|
|
@ -43,17 +43,17 @@ public class EntersTheBattlefieldEvent extends GameEvent {
|
|||
private Permanent target;
|
||||
|
||||
public EntersTheBattlefieldEvent(Permanent target, UUID sourceId, UUID playerId, Zone fromZone) {
|
||||
super(EventType.ENTERS_THE_BATTLEFIELD, target.getId(), sourceId, playerId);
|
||||
this.fromZone = fromZone;
|
||||
this.target = target;
|
||||
this(target, sourceId, playerId, fromZone, null);
|
||||
}
|
||||
|
||||
public EntersTheBattlefieldEvent(Permanent target, UUID sourceId, UUID playerId, Zone fromZone, ArrayList<UUID> appliedEffects) {
|
||||
super(EventType.ENTERS_THE_BATTLEFIELD, target.getId(), sourceId, playerId);
|
||||
this.fromZone = fromZone;
|
||||
this.target = target;
|
||||
if (appliedEffects != null) {
|
||||
this.appliedEffects = appliedEffects;
|
||||
}
|
||||
this.amount = 1; // Number of times to trigger (Panharmonicon can change that value)
|
||||
}
|
||||
|
||||
public Zone getFromZone() {
|
||||
|
|
|
|||
|
|
@ -884,7 +884,10 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
EntersTheBattlefieldEvent event = new EntersTheBattlefieldEvent(this, sourceId, getControllerId(), fromZone);
|
||||
if (!game.replaceEvent(event)) {
|
||||
if (fireEvent) {
|
||||
game.addSimultaneousEvent(event);
|
||||
// Trigger multiple times with Panharmonicon.
|
||||
for (int i = 0; i < event.getAmount(); i++) {
|
||||
game.addSimultaneousEvent(event);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue