mage icon indicating copy to clipboard operation
mage copied to clipboard

Cards that look for hexproof ability can't find midified hexproof versions (Kathril, Aspect Warper, Eater of Virtue, etc)

Open JayDi85 opened this issue 1 year ago • 2 comments

There are multiple versions of hexproof ability ("modified" hexproof): shot_240429_223334

If you look at ruling from Kathril, Aspect Warper -- "hexproof" means any versions of hexproof:

If cards in your graveyard have multiple hexproof abilities (such as hexproof, hexproof from white, and hexproof from black), a counter of each variant kind will be put onto a creature. (2020-06-23)

Problem 1 - wrong class usages

All modified versions uses HexproofBaseAbility as a parent, not HexproofAbility. So all searches will fail.

Wrong code usage:

  • HexproofAbility.class
  • instanceof HexproofAbility

Good code usage:

  • HexproofBaseAbility.class
  • instanceof HexproofBaseAbility

Maybe other usage code exists too (usages in streams, usages of HexproofAbility.getInstance(), etc).

How to fix: just replace one class by another.

Rules:

702.11e Any effect that causes an object to lose hexproof will cause an object to lose all “hexproof from [quality]” abilities. Any effect that allows a player to choose a creature with hexproof as a target as though it didn’t have hexproof will allow a player to choose a creature with a “hexproof from [quality]” ability. Any effect that looks for a card with hexproof will find a card with a “hexproof from [quality]” ability.

Problem 2 - wrong ability counter usage

Some cards must found hexproof and put related counter. Current implementations check only one hexproof counter and can lost all other types.

Some of the affected cards (all used own implementations):

  • [[Odric, Blood-Cursed]]
  • [[Kathril, Aspect Warper]]
  • [[Eater of Virtue]]
  • [[Wretched Bonemass]] -- may works fine cause copy founded hexproof ability;
  • [[Indominus Rex, Alpha]] (see PR #12119)

More:

  • Selective Adaptation
  • Urborg Scavengers

Current implementation find all hexproof, but add only basic counter ability (e.g. will lost hexproof from white and other versions): shot_240429_222857

How to fix: rework ability counter creating (current engine supports any ability, so only affected cards must be fixed).

P.S. All other used abilities like flying has only single version, so only hexproof affected.

JayDi85 avatar Apr 29 '24 19:04 JayDi85

Odric, Blood-Cursed - (Gatherer) (Scryfall) (EDHREC)

{1}{R}{W} Legendary Creature — Vampire Soldier 3/3 When Odric, Blood-Cursed enters the battlefield, create X Blood tokens, where X is the number of abilities from among flying, first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, menace, reach, trample, and vigilance found among creatures you control. (Count each ability only once.)

Kathril, Aspect Warper - (Gatherer) (Scryfall) (EDHREC)

{2}{W}{B}{G} Legendary Creature — Nightmare Insect 3/3 When Kathril, Aspect Warper enters the battlefield, put a flying counter on any creature you control if a creature card in your graveyard has flying. Repeat this process for first strike, double strike, deathtouch, hexproof, indestructible, lifelink, menace, reach, trample, and vigilance. Then put a +1/+1 counter on Kathril for each counter put on a creature this way.

Eater of Virtue - (Gatherer) (Scryfall) (EDHREC)

{1} Legendary Artifact — Equipment Whenever equipped creature dies, exile it. Equipped creature gets +2/+0. As long as a card exiled with Eater of Virtue has flying, equipped creature has flying. The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, menace, protection, reach, trample, and vigilance. Equip {1}

Altar of the Wretched // Wretched Bonemass - (Gatherer) (Scryfall) (EDHREC)

{2}{B} Artifact When Altar of the Wretched enters the battlefield, you may sacrifice a nontoken creature. If you do, draw X cards, then mill X cards, where X is that creature's power. Craft with one or more creatures {2}{B}{B} {2}{B}: Return Altar of the Wretched from your graveyard to your hand. :arrows_counterclockwise: Creature — Skeleton Horror / Wretched Bonemass's power and toughness are each equal to the total power of the exiled cards used to craft it. Wretched Bonemass has flying as long as an exiled card used to craft it has flying. The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, menace, protection, reach, trample, and vigilance.

Indominus Rex, Alpha - (Gatherer) (Scryfall) (EDHREC)

{1}{U/B}{U/B}{G}{G} Legendary Creature — Dinosaur Mutant 6/6 As Indominus Rex, Alpha enters the battlefield, discard any number of creature cards. It enters with a flying counter on it if a card discarded this way has flying. The same is true for first strike, double strike, deathtouch, hexproof, haste, indestructible, lifelink, menace, reach, trample, and vigilance. When Indominus Rex enters the battlefield, draw a card for each counter on it.

github-actions[bot] avatar Apr 29 '24 19:04 github-actions[bot]

Alternative solution for 1 (if possible then it's better):

  • move all shared code from HexproofBaseAbility to HexproofAbility;
  • delete HexproofBaseAbility;
  • make HexproofAbility as parent for all other versions.

JayDi85 avatar Apr 29 '24 19:04 JayDi85