added item support and team registration #4
@@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "pokemon-data-displayer",
|
"productName": "pokemon-data-displayer",
|
||||||
"version": "0.0.6"
|
"version": "0.0.7"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
|
|||||||
@@ -9,19 +9,16 @@
|
|||||||
export let attackId: number | undefined;
|
export let attackId: number | undefined;
|
||||||
let attackData;
|
let attackData;
|
||||||
$: {
|
$: {
|
||||||
if (myValue > 0 && myValue !== currentValue) {
|
if (moveValue > 0) {
|
||||||
invoke("search_move", { index: myValue }).then((r) => {
|
invoke("search_move", { index: moveValue }).then((r) => {
|
||||||
currentValue = myValue;
|
|
||||||
attackData = r;
|
attackData = r;
|
||||||
console.log(attackData);
|
moveValue = undefined;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!!attackId) {
|
if (!!attackId) {
|
||||||
console.log(attackId);
|
console.log(attackId);
|
||||||
invoke("search_move", { index: attackId }).then((r) => {
|
invoke("search_move", { index: attackId }).then((r) => {
|
||||||
currentValue = myValue = attackId;
|
|
||||||
attackData = r;
|
attackData = r;
|
||||||
console.log(attackData);
|
|
||||||
attackId = undefined;
|
attackId = undefined;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -44,6 +41,10 @@
|
|||||||
(!!attackData && ![1, 2].includes(attackData.category))
|
(!!attackData && ![1, 2].includes(attackData.category))
|
||||||
) {
|
) {
|
||||||
// display some message somewhere
|
// display some message somewhere
|
||||||
|
total_max_damage = 0;
|
||||||
|
total_min_damage = 0;
|
||||||
|
total_max_damage_percentage = 0;
|
||||||
|
total_min_damage_percentage = 0;
|
||||||
console.log("skip");
|
console.log("skip");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -353,8 +354,7 @@
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let myValue;
|
let moveValue;
|
||||||
let currentValue = 0;
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="calculator">
|
<div class="calculator">
|
||||||
@@ -392,7 +392,7 @@
|
|||||||
localFiltering={false}
|
localFiltering={false}
|
||||||
labelFieldName="name"
|
labelFieldName="name"
|
||||||
valueFieldName="id"
|
valueFieldName="id"
|
||||||
bind:value={myValue}
|
bind:value={moveValue}
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td>{ attackData ? attackData.name : "" }</td>
|
<td>{ attackData ? attackData.name : "" }</td>
|
||||||
|
|||||||
@@ -142,31 +142,31 @@
|
|||||||
pokemonData.hp_v,
|
pokemonData.hp_v,
|
||||||
pokemonData.hp_d
|
pokemonData.hp_d
|
||||||
);
|
);
|
||||||
atk_final = other_stats(
|
attack_final = other_stats(
|
||||||
pokemonData.attack,
|
pokemonData.attack,
|
||||||
pokemonData.attack_v,
|
pokemonData.attack_v,
|
||||||
pokemonData.attack_d,
|
pokemonData.attack_d,
|
||||||
atk_p
|
atk_p
|
||||||
);
|
);
|
||||||
def_final = other_stats(
|
defense_final = other_stats(
|
||||||
pokemonData.defense,
|
pokemonData.defense,
|
||||||
pokemonData.defense_v,
|
pokemonData.defense_v,
|
||||||
pokemonData.defense_d,
|
pokemonData.defense_d,
|
||||||
def_p
|
def_p
|
||||||
);
|
);
|
||||||
spatk_final = other_stats(
|
special_attack_final = other_stats(
|
||||||
pokemonData.special_attack,
|
pokemonData.special_attack,
|
||||||
pokemonData.special_attack_v,
|
pokemonData.special_attack_v,
|
||||||
pokemonData.special_attack_d,
|
pokemonData.special_attack_d,
|
||||||
spatk_p
|
spatk_p
|
||||||
);
|
);
|
||||||
spdef_final = other_stats(
|
special_defense_final = other_stats(
|
||||||
pokemonData.special_defense,
|
pokemonData.special_defense,
|
||||||
pokemonData.special_defense_v,
|
pokemonData.special_defense_v,
|
||||||
pokemonData.special_defense_d,
|
pokemonData.special_defense_d,
|
||||||
spdef_p
|
spdef_p
|
||||||
);
|
);
|
||||||
spd_final = other_stats(
|
speed_final = other_stats(
|
||||||
pokemonData.speed,
|
pokemonData.speed,
|
||||||
pokemonData.speed_v,
|
pokemonData.speed_v,
|
||||||
pokemonData.speed_d,
|
pokemonData.speed_d,
|
||||||
@@ -308,11 +308,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
export let hp_final = 0;
|
export let hp_final = 0;
|
||||||
export let atk_final = 0;
|
export let attack_final = 0;
|
||||||
export let def_final = 0;
|
export let defense_final = 0;
|
||||||
export let spatk_final = 0;
|
export let special_attack_final = 0;
|
||||||
export let spdef_final = 0;
|
export let special_defense_final = 0;
|
||||||
export let spd_final = 0;
|
export let speed_final = 0;
|
||||||
let level = 50;
|
let level = 50;
|
||||||
let selected_terastype = 0;
|
let selected_terastype = 0;
|
||||||
let selected_item = 0;
|
let selected_item = 0;
|
||||||
@@ -465,7 +465,7 @@
|
|||||||
/></b
|
/></b
|
||||||
></td
|
></td
|
||||||
>
|
>
|
||||||
<td class="atai-column"><b>{atk_final}</b></td>
|
<td class="atai-column"><b>{attack_final}</b></td>
|
||||||
<td class="atai-column"
|
<td class="atai-column"
|
||||||
><b
|
><b
|
||||||
><input
|
><input
|
||||||
@@ -485,14 +485,50 @@
|
|||||||
<td> </td>
|
<td> </td>
|
||||||
{#each Array.from({ length: 6 }, (_, i) => i - 6) as i}
|
{#each Array.from({ length: 6 }, (_, i) => i - 6) as i}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<td class="cursor-pointer minus {pokemonData.attack_buff < i+1 ? "red" : ""}" on:click={() => { pokemonData.attack_buff = i; }}>▼</td>
|
<td
|
||||||
|
class="cursor-pointer minus {pokemonData.attack_buff < i + 1
|
||||||
|
? 'red'
|
||||||
|
: ''}"
|
||||||
|
on:click={() => {
|
||||||
|
pokemonData.attack_buff = i;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
▼
|
||||||
|
</td>
|
||||||
{/each}
|
{/each}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<td class="cursor-pointer" on:click={() => { pokemonData.attack_buff = 0; }}>・</td>
|
<td
|
||||||
|
class="cursor-pointer"
|
||||||
|
on:click={() => {
|
||||||
|
pokemonData.attack_buff = 0;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
・
|
||||||
|
</td>
|
||||||
{#each Array.from({ length: 6 }, (_, i) => i) as i}
|
{#each Array.from({ length: 6 }, (_, i) => i) as i}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<td class="cursor-pointer plus {pokemonData.attack_buff > i ? "green" : ""}" on:click={() => { pokemonData.attack_buff = i+1; }}>▲</td>
|
<td
|
||||||
|
class="cursor-pointer plus {pokemonData.attack_buff > i
|
||||||
|
? 'green'
|
||||||
|
: ''}"
|
||||||
|
on:click={() => {
|
||||||
|
pokemonData.attack_buff = i + 1;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
▲
|
||||||
|
</td>
|
||||||
{/each}
|
{/each}
|
||||||
|
<td> </td>
|
||||||
|
<td>
|
||||||
|
({Math.floor(
|
||||||
|
attack_final *
|
||||||
|
(pokemonData.attack_buff > 0
|
||||||
|
? (2 + pokemonData.attack_buff) / 2
|
||||||
|
: pokemonData.attack_buff < 0
|
||||||
|
? 2 / (2 - pokemonData.attack_buff)
|
||||||
|
: 1)
|
||||||
|
)})
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="value-column"><b>DEF</b></td>
|
<td class="value-column"><b>DEF</b></td>
|
||||||
@@ -519,7 +555,7 @@
|
|||||||
/></b
|
/></b
|
||||||
></td
|
></td
|
||||||
>
|
>
|
||||||
<td class="atai-column"><b>{def_final}</b></td>
|
<td class="atai-column"><b>{defense_final}</b></td>
|
||||||
<td class="atai-column"
|
<td class="atai-column"
|
||||||
><b
|
><b
|
||||||
><input
|
><input
|
||||||
@@ -539,14 +575,50 @@
|
|||||||
<td> </td>
|
<td> </td>
|
||||||
{#each Array.from({ length: 6 }, (_, i) => i - 6) as i}
|
{#each Array.from({ length: 6 }, (_, i) => i - 6) as i}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<td class="cursor-pointer minus {pokemonData.defense_buff < i+1 ? "red" : ""}" on:click={() => { pokemonData.defense_buff = i; }}>▼</td>
|
<td
|
||||||
|
class="cursor-pointer minus {pokemonData.defense_buff < i + 1
|
||||||
|
? 'red'
|
||||||
|
: ''}"
|
||||||
|
on:click={() => {
|
||||||
|
pokemonData.defense_buff = i;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
▼
|
||||||
|
</td>
|
||||||
{/each}
|
{/each}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<td class="cursor-pointer" on:click={() => { pokemonData.defense_buff = 0; }}>・</td>
|
<td
|
||||||
|
class="cursor-pointer"
|
||||||
|
on:click={() => {
|
||||||
|
pokemonData.defense_buff = 0;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
・
|
||||||
|
</td>
|
||||||
{#each Array.from({ length: 6 }, (_, i) => i) as i}
|
{#each Array.from({ length: 6 }, (_, i) => i) as i}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<td class="cursor-pointer plus {pokemonData.defense_buff > i ? "green" : ""}" on:click={() => { pokemonData.defense_buff = i+1; }}>▲</td>
|
<td
|
||||||
|
class="cursor-pointer plus {pokemonData.defense_buff > i
|
||||||
|
? 'green'
|
||||||
|
: ''}"
|
||||||
|
on:click={() => {
|
||||||
|
pokemonData.defense_buff = i + 1;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
▲
|
||||||
|
</td>
|
||||||
{/each}
|
{/each}
|
||||||
|
<td> </td>
|
||||||
|
<td>
|
||||||
|
({Math.floor(
|
||||||
|
defense_final *
|
||||||
|
(pokemonData.defense_buff > 0
|
||||||
|
? (2 + pokemonData.defense_buff) / 2
|
||||||
|
: pokemonData.defense_buff < 0
|
||||||
|
? 2 / (2 - pokemonData.defense_buff)
|
||||||
|
: 1)
|
||||||
|
)})
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="value-column"><b>S.ATK</b></td>
|
<td class="value-column"><b>S.ATK</b></td>
|
||||||
@@ -573,7 +645,7 @@
|
|||||||
/>
|
/>
|
||||||
</b>
|
</b>
|
||||||
</td>
|
</td>
|
||||||
<td class="atai-column"><b>{spatk_final}</b></td>
|
<td class="atai-column"><b>{special_attack_final}</b></td>
|
||||||
<td class="atai-column">
|
<td class="atai-column">
|
||||||
<b>
|
<b>
|
||||||
<input
|
<input
|
||||||
@@ -593,14 +665,52 @@
|
|||||||
<td> </td>
|
<td> </td>
|
||||||
{#each Array.from({ length: 6 }, (_, i) => i - 6) as i}
|
{#each Array.from({ length: 6 }, (_, i) => i - 6) as i}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<td class="cursor-pointer minus {pokemonData.special_attack_buff < i+1 ? "red" : ""}" on:click={() => { pokemonData.special_attack_buff = i; }}>▼</td>
|
<td
|
||||||
|
class="cursor-pointer minus {pokemonData.special_attack_buff <
|
||||||
|
i + 1
|
||||||
|
? 'red'
|
||||||
|
: ''}"
|
||||||
|
on:click={() => {
|
||||||
|
pokemonData.special_attack_buff = i;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
▼
|
||||||
|
</td>
|
||||||
{/each}
|
{/each}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<td class="cursor-pointer" on:click={() => { pokemonData.special_attack_buff = 0; }}>・</td>
|
<td
|
||||||
|
class="cursor-pointer"
|
||||||
|
on:click={() => {
|
||||||
|
pokemonData.special_attack_buff = 0;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
・
|
||||||
|
</td>
|
||||||
{#each Array.from({ length: 6 }, (_, i) => i) as i}
|
{#each Array.from({ length: 6 }, (_, i) => i) as i}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<td class="cursor-pointer plus {pokemonData.special_attack_buff > i ? "green" : ""}" on:click={() => { pokemonData.special_attack_buff = i+1; }}>▲</td>
|
<td
|
||||||
|
class="cursor-pointer plus {pokemonData.special_attack_buff >
|
||||||
|
i
|
||||||
|
? 'green'
|
||||||
|
: ''}"
|
||||||
|
on:click={() => {
|
||||||
|
pokemonData.special_attack_buff = i + 1;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
▲
|
||||||
|
</td>
|
||||||
{/each}
|
{/each}
|
||||||
|
<td> </td>
|
||||||
|
<td>
|
||||||
|
({Math.floor(
|
||||||
|
special_attack_final *
|
||||||
|
(pokemonData.special_attack_buff > 0
|
||||||
|
? (2 + pokemonData.special_attack_buff) / 2
|
||||||
|
: pokemonData.special_attack_buff < 0
|
||||||
|
? 2 / (2 - pokemonData.special_attack_buff)
|
||||||
|
: 1)
|
||||||
|
)})
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="value-column"><b>S.DEF</b></td>
|
<td class="value-column"><b>S.DEF</b></td>
|
||||||
@@ -627,7 +737,7 @@
|
|||||||
/>
|
/>
|
||||||
</b>
|
</b>
|
||||||
</td>
|
</td>
|
||||||
<td class="atai-column"><b>{spdef_final}</b></td>
|
<td class="atai-column"><b>{special_defense_final}</b></td>
|
||||||
<td class="atai-column">
|
<td class="atai-column">
|
||||||
<b>
|
<b>
|
||||||
<input
|
<input
|
||||||
@@ -647,14 +757,52 @@
|
|||||||
<td> </td>
|
<td> </td>
|
||||||
{#each Array.from({ length: 6 }, (_, i) => i - 6) as i}
|
{#each Array.from({ length: 6 }, (_, i) => i - 6) as i}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<td class="cursor-pointer minus {pokemonData.special_defense_buff < i+1 ? "red" : ""}" on:click={() => { pokemonData.special_defense_buff = i; }}>▼</td>
|
<td
|
||||||
|
class="cursor-pointer minus {pokemonData.special_defense_buff <
|
||||||
|
i + 1
|
||||||
|
? 'red'
|
||||||
|
: ''}"
|
||||||
|
on:click={() => {
|
||||||
|
pokemonData.special_defense_buff = i;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
▼
|
||||||
|
</td>
|
||||||
{/each}
|
{/each}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<td class="cursor-pointer" on:click={() => { pokemonData.special_defense_buff = 0; }}>・</td>
|
<td
|
||||||
|
class="cursor-pointer"
|
||||||
|
on:click={() => {
|
||||||
|
pokemonData.special_defense_buff = 0;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
・
|
||||||
|
</td>
|
||||||
{#each Array.from({ length: 6 }, (_, i) => i) as i}
|
{#each Array.from({ length: 6 }, (_, i) => i) as i}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<td class="cursor-pointer plus {pokemonData.special_defense_buff > i ? "green" : ""}" on:click={() => { pokemonData.special_defense_buff = i+1; }}>▲</td>
|
<td
|
||||||
|
class="cursor-pointer plus {pokemonData.special_defense_buff >
|
||||||
|
i
|
||||||
|
? 'green'
|
||||||
|
: ''}"
|
||||||
|
on:click={() => {
|
||||||
|
pokemonData.special_defense_buff = i + 1;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
▲
|
||||||
|
</td>
|
||||||
{/each}
|
{/each}
|
||||||
|
<td> </td>
|
||||||
|
<td>
|
||||||
|
({Math.floor(
|
||||||
|
special_defense_final *
|
||||||
|
(pokemonData.special_defense_buff > 0
|
||||||
|
? (2 + pokemonData.special_defense_buff) / 2
|
||||||
|
: pokemonData.special_defense_buff < 0
|
||||||
|
? 2 / (2 - pokemonData.special_defense_buff)
|
||||||
|
: 1)
|
||||||
|
)})
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="value-column"><b>SPD</b></td>
|
<td class="value-column"><b>SPD</b></td>
|
||||||
@@ -681,7 +829,7 @@
|
|||||||
/>
|
/>
|
||||||
</b>
|
</b>
|
||||||
</td>
|
</td>
|
||||||
<td class="atai-column"><b>{spd_final}</b></td>
|
<td class="atai-column"><b>{speed_final}</b></td>
|
||||||
<td class="atai-column">
|
<td class="atai-column">
|
||||||
<b>
|
<b>
|
||||||
<input
|
<input
|
||||||
@@ -701,27 +849,63 @@
|
|||||||
<td> </td>
|
<td> </td>
|
||||||
{#each Array.from({ length: 6 }, (_, i) => i - 6) as i}
|
{#each Array.from({ length: 6 }, (_, i) => i - 6) as i}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<td class="cursor-pointer minus {pokemonData.speed_buff < i+1 ? "red" : ""}" on:click={() => { pokemonData.speed_buff = i; }}>▼</td>
|
<td
|
||||||
|
class="cursor-pointer minus {pokemonData.speed_buff < i + 1
|
||||||
|
? 'red'
|
||||||
|
: ''}"
|
||||||
|
on:click={() => {
|
||||||
|
pokemonData.speed_buff = i;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
▼
|
||||||
|
</td>
|
||||||
{/each}
|
{/each}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<td class="cursor-pointer" on:click={() => { pokemonData.speed_buff = 0; }}>・</td>
|
<td
|
||||||
|
class="cursor-pointer"
|
||||||
|
on:click={() => {
|
||||||
|
pokemonData.speed_buff = 0;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
・
|
||||||
|
</td>
|
||||||
{#each Array.from({ length: 6 }, (_, i) => i) as i}
|
{#each Array.from({ length: 6 }, (_, i) => i) as i}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<td class="cursor-pointer plus {pokemonData.speed_buff > i ? "green" : ""}" on:click={() => { pokemonData.speed_buff = i+1; }}>▲</td>
|
<td
|
||||||
|
class="cursor-pointer plus {pokemonData.speed_buff > i
|
||||||
|
? 'green'
|
||||||
|
: ''}"
|
||||||
|
on:click={() => {
|
||||||
|
pokemonData.speed_buff = i + 1;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
▲
|
||||||
|
</td>
|
||||||
{/each}
|
{/each}
|
||||||
|
<td> </td>
|
||||||
|
<td>
|
||||||
|
({Math.floor(
|
||||||
|
speed_final *
|
||||||
|
(pokemonData.speed_buff > 0
|
||||||
|
? (2 + pokemonData.speed_buff) / 2
|
||||||
|
: pokemonData.speed_buff < 0
|
||||||
|
? 2 / (2 - pokemonData.speed_buff)
|
||||||
|
: 1)
|
||||||
|
)})
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="value-column"><b>TOTAL</b></td>
|
<td class="value-column"><b>TOTAL</b></td>
|
||||||
<td class="atai-column"
|
<td class="atai-column">
|
||||||
><b
|
<b>
|
||||||
>{pokemonData.hp +
|
{pokemonData.hp +
|
||||||
pokemonData.attack +
|
pokemonData.attack +
|
||||||
pokemonData.defense +
|
pokemonData.defense +
|
||||||
pokemonData.special_attack +
|
pokemonData.special_attack +
|
||||||
pokemonData.special_defense +
|
pokemonData.special_defense +
|
||||||
pokemonData.speed}</b
|
pokemonData.speed}
|
||||||
></td
|
</b>
|
||||||
>
|
</td>
|
||||||
<td class="atai-column" />
|
<td class="atai-column" />
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -747,7 +931,9 @@
|
|||||||
console.log("passing" + learnset.name);
|
console.log("passing" + learnset.name);
|
||||||
attackId = learnset.learnset_id;
|
attackId = learnset.learnset_id;
|
||||||
await invoke("increase_attack_usage", { index: learnset.id });
|
await invoke("increase_attack_usage", { index: learnset.id });
|
||||||
pokemonData.learnset = await invoke("search_learnset", { index: pokemonData.id });
|
pokemonData.learnset = await invoke("search_learnset", {
|
||||||
|
index: pokemonData.id,
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<td
|
<td
|
||||||
@@ -850,12 +1036,12 @@
|
|||||||
}
|
}
|
||||||
.minus:hover {
|
.minus:hover {
|
||||||
color: pink;
|
color: pink;
|
||||||
transition: font-size .5s ease;
|
transition: font-size 0.5s ease;
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
}
|
}
|
||||||
.plus:hover {
|
.plus:hover {
|
||||||
color: lightgreen;
|
color: lightgreen;
|
||||||
transition: font-size .5s ease;
|
transition: font-size 0.5s ease;
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
}
|
}
|
||||||
.red {
|
.red {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import DisplayData from "./DisplayData.svelte";
|
import DisplayData from "./DisplayData.svelte";
|
||||||
import type { PokemonStatus } from "../model/PokemonStatus";
|
import type { PokemonStatus } from "../model/PokemonStatus";
|
||||||
import type { PokemonDBData, PokemonData } from "src/model/PokemonData";
|
import type { PokemonDBData, PokemonData } from "src/model/PokemonData";
|
||||||
import type { ItemData, ItemEffect } from "../model/ItemData";
|
import type { ItemData } from "../model/ItemData";
|
||||||
$: {
|
$: {
|
||||||
if (myValue > 0) {
|
if (myValue > 0) {
|
||||||
invoke("search", { index: myValue }).then((r: PokemonDBData) => {
|
invoke("search", { index: myValue }).then((r: PokemonDBData) => {
|
||||||
@@ -59,11 +59,11 @@
|
|||||||
types: pokemonData ? pokemonData.types : [],
|
types: pokemonData ? pokemonData.types : [],
|
||||||
terastype: pokemonData ? pokemonData.terastype : [0],
|
terastype: pokemonData ? pokemonData.terastype : [0],
|
||||||
hp: hp_final,
|
hp: hp_final,
|
||||||
attack: atk_final,
|
attack: attack_final,
|
||||||
defense: def_final,
|
defense: defense_final,
|
||||||
special_attack: spatk_final,
|
special_attack: special_attack_final,
|
||||||
special_defense: spdef_final,
|
special_defense: special_defense_final,
|
||||||
speed: spd_final,
|
speed: speed_final,
|
||||||
attack_buff: pokemonData ? pokemonData.attack_buff : 0,
|
attack_buff: pokemonData ? pokemonData.attack_buff : 0,
|
||||||
defense_buff: pokemonData ? pokemonData.defense_buff : 0,
|
defense_buff: pokemonData ? pokemonData.defense_buff : 0,
|
||||||
special_attack_buff: pokemonData ? pokemonData.special_attack_buff : 0,
|
special_attack_buff: pokemonData ? pokemonData.special_attack_buff : 0,
|
||||||
@@ -79,11 +79,11 @@
|
|||||||
let pokemonData: PokemonData | undefined;
|
let pokemonData: PokemonData | undefined;
|
||||||
let pokemonDataArray: PokemonData[] = [];
|
let pokemonDataArray: PokemonData[] = [];
|
||||||
let hp_final = 0;
|
let hp_final = 0;
|
||||||
let atk_final = 0;
|
let attack_final = 0;
|
||||||
let def_final = 0;
|
let defense_final = 0;
|
||||||
let spatk_final = 0;
|
let special_attack_final = 0;
|
||||||
let spdef_final = 0;
|
let special_defense_final = 0;
|
||||||
let spd_final = 0;
|
let speed_final = 0;
|
||||||
export let pokemonStatus: PokemonStatus = {
|
export let pokemonStatus: PokemonStatus = {
|
||||||
types: [],
|
types: [],
|
||||||
terastype: [0],
|
terastype: [0],
|
||||||
@@ -174,11 +174,11 @@
|
|||||||
<DisplayData
|
<DisplayData
|
||||||
{pokemonData}
|
{pokemonData}
|
||||||
bind:hp_final
|
bind:hp_final
|
||||||
bind:atk_final
|
bind:attack_final
|
||||||
bind:def_final
|
bind:defense_final
|
||||||
bind:spatk_final
|
bind:special_attack_final
|
||||||
bind:spdef_final
|
bind:special_defense_final
|
||||||
bind:spd_final
|
bind:speed_final
|
||||||
bind:attackId
|
bind:attackId
|
||||||
{items}
|
{items}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user