Name:Torment of Scarabs
ManaCost:3 B
Types:Enchantment Aura Curse
K:Enchant player
A:SP$ Attach | Cost$ 3 B | ValidTgts$ Player | AILogic$ Curse
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player.EnchantedBy | TriggerZones$ Battlefield | Execute$ TrigGenericChoice | TriggerDescription$ At the beginning of enchanted player's upkeep, that player loses 3 life unless they sacrifice a nonland permanent or discard a card.
SVar:TrigGenericChoice:DB$ GenericChoice | Choices$ PaySac,PayDiscard | Defined$ TriggeredPlayer | FallbackAbility$ LoseLifeFallback | AILogic$ PayUnlessCost
SVar:PaySac:DB$ LoseLife | LifeAmount$ 3 | Defined$ TriggeredPlayer | UnlessCost$ Sac<1/Permanent.nonland/nonland permanent> | UnlessPayer$ TriggeredPlayer | UnlessAI$ LifeLE3 | SpellDescription$ You lose 3 life unless you sacrifice a nonland permanent.
SVar:PayDiscard:DB$ LoseLife | LifeAmount$ 3 | Defined$ TriggeredPlayer | UnlessCost$ Discard<1/Card> | UnlessPayer$ TriggeredPlayer | UnlessAI$ LifeLE3 | SpellDescription$ You lose 3 life unless you discard a card.
# TODO: Most likely the ChooseGenericEffect code can be simplified somehow to avoid the necessity of having a dedicated fallback ability
SVar:LoseLifeFallback:DB$ LoseLife | Defined$ Player.IsRemembered | LifeAmount$ 3
Oracle:Enchant player\nAt the beginning of enchanted player's upkeep, that player loses 3 life unless they sacrifice a nonland permanent or discard a card.
