Bases: BattleMod
, VectorTemplate
Battle template using vector shape layers and automatic pinlines / multicolor generation.
Source code in src\templates\battle.py
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195 | class BattleTemplate (BattleMod, VectorTemplate):
"""Battle template using vector shape layers and automatic pinlines / multicolor generation."""
"""
* Bool Properties
"""
@property
def is_legendary(self) -> bool:
return False
"""
* Groups
"""
@property
def background_group(self) -> Optional[LayerSet]:
return
"""
* Colors
"""
@auto_prop_cached
def pinlines_colors(self) -> Union[SolidColor, list[dict]]:
"""Must be returned as SolidColor or gradient notation."""
return psd.get_pinline_gradient(
self.identity if 1 < len(self.identity) < self.color_limit else self.pinlines,
color_map=self.pinlines_color_map,
location_map={2: [.4543, .5886]}
)
"""
* Shape Layers
"""
@auto_prop_cached
def textbox_shape(self) -> Optional[ArtLayer]:
return psd.getLayer(LAYERS.NORMAL, [self.textbox_group, LAYERS.SHAPE])
@auto_prop_cached
def enabled_shapes(self) -> list[Union[ArtLayer, LayerSet, None]]:
return [self.textbox_shape]
|
Functions
pinlines_colors() -> Union[SolidColor, list[dict]]
Must be returned as SolidColor or gradient notation.
Source code in src\templates\battle.py
176
177
178
179
180
181
182
183 | @auto_prop_cached
def pinlines_colors(self) -> Union[SolidColor, list[dict]]:
"""Must be returned as SolidColor or gradient notation."""
return psd.get_pinline_gradient(
self.identity if 1 < len(self.identity) < self.color_limit else self.pinlines,
color_map=self.pinlines_color_map,
location_map={2: [.4543, .5886]}
)
|