Skip to content

Commit

Permalink
wayta_trainer_prodigy.txt and support
Browse files Browse the repository at this point in the history
  • Loading branch information
Northmoc committed Nov 24, 2023
1 parent 0e84ce2 commit eb5eb75
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
11 changes: 11 additions & 0 deletions forge-game/src/main/java/forge/game/ability/AbilityUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,17 @@ else if (calcX[0].startsWith("Returned")) {
else if (calcX[0].startsWith("Targeted")) {
list = sa.findTargetedCards();
}
else if (calcX[0].startsWith("AllTargeted")) {
CardCollection all = new CardCollection();
SpellAbility loopSA = sa.getRootAbility();
while (loopSA != null) {
if (loopSA.usesTargeting()) {
all.addAll(loopSA.findTargetedCards());
}
loopSA = loopSA.getSubAbility();
}
list = all;
}
else if (calcX[0].startsWith("ParentTargeted")) {
SpellAbility parent = sa.getParentTargetingCard();
if (parent != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ public static boolean applyPanharmoniconAbility(final StaticAbility stAb, final
if (!stAb.matchesValidParam("ValidActivator", sa.getActivatingPlayer())) {
return false;
}
} else if (trigMode.equals(TriggerType.DamageDone) || trigMode.equals(TriggerType.DamageDoneOnce)) {
if (!stAb.matchesValidParam("ValidTarget", runParams.get(AbilityKey.DamageTarget))) {
return false;
}
}

return true;
Expand Down
11 changes: 11 additions & 0 deletions forge-gui/res/cardsfolder/upcoming/wayta_trainer_prodigy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Name:Wayta, Trainer Prodigy
ManaCost:R G W
Types:Legendary Creature Human Warrior
PT:1/5
K:Haste
A:AB$ Pump | Cost$ 2 G T | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | SubAbility$ DBFight | ReduceCost$ X | StackDescription$ None | SpellDescription$ Target creature you control fights another target creature.
SVar:DBFight:DB$ Fight | Defined$ ParentTarget | ValidTgts$ Creature | TargetUnique$ True | TgtPrompt$ Select another target creature
SVar:X:Count$Compare Y EQ2.2.0
SVar:Y:AllTargeted$Valid Creature.YouCtrl
S:Mode$ Panharmonicon | ValidMode$ DamageDoneOnce,DamageDone | ValidTarget$ Creature.YouCtrl | ValidCard$ Permanent.YouCtrl | Description$ If a creature you control being dealt damage causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time.
Oracle:Haste\n{2}{G}, {T}: Target creature you control fights another target creature. This ability costs {2} less to activate if it targets two creatures you control.\nIf a creature you control being dealt damage causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time.

0 comments on commit eb5eb75

Please sign in to comment.