Skip to content

UniversesBeyondBattleTemplate

src.templates.battle.UniversesBeyondBattleTemplate

Bases: BattleTemplate

Universes Beyond version of BattleTemplate.

Source code in src\templates\battle.py
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
class UniversesBeyondBattleTemplate (BattleTemplate):
    """Universes Beyond version of BattleTemplate."""

    """
    * Colors
    """

    @auto_prop_cached
    def pinlines_color_map(self) -> dict:
        colors = pinlines_color_map.copy()
        colors.update({
            'W': [246, 247, 241],
            'U': [0, 131, 193],
            'B': [44, 40, 33],
            'R': [237, 66, 31],
            'G': [5, 129, 64],
            'Gold': [239, 209, 107],
            'Land': [165, 150, 132],
            'Artifact': [227, 228, 230],
            'Colorless': [227, 228, 230]
        })
        return colors

    @auto_prop_cached
    def twins_colors(self) -> Optional[str]:
        return f"{self.twins} Beyond"

    """
    * Groups
    """

    @auto_prop_cached
    def textbox_group(self) -> LayerSet:
        """Textbox Beyond group."""
        return psd.getLayerSet(f"{LAYERS.TEXTBOX} Beyond")

    """
    * Shape Layers
    """

    @auto_prop_cached
    def textbox_shape(self) -> Optional[ArtLayer]:
        return psd.getLayer(LAYERS.NORMAL, [self.textbox_group, LAYERS.SHAPE])

Functions

textbox_group() -> LayerSet

Textbox Beyond group.

Source code in src\templates\battle.py
229
230
231
232
@auto_prop_cached
def textbox_group(self) -> LayerSet:
    """Textbox Beyond group."""
    return psd.getLayerSet(f"{LAYERS.TEXTBOX} Beyond")