Panharmonicon fix for Nadu, Winged Wisdom (#5297)

This commit is contained in:
tool4ever
2024-05-25 14:28:59 +02:00
committed by GitHub
parent 42cd2ec210
commit 651d01ab76
4 changed files with 11 additions and 13 deletions

View File

@@ -41,12 +41,6 @@ public class StaticAbilityPanharmonicon {
return n;
}
// "triggers only once" means it can't happen
if (t.hasParam("ActivationLimit")) {
// currently no other limits, so no further calculation needed
return n;
}
CardCollectionView cardList = null;
// if LTB look back
if (t.getMode() == TriggerType.Exploited || t.getMode() == TriggerType.Sacrificed || t.getMode() == TriggerType.Destroyed ||
@@ -67,6 +61,11 @@ public class StaticAbilityPanharmonicon {
if (!stAb.checkConditions(MODE)) {
continue;
}
// it can't trigger more times than the limit allows
if (t.hasParam("ActivationLimit") &&
t.getActivationsThisTurn() + n + 1 >= Integer.parseInt(t.getParam("ActivationLimit"))) {
break;
}
if (applyPanharmoniconAbility(stAb, t, runParams)) {
n++;
}

View File

@@ -4,9 +4,9 @@ Types:Creature Spirit
PT:2/1
S:Mode$ CantBlockBy | ValidAttacker$ Creature.Self | Description$ CARDNAME can't be blocked.
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigGainLife | TriggerDescription$ When CARDNAME enters the battlefield, you gain 4 life.
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigSac | ManaNotSpent$ U | TriggerDescription$ When CARDNAME enters the battlefield, sacrifice it unless {U} was spent to cast it.
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigSac | TriggerDescription$ When CARDNAME enters the battlefield, sacrifice it unless {U} was spent to cast it.
SVar:TrigGainLife:DB$ GainLife | Defined$ You | LifeAmount$ 4
SVar:TrigSac:DB$ Sacrifice
SVar:TrigSac:DB$ Sacrifice | ConditionManaNotSpent$ U
SVar:ManaNeededToAvoidNegativeEffect:blue
AI:RemoveDeck:Random
DeckNeeds:Color$Blue

View File

@@ -6,7 +6,7 @@ K:Flying
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigChooseOpp | TriggerDescription$ When CARDNAME leaves the battlefield, choose an opponent who controls more lands than you. Search your library for a number of Plains cards equal to the difference, reveal those cards, put one of them onto the battlefield tapped and the rest into your hand, then shuffle.
SVar:TrigChooseOpp:DB$ ChoosePlayer | Defined$ You | Choices$ Player.Opponent+withMoreLandsThanYou | SubAbility$ TrigSearchHand
SVar:TrigSearchHand:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Plains.YouCtrl | ChangeNum$ Z | NoShuffle$ True | ConditionCheckSVar$ X | ConditionSVarCompare$ GE2 | StackDescription$ None | SubAbility$ TrigSearchPlay
SVar:TrigSearchPlay:DB$ ChangeZone | Origin$ Library | Destination$ Battlefield | ChangeType$ Plains.YouCtrl | ChangeNum$ 1 | StackDescription$ None | NoLooking$ True | Tapped$ True
SVar:TrigSearchPlay:DB$ ChangeZone | Origin$ Library | Destination$ Battlefield | ChangeType$ Plains.YouCtrl | ChangeNum$ 1 | StackDescription$ None | NoLooking$ True | Tapped$ True | ConditionCheckSVar$ X
SVar:X:Count$Valid Land.ChosenCtrl/Minus.Y
SVar:Y:Count$Valid Land.YouCtrl
SVar:Z:SVar$X/Minus.1

View File

@@ -3,9 +3,8 @@ ManaCost:1 B
Types:Enchantment Aura
K:Enchant creature you control
A:SP$ Attach | Cost$ 1 B | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | AILogic$ Pump
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddTrigger$ TrigPump | AddSVar$ CloakofConfusionPump & CloakofConfusionDiscard | Description$ Whenever enchanted creature attacks and isn't blocked, you may have it assign no combat damage this turn. If you do, defending player discards a card at random.
SVar:TrigPump:Mode$ AttackerUnblocked | ValidCard$ Card.Self | Execute$ CloakofConfusionPump | OptionalDecider$ You | TriggerDescription$ Whenever enchanted creature attacks and isn't blocked, you may have it assign no combat damage this turn. If you do, defending player discards a card at random.
SVar:CloakofConfusionPump:DB$ Pump | Defined$ Self | KW$ HIDDEN CARDNAME assigns no combat damage | SubAbility$ CloakofConfusionDiscard
SVar:CloakofConfusionDiscard:DB$ Discard | Defined$ DefendingPlayer | Mode$ Random | NumCards$ 1
T:Mode$ AttackerUnblocked | ValidCard$ Creature.EnchantedBy | Execute$ CloakofConfusionPump | OptionalDecider$ You | TriggerDescription$ Whenever enchanted creature attacks and isn't blocked, you may have it assign no combat damage this turn. If you do, defending player discards a card at random.
SVar:CloakofConfusionPump:DB$ Pump | Defined$ Enchanted | KW$ HIDDEN CARDNAME assigns no combat damage | SubAbility$ CloakofConfusionDiscard
SVar:CloakofConfusionDiscard:DB$ Discard | Defined$ TriggeredDefendingPlayer | Mode$ Random | NumCards$ 1
AI:RemoveDeck:All
Oracle:Enchant creature you control\nWhenever enchanted creature attacks and isn't blocked, you may have it assign no combat damage this turn. If you do, defending player discards a card at random.