mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Teysa Karlov: add Dieharmonicon to TriggerHandler
This commit is contained in:
@@ -693,7 +693,8 @@ public class TriggerHandler {
|
||||
}
|
||||
|
||||
private int handlePanharmonicon(final Trigger t, final Map<String, Object> runParams) {
|
||||
final Card host = t.getHostCard();
|
||||
// Need to get the last info from the trigger host
|
||||
final Card host = game.getChangeZoneLKIInfo(t.getHostCard());
|
||||
final Player p = host.getController();
|
||||
|
||||
// not a changesZone trigger
|
||||
@@ -709,9 +710,10 @@ public class TriggerHandler {
|
||||
int n = 0;
|
||||
for (final String kw : p.getKeywords()) {
|
||||
if (kw.startsWith("Panharmonicon")) {
|
||||
// Enter the Battlefield Trigger
|
||||
if (runParams.get("Destination") instanceof String) {
|
||||
final String dest = (String) runParams.get("Destination");
|
||||
if (dest.equals("Battlefield") && runParams.get("Card") instanceof Card) {
|
||||
if ("Battlefield".equals(dest) && runParams.get("Card") instanceof Card) {
|
||||
final Card card = (Card) runParams.get("Card");
|
||||
final String valid = kw.split(":")[1];
|
||||
if (card.isValid(valid.split(","), p, host, null)) {
|
||||
@@ -719,6 +721,20 @@ public class TriggerHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (kw.startsWith("Dieharmonicon")) {
|
||||
// 700.4. The term dies means “is put into a graveyard from the battlefield.”
|
||||
if (runParams.get("Origin") instanceof String) {
|
||||
final String origin = (String) runParams.get("Origin");
|
||||
if ("Battlefield".equals(origin) && runParams.get("Destination") instanceof String) {
|
||||
final String dest = (String) runParams.get("Destination");
|
||||
if ("Graveyard".equals(dest) && runParams.get("Card") instanceof Card) {
|
||||
final Card card = (Card) runParams.get("Card");
|
||||
if (card.isCreature()) {
|
||||
n++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
7
forge-gui/res/cardsfolder/upcoming/teysa_karlov.txt
Normal file
7
forge-gui/res/cardsfolder/upcoming/teysa_karlov.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Name:Teysa Karlov
|
||||
ManaCost:2 W B
|
||||
Types:Legendary Creature Human Advisor
|
||||
PT:2/4
|
||||
S:Mode$ Continuous | Affected$ You | AddKeyword$ Dieharmonicon | Description$ If a creature dying causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time.
|
||||
S:Mode$ Continuous | Affected$ Creature.token+YouCtrl | AddKeyword$ Vigilance & Lifelink | Description$ Creature tokens you control have vigilance and lifelink.
|
||||
Oracle:If a creature dying causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time.\nCreature tokens you control have vigilance and lifelink.
|
||||
Reference in New Issue
Block a user