mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Added Naban, Dean of Iteration (the Changetext effect was tested)
This commit is contained in:
@@ -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;
|
||||||
|
for (final String kw : p.getKeywords()) {
|
||||||
|
if (kw.startsWith("Panharmonicon")) {
|
||||||
if (runParams.get("Destination") instanceof String) {
|
if (runParams.get("Destination") instanceof String) {
|
||||||
final String dest = (String) runParams.get("Destination");
|
final String dest = (String) runParams.get("Destination");
|
||||||
if (dest.equals("Battlefield") && runParams.get("Card") instanceof Card) {
|
if (dest.equals("Battlefield") && runParams.get("Card") instanceof Card) {
|
||||||
final Card card = (Card) runParams.get("Card");
|
final Card card = (Card) runParams.get("Card");
|
||||||
if (card.isCreature() || card.isArtifact()) {
|
final String valid = kw.split(":")[1];
|
||||||
return true;
|
if (card.isValid(valid.split(","), p, host, null)) {
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return n;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
forge-gui/res/cardsfolder/p/naban_dean_of_iteration.txt
Normal file
7
forge-gui/res/cardsfolder/p/naban_dean_of_iteration.txt
Normal 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.
|
||||||
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user