Re: Gold Cost Formula
Just because a column has a human-readable label doesn't mean that's what it actually does. Many of them were very poorly understood when the names were assigned, and some of them are flat wrong.
Legendary cards can also have Family 15 (primarily for non-creatures).
Flags: Act Use X doesn't do anything except, when displaying the "AI player activates such-and-such a card" dialog, show the value picked for X in an activated ability that has X is in the cost. By design, it's not on every activated ability with X in the cost, and is on some that don't have X in the cost but do have some other variable that should be shown in that dialog.
Flags: Counters is entirely unused in Shandalar, and does something mostly unrelated to counters (it's not entirely clear what) in Manalink. It's not set on any non-Manalink cards, and only very inconsistently on the Manalink ones.
Flags: Activated Counterspell doesn't mean "this card has an activated ability that counters a spell"; it happened to be on several of the original cards that had such abilities. It controls, to some extent and in combination with Flags: Activated Interrupt and Flags: Protect, whether the card can be activated during the interrupt window or during the regeneration or damage prevention steps. It's unused in Shandalar, and not set on any non-Manalink cards (and inconsistently on the Manalink ones).
Flags: Paid Mana Source doesn't do anything except make it so a card can never be autotapped for mana. It's currently on only four cards in the Shandalar pool (Apprentice Wizard, Celestial Prism, Coal Golem, and Fire Sprites); I'm likely going to repurpose it to indicate mana filters.
Flags: Lich didn't really have anything to do specifically with Lich. If no card with that flag set was on the battlefield during a given turn, then triggers for gaining or losing life and for replacing life gain or loss aren't sent. If set on a specific card, that card will also get EVENT_SPECULATIVE_LIFE events, which tell the AI to use a card-specific value instead of a player's current life when evaluating the current game state (e.g. Lich, when it gets rewritten, will use this event to tell the AI to value each controlled permanent as a point of life and ignore that its current life total is 0); it's currently only used this way by Transcendence, Lich's Tomb, and Phyrexian Unlife.
Flags: Force Attack doesn't do anything at all. It was originally checked before dispatching the also-badly-named EVENT_MUST_ATTACK immediately before combat; while it's true that cards with "[cardname] attacks each turn if able" responded to that event in the obvious way, so do the cards with "at the start of combat, ..." and other similarly-timed effects. Forgetting to set that bit on a card that needs it was so common in Manalink, and dispatching the single EVENT_MUST_ATTACK event is so cheap, that we eventually just removed the check for the bit.
Rarity is canonically set in the individual sets' columns in Manalink.csv.
Reporting "clearly-wrong" csv values should be done in the Manalink CSV errors thread, in general. Some of these sorts of problems are fixed at runtime in Shandalar; see DeclareCardFunction::assign_to_cards_data() in src/shandalar/replace_cards.cpp, starting at "// Fix bad card data". (That's the right place to report even if it's a Shandalar-only card, since the expectation is that they'll eventually go into Manalink as well. (You can mostly tell because the "CODED CARD" column in Manalink.csv will be 0, though the backs of double-faced cards, bottoms of flip cards, and animated versions of manlands and so on will also be set to 0.))
Legendary cards can also have Family 15 (primarily for non-creatures).
Flags: Act Use X doesn't do anything except, when displaying the "AI player activates such-and-such a card" dialog, show the value picked for X in an activated ability that has X is in the cost. By design, it's not on every activated ability with X in the cost, and is on some that don't have X in the cost but do have some other variable that should be shown in that dialog.
Flags: Counters is entirely unused in Shandalar, and does something mostly unrelated to counters (it's not entirely clear what) in Manalink. It's not set on any non-Manalink cards, and only very inconsistently on the Manalink ones.
Flags: Activated Counterspell doesn't mean "this card has an activated ability that counters a spell"; it happened to be on several of the original cards that had such abilities. It controls, to some extent and in combination with Flags: Activated Interrupt and Flags: Protect, whether the card can be activated during the interrupt window or during the regeneration or damage prevention steps. It's unused in Shandalar, and not set on any non-Manalink cards (and inconsistently on the Manalink ones).
Flags: Paid Mana Source doesn't do anything except make it so a card can never be autotapped for mana. It's currently on only four cards in the Shandalar pool (Apprentice Wizard, Celestial Prism, Coal Golem, and Fire Sprites); I'm likely going to repurpose it to indicate mana filters.
Flags: Lich didn't really have anything to do specifically with Lich. If no card with that flag set was on the battlefield during a given turn, then triggers for gaining or losing life and for replacing life gain or loss aren't sent. If set on a specific card, that card will also get EVENT_SPECULATIVE_LIFE events, which tell the AI to use a card-specific value instead of a player's current life when evaluating the current game state (e.g. Lich, when it gets rewritten, will use this event to tell the AI to value each controlled permanent as a point of life and ignore that its current life total is 0); it's currently only used this way by Transcendence, Lich's Tomb, and Phyrexian Unlife.
Flags: Force Attack doesn't do anything at all. It was originally checked before dispatching the also-badly-named EVENT_MUST_ATTACK immediately before combat; while it's true that cards with "[cardname] attacks each turn if able" responded to that event in the obvious way, so do the cards with "at the start of combat, ..." and other similarly-timed effects. Forgetting to set that bit on a card that needs it was so common in Manalink, and dispatching the single EVENT_MUST_ATTACK event is so cheap, that we eventually just removed the check for the bit.
Rarity is canonically set in the individual sets' columns in Manalink.csv.
Reporting "clearly-wrong" csv values should be done in the Manalink CSV errors thread, in general. Some of these sorts of problems are fixed at runtime in Shandalar; see DeclareCardFunction::assign_to_cards_data() in src/shandalar/replace_cards.cpp, starting at "// Fix bad card data". (That's the right place to report even if it's a Shandalar-only card, since the expectation is that they'll eventually go into Manalink as well. (You can mostly tell because the "CODED CARD" column in Manalink.csv will be 0, though the backs of double-faced cards, bottoms of flip cards, and animated versions of manlands and so on will also be set to 0.))