Affinity

Affinity is a keyword ability that reduces the mana cost of a spell by the number of permanents of a certain type that the player controls. It first appeared in the Mirrodin block.
==Description==
The ability is always written as "Affinity for [something]". The most common instance is "Affinity for artifacts" (see <c>Frogmite</c>). However, a cycle of Golems (consisting of <c>Dross Golem</c>, <c>Oxidda Golem</c>, <c>Razor Golem</c>, <c>Spire Golem</c>, and <c>Tangle Golem</c>) appeared in the Darksteel expansion, each with affinity for a particular basic land type. <c>Hum of the Radix</c> functions as an "anti-affinity" enchantment, increasing by the cost of all artifact spells for each artifact its controller owns. <c>Mycosynth Golem</c> grants affinity to artifacts for all artifact creature spells cast by its controller, in addition to having Affinity for artifacts itself.
Mirrodin block's cards with affinity contributed heavily to the Second Combo Winter and soured public perception towards the mechanic. The mechanic was considered for a return in the Scars of Mirrodin block but rejected because it had been so destructive for the metagame in its first appearance.Mark Rosewater, Drive to Work #263 "2010"
Affinity for artifacts appeared as a one-off in War of the Spark with <c>Tezzeret, Master of the Bridge</c>., followed by a reintroduction in Modern Horizons 2, alongside a new variant in <c>Junk Winder</c>'s "Affinity for tokens".
R&D officially promoted Affinity to a deciduous mechanic with its return in Phyrexia: All Will Be One. The set debuted Affinity for Equipment, with some classic Affinity for Artifacts in the Commander release. The Lord of the Rings: Tales of Middle-earth featured Affinity for Food.
<c>Tomik, Wielder of Law</c> has "Affinity for Planeswalkers". Notably, his mana cost only has in generic mana (the only Affinity spell to have that amount of generic), demonstrating it is a Commander design as the tax would be reduced by the Affinity ability. 
Outlaws of Thunder Junction featured Affinity for Outlaws.
===Unkeyworded affinity===
Affinity was always designed to use a variety of objects, but the disastrous first try gave the keyword a bad reputation. In between the near-two-decade gap between the debut in Mirrodin block and its return to becoming deciduous Phyrexia: All Will Be One, various other forms of Affinity were tested for a better sense of how to cost them. However, the mechanic was not keyworded to save keyword learning space, while some designs have wordings that are not practical in using Affinity phrasing. , , and are examples of un-keyworded "affinity for artifacts", which were not errata'ed to have affinity after the policy change. When was reprinted in Aetherdrift, it was granted the keyword.
Other un-keyworded objects of affinity include:
*<c>Gate Colossus</c> (Gates)
*<c>Embercleave</c> (attacking creatures)
*<c>The Circle of Loyalty</c> (Knights)
*<c>Brine Giant</c> and (enchantments)
*<c>Hamza, Guardian of Arashin</c> (creatures with +1/+1 counters, also grants it to your other creature spells)
*<c>Icebreaker Kraken</c> (snow lands)
* (Spirits)
* (modified creatures)
* (Citizens)
* (creatures)
* (grants "Affinity for creature tokens" to instants and sorceries)
* (permanents you control with Oil counters)
*<c>Riders of the Mark</c> (Humans)
*<c>Gargantuan Leech</c> (Caves; also counts Caves in graveyard)
*<c>Polliwallop</c> (Frogs)
*<c>Scales of Shale</c> (Lizards)
Ten spells that care about Party have "Affinity for creatures in your Party", but the wording for Party and the wording of Affinity mix poorly. In a similar vein: 
*<c>Stratadon</c>, and has "Affinity for Domain"; <c>Draco</c> and <c>Scion of Draco</c> have "Affinity for Domain" twice.
*<c>Valiant Changeling</c> has "Affinity for creature types".
*<c>Drag to the Underworld</c> and <c>Marshmist Titan</c> have "Affinity for devotion to black"; <c>Daybreak Chimera</c> has "Affinity for devotion to white"
*<c>Khalni Hydra</c> has a unique version where the cost reduced is rather than , but otherwise has "Affinity for green creatures".
*<c>Ghalta, Primal Hunger</c> and <c>Volcanic Salvo</c> have "Affinity for power". <c>The Pride of Hull Clade</c> has "Affinity for toughness"
The next list does not require controlling the objects to discount, such as a certain quality of players, cards in other zones, or other player's creatures.
*Creatures:
**<c>Blasphemous Act</c>, <c>Vanquish the Horde</c> (creatures)
** (opponent's creatures)
**, , <c>Death-Rattle Oni</c> (creatures that have died)
**<c>Sentry Bot</c> (creatures attacking you)
**<c>Stone Idol Trap</c>, <c>Ancient Stone Idol</c> (anyone's attacking creatures)
**, (number of your creatures that were declared as attackers)
**<c>Rowdy Research</c>, <c>Witchstalker Frenzy</c> (any creatures declared as attackers)
*Graveyard cards:
**<c>Ghoultree</c>, <c>Karador, Ghost Chieftain</c>, <c>Molderhulk</c>, <c>Nemesis of Mortals</c>, <c>Writhing Necromass</c>, , <c>Hollow Marauder</c> (creatures in your graveyard)
**<c>Huskburster Swarm</c> (creatures in your graveyard and exile)
**<c>Chitin Gravestalker</c> (creatures and artifacts in your graveyard)
**<c>Bedlam Reveler</c>, , <c>The Magic Mirror</c>, , <c>Eddymurk Crab</c> (instants/sorceries in your graveyard)
**<c>Hearth Elemental</c> (instants/sorceries and Adventure creatures in the graveyard)
** (instants/sorceries in graveyard and exile, plus exiled Adventure creatures)
**<c>Eris, Roar of the Storm</c> (different mana values of instants/sorceries in graveyard)
** (different types in your graveyard)
**<c>The Capitoline Triad</c> (Historic cards in your graveyard)
** (different mana values in your graveyard)
**, <c>Yuma, Proud Protector</c>, <c>Rumbleweed</c> (lands in graveyard)
*Opponents:
**, all spells with Undaunted (opponents)
** (damaged opponents)
** (attacked opponents by you)
* (opponent's lands that produce )
*<c>Lumbering Megasloth</c> (counters on anything)
*<c>The Balrog, Durin's Bane</c> (any sacrificed permanents)
*<c>Korvold, Gleeful Glutton</c> (card types among sacrificed permanents)
*<c>Licia, Sanguine Tribune</c>, <c>Ezzaroot Channeler</c>, <c>Sproutback Trudge</c> (life gained)
==Rules==
==Rulings==
*The affinity ability reduces only the amount of generic mana you pay. It can't reduce how much nongeneric mana you pay.
*Affinity can't reduce the cost to cast a spell to less than .
*Affinity doesn't change the spell's mana cost or converted mana cost. It just changes how much mana you pay to cast the spell.
*The cost reduction is set before you have to pay any costs for the spell. If you sacrifice an artifact while paying the spell's costs, that artifact still counts toward the cost reduction.
==Examples==
==Notable cards with affinity==
*<c>Frogmite</c>
*<c>Myr Enforcer</c>
*<c>Thoughtcast</c> - used in affinity decks
==References==