Bases: NormalLayout
Adventure card layout, introduced in Throne of Eldraine.
Source code in src\layouts.py
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050 | class AdventureLayout(NormalLayout):
"""Adventure card layout, introduced in Throne of Eldraine."""
card_class: str = LayoutType.Adventure
"""
* Core Data
"""
@auto_prop_cached
def adventure(self) -> dict:
"""Card object for adventure side."""
return self.scryfall['card_faces'][1]
"""
* Adventure Text
"""
@auto_prop_cached
def mana_adventure(self) -> str:
"""Mana cost of the adventure side."""
return self.adventure['mana_cost']
@auto_prop_cached
def name_adventure(self) -> str:
"""Name of the Adventure side."""
if self.is_alt_lang and 'printed_name' in self.adventure:
return self.adventure.get('printed_name', '')
return self.adventure.get('name', '')
@auto_prop_cached
def type_line_adventure(self) -> str:
"""Type line of the Adventure side."""
if self.is_alt_lang and 'printed_type_line' in self.adventure:
return self.adventure.get('printed_type_line', '')
return self.adventure.get('type_line', '')
@auto_prop_cached
def oracle_text_adventure(self) -> str:
"""Oracle text of the Adventure side."""
if self.is_alt_lang and 'printed_text' in self.adventure:
return self.adventure.get('printed_text', '')
return self.adventure.get('oracle_text', '')
@auto_prop_cached
def flavor_text_adventure(self) -> str:
"""Flavor text of the Adventure side."""
return self.adventure.get('flavor_text', '')
"""
* Adventure Colors
"""
@auto_prop_cached
def color_identity_adventure(self) -> list[str]:
"""Colors present in the adventure side mana cost."""
return [n for n in get_mana_cost_colors(self.mana_adventure)]
@auto_prop_cached
def adventure_colors(self) -> str:
"""Color identity of adventure side frame elements."""
if check_hybrid_mana_cost(self.color_identity_adventure, self.mana_adventure):
return LAYERS.LAND
if len(self.color_identity_adventure) > 1:
return LAYERS.GOLD
if not self.color_identity_adventure:
return LAYERS.COLORLESS
return self.color_identity_adventure[0]
|
Attributes
card_class: str = LayoutType.Adventure
Functions
adventure() -> dict
Card object for adventure side.
Source code in src\layouts.py
| @auto_prop_cached
def adventure(self) -> dict:
"""Card object for adventure side."""
return self.scryfall['card_faces'][1]
|
adventure_colors() -> str
Color identity of adventure side frame elements.
Source code in src\layouts.py
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050 | @auto_prop_cached
def adventure_colors(self) -> str:
"""Color identity of adventure side frame elements."""
if check_hybrid_mana_cost(self.color_identity_adventure, self.mana_adventure):
return LAYERS.LAND
if len(self.color_identity_adventure) > 1:
return LAYERS.GOLD
if not self.color_identity_adventure:
return LAYERS.COLORLESS
return self.color_identity_adventure[0]
|
color_identity_adventure() -> list[str]
Colors present in the adventure side mana cost.
Source code in src\layouts.py
| @auto_prop_cached
def color_identity_adventure(self) -> list[str]:
"""Colors present in the adventure side mana cost."""
return [n for n in get_mana_cost_colors(self.mana_adventure)]
|
flavor_text_adventure() -> str
Flavor text of the Adventure side.
Source code in src\layouts.py
| @auto_prop_cached
def flavor_text_adventure(self) -> str:
"""Flavor text of the Adventure side."""
return self.adventure.get('flavor_text', '')
|
mana_adventure() -> str
Mana cost of the adventure side.
Source code in src\layouts.py
| @auto_prop_cached
def mana_adventure(self) -> str:
"""Mana cost of the adventure side."""
return self.adventure['mana_cost']
|
name_adventure() -> str
Name of the Adventure side.
Source code in src\layouts.py
1006
1007
1008
1009
1010
1011 | @auto_prop_cached
def name_adventure(self) -> str:
"""Name of the Adventure side."""
if self.is_alt_lang and 'printed_name' in self.adventure:
return self.adventure.get('printed_name', '')
return self.adventure.get('name', '')
|
oracle_text_adventure() -> str
Oracle text of the Adventure side.
Source code in src\layouts.py
1020
1021
1022
1023
1024
1025 | @auto_prop_cached
def oracle_text_adventure(self) -> str:
"""Oracle text of the Adventure side."""
if self.is_alt_lang and 'printed_text' in self.adventure:
return self.adventure.get('printed_text', '')
return self.adventure.get('oracle_text', '')
|
type_line_adventure() -> str
Type line of the Adventure side.
Source code in src\layouts.py
1013
1014
1015
1016
1017
1018 | @auto_prop_cached
def type_line_adventure(self) -> str:
"""Type line of the Adventure side."""
if self.is_alt_lang and 'printed_type_line' in self.adventure:
return self.adventure.get('printed_type_line', '')
return self.adventure.get('type_line', '')
|