FANDOM


This template will add a box to an article that contains either a glossary entry or a rules section from the Magic the Gathering comprehensive rules.

Usage:

  • {{CompRules|glossary|<glossaryterm>}}
  • {{CompRules|<rulestitle>}}
  • {{CompRules|<rulesindex>}}
  • {{CompRules|exact|<rulesindex>}}

All the parameters are case sensitive.

<rulesindex>

The <rulesindex> variant should be used sparingly as a last resort if a partial section is required. This is because the rule index can change in rules updates. It's rare but has been known to happen. Use <rulestitle> instead whenever you can.

To make validating the rules index after a rules update easier the category Indexed Rule is automatically added to any page that uses the <rulesindex> variant.

Categories

In addition to the Indexed Rule category mentioned above, the template will also add the following categories where appropriate.

Examples

Glossary Example

{{CompRules|glossary|Special Action}} gives

Comprehensive Rules Glossary (April 17, 2020)

Special Action
An action a player may take that doesn’t use the stack. See rule 116, “Special Actions.”

Rules Title Example

{{CompRules|Populate}} gives

Comprehensive Rules (April 17, 2020)

  • 701.29. Populate
    • 701.29a To populate means to choose a creature token you control and create a token that’s a copy of that creature token.
    • 701.29b If you control no creature tokens when instructed to populate, you won’t create a token.

Rules Index Example

{{CompRules|700.3}} gives

Comprehensive Rules (April 17, 2020)

  • 700.3. Some effects cause objects to be temporarily grouped into piles.
    • 700.3a Each of the affected objects must be put into exactly one of those piles, unless the effect specifies otherwise.
    • 700.3b Each object in a pile is still an individual object. The pile is not an object.
    • 700.3c Objects grouped into piles don’t leave the zone they’re currently in. If cards in a graveyard are split into piles, the order of the graveyard must be maintained.

      Example: Fact or Fiction reads, “Reveal the top five cards of your library. An opponent separates those cards into two piles. Put one pile into your hand and the other into your graveyard.” While an opponent is separating the revealed cards into piles, they’re still in their owner’s library. They don’t leave the library until they’re put into their owner’s hand or graveyard.

    • 700.3d A pile can contain zero or more objects.

Exact Example

{{CompRules|exact|700.3}} gives

Comprehensive Rules (April 17, 2020)

  • 700.3. Some effects cause objects to be temporarily grouped into piles.

Maintenance

To update the comprehensive rules you edit Module:CompRulesText.

First obtain the TXT version of the rules from Magic the Gathering Comprehensive Rules.

Then paste its contents into the CompRulesText module between the [===[ and the ]===] replacing what is already there.

i.e.

p.text = [===[
Paste the rules text here
]===]

Leave the rest of the module as it is.

Community content is available under CC-BY-SA unless otherwise noted.