Skip to content

MutateLayout

src.layouts.MutateLayout

Bases: NormalLayout

Mutate card layout introduced in Ikoria: Lair of Behemoths.

Source code in src\layouts.py
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
class MutateLayout(NormalLayout):
    """Mutate card layout introduced in Ikoria: Lair of Behemoths."""
    card_class: str = LayoutType.Mutate

    """
    * Text Info
    """

    @auto_prop_cached
    def oracle_text_unprocessed(self) -> str:
        """str: Unaltered text to split between oracle and mutate."""
        return self.card.get('printed_text', self.oracle_text_raw) if self.is_alt_lang else self.oracle_text_raw

    @auto_prop_cached
    def oracle_text(self) -> str:
        """str: Remove the mutate ability text."""
        return strip_lines(self.oracle_text_unprocessed, 1)

    """
    * Mutate Properties
    """

    @auto_prop_cached
    def mutate_text(self) -> str:
        """str: Isolated mutate ability text."""
        return get_line(self.oracle_text_unprocessed, 0)

Attributes

card_class: str = LayoutType.Mutate

  • Text Info

Functions

mutate_text() -> str

Source code in src\layouts.py
784
785
786
787
@auto_prop_cached
def mutate_text(self) -> str:
    """str: Isolated mutate ability text."""
    return get_line(self.oracle_text_unprocessed, 0)

oracle_text() -> str

Source code in src\layouts.py
775
776
777
778
@auto_prop_cached
def oracle_text(self) -> str:
    """str: Remove the mutate ability text."""
    return strip_lines(self.oracle_text_unprocessed, 1)

oracle_text_unprocessed() -> str

Source code in src\layouts.py
770
771
772
773
@auto_prop_cached
def oracle_text_unprocessed(self) -> str:
    """str: Unaltered text to split between oracle and mutate."""
    return self.card.get('printed_text', self.oracle_text_raw) if self.is_alt_lang else self.oracle_text_raw