- Added Naban, Dean of Iteration (the Changetext effect was tested)

This commit is contained in:
swordshine
2018-03-25 22:07:29 +08:00
parent 489b1a0eb4
commit 3af07078c1
3 changed files with 30 additions and 25 deletions

View File

@@ -348,12 +348,7 @@ public class TriggerHandler {
// Static triggers // Static triggers
for (final Trigger t : Lists.newArrayList(activeTriggers)) { for (final Trigger t : Lists.newArrayList(activeTriggers)) {
if (t.isStatic() && canRunTrigger(t, mode, runParams)) { if (t.isStatic() && canRunTrigger(t, mode, runParams)) {
int x = 1; int x = 1 + handlePanharmonicon(t, runParams);
int p = t.getHostCard().getController().getAmountOfKeyword("Panharmonicon");
if (p > 0 && handlePanharmonicon(t, runParams)) {
x += p;
}
for (int i = 0; i < x; ++i) { for (int i = 0; i < x; ++i) {
runSingleTrigger(t, runParams); runSingleTrigger(t, runParams);
@@ -425,12 +420,7 @@ public class TriggerHandler {
} }
} }
int x = 1; int x = 1 + handlePanharmonicon(t, runParams);;
int p = t.getHostCard().getController().getAmountOfKeyword("Panharmonicon");
if (p > 0 && handlePanharmonicon(t, runParams)) {
x += p;
}
for (int i = 0; i < x; ++i) { for (int i = 0; i < x; ++i) {
runSingleTrigger(t, runParams); runSingleTrigger(t, runParams);
@@ -674,28 +664,36 @@ public class TriggerHandler {
} }
} }
private boolean handlePanharmonicon(final Trigger t, final Map<String, Object> runParams) { private int handlePanharmonicon(final Trigger t, final Map<String, Object> runParams) {
final Card host = t.getHostCard();
final Player p = host.getController();
// not a changesZone trigger // not a changesZone trigger
if (t.getMode() != TriggerType.ChangesZone) { if (t.getMode() != TriggerType.ChangesZone) {
return false; return 0;
} }
// not a Permanent you control // not a Permanent you control
if (!t.getHostCard().isPermanent() || !t.getHostCard().isInZone(ZoneType.Battlefield)) { if (!host.isPermanent() || !host.isInZone(ZoneType.Battlefield)) {
return false; return 0;
} }
// its not an ETB trigger or the card is not a Artifact or Creature int n = 0;
if (runParams.get("Destination") instanceof String) { for (final String kw : p.getKeywords()) {
final String dest = (String) runParams.get("Destination"); if (kw.startsWith("Panharmonicon")) {
if (dest.equals("Battlefield") && runParams.get("Card") instanceof Card) { if (runParams.get("Destination") instanceof String) {
final Card card = (Card) runParams.get("Card"); final String dest = (String) runParams.get("Destination");
if (card.isCreature() || card.isArtifact()) { if (dest.equals("Battlefield") && runParams.get("Card") instanceof Card) {
return true; final Card card = (Card) runParams.get("Card");
final String valid = kw.split(":")[1];
if (card.isValid(valid.split(","), p, host, null)) {
n++;
}
}
} }
} }
} }
return false; return n;
} }
} }

View File

@@ -0,0 +1,7 @@
Name:Naban, Dean of Iteration
ManaCost:1 U
Types:Legendary Creature Human Wizard
PT:2/1
S:Mode$ Continuous | Affected$ You | AddKeyword$ Panharmonicon:Wizard.YouCtrl | Description$ If a Wizard entering the battlefield under your control causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time.
SVar:Picture:http://www.wizards.com/global/images/magic/general/naban_dean_of_iteration.jpg
Oracle:If a Wizard entering the battlefield under your control causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time.

View File

@@ -1,6 +1,6 @@
Name:Panharmonicon Name:Panharmonicon
ManaCost:4 ManaCost:4
Types:Artifact Types:Artifact
S:Mode$ Continuous | Affected$ You | AddKeyword$ Panharmonicon | Description$ If an artifact or creature entering the battlefield causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time. S:Mode$ Continuous | Affected$ You | AddKeyword$ Panharmonicon:Creature,Artifact | Description$ If an artifact or creature entering the battlefield causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time.
SVar:Picture:http://www.wizards.com/global/images/magic/general/panharmonicon.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/panharmonicon.jpg
Oracle:If an artifact or creature entering the battlefield causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time. Oracle:If an artifact or creature entering the battlefield causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time.