CLEAN
Browse files
src/lib/components/Piclets/AbilityDisplay.svelte
CHANGED
@@ -127,42 +127,39 @@
|
|
127 |
</div>
|
128 |
|
129 |
{#if expanded && ability.triggers?.length}
|
|
|
130 |
<div class="ability-details">
|
131 |
<div class="triggers-section">
|
132 |
<h4 class="section-title">
|
133 |
<span class="section-icon">⚡</span>
|
134 |
-
|
135 |
</h4>
|
136 |
-
<div class="
|
137 |
-
|
138 |
-
<
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
{#if trigger.condition}
|
144 |
-
<span class="trigger-condition">when {trigger.condition}</span>
|
145 |
-
{/if}
|
146 |
-
</div>
|
147 |
-
</div>
|
148 |
-
|
149 |
-
{#if trigger.effects?.length}
|
150 |
-
<div class="trigger-effects">
|
151 |
-
{#each trigger.effects as effect}
|
152 |
-
<div class="trigger-effect">
|
153 |
-
<span
|
154 |
-
class="effect-icon small"
|
155 |
-
style="color: {getEffectColor(effect.type)}"
|
156 |
-
>
|
157 |
-
{getEffectIcon(effect.type)}
|
158 |
-
</span>
|
159 |
-
<span class="effect-summary">{formatEffectDescription(effect)}</span>
|
160 |
-
</div>
|
161 |
-
{/each}
|
162 |
-
</div>
|
163 |
{/if}
|
164 |
</div>
|
165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
</div>
|
167 |
</div>
|
168 |
</div>
|
|
|
127 |
</div>
|
128 |
|
129 |
{#if expanded && ability.triggers?.length}
|
130 |
+
{@const trigger = ability.triggers[0]}
|
131 |
<div class="ability-details">
|
132 |
<div class="triggers-section">
|
133 |
<h4 class="section-title">
|
134 |
<span class="section-icon">⚡</span>
|
135 |
+
Trigger
|
136 |
</h4>
|
137 |
+
<div class="trigger-item">
|
138 |
+
<div class="trigger-header">
|
139 |
+
<span class="trigger-icon">{getTriggerIcon(trigger.event)}</span>
|
140 |
+
<div class="trigger-info">
|
141 |
+
<span class="trigger-event">{trigger.event}</span>
|
142 |
+
{#if trigger.condition}
|
143 |
+
<span class="trigger-condition">when {trigger.condition}</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
{/if}
|
145 |
</div>
|
146 |
+
</div>
|
147 |
+
|
148 |
+
{#if trigger.effects?.length}
|
149 |
+
<div class="trigger-effects">
|
150 |
+
{#each trigger.effects as effect}
|
151 |
+
<div class="trigger-effect">
|
152 |
+
<span
|
153 |
+
class="effect-icon small"
|
154 |
+
style="color: {getEffectColor(effect.type)}"
|
155 |
+
>
|
156 |
+
{getEffectIcon(effect.type)}
|
157 |
+
</span>
|
158 |
+
<span class="effect-summary">{formatEffectDescription(effect)}</span>
|
159 |
+
</div>
|
160 |
+
{/each}
|
161 |
+
</div>
|
162 |
+
{/if}
|
163 |
</div>
|
164 |
</div>
|
165 |
</div>
|
src/lib/components/Piclets/PicletDetail.svelte
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
|
18 |
let { instance, onClose, onDeleted }: Props = $props();
|
19 |
let showDeleteConfirm = $state(false);
|
20 |
-
let selectedTab = $state<'about' | '
|
21 |
let isSharing = $state(false);
|
22 |
|
23 |
// Convert to battle definition to get enhanced ability data
|
@@ -130,26 +130,12 @@
|
|
130 |
>
|
131 |
About
|
132 |
</button>
|
133 |
-
<button
|
134 |
-
class="tab-button"
|
135 |
-
class:active={selectedTab === 'stats'}
|
136 |
-
onclick={() => selectedTab = 'stats'}
|
137 |
-
>
|
138 |
-
Stats
|
139 |
-
</button>
|
140 |
<button
|
141 |
class="tab-button"
|
142 |
class:active={selectedTab === 'abilities'}
|
143 |
onclick={() => selectedTab = 'abilities'}
|
144 |
>
|
145 |
-
|
146 |
-
</button>
|
147 |
-
<button
|
148 |
-
class="tab-button"
|
149 |
-
class:active={selectedTab === 'moves'}
|
150 |
-
onclick={() => selectedTab = 'moves'}
|
151 |
-
>
|
152 |
-
Moves
|
153 |
</button>
|
154 |
</div>
|
155 |
|
@@ -158,9 +144,10 @@
|
|
158 |
{#if selectedTab === 'about'}
|
159 |
<div class="content-card">
|
160 |
<p class="description">{instance.description}</p>
|
161 |
-
|
162 |
-
|
163 |
-
|
|
|
164 |
<div class="stats-list">
|
165 |
<div class="stat-row">
|
166 |
<span>Attack</span>
|
@@ -199,13 +186,15 @@
|
|
199 |
</div>
|
200 |
{:else if selectedTab === 'abilities'}
|
201 |
<div class="content-card">
|
|
|
202 |
<AbilityDisplay
|
203 |
ability={battleDefinition.specialAbility}
|
204 |
expanded={true}
|
205 |
/>
|
206 |
-
|
207 |
-
|
208 |
-
|
|
|
209 |
<div class="moves-list">
|
210 |
{#each instance.moves as move, index}
|
211 |
<MoveDisplay
|
@@ -483,6 +472,13 @@
|
|
483 |
font-size: 16px;
|
484 |
}
|
485 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
486 |
.btn {
|
487 |
padding: 0.75rem 1.5rem;
|
488 |
border: none;
|
|
|
17 |
|
18 |
let { instance, onClose, onDeleted }: Props = $props();
|
19 |
let showDeleteConfirm = $state(false);
|
20 |
+
let selectedTab = $state<'about' | 'abilities'>('about');
|
21 |
let isSharing = $state(false);
|
22 |
|
23 |
// Convert to battle definition to get enhanced ability data
|
|
|
130 |
>
|
131 |
About
|
132 |
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
<button
|
134 |
class="tab-button"
|
135 |
class:active={selectedTab === 'abilities'}
|
136 |
onclick={() => selectedTab = 'abilities'}
|
137 |
>
|
138 |
+
Abilities
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
</button>
|
140 |
</div>
|
141 |
|
|
|
144 |
{#if selectedTab === 'about'}
|
145 |
<div class="content-card">
|
146 |
<p class="description">{instance.description}</p>
|
147 |
+
|
148 |
+
<div class="divider"></div>
|
149 |
+
|
150 |
+
<h3 class="section-heading">Stats</h3>
|
151 |
<div class="stats-list">
|
152 |
<div class="stat-row">
|
153 |
<span>Attack</span>
|
|
|
186 |
</div>
|
187 |
{:else if selectedTab === 'abilities'}
|
188 |
<div class="content-card">
|
189 |
+
<h3 class="section-heading">Special Ability</h3>
|
190 |
<AbilityDisplay
|
191 |
ability={battleDefinition.specialAbility}
|
192 |
expanded={true}
|
193 |
/>
|
194 |
+
|
195 |
+
<div class="divider"></div>
|
196 |
+
|
197 |
+
<h3 class="section-heading">Moves</h3>
|
198 |
<div class="moves-list">
|
199 |
{#each instance.moves as move, index}
|
200 |
<MoveDisplay
|
|
|
472 |
font-size: 16px;
|
473 |
}
|
474 |
|
475 |
+
.section-heading {
|
476 |
+
font-size: 18px;
|
477 |
+
font-weight: 600;
|
478 |
+
color: #495057;
|
479 |
+
margin: 0 0 12px 0;
|
480 |
+
}
|
481 |
+
|
482 |
.btn {
|
483 |
padding: 0.75rem 1.5rem;
|
484 |
border: none;
|