Skip to content

VectorCompanionMod

src.templates._cosmetic.VectorCompanionMod

Bases: CompanionMod, VectorTemplate

Modifier for vectorized 'Companion' supported templates.

Inherits
  • 'CompanionMod'
Adds
  • 'companion_group': Defines the group containing Companion textures if card is Companion
Modifies
  • 'enable_companion_layers': Uses 'create_blended_layer' to blend companion textures.
Source code in src\templates\_cosmetic.py
194
195
196
197
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
class VectorCompanionMod (CompanionMod, VectorTemplate):
    """
    Modifier for vectorized 'Companion' supported templates.

    Inherits:
        - 'CompanionMod'

    Adds:
        - 'companion_group': Defines the group containing Companion textures if card is Companion

    Modifies:
        - 'enable_companion_layers': Uses 'create_blended_layer' to blend companion textures.
    """

    @auto_prop_cached
    def companion_group(self) -> Optional[LayerSet]:
        """Group containing Companion inner crown textures."""
        return psd.getLayerSet(LAYERS.COMPANION)

    """
    * Companion Methods
    """

    def enable_companion_layers(self) -> None:
        """Generate blended hollow crown Companion texture."""
        if self.is_legendary and self.companion_group:
            self.create_blended_layer(
                group=self.companion_group,
                colors=self.crown_colors,
                masks=self.crown_masks)

Functions

companion_group() -> Optional[LayerSet]

Group containing Companion inner crown textures.

Source code in src\templates\_cosmetic.py
208
209
210
211
@auto_prop_cached
def companion_group(self) -> Optional[LayerSet]:
    """Group containing Companion inner crown textures."""
    return psd.getLayerSet(LAYERS.COMPANION)

enable_companion_layers() -> None

Generate blended hollow crown Companion texture.

Source code in src\templates\_cosmetic.py
217
218
219
220
221
222
223
def enable_companion_layers(self) -> None:
    """Generate blended hollow crown Companion texture."""
    if self.is_legendary and self.companion_group:
        self.create_blended_layer(
            group=self.companion_group,
            colors=self.crown_colors,
            masks=self.crown_masks)