Negation cleanup: notAttackedThisTurn (#7066)

This commit is contained in:
Renato Filipe Vidal Santos
2025-02-22 21:37:02 +00:00
committed by GitHub
parent 62c27f9142
commit 2802c61abd
16 changed files with 15 additions and 20 deletions

View File

@@ -1265,10 +1265,6 @@ public class CardProperty {
if (card.getBlockedByThisTurn().isEmpty()) {
return false;
}
} else if (property.startsWith("notAttackedThisTurn")) {
if (card.getDamageHistory().getCreatureAttacksThisTurn() > 0) {
return false;
}
} else if (property.startsWith("greatestPower")) {
CardCollectionView cards = CardLists.filter(game.getCardsIn(ZoneType.Battlefield), CardPredicates.CREATURES);
if (property.contains("ControlledBy")) {

View File

@@ -4,7 +4,7 @@ Types:Enchantment Aura
K:Enchant non-Wall creature
A:SP$ Attach | ValidTgts$ Creature.nonWall | TgtPrompt$ Select target non-Wall creature | AILogic$ Pump
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ First Strike & Trample | Description$ Enchanted creature has first strike and trample.
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Player.EnchantedController | TriggerZones$ Battlefield | Execute$ TrigDestroy | IsPresent$ Card.EnchantedBy+notAttackedThisTurn | TriggerDescription$ At the beginning of the end step of enchanted creature's controller, destroy that creature if it didn't attack this turn.
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Player.EnchantedController | TriggerZones$ Battlefield | Execute$ TrigDestroy | IsPresent$ Card.EnchantedBy+!attackedThisTurn | TriggerDescription$ At the beginning of the end step of enchanted creature's controller, destroy that creature if it didn't attack this turn.
SVar:TrigDestroy:DB$ Destroy | Defined$ Enchanted
AI:RemoveDeck:All
Oracle:Enchant non-Wall creature\nEnchanted creature has first strike and trample.\nAt the beginning of the end step of enchanted creature's controller, destroy that creature if it didn't attack this turn.

View File

@@ -3,7 +3,7 @@ ManaCost:3
Types:Artifact
S:Mode$ Continuous | Affected$ Creature | AddKeyword$ Vigilance | Description$ All creatures have vigilance.
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Player | Execute$ TrigTapAll | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of each player's end step, tap all untapped creatures that player controls that didn't attack this turn. CARDNAME deals damage to the player equal to the number of creatures tapped this way.
SVar:TrigTapAll:DB$ TapAll | ValidCards$ Creature.untapped+notAttackedThisTurn+ActivePlayerCtrl | RememberTapped$ True | SubAbility$ DBDamage
SVar:TrigTapAll:DB$ TapAll | ValidCards$ Creature.untapped+!attackedThisTurn+ActivePlayerCtrl | RememberTapped$ True | SubAbility$ DBDamage
SVar:DBDamage:DB$ DealDamage | Defined$ TriggeredPlayer | NumDmg$ AngelDamage | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:AngelDamage:Remembered$Amount

View File

@@ -4,7 +4,7 @@ Types:Artifact
A:AB$ Animate | Cost$ 3 T | ActivationPhases$ Upkeep->BeginCombat | ActivationFirstCombat$ True | ValidTgts$ Creature.nonWall+ActivePlayerCtrl+!firstTurnControlled | TgtPrompt$ Select target non-Wall creature the active player has controlled continuously since the beginning of the turn | IsCurse$ True | staticAbilities$ MustAttack | UnlessCost$ X | UnlessPayer$ TargetedController | UnlessResolveSubs$ WhenNotPaid | SubAbility$ DestroyPacifist | SpellDescription$ Choose target non-Wall creature the active player has controlled continuously since the beginning of the turn. That player may pay {X}, where X is that creature's mana value. If they don't pay, the creature attacks this turn if able, and at the beginning of the next end step, destroy it if it didn't attack this turn. Activate only before attackers are declared.
SVar:MustAttack:Mode$ MustAttack | ValidCreature$ Card.Self | Description$ This creature attacks this turn if able.
SVar:DestroyPacifist:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | Execute$ TrigDestroy | RememberObjects$ ParentTarget | TriggerDescription$ At the beginning of the next end step, destroy that creature if it didn't attack this turn.
SVar:TrigDestroy:DB$ Destroy | Defined$ DelayTriggerRemembered | ConditionDefined$ DelayTriggerRemembered | ConditionPresent$ Creature.notAttackedThisTurn | ConditionCompare$ GE1
SVar:TrigDestroy:DB$ Destroy | Defined$ DelayTriggerRemembered | ConditionDefined$ DelayTriggerRemembered | ConditionPresent$ Creature.!attackedThisTurn | ConditionCompare$ GE1
SVar:X:Targeted$CardManaCost
AI:RemoveDeck:All
Oracle:{3}, {T}: Choose target non-Wall creature the active player has controlled continuously since the beginning of the turn. That player may pay {X}, where X is that creature's mana value. If they don't pay, the creature attacks this turn if able, and at the beginning of the next end step, destroy it if it didn't attack this turn. Activate only before attackers are declared.

View File

@@ -18,7 +18,7 @@ ManaCost:no cost
Colors:red
Types:Creature Human Mutant
PT:5/1
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigTap | IsPresent$ Card.notAttackedThisTurn+Self | TriggerDescription$ At the beginning of your end step, if CARDNAME didn't attack this turn, tap CARDNAME, then transform it.
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigTap | IsPresent$ Card.!attackedThisTurn+Self | TriggerDescription$ At the beginning of your end step, if CARDNAME didn't attack this turn, tap CARDNAME, then transform it.
SVar:TrigTap:DB$ Tap | Defined$ Self | SubAbility$ DBTransform2
SVar:DBTransform2:DB$ SetState | Defined$ Self | Mode$ Transform
Oracle:At the beginning of your end step, if Homicidal Brute didn't attack this turn, tap Homicidal Brute, then transform it.

View File

@@ -2,7 +2,7 @@ Name:Erg Raiders
ManaCost:1 B
Types:Creature Human Warrior
PT:2/3
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDamage | IsPresent$ Card.Self+notAttackedThisTurn | TriggerDescription$ At the beginning of your end step, if CARDNAME didn't attack this turn, CARDNAME deals 2 damage to you unless it came under your control this turn.
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDamage | IsPresent$ Card.Self+!attackedThisTurn | TriggerDescription$ At the beginning of your end step, if CARDNAME didn't attack this turn, CARDNAME deals 2 damage to you unless it came under your control this turn.
SVar:TrigDamage:DB$ DealDamage | Defined$ You | NumDmg$ 2 | ConditionPresent$ Card.Self+!firstTurnControlled | ConditionCompare$ EQ1
SVar:MustAttack:True
Oracle:At the beginning of your end step, if Erg Raiders didn't attack this turn, Erg Raiders deals 2 damage to you unless it came under your control this turn.

View File

@@ -5,7 +5,7 @@ K:Enchant creature
A:SP$ Attach | ValidTgts$ Creature | AILogic$ Curse
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddTrigger$ EOTTrigger | AddSVar$ InstillTrigSac & MustAttack | Description$ Enchanted creature has "At the beginning of your end step, sacrifice this creature unless it attacked this turn."
SVar:EOTTrigger:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ InstillTrigSac | TriggerDescription$ At the beginning of your end step, sacrifice this creature unless it attacked this turn.
SVar:InstillTrigSac:DB$ Sacrifice | ConditionPresent$ Card.Self+notAttackedThisTurn | ConditionCompare$ GE1
SVar:InstillTrigSac:DB$ Sacrifice | ConditionPresent$ Card.Self+!attackedThisTurn | ConditionCompare$ GE1
SVar:MustAttack:True
SVar:NonStackingAttachEffect:True
Oracle:Enchant creature\nEnchanted creature has "At the beginning of your end step, sacrifice this creature unless it attacked this turn."

View File

@@ -4,5 +4,5 @@ Types:Enchantment Aura
K:Enchant creature
A:SP$ Attach | ValidTgts$ Creature | AILogic$ Curse
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Player.EnchantedController | TriggerZones$ Battlefield | Execute$ TrigDamage | TriggerDescription$ At the beginning of the end step of enchanted creature's controller, CARDNAME deals 2 damage to that player unless that creature attacked this turn.
SVar:TrigDamage:DB$ DealDamage | Defined$ TriggeredPlayer | NumDmg$ 2 | ConditionPresent$ Card.EnchantedBy+notAttackedThisTurn
SVar:TrigDamage:DB$ DealDamage | Defined$ TriggeredPlayer | NumDmg$ 2 | ConditionPresent$ Card.EnchantedBy+!attackedThisTurn
Oracle:Enchant creature\nAt the beginning of the end step of enchanted creature's controller, Insubordination deals 2 damage to that player unless that creature attacked this turn.

View File

@@ -2,5 +2,5 @@ Name:Lurker
ManaCost:2 G
Types:Creature Beast
PT:2/3
S:Mode$ CantTarget | ValidCard$ Card.Self+notAttackedThisTurn+!blockedThisTurn | ValidSA$ Spell | Description$ CARDNAME can't be the target of spells unless it attacked or blocked this turn.
S:Mode$ CantTarget | ValidCard$ Card.Self+!attackedThisTurn+!blockedThisTurn | ValidSA$ Spell | Description$ CARDNAME can't be the target of spells unless it attacked or blocked this turn.
Oracle:Lurker can't be the target of spells unless it attacked or blocked this turn.

View File

@@ -6,7 +6,7 @@ K:Flying
A:AB$ Effect | Cost$ T | RememberObjects$ Valid Creature.ActivePlayerCtrl+nonWall | ActivationPhases$ Upkeep->Main1 | ActivationFirstCombat$ True | OpponentTurn$ True | StaticAbilities$ MustAttack | SubAbility$ DelTrig | StackDescription$ None | SpellDescription$ Non-Wall creatures the active player controls attack this turn if able. At the beginning of the next end step, destroy each of those creatures that didn't attack this turn. Activate only during an opponent's turn and only before combat.
SVar:MustAttack:Mode$ MustAttack | ValidCreature$ Card.IsRemembered | Description$ Non-Wall creatures the active player controls attack this turn if able.
SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | Execute$ TrigDestroy | RememberObjects$ Valid Creature.ActivePlayerCtrl+nonWall | TriggerDescription$ At the beginning of the next end step, destroy each of those creatures that didn't attack this turn.
SVar:TrigDestroy:DB$ DestroyAll | ValidCards$ Creature.IsTriggerRemembered+notAttackedThisTurn
SVar:TrigDestroy:DB$ DestroyAll | ValidCards$ Creature.IsTriggerRemembered+!attackedThisTurn
AI:RemoveDeck:All
AI:RemoveDeck:Random
SVar:NonCombatPriority:5

View File

@@ -5,6 +5,6 @@ PT:1/1
A:AB$ Animate | Cost$ T | ValidTgts$ Creature.nonWall+ActivePlayerCtrl+!firstTurnControlled | TgtPrompt$ Select target non-Wall creature the active player has controlled continuously since the beginning of the turn | ActivationPhases$ Upkeep->BeginCombat | ActivationFirstCombat$ True | OpponentTurn$ True | staticAbilities$ MustAttack | SubAbility$ DestroyPacifist | SpellDescription$ Choose target non-Wall creature the active player has controlled continuously since the beginning of the turn. That creature attacks this turn if able. Destroy it at the beginning of the next end step if it didn't attack this turn. Activate only during an opponent's turn, before attackers are declared.
SVar:MustAttack:Mode$ MustAttack | ValidCreature$ Card.Self | Description$ This creature attacks this turn if able.
SVar:DestroyPacifist:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | RememberObjects$ ParentTarget | Execute$ TrigDestroy | TriggerDescription$ At the beginning of the next end step, destroy that creature if it didn't attack this turn.
SVar:TrigDestroy:DB$ Destroy | Defined$ DelayTriggerRemembered | ConditionDefined$ DelayTriggerRemembered | ConditionPresent$ Creature.notAttackedThisTurn | ConditionCompare$ GE1
SVar:TrigDestroy:DB$ Destroy | Defined$ DelayTriggerRemembered | ConditionDefined$ DelayTriggerRemembered | ConditionPresent$ Creature.!attackedThisTurn | ConditionCompare$ GE1
AI:RemoveDeck:All
Oracle:{T}: Choose target non-Wall creature the active player has controlled continuously since the beginning of the turn. That creature attacks this turn if able. Destroy it at the beginning of the next end step if it didn't attack this turn. Activate only during an opponent's turn, before attackers are declared.

View File

@@ -6,7 +6,7 @@ A:AB$ Untap | Cost$ T | ValidTgts$ Creature.Blue | TgtPrompt$ Select target blue
A:AB$ Pump | Cost$ T | ValidTgts$ Creature.nonWall+ActivePlayerCtrl+!firstTurnControlled | TgtPrompt$ Select target non-Wall creature the active player has controlled continuously since the beginning of the turn | ActivationPhases$ Upkeep->BeginCombat | ActivationFirstCombat$ True | staticAbilities$ MustAttack | SubAbility$ DestroyPacifist | SpellDescription$ Choose target non-Wall creature the active player has controlled continuously since the beginning of the turn. That creature attacks this turn if able. Destroy it at the beginning of the next end step if it didn't attack this turn. Activate only before attackers are declared.
SVar:MustAttack:Mode$ MustAttack | ValidCreature$ Card.Self | Description$ This creature attacks this turn if able.
SVar:DestroyPacifist:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | Execute$ TrigDestroy | RememberObjects$ ParentTarget | TriggerDescription$ At the beginning of the next end step, destroy that creature if it didn't attack this turn.
SVar:TrigDestroy:DB$ Destroy | Defined$ DelayTriggerRemembered | ConditionDefined$ DelayTriggerRemembered | ConditionPresent$ Creature.notAttackedThisTurn | ConditionCompare$ GE1
SVar:TrigDestroy:DB$ Destroy | Defined$ DelayTriggerRemembered | ConditionDefined$ DelayTriggerRemembered | ConditionPresent$ Creature.!attackedThisTurn | ConditionCompare$ GE1
AI:RemoveDeck:All
DeckHints:Color$Blue
Oracle:{T}: Untap target blue creature.\n{T}: Choose target non-Wall creature the active player has controlled continuously since the beginning of the turn. That creature attacks this turn if able. Destroy it at the beginning of the next end step if it didn't attack this turn. Activate only before attackers are declared.

View File

@@ -8,6 +8,6 @@ SVar:DBOracleEffect:DB$ Effect | EffectOwner$ TargetedPlayer | StaticAbilities$
SVar:ForceAttack:Mode$ MustAttack | AffectedZone$ Battlefield | ValidCreature$ Creature.YouCtrl+ChosenCardStrict | Description$ During your next turn, creatures chosen with EFFECTSOURCE attack if able.
SVar:ForbidAttack:Mode$ CantAttack | ValidCard$ Creature.YouCtrl+!ChosenCardStrict | Description$ During your next turn, creatures NOT chosen with EFFECTSOURCE can't attack.
SVar:TrigDestroy:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Command | Execute$ DBDestroy | TriggerDescription$ At the beginning of your next turn's end step, destroy each creature chosen with EFFECTSOURCE that didn't attack that turn.
SVar:DBDestroy:DB$ DestroyAll | ValidCards$ Creature.ChosenCardStrict+notAttackedThisTurn
SVar:DBDestroy:DB$ DestroyAll | ValidCards$ Creature.ChosenCardStrict+!attackedThisTurn
SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True
Oracle:{T}: Target opponent chooses any number of creatures they control. During that player's next turn, the chosen creatures attack if able, and other creatures can't attack. At the beginning of that turn's end step, destroy each of the chosen creatures that didn't attack this turn. Activate only during your turn.

View File

@@ -4,7 +4,7 @@ Types:Instant
A:SP$ Effect | StaticAbilities$ MustAttack | ActivationPhases$ Upkeep->BeginCombat | ActivationFirstCombat$ True | OpponentTurn$ True | SpellDescription$ Cast this spell only during an opponent's turn, before attackers are declared. Creatures the active player controls attack this turn if able. At the beginning of the next end step, destroy all non-Wall creatures that player controls that didn't attack this turn. Ignore this effect for each creature the player didn't control continuously since the beginning of the turn. | SubAbility$ DestroyPacifist
SVar:MustAttack:Mode$ MustAttack | AffectedZone$ Battlefield | ValidCreature$ Creature.ActivePlayerCtrl | Description$ Creatures the active player controls attack this turn if able.
SVar:DestroyPacifist:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | Execute$ TrigDestroy | TriggerDescription$ At the beginning of the next end step, destroy all non-Wall creatures that player controls that didn't attack this turn.
SVar:TrigDestroy:DB$ DestroyAll | ValidCards$ Creature.ActivePlayerCtrl+notAttackedThisTurn+nonWall+!firstTurnControlled | SubAbility$ DBCleanup
SVar:TrigDestroy:DB$ DestroyAll | ValidCards$ Creature.ActivePlayerCtrl+!attackedThisTurn+nonWall+!firstTurnControlled | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
AI:RemoveDeck:All
AI:RemoveDeck:Random

View File

@@ -12,6 +12,6 @@ SVar:DBTap:DB$ Tap | Defined$ Self | SubAbility$ DBCleanup
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigClearRem | Static$ True
SVar:TrigClearRem:DB$ Cleanup | ClearRemembered$ True | SubAbility$ TrigRemember
SVar:TrigRemember:DB$ Pump | RememberObjects$ TriggeredDefendingPlayer
T:Mode$ Phase | Phase$ EndCombat | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ DBCleanup | IsPresent$ Card.notAttackedThisTurn+Self | Static$ True
T:Mode$ Phase | Phase$ EndCombat | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ DBCleanup | IsPresent$ Card.!attackedThisTurn+Self | Static$ True
SVar:DBCleanup:DB$ Cleanup | ClearChosenPlayer$ True | ClearRemembered$ True
Oracle:Flying, haste\nAt the beginning of combat on your turn, choose an opponent at random that Territorial Hellkite didn't attack during your last combat. Territorial Hellkite attacks that player this combat if able. If you can't choose an opponent this way, tap Territorial Hellkite.

View File

@@ -466,8 +466,7 @@ public final class CardScriptParser {
"wasDealtDamageByHostThisTurn", "wasDealtDamageByEquipeeThisTurn",
"wasDealtDamageByEnchantedThisTurn", "dealtDamageThisTurn",
"attackedThisTurn", "attackedLastTurn", "blockedThisTurn",
"gotBlockedThisTurn", "notAttackedThisTurn",
"greatestPower", "yardGreatestPower",
"gotBlockedThisTurn", "greatestPower", "yardGreatestPower",
"leastPower", "leastToughness", "greatestCMC",
"greatestRememberedCMC", "lowestRememberedCMC", "lowestCMC",
"enchanted", "unenchanted", "enchanting", "equipped", "unequipped",