- 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
for (final Trigger t : Lists.newArrayList(activeTriggers)) {
if (t.isStatic() && canRunTrigger(t, mode, runParams)) {
int x = 1;
int p = t.getHostCard().getController().getAmountOfKeyword("Panharmonicon");
if (p > 0 && handlePanharmonicon(t, runParams)) {
x += p;
}
int x = 1 + handlePanharmonicon(t, runParams);
for (int i = 0; i < x; ++i) {
runSingleTrigger(t, runParams);
@@ -425,12 +420,7 @@ public class TriggerHandler {
}
}
int x = 1;
int p = t.getHostCard().getController().getAmountOfKeyword("Panharmonicon");
if (p > 0 && handlePanharmonicon(t, runParams)) {
x += p;
}
int x = 1 + handlePanharmonicon(t, runParams);;
for (int i = 0; i < x; ++i) {
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
if (t.getMode() != TriggerType.ChangesZone) {
return false;
return 0;
}
// not a Permanent you control
if (!t.getHostCard().isPermanent() || !t.getHostCard().isInZone(ZoneType.Battlefield)) {
return false;
if (!host.isPermanent() || !host.isInZone(ZoneType.Battlefield)) {
return 0;
}
// its not an ETB trigger or the card is not a Artifact or Creature
int n = 0;
for (final String kw : p.getKeywords()) {
if (kw.startsWith("Panharmonicon")) {
if (runParams.get("Destination") instanceof String) {
final String dest = (String) runParams.get("Destination");
if (dest.equals("Battlefield") && runParams.get("Card") instanceof Card) {
final Card card = (Card) runParams.get("Card");
if (card.isCreature() || card.isArtifact()) {
return true;
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
ManaCost:4
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
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.