Update data 1.2

This commit is contained in:
I Made Setia Baruna 2021-01-07 17:37:50 +08:00
parent a2f942c1eb
commit 8cf6e996f6
147 changed files with 7771 additions and 11725 deletions

11
.vscode/settings.json vendored
View file

@ -1,7 +1,8 @@
{ {
"editor.tabSize": 2, "editor.tabSize": 2,
"editor.detectIndentation": false, "editor.detectIndentation": false,
"[javascript]": { "prettier.disableLanguages": [],
"editor.defaultFormatter": "esbenp.prettier-vscode" "[javascript]": {
} "editor.defaultFormatter": "esbenp.prettier-vscode"
}
} }

View file

@ -5,7 +5,7 @@
import { mdiChevronDown } from '@mdi/js'; import { mdiChevronDown } from '@mdi/js';
import Icon from './Icon.svelte'; import Icon from './Icon.svelte';
import { characters as characterList } from '../data/charactersAscension'; import { characters as characterList } from '../data/characters';
const dispatch = createEventDispatcher(); const dispatch = createEventDispatcher();

View file

@ -1,139 +1,171 @@
<!-- Copyright (c) 2018 Rich Harris
Permission is hereby granted by the authors of this software, to any person, to use the software for any purpose, free of charge, including the rights to run, read, copy, change, distribute and sell it, and including usage rights to any patents the authors may hold on it, subject to the following conditions:
This license, or a link to its text, must be included with all copies of the software and any derivative works.
Any modification to the software submitted to the authors may be incorporated into the software under the terms of this license.
The software is provided "as is", without warranty of any kind, including but not limited to the warranties of title, fitness, merchantability and non-infringement. The authors have no obligation to provide support or updates for the software, and may not be held liable for any damages, claims or other liability arising from its use. -->
<script> <script>
import { onMount, tick } from 'svelte'; import { onMount, tick } from 'svelte';
// props
export let items; // props
export let height = '100%'; export let items;
export let itemHeight = undefined; export let height = '100%';
let foo; export let itemHeight = undefined;
// read-only, but visible to consumers via bind:start
export let start = 0; let foo;
export let end = 0;
// local state // read-only, but visible to consumers via bind:start
let height_map = []; export let start = 0;
let rows; export let end = 0;
let viewport;
let contents; // local state
let viewport_height = 0; let height_map = [];
let visible; let rows;
let mounted; let viewport;
let top = 0; let contents;
let bottom = 0; let viewport_height = 0;
let average_height; let visible;
$: visible = items.slice(start, end).map((data, i) => { let mounted;
return { index: i + start, data };
}); let top = 0;
// whenever `items` changes, invalidate the current heightmap let bottom = 0;
$: if (mounted) refresh(items, viewport_height, itemHeight); let average_height;
async function refresh(items, viewport_height, itemHeight) {
const { scrollTop } = viewport; $: visible = items.slice(start, end).map((data, i) => {
await tick(); // wait until the DOM is up to date return { index: i + start, data };
let content_height = top - scrollTop; });
let i = start;
while (content_height < viewport_height && i < items.length) { // whenever `items` changes, invalidate the current heightmap
let row = rows[i - start]; $: if (mounted) refresh(items, viewport_height, itemHeight);
if (!row) {
end = i + 1; async function refresh(items, viewport_height, itemHeight) {
await tick(); // render the newly visible row const { scrollTop } = viewport;
row = rows[i - start];
} await tick(); // wait until the DOM is up to date
const row_height = (height_map[i] = itemHeight || row.offsetHeight);
content_height += row_height; let content_height = top - scrollTop;
i += 1; let i = start;
}
end = i; while (content_height < viewport_height && i < items.length) {
const remaining = items.length - end; let row = rows[i - start];
average_height = (top + content_height) / end;
bottom = remaining * average_height; if (!row) {
end = i + 1;
await tick(); // render the newly visible row
row = rows[i - start];
}
const row_height = height_map[i] = itemHeight || row.offsetHeight;
content_height += row_height;
i += 1;
}
end = i;
const remaining = items.length - end;
average_height = (top + content_height) / end;
bottom = remaining * average_height;
height_map.length = items.length; height_map.length = items.length;
}
async function handle_scroll() { viewport.scrollTo(0, 0);
const { scrollTop } = viewport; }
const old_start = start;
for (let v = 0; v < rows.length; v += 1) { async function handle_scroll() {
height_map[start + v] = itemHeight || rows[v].offsetHeight; const { scrollTop } = viewport;
}
let i = 0; const old_start = start;
let y = 0;
while (i < items.length) { for (let v = 0; v < rows.length; v += 1) {
const row_height = height_map[i] || average_height; height_map[start + v] = itemHeight || rows[v].offsetHeight;
if (y + row_height > scrollTop) { }
start = i;
top = y; let i = 0;
break; let y = 0;
}
y += row_height; while (i < items.length) {
i += 1; const row_height = height_map[i] || average_height;
} if (y + row_height > scrollTop) {
while (i < items.length) { start = i;
y += height_map[i] || average_height; top = y;
i += 1;
if (y > scrollTop + viewport_height) break; break;
} }
end = i;
const remaining = items.length - end; y += row_height;
average_height = y / end; i += 1;
while (i < items.length) height_map[i++] = average_height; }
bottom = remaining * average_height;
// prevent jumping if we scrolled up into unknown territory while (i < items.length) {
if (start < old_start) { y += height_map[i] || average_height;
await tick(); i += 1;
let expected_height = 0;
let actual_height = 0; if (y > scrollTop + viewport_height) break;
for (let i = start; i < old_start; i += 1) { }
if (rows[i - start]) {
expected_height += height_map[i]; end = i;
actual_height += itemHeight || rows[i - start].offsetHeight;
} const remaining = items.length - end;
} average_height = y / end;
const d = actual_height - expected_height;
viewport.scrollTo(0, scrollTop + d); while (i < items.length) height_map[i++] = average_height;
} bottom = remaining * average_height;
// TODO if we overestimated the space these
// rows would occupy we may need to add some // prevent jumping if we scrolled up into unknown territory
// more. maybe we can just call handle_scroll again? if (start < old_start) {
} await tick();
// trigger initial refresh
onMount(() => { let expected_height = 0;
rows = contents.getElementsByTagName('svelte-virtual-list-row'); let actual_height = 0;
mounted = true;
}); for (let i = start; i < old_start; i +=1) {
if (rows[i - start]) {
expected_height += height_map[i];
actual_height += itemHeight || rows[i - start].offsetHeight;
}
}
const d = actual_height - expected_height;
viewport.scrollTo(0, scrollTop + d);
}
// TODO if we overestimated the space these
// rows would occupy we may need to add some
// more. maybe we can just call handle_scroll again?
}
// trigger initial refresh
onMount(() => {
rows = contents.getElementsByTagName('svelte-virtual-list-row');
mounted = true;
});
</script> </script>
<style> <style>
svelte-virtual-list-viewport { svelte-virtual-list-viewport {
position: relative; position: relative;
overflow-y: auto; overflow-y: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling:touch;
display: block; display: block;
} }
svelte-virtual-list-contents,
svelte-virtual-list-row { svelte-virtual-list-contents, svelte-virtual-list-row {
display: block; display: block;
} }
svelte-virtual-list-row {
overflow: hidden; svelte-virtual-list-row {
} overflow: hidden;
}
</style> </style>
<svelte-virtual-list-viewport <svelte-virtual-list-viewport
bind:this={viewport} bind:this={viewport}
bind:offsetHeight={viewport_height} bind:offsetHeight={viewport_height}
on:scroll={handle_scroll} on:scroll={handle_scroll}
style="height: {height};"> style="height: {height};"
<svelte-virtual-list-contents bind:this={contents} style="padding-top: {top}px; padding-bottom: {bottom}px;"> >
{#each visible as row (row.index)} <svelte-virtual-list-contents
<svelte-virtual-list-row> bind:this={contents}
<slot item={row.data} index={row.index}>Missing template</slot> style="padding-top: {top}px; padding-bottom: {bottom}px;"
</svelte-virtual-list-row> >
{/each} {#each visible as row (row.index)}
</svelte-virtual-list-contents> <svelte-virtual-list-row>
<slot item={row.data} index={row.index}>Missing template</slot>
</svelte-virtual-list-row>
{/each}
</svelte-virtual-list-contents>
</svelte-virtual-list-viewport> </svelte-virtual-list-viewport>

View file

@ -80,4 +80,13 @@ export const characterExp = [
4760350, 4760350,
4939525, 4939525,
5122700, 5122700,
5338925,
5581950,
5855050,
6161850,
6506450,
6893400,
7327825,
7815450,
8362650,
]; ];

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,72 +1,194 @@
export const itemList = { export const itemList = {
unknown: { id: 'unknown', name: 'unknown' }, unknown: { id: 'unknown', name: 'unknown' },
none: { id: 'none', name: 'none' }, none: { id: 'none', name: 'none' },
mystic_enhancement_ore: { id: 'mystic_enhancement_ore', name: 'Mystic Enhancement Ore' },
fine_enhancement_ore: { id: 'fine_enhancement_ore', name: 'Fine Enhancement Ore' },
enhancement_ore: { id: 'enhancement_ore', name: 'Enhancement Ore' },
any_weapon_1: { id: 'any_weapon_1', name: '1 Star Weapon' },
any_weapon_2: { id: 'any_weapon_2', name: '2 Star Weapon' },
any_weapon_3: { id: 'any_weapon_3', name: '3 Star Weapon' },
mora: { id: 'mora', name: 'Mora' },
heros_wit: { id: 'heros_wit', name: "Hero's Wit" },
adventurers_experience: { id: 'adventurers_experience', name: "Adventurer's Experience" },
wanderes_advice: { id: 'wanderes_advice', name: "Wanderer's Advice" },
crown_of_insight: { id: 'crown_of_insight', name: 'Crown of Insight' },
fetters_of_the_dandelion_gladiator: { fetters_of_the_dandelion_gladiator: {
id: 'fetters_of_the_dandelion_gladiator', id: 'fetters_of_the_dandelion_gladiator',
name: 'Fetters of the Dandelion Gladiator', name: 'Fetters of the Dandelion Gladiator',
day: ['wednesday', 'saturday'],
}, },
chaos_device: { id: 'chaos_device', name: 'Chaos Device' }, chaos_device: { id: 'chaos_device', name: 'Chaos Device' },
divining_scroll: { id: 'divining_scroll', name: 'Divining Scroll' }, divining_scroll: { id: 'divining_scroll', name: 'Divining Scroll' },
chains_of_the_dandelion_gladiator: { chains_of_the_dandelion_gladiator: {
id: 'chains_of_the_dandelion_gladiator', id: 'chains_of_the_dandelion_gladiator',
name: 'Chains of the Dandelion Gladiator', name: 'Chains of the Dandelion Gladiator',
day: ['wednesday', 'saturday'],
}, },
chaos_circuit: { id: 'chaos_circuit', name: 'Chaos Circuit' }, chaos_circuit: { id: 'chaos_circuit', name: 'Chaos Circuit' },
sealed_scroll: { id: 'sealed_scroll', name: 'Sealed Scroll' }, sealed_scroll: { id: 'sealed_scroll', name: 'Sealed Scroll' },
shackles_of_the_dandelion_gladiator: { shackles_of_the_dandelion_gladiator: {
id: 'shackles_of_the_dandelion_gladiator', id: 'shackles_of_the_dandelion_gladiator',
name: 'Shackles of the Dandelion Gladiator', name: 'Shackles of the Dandelion Gladiator',
day: ['wednesday', 'saturday'],
}, },
boreal_wolfs_milk_tooth: { chaos_core: { id: 'chaos_core', name: 'Chaos Core' },
id: 'boreal_wolfs_milk_tooth', forbidden_curse_scroll: {
name: "Boreal Wolf's Milk Tooth", id: 'forbidden_curse_scroll',
name: 'Forbidden Curse Scroll',
}, },
dead_ley_line_branches: { dream_of_the_dandelion_gladiator: {
id: 'dead_ley_line_branches', id: 'dream_of_the_dandelion_gladiator',
name: 'Dead Ley Line Branches', name: 'Dream of the Dandelion Gladiator',
day: ['wednesday', 'saturday'],
},
tile_of_decarabians_tower: {
id: 'tile_of_decarabians_tower',
name: "Tile of Decarabian's Tower",
day: ['monday', 'thursday'],
},
heavy_horn: { id: 'heavy_horn', name: 'Heavy Horn' },
firm_arrowhead: { id: 'firm_arrowhead', name: 'Firm Arrowhead' },
debris_of_decarabians_city: {
id: 'debris_of_decarabians_city',
name: "Debris of Decarabian's City",
day: ['monday', 'thursday'],
},
black_bronze_horn: {
id: 'black_bronze_horn',
name: 'Black Bronze Horn',
},
sharp_arrowhead: { id: 'sharp_arrowhead', name: 'Sharp Arrowhead' },
fragment_of_decarabians_epic: {
id: 'fragment_of_decarabians_epic',
name: "Fragment of Decarabian's Epic",
day: ['monday', 'thursday'],
},
black_crystal_horn: {
id: 'black_crystal_horn',
name: 'Black Crystal Horn',
},
weathered_arrowhead: {
id: 'weathered_arrowhead',
name: 'Weathered Arrowhead',
},
scattered_piece_of_decarabians_dream: {
id: 'scattered_piece_of_decarabians_dream',
name: "Scattered Piece of Decarabian's Dream",
day: ['monday', 'thursday'],
}, },
slime_condensate: { id: 'slime_condensate', name: 'Slime Condensate' }, slime_condensate: { id: 'slime_condensate', name: 'Slime Condensate' },
boreal_wolfs_cracked_tooth: {
id: 'boreal_wolfs_cracked_tooth',
name: "Boreal Wolf's Cracked Tooth",
},
dead_ley_line_leaves: {
id: 'dead_ley_line_leaves',
name: 'Dead Ley Line Leaves',
},
slime_secretions: { id: 'slime_secretions', name: 'Slime Secretions' }, slime_secretions: { id: 'slime_secretions', name: 'Slime Secretions' },
boreal_wolfs_broken_fang: {
id: 'boreal_wolfs_broken_fang',
name: "Boreal Wolf's Broken Fang",
},
ley_line_sprouts: { id: 'ley_line_sprouts', name: 'Ley Line Sprouts' },
slime_concentrate: { slime_concentrate: {
id: 'slime_concentrate', id: 'slime_concentrate',
name: 'Slime Concentrate', name: 'Slime Concentrate',
}, },
boreal_wolfs_nostalgia: { boreal_wolfs_milk_tooth: {
id: 'boreal_wolfs_nostalgia', id: 'boreal_wolfs_milk_tooth',
name: "Boreal Wolf's Nostalgia", name: "Boreal Wolf's Milk Tooth",
day: ['tuesday', 'friday'],
}, },
dead_ley_line_branch: { dead_ley_line_branch: {
id: 'dead_ley_line_branch', id: 'dead_ley_line_branch',
name: 'Dead Ley Line Branch', name: 'Dead Ley Line Branch',
}, },
firm_arrowhead: { id: 'firm_arrowhead', name: 'Firm Arrowhead' }, boreal_wolfs_cracked_tooth: {
weathered_arrowhead: { id: 'boreal_wolfs_cracked_tooth',
id: 'weathered_arrowhead', name: "Boreal Wolf's Cracked Tooth",
name: 'Weathered Arrowhead', day: ['tuesday', 'friday'],
}, },
chaos_core: { id: 'chaos_core', name: 'Chaos Core' }, dead_ley_line_leaves: {
dream_of_the_dandelion_gladiator: { id: 'dead_ley_line_leaves',
id: 'dream_of_the_dandelion_gladiator', name: 'Dead Ley Line Leaves',
name: 'Dream of the Dandelion Gladiator', },
boreal_wolfs_broken_fang: {
id: 'boreal_wolfs_broken_fang',
name: "Boreal Wolf's Broken Fang",
day: ['tuesday', 'friday'],
},
ley_line_sprouts: { id: 'ley_line_sprouts', name: 'Ley Line Sprouts' },
boreal_wolfs_nostalgia: {
id: 'boreal_wolfs_nostalgia',
name: "Boreal Wolf's Nostalgia",
day: ['tuesday', 'friday'],
},
grain_of_aerosiderite: {
id: 'grain_of_aerosiderite',
name: 'Grain of Aerosiderite',
day: ['wednesday', 'saturday'],
},
fragile_bone_shard: {
id: 'fragile_bone_shard',
name: 'Fragile Bone Shard',
},
damaged_mask: { id: 'damaged_mask', name: 'Damaged Mask' },
piece_of_aerosiderite: {
id: 'piece_of_aerosiderite',
name: 'Piece of Aerosiderite',
day: ['wednesday', 'saturday'],
},
sturdy_bone_shard: {
id: 'sturdy_bone_shard',
name: 'Sturdy Bone Shard',
},
stained_mask: { id: 'stained_mask', name: 'Stained Mask' },
bit_of_aerosiderite: {
id: 'bit_of_aerosiderite',
name: 'Bit of Aerosiderite',
day: ['wednesday', 'saturday'],
},
fossilized_bone_shard: {
id: 'fossilized_bone_shard',
name: 'Fossilized Bone Shard',
},
ominous_mask: { id: 'ominous_mask', name: 'Ominous Mask' },
chunk_of_aerosiderite: {
id: 'chunk_of_aerosiderite',
name: 'Chunk of Aerosiderite',
day: ['wednesday', 'saturday'],
},
mist_veiled_lead_elixir: {
id: 'mist_veiled_lead_elixir',
name: 'Mist Veiled Lead Elixir',
day: ['tuesday', 'friday'],
},
mist_grass_pollen: {
id: 'mist_grass_pollen',
name: 'Mist Grass Pollen',
},
treasure_hoarder_insignia: {
id: 'treasure_hoarder_insignia',
name: 'Treasure Hoarder Insignia',
},
mist_veiled_mercury_elixir: {
id: 'mist_veiled_mercury_elixir',
name: 'Mist Veiled Mercury Elixir',
day: ['tuesday', 'friday'],
},
mist_grass: { id: 'mist_grass', name: 'Mist Grass' },
silver_raven_insignia: {
id: 'silver_raven_insignia',
name: 'Silver Raven Insignia',
},
mist_veiled_gold_elixir: {
id: 'mist_veiled_gold_elixir',
name: 'Mist Veiled Gold Elixir',
day: ['tuesday', 'friday'],
},
mist_grass_wick: { id: 'mist_grass_wick', name: 'Mist Grass Wick' },
golden_raven_insignia: {
id: 'golden_raven_insignia',
name: 'Golden Raven Insignia',
},
mist_veiled_primo_elixir: {
id: 'mist_veiled_primo_elixir',
name: 'Mist Veiled Primo Elixir',
day: ['tuesday', 'friday'],
}, },
sharp_arrowhead: { id: 'sharp_arrowhead', name: 'Sharp Arrowhead' },
luminous_sands_from_guyun: { luminous_sands_from_guyun: {
id: 'luminous_sands_from_guyun', id: 'luminous_sands_from_guyun',
name: 'Luminous Sands from Guyun', name: 'Luminous Sands from Guyun',
day: ['monday', 'thursday'],
}, },
hunters_sacrificial_knife: { hunters_sacrificial_knife: {
id: 'hunters_sacrificial_knife', id: 'hunters_sacrificial_knife',
@ -79,6 +201,7 @@ export const itemList = {
lustrous_stone_from_guyun: { lustrous_stone_from_guyun: {
id: 'lustrous_stone_from_guyun', id: 'lustrous_stone_from_guyun',
name: 'Lustrous Stone from Guyun', name: 'Lustrous Stone from Guyun',
day: ['monday', 'thursday'],
}, },
agents_sacrificial_knife: { agents_sacrificial_knife: {
id: 'agents_sacrificial_knife', id: 'agents_sacrificial_knife',
@ -88,7 +211,11 @@ export const itemList = {
id: 'sergeants_insignia', id: 'sergeants_insignia',
name: "Sergeant's Insignia", name: "Sergeant's Insignia",
}, },
relic_from_guyun: { id: 'relic_from_guyun', name: 'Relic from Guyun' }, relic_from_guyun: {
id: 'relic_from_guyun',
name: 'Relic from Guyun',
day: ['monday', 'thursday'],
},
inspectors_sacrificial_knife: { inspectors_sacrificial_knife: {
id: 'inspectors_sacrificial_knife', id: 'inspectors_sacrificial_knife',
name: "Inspector's Sacrificial Knife", name: "Inspector's Sacrificial Knife",
@ -100,100 +227,7 @@ export const itemList = {
divine_body_from_guyun: { divine_body_from_guyun: {
id: 'divine_body_from_guyun', id: 'divine_body_from_guyun',
name: 'Divine Body from Guyun', name: 'Divine Body from Guyun',
}, day: ['monday', 'thursday'],
tile_of_decarabians_tower: {
id: 'tile_of_decarabians_tower',
name: "Tile of Decarabian's Tower",
},
heavy_horn: { id: 'heavy_horn', name: 'Heavy Horn' },
debris_of_decarabians_city: {
id: 'debris_of_decarabians_city',
name: "Debris of Decarabian's City",
},
black_bronze_horn: {
id: 'black_bronze_horn',
name: 'Black Bronze Horn',
},
fragment_of_decarabians_epic: {
id: 'fragment_of_decarabians_epic',
name: "Fragment of Decarabian's Epic",
},
black_crystal_horn: {
id: 'black_crystal_horn',
name: 'Black Crystal Horn',
},
scattered_piece_of_decarabians_dream: {
id: 'scattered_piece_of_decarabians_dream',
name: "Scattered Piece of Decarabian's Dream",
},
forbidden_curse_scroll: {
id: 'forbidden_curse_scroll',
name: 'Forbidden Curse Scroll',
},
mist_veiled_lead_elixir: {
id: 'mist_veiled_lead_elixir',
name: 'Mist Veiled Lead Elixir',
},
mist_grass_pollen: {
id: 'mist_grass_pollen',
name: 'Mist Grass Pollen',
},
mist_veiled_mercury_elixir: {
id: 'mist_veiled_mercury_elixir',
name: 'Mist Veiled Mercury Elixir',
},
mist_grass: { id: 'mist_grass', name: 'Mist Grass' },
mist_veiled_gold_elixir: {
id: 'mist_veiled_gold_elixir',
name: 'Mist Veiled Gold Elixir',
},
mist_grass_wick: { id: 'mist_grass_wick', name: 'Mist Grass Wick' },
mist_veiled_primo_elixir: {
id: 'mist_veiled_primo_elixir',
name: 'Mist Veiled Primo Elixir',
},
grain_of_aerosiderite: {
id: 'grain_of_aerosiderite',
name: 'Grain of Aerosiderite',
},
fragile_bone_shard: {
id: 'fragile_bone_shard',
name: 'Fragile Bone Shard',
},
damaged_mask: { id: 'damaged_mask', name: 'Damaged Mask' },
piece_of_aerosiderite: {
id: 'piece_of_aerosiderite',
name: 'Piece of Aerosiderite',
},
sturdy_bone_shard: {
id: 'sturdy_bone_shard',
name: 'Sturdy Bone Shard',
},
stained_mask: { id: 'stained_mask', name: 'Stained Mask' },
bit_of_aerosiderite: {
id: 'bit_of_aerosiderite',
name: 'Bit of Aerosiderite',
},
fossilized_bone_shard: {
id: 'fossilized_bone_shard',
name: 'Fossilized Bone Shard',
},
ominous_mask: { id: 'ominous_mask', name: 'Ominous Mask' },
chunk_of_aerosiderite: {
id: 'chunk_of_aerosiderite',
name: 'Chunk of Aerosiderite',
},
treasure_hoarder_insignia: {
id: 'treasure_hoarder_insignia',
name: 'Treasure Hoarder Insignia',
},
silver_raven_insignia: {
id: 'silver_raven_insignia',
name: 'Silver Raven Insignia',
},
golden_raven_insignia: {
id: 'golden_raven_insignia',
name: 'Golden Raven Insignia',
}, },
whopperflower_nectar: { whopperflower_nectar: {
id: 'whopperflower_nectar', id: 'whopperflower_nectar',
@ -204,18 +238,42 @@ export const itemList = {
name: 'Shimmering Nectar', name: 'Shimmering Nectar',
}, },
energy_nectar: { id: 'energy_nectar', name: 'Energy Nectar' }, energy_nectar: { id: 'energy_nectar', name: 'Energy Nectar' },
mist_flower_pollen: { prithiva_topaz_sliver: {
id: 'mist_flower_pollen', id: 'prithiva_topaz_sliver',
name: 'Mist Flower Pollen', name: 'Prithiva Topaz Sliver',
}, },
seal_scroll: { id: 'seal_scroll', name: 'Seal Scroll' }, cecilia: { id: 'cecilia', name: 'Cecilia' },
black_copper_horn: { prithiva_topaz_fragment: {
id: 'black_copper_horn', id: 'prithiva_topaz_fragment',
name: 'Black Copper Horn', name: 'Prithiva Topaz Fragment',
}, },
historic_arrowhead: { basalt_pillar: { id: 'basalt_pillar', name: 'Basalt Pillar' },
id: 'historic_arrowhead', prithiva_topaz_chunk: {
name: 'Historic Arrowhead', id: 'prithiva_topaz_chunk',
name: 'Prithiva Topaz Chunk',
},
prithiva_topaz_gemstone: {
id: 'prithiva_topaz_gemstone',
name: 'Prithiva Topaz Gemstone',
},
teachings_of_ballad: {
id: 'teachings_of_ballad',
name: 'Teachings of Ballad',
day: ['wednesday', 'saturday'],
},
guide_to_ballad: {
id: 'guide_to_ballad',
name: 'Guide to Ballad',
day: ['wednesday', 'saturday'],
},
philosophies_of_ballad: {
id: 'philosophies_of_ballad',
name: 'Philosophies of Ballad',
day: ['wednesday', 'saturday'],
},
tusk_of_monoceros_caeli: {
id: 'tusk_of_monoceros_caeli',
name: 'Tusk of Monoceros Caeli',
}, },
agnidus_agate_sliver: { agnidus_agate_sliver: {
id: 'agnidus_agate_sliver', id: 'agnidus_agate_sliver',
@ -235,6 +293,22 @@ export const itemList = {
id: 'agnidus_agate_gemstone', id: 'agnidus_agate_gemstone',
name: 'Agnidus Agate Gemstone', name: 'Agnidus Agate Gemstone',
}, },
teachings_of_freedom: {
id: 'teachings_of_freedom',
name: 'Teachings of Freedom',
day: ['monday', 'thursday'],
},
guide_to_freedom: {
id: 'guide_to_freedom',
name: 'Guide to Freedom',
day: ['monday', 'thursday'],
},
philosophies_of_freedom: {
id: 'philosophies_of_freedom',
name: 'Philosophies of Freedom',
day: ['monday', 'thursday'],
},
dvalins_sigh: { id: 'dvalins_sigh', name: "Dvalin's Sigh" },
varunada_lazurite_sliver: { varunada_lazurite_sliver: {
id: 'varunada_lazurite_sliver', id: 'varunada_lazurite_sliver',
name: 'Varunada Lazurite Sliver', name: 'Varunada Lazurite Sliver',
@ -256,6 +330,7 @@ export const itemList = {
id: 'varunada_lazurite_gemstone', id: 'varunada_lazurite_gemstone',
name: 'Varunada Lazurite Gemstone', name: 'Varunada Lazurite Gemstone',
}, },
ring_of_boreas: { id: 'ring_of_boreas', name: 'Ring of Boreas' },
vajrada_amethyst_sliver: { vajrada_amethyst_sliver: {
id: 'vajrada_amethyst_sliver', id: 'vajrada_amethyst_sliver',
name: 'Vajrada Amethyst Sliver', name: 'Vajrada Amethyst Sliver',
@ -274,7 +349,38 @@ export const itemList = {
id: 'vajrada_amethyst_gemstone', id: 'vajrada_amethyst_gemstone',
name: 'Vajrada Amethyst Gemstone', name: 'Vajrada Amethyst Gemstone',
}, },
teachings_of_gold: {
id: 'teachings_of_gold',
name: 'Teachings of Gold',
day: ['wednesday', 'saturday'],
},
guide_to_gold: {
id: 'guide_to_gold',
name: 'Guide to Gold',
day: ['wednesday', 'saturday'],
},
philosophies_of_gold: {
id: 'philosophies_of_gold',
name: 'Philosophies of Gold',
day: ['wednesday', 'saturday'],
},
windwheel_aster: { id: 'windwheel_aster', name: 'Windwheel Aster' }, windwheel_aster: { id: 'windwheel_aster', name: 'Windwheel Aster' },
teachings_of_resistance: {
id: 'teachings_of_resistance',
name: 'Teachings of Resistance',
day: ['tuesday', 'friday'],
},
guide_to_resistance: {
id: 'guide_to_resistance',
name: 'Guide to Resistance',
day: ['tuesday', 'friday'],
},
philosophies_of_resistance: {
id: 'philosophies_of_resistance',
name: 'Philosophies of Resistance',
day: ['tuesday', 'friday'],
},
dvalins_plume: { id: 'dvalins_plume', name: "Dvalin's Plume" },
shivada_jade_sliver: { shivada_jade_sliver: {
id: 'shivada_jade_sliver', id: 'shivada_jade_sliver',
name: 'Shivada Jade Sliver', name: 'Shivada Jade Sliver',
@ -293,6 +399,30 @@ export const itemList = {
id: 'shivada_jade_gemstone', id: 'shivada_jade_gemstone',
name: 'Shivada Jade Gemstone', name: 'Shivada Jade Gemstone',
}, },
teachings_of_diligence: {
id: 'teachings_of_diligence',
name: 'Teachings of Diligence',
day: ['tuesday', 'friday'],
},
guide_to_diligence: {
id: 'guide_to_diligence',
name: 'Guide to Diligence',
day: ['tuesday', 'friday'],
},
philosophies_of_diligence: {
id: 'philosophies_of_diligence',
name: 'Philosophies of Diligence',
day: ['tuesday', 'friday'],
},
calla_lily: { id: 'calla_lily', name: 'Calla Lily' },
shard_of_a_foul_legacy: {
id: 'shard_of_a_foul_legacy',
name: 'Shard of a Foul Legacy',
},
spirit_locket_of_boreas: {
id: 'spirit_locket_of_boreas',
name: 'Spirit Locket of Boreas',
},
vayuda_turquoise_sliver: { vayuda_turquoise_sliver: {
id: 'vayuda_turquoise_sliver', id: 'vayuda_turquoise_sliver',
name: 'Vayuda Turquoise Sliver', name: 'Vayuda Turquoise Sliver',
@ -311,28 +441,28 @@ export const itemList = {
id: 'vayuda_turquoise_gemstone', id: 'vayuda_turquoise_gemstone',
name: 'Vayuda Turquoise Gemstone', name: 'Vayuda Turquoise Gemstone',
}, },
calla_lily: { id: 'calla_lily', name: 'Calla Lily' }, teachings_of_prosperity: {
id: 'teachings_of_prosperity',
name: 'Teachings of Prosperity',
day: ['monday', 'thursday'],
},
guide_to_prosperity: {
id: 'guide_to_prosperity',
name: 'Guide to Prosperity',
day: ['monday', 'thursday'],
},
philosophies_of_prosperity: {
id: 'philosophies_of_prosperity',
name: 'Philosophies of Prosperity',
day: ['monday', 'thursday'],
},
valberry: { id: 'valberry', name: 'Valberry' }, valberry: { id: 'valberry', name: 'Valberry' },
prithiva_topaz_sliver: { dvalins_claw: { id: 'dvalins_claw', name: "Dvalin's Claw" },
id: 'prithiva_topaz_sliver',
name: 'Prithiva Topaz Sliver',
},
glaze_lily: { id: 'glaze_lily', name: 'Glaze Lily' }, glaze_lily: { id: 'glaze_lily', name: 'Glaze Lily' },
prithiva_topaz_fragment: {
id: 'prithiva_topaz_fragment',
name: 'Prithiva Topaz Fragment',
},
basalt_pillar: { id: 'basalt_pillar', name: 'Basalt Pillar' },
prithiva_topaz_chunk: {
id: 'prithiva_topaz_chunk',
name: 'Prithiva Topaz Chunk',
},
prithiva_topaz_gemstone: {
id: 'prithiva_topaz_gemstone',
name: 'Prithiva Topaz Gemstone',
},
violetgrass: { id: 'violetgrass', name: 'Violetgrass' }, violetgrass: { id: 'violetgrass', name: 'Violetgrass' },
tail_of_boreas: { id: 'tail_of_boreas', name: 'Tail of Boreas' },
wolfhook: { id: 'wolfhook', name: 'Wolfhook' }, wolfhook: { id: 'wolfhook', name: 'Wolfhook' },
starconch: { id: 'starconch', name: 'Starconch' },
brilliant_diamond_sliver: { brilliant_diamond_sliver: {
id: 'brilliant_diamond_sliver', id: 'brilliant_diamond_sliver',
name: 'Brilliant Diamond Sliver', name: 'Brilliant Diamond Sliver',
@ -349,17 +479,6 @@ export const itemList = {
id: 'brilliant_diamond_gemstone', id: 'brilliant_diamond_gemstone',
name: 'Brilliant Diamond Gemstone', name: 'Brilliant Diamond Gemstone',
}, },
cecilia: { id: 'cecilia', name: 'Cecilia' },
jueyun_chili: { id: 'jueyun_chili', name: 'Jueyun Chili' }, jueyun_chili: { id: 'jueyun_chili', name: 'Jueyun Chili' },
silk_flower: { id: 'silk_flower', name: 'Silk Flower' }, silk_flower: { id: 'silk_flower', name: 'Silk Flower' },
mystic_enhancement_ore: { id: 'mystic_enhancement_ore', name: 'Mystic Enhancement Ore' },
fine_enhancement_ore: { id: 'fine_enhancement_ore', name: 'Fine Enhancement Ore' },
enhancement_ore: { id: 'enhancement_ore', name: 'Enhancement Ore' },
any_weapon_1: { id: 'any_weapon_1', name: '1 Star Weapon' },
any_weapon_2: { id: 'any_weapon_2', name: '2 Star Weapon' },
any_weapon_3: { id: 'any_weapon_3', name: '3 Star Weapon' },
mora: { id: 'mora', name: 'Mora' },
heros_wit: { id: 'heros_wit', name: "Hero's Wit" },
adventurers_experience: { id: 'adventurers_experience', name: "Adventurer's Experience" },
wanderes_advice: { id: 'wanderes_advice', name: "Wanderer's Advice" },
}; };

128
src/data/talent.js Normal file
View file

@ -0,0 +1,128 @@
export const talent = [
{
ascension: 2,
book: {
rarity: 2,
amount: 3,
},
commonMaterial: {
rarity: 1,
amount: 6,
},
bossMaterial: 0,
eventMaterial: 0,
mora: 12500,
},
{
ascension: 3,
book: {
rarity: 3,
amount: 2,
},
commonMaterial: {
rarity: 2,
amount: 3,
},
bossMaterial: 0,
eventMaterial: 0,
mora: 17500,
},
{
ascension: 3,
book: {
rarity: 3,
amount: 4,
},
commonMaterial: {
rarity: 2,
amount: 4,
},
bossMaterial: 0,
eventMaterial: 0,
mora: 25000,
},
{
ascension: 4,
book: {
rarity: 3,
amount: 6,
},
commonMaterial: {
rarity: 2,
amount: 6,
},
bossMaterial: 0,
eventMaterial: 0,
mora: 30000,
},
{
ascension: 4,
book: {
rarity: 3,
amount: 9,
},
commonMaterial: {
rarity: 2,
amount: 9,
},
bossMaterial: 0,
eventMaterial: 0,
mora: 37500,
},
{
ascension: 5,
book: {
rarity: 4,
amount: 4,
},
commonMaterial: {
rarity: 3,
amount: 4,
},
bossMaterial: 1,
eventMaterial: 0,
mora: 120000,
},
{
ascension: 5,
book: {
rarity: 4,
amount: 6,
},
commonMaterial: {
rarity: 3,
amount: 6,
},
bossMaterial: 1,
eventMaterial: 0,
mora: 260000,
},
{
ascension: 6,
book: {
rarity: 4,
amount: 12,
},
commonMaterial: {
rarity: 3,
amount: 9,
},
bossMaterial: 2,
eventMaterial: 0,
mora: 450000,
},
{
ascension: 6,
book: {
rarity: 4,
amount: 16,
},
commonMaterial: {
rarity: 3,
amount: 12,
},
bossMaterial: 2,
eventMaterial: 1,
mora: 700000,
},
];

View file

@ -1,248 +1,278 @@
export const weaponExp = [ export const weaponExp = [
[ [
0, 0,
275, 275,
700, 700,
1300, 1300,
2100, 2100,
3125, 3125,
4400, 4400,
5950, 5950,
7800, 7800,
9975, 9975,
12475, 12475,
15350, 15350,
18600, 18600,
22250, 22250,
26300, 26300,
30800, 30800,
35750, 35750,
41150, 41150,
47050, 47050,
53475, 53475,
60400, 60400,
68250, 68250,
76675, 76675,
85725, 85725,
95400, 95400,
105725, 105725,
116700, 116700,
128350, 128350,
140700, 140700,
153750, 153750,
167550, 167550,
182075, 182075,
197375, 197375,
213475, 213475,
230375, 230375,
248075, 248075,
266625, 266625,
286025, 286025,
306300, 306300,
327475, 327475,
349525, 349525,
373675, 373675,
398800, 398800,
424925, 424925,
452075, 452075,
480275, 480275,
509525, 509525,
539850, 539850,
571275, 571275,
603825, 603825,
637475, 637475,
674025, 674025,
711800, 711800,
750800, 750800,
791075, 791075,
832625, 832625,
875475, 875475,
919625, 919625,
965125, 965125,
1011975, 1011975,
1060200, 1060200,
1112275, 1112275,
1165825, 1165825,
1220875, 1220875,
1277425, 1277425,
1335525, 1335525,
1395175, 1395175,
1456400, 1456400,
1519200, 1519200,
1583600, 1583600,
1649625, 1649625,
1720700, 1720700,
1793525, 1793525,
1868100, 1868100,
1944450, 1944450,
2022600, 2022600,
2102600, 2102600,
2184450, 2184450,
2268150, 2268150,
2353725, 2353725,
0,
0,
0,
0,
0,
0,
0,
0,
0,
3988200
], ],
[ [
0, 0,
400, 400,
1025, 1025,
1925, 1925,
3125, 3125,
4675, 4675,
6625, 6625,
8975, 8975,
11775, 11775,
15075, 15075,
18875, 18875,
23225, 23225,
28150, 28150,
33675, 33675,
39825, 39825,
46625, 46625,
54125, 54125,
62325, 62325,
71275, 71275,
81000, 81000,
91500, 91500,
103400, 103400,
116175, 116175,
129875, 129875,
144525, 144525,
160150, 160150,
176775, 176775,
194425, 194425,
213125, 213125,
232900, 232900,
253800, 253800,
275825, 275825,
299025, 299025,
323400, 323400,
349000, 349000,
375825, 375825,
403925, 403925,
433325, 433325,
464050, 464050,
496125, 496125,
529550, 529550,
566125, 566125,
604200, 604200,
643800, 643800,
684950, 684950,
727675, 727675,
772000, 772000,
817950, 817950,
865550, 865550,
914850, 914850,
965850, 965850,
1021225, 1021225,
1078450, 1078450,
1137550, 1137550,
1198575, 1198575,
1261525, 1261525,
1326450, 1326450,
1393350, 1393350,
1462275, 1462275,
1533250, 1533250,
1606300, 1606300,
1685200, 1685200,
1766325, 1766325,
1849725, 1849725,
1935425, 1935425,
2023450, 2023450,
2113825, 2113825,
2206575, 2206575,
2301725, 2301725,
2399300, 2399300,
2499350, 2499350,
2607025, 2607025,
2717350, 2717350,
2830350, 2830350,
2946050, 2946050,
3064475, 3064475,
3185675, 3185675,
3309675, 3309675,
3436500, 3436500,
3566175, 3566175,
3698750,
3855225,
4031100,
4228700,
4450675,
4699975,
4979925,
5294175,
5646875,
6042650
], ],
[ [
0, 0,
600, 600,
1550, 1550,
2900, 2900,
4700, 4700,
7025, 7025,
9950, 9950,
13475, 13475,
17675, 17675,
22625, 22625,
28325, 28325,
34850, 34850,
42250, 42250,
50550, 50550,
59775, 59775,
69975, 69975,
81225, 81225,
93525, 93525,
106950, 106950,
121550, 121550,
137300, 137300,
155150, 155150,
174325, 174325,
194875, 194875,
216850, 216850,
240300, 240300,
265250, 265250,
291725, 291725,
319775, 319775,
349450, 349450,
381800, 380800,
414850, 413850,
449650, 448650,
486225, 485225,
524625, 523625,
564875, 563875,
607025, 606025,
651125, 650125,
697225, 696225,
745350, 744350,
795500, 794500,
850375, 849375,
907500, 906500,
966900, 965900,
1028625, 1027625,
1092725, 1091725,
1159225, 1158225,
1228150, 1227150,
1299550, 1298550,
1373500, 1372500,
1450000, 1449000,
1533075, 1532075,
1618925, 1617925,
1707575, 1706575,
1799125, 1798125,
1893550, 1892550,
1990950, 1989950,
2091300, 2090300,
2194700, 2193700,
2301175, 2300175,
2410750, 2409750,
2529100, 2528100,
2650800, 2649800,
2775900, 2774900,
2904450, 2903450,
3036500, 3035500,
3172075, 3171075,
3311200, 3310200,
3453925, 3452925,
3600300, 3599300,
3750375, 3749375,
3911900, 3910900,
4077400, 4076400,
4246900, 4245900,
4420450, 4419450,
4598100, 4597100,
4779900, 4778900,
4965900, 4964900,
5156150, 5155150,
5350675, 5349675,
], 5548550,
5783275,
6047100,
6343500,
6676475,
7050425,
7470350,
7941725,
8470775,
9064450
]
]; ];

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,9 @@
import Icon from '../../components/Icon.svelte'; import Icon from '../../components/Icon.svelte';
import { characterExp } from '../../data/characterExp'; import { characterExp } from '../../data/characterExp';
import { talent } from '../../data/talent';
import { addTodo } from '../../stores/todo'; import { addTodo } from '../../stores/todo';
import { itemList } from '../../data/itemList';
let resources = [ let resources = [
{ {
@ -43,6 +45,7 @@
let addedToTodo = false; let addedToTodo = false;
let withAscension = true; let withAscension = true;
let withTalent = false;
let selectedCharacter = null; let selectedCharacter = null;
@ -55,18 +58,32 @@
let minAscension = 0; let minAscension = 0;
let minIntendedAscension = 0; let minIntendedAscension = 0;
let maxTalentLevel = 1;
let ascensionResouce = {}; let ascensionResouce = {};
let unknownList = {}; let unknownList = {};
let currentMax = null; let currentMax = null;
let moraNeeded = 0; let moraNeeded = 0;
let changed = false; let changed = false;
let currentTalentLevel = {
first: 1,
second: 1,
third: 1,
};
let talentMaterial = {
items: {},
mora: 0,
};
let numberFormat = Intl.NumberFormat(); let numberFormat = Intl.NumberFormat();
$: usedResource = resources.filter((e) => e.selected).sort((a, b) => b.value - a.value); $: usedResource = resources.filter((e) => e.selected).sort((a, b) => b.value - a.value);
$: currentAscension, updateIntendedAscension(); $: currentAscension, updateIntendedAscension();
$: currentLevel, updateMinAscension(); $: currentLevel, updateMinAscension();
$: intendedLevel, updateMinIntendedAscension(); $: intendedLevel, updateMinIntendedAscension();
$: intendedAscension, updateMaxTalentLevel();
$: canCalculate = $: canCalculate =
(withAscension ? selectedCharacter !== null : true) && (withAscension ? selectedCharacter !== null : true) &&
@ -74,10 +91,10 @@
intendedAscension >= currentAscension && intendedAscension >= currentAscension &&
currentLevel !== '' && currentLevel !== '' &&
currentLevel > 0 && currentLevel > 0 &&
currentLevel <= 80 && currentLevel <= 90 &&
intendedLevel !== '' && intendedLevel !== '' &&
intendedLevel > 0 && intendedLevel > 0 &&
intendedLevel <= 80; intendedLevel <= 90;
function updateIntendedAscension() { function updateIntendedAscension() {
intendedAscension = Math.max(currentAscension, intendedAscension); intendedAscension = Math.max(currentAscension, intendedAscension);
@ -123,6 +140,32 @@
intendedAscension = Math.max(intendedAscension, minIntendedAscension); intendedAscension = Math.max(intendedAscension, minIntendedAscension);
} }
function updateMaxTalentLevel() {
switch (intendedAscension) {
case 6:
maxTalentLevel = 10;
break;
case 5:
maxTalentLevel = 8;
break;
case 4:
maxTalentLevel = 6;
break;
case 3:
maxTalentLevel = 4;
break;
case 2:
maxTalentLevel = 2;
break;
}
currentTalentLevel = {
first: Math.min(currentTalentLevel.first, maxTalentLevel),
second: Math.min(currentTalentLevel.second, maxTalentLevel),
third: Math.min(currentTalentLevel.third, maxTalentLevel),
};
}
function onChange() { function onChange() {
changed = true; changed = true;
} }
@ -186,9 +229,56 @@
console.log(ascensionResouce); console.log(ascensionResouce);
} }
function calculateTalent() {
Object.keys(currentTalentLevel).forEach((i) => {
talent.slice(currentTalentLevel[i] - 1, maxTalentLevel - 1).forEach((talent) => {
talentMaterial.mora = talentMaterial.mora + talent.mora;
const currentBook = selectedCharacter.material.book[talent.book.rarity - 2];
const currentMaterial = selectedCharacter.material.material[talent.commonMaterial.rarity - 1];
if (talentMaterial.items[currentBook.id] === undefined) {
talentMaterial.items[currentBook.id] = { ...currentBook, amount: 0 };
}
talentMaterial.items[currentBook.id].amount += talent.book.amount;
if (talentMaterial.items[currentMaterial.id] === undefined) {
talentMaterial.items[currentMaterial.id] = { ...currentMaterial, amount: 0 };
}
talentMaterial.items[currentMaterial.id].amount += talent.commonMaterial.amount;
if (talent.bossMaterial > 0) {
if (talentMaterial.items[selectedCharacter.material.boss.id] === undefined) {
talentMaterial.items[selectedCharacter.material.boss.id] = {
...selectedCharacter.material.boss,
amount: 0,
};
}
talentMaterial.items[selectedCharacter.material.boss.id].amount += talent.bossMaterial;
}
if (talent.eventMaterial > 0) {
if (talentMaterial.items['crown_of_insight'] === undefined) {
talentMaterial.items['crown_of_insight'] = { ...itemList.crown_of_insight, amount: 0 };
}
talentMaterial.items['crown_of_insight'].amount += talent.eventMaterial;
}
});
});
moraNeeded = moraNeeded + talentMaterial.mora;
console.log(talentMaterial);
}
function calculate() { function calculate() {
unknownList = {}; unknownList = {};
ascensionResouce = {}; ascensionResouce = {};
talentMaterial = {
mora: 0,
items: {},
};
moraNeeded = 0;
const values = resources const values = resources
.filter((e) => e.selected) .filter((e) => e.selected)
@ -251,6 +341,10 @@
if (withAscension) { if (withAscension) {
calculateAscension(); calculateAscension();
if (withTalent) {
calculateTalent();
}
} }
changed = false; changed = false;
@ -273,6 +367,14 @@
return prev; return prev;
}, {}); }, {});
const talentRes = Object.keys(talentMaterial.items).reduce((prev, item) => {
if (talentMaterial.items[item].amount > 0) {
prev[item] = talentMaterial.items[item].amount;
}
return prev;
}, {});
addTodo({ addTodo({
type: 'character', type: 'character',
character: withAscension ? selectedCharacter : null, character: withAscension ? selectedCharacter : null,
@ -281,6 +383,7 @@
mora: moraNeeded, mora: moraNeeded,
...levelRes, ...levelRes,
...ascensionRes, ...ascensionRes,
...talentRes,
}, },
}); });
@ -353,6 +456,38 @@
</Checkbox> </Checkbox>
</div> </div>
{/each} {/each}
<div class="mt-4">
{#if withAscension}
<Check on:change={onChange} bind:checked={withTalent}>Calculate Talent Material?</Check>
{/if}
{#if withTalent}
<p class="text-white text-center mt-3">Will calculate all talent to level {maxTalentLevel}</p>
<p class="text-white text-center mt-3">Input the 1st, 2nd & 3rd current talent level</p>
<div class="grid grid-cols-3 gap-2 mt-2">
<Input
on:change={onChange}
type="number"
min={1}
max={maxTalentLevel}
bind:value={currentTalentLevel.first}
placeholder="1st talent lvl" />
<Input
on:change={onChange}
type="number"
min={1}
max={maxTalentLevel}
bind:value={currentTalentLevel.second}
placeholder="2nd talent lvl" />
<Input
on:change={onChange}
type="number"
min={1}
max={maxTalentLevel}
bind:value={currentTalentLevel.third}
placeholder="3rd talent lvl" />
</div>
{/if}
</div>
</div> </div>
<div class="md:col-span-2 xl:col-span-1"> <div class="md:col-span-2 xl:col-span-1">
<Button disabled={!canCalculate} className="block w-full md:w-auto" on:click={calculate}>Calculate</Button> <Button disabled={!canCalculate} className="block w-full md:w-auto" on:click={calculate}>Calculate</Button>
@ -413,6 +548,24 @@
</tr> </tr>
{/if} {/if}
{/each} {/each}
{#each Object.entries(talentMaterial.items) as [id, item]}
{#if item.amount > 0}
<tr>
<td class="text-right border-b border-gray-700 py-1">
<span class="text-white mr-2 whitespace-no-wrap">{item.amount}
<Icon size={0.5} path={mdiClose} /></span>
</td>
<td class="border-b border-gray-700 py-1">
<span class="text-white">
<span class="w-6 inline-block">
<img class="h-6 inline-block mr-1" src={`/images/items/${id}.png`} alt={item.name} />
</span>
{item.name}
</span>
</td>
</tr>
{/if}
{/each}
<tr> <tr>
<td class="text-right border-b border-gray-700 py-1"> <td class="text-right border-b border-gray-700 py-1">
<span class="text-white mr-2 whitespace-no-wrap">{numberFormat.format(moraNeeded)} <span class="text-white mr-2 whitespace-no-wrap">{numberFormat.format(moraNeeded)}

View file

@ -16,7 +16,12 @@
$: isSynced = $synced && !$localModified; $: isSynced = $synced && !$localModified;
</script> </script>
<svelte:head>
<title>Settings - Paimon.moe</title>
</svelte:head>
<div class="lg:ml-64 pt-20 px-8 lg:pt-8"> <div class="lg:ml-64 pt-20 px-8 lg:pt-8">
<p class="text-white mb-4">Data Version: <b>1.2</b></p>
<p class="text-white mb-2"> <p class="text-white mb-2">
Paimon.moe use Application Data Directory on your Google Drive to save and sync your wish counter and todo list. Paimon.moe use Application Data Directory on your Google Drive to save and sync your wish counter and todo list.
</p> </p>

View file

@ -1,6 +1,7 @@
<script> <script>
import { getContext, tick } from 'svelte'; import { getContext, tick } from 'svelte';
import { mdiChevronLeft, mdiChevronRight, mdiClose, mdiLoading } from '@mdi/js'; import { mdiChevronLeft, mdiChevronRight, mdiClose, mdiLoading } from '@mdi/js';
import dayjs from 'dayjs';
import { todos, loading } from '../stores/todo'; import { todos, loading } from '../stores/todo';
import { itemList } from '../data/itemList'; import { itemList } from '../data/itemList';
import Masonry from 'svelte-masonry/Masonry.svelte'; import Masonry from 'svelte-masonry/Masonry.svelte';
@ -13,6 +14,8 @@
let refreshLayout; let refreshLayout;
let numberFormat = Intl.NumberFormat(); let numberFormat = Intl.NumberFormat();
let adding = false; let adding = false;
let todayOnly = false;
let today = dayjs().format('dddd').toLowerCase();
async function reorder(index, pos) { async function reorder(index, pos) {
if ((index === 0 && pos === -1) || (index === $todos.length - 1 && pos === 1)) return; if ((index === 0 && pos === -1) || (index === $todos.length - 1 && pos === 1)) return;
@ -54,6 +57,10 @@
); );
} }
function toggleTodayOnly() {
todayOnly = !todayOnly;
}
function decrease(key, val) { function decrease(key, val) {
todos.update((n) => { todos.update((n) => {
let i = 0; let i = 0;
@ -77,6 +84,8 @@
$: summary = $todos.reduce((prev, current) => { $: summary = $todos.reduce((prev, current) => {
for (const [id, amount] of Object.entries(current.resources)) { for (const [id, amount] of Object.entries(current.resources)) {
if (todayOnly && itemList[id].day && !itemList[id].day.includes(today)) continue;
if (prev[id] === undefined) { if (prev[id] === undefined) {
prev[id] = 0; prev[id] = 0;
} }
@ -98,7 +107,10 @@
{#if $loading} {#if $loading}
<Icon path={mdiLoading} color="white" spin /> <Icon path={mdiLoading} color="white" spin />
{:else if $todos.length > 0} {:else if $todos.length > 0}
<p class="font-bold text-xl mb-4">Summary</p> <div>
<Button className="float-right" size="md" on:click={toggleTodayOnly}>Show {todayOnly ? 'All Day' : 'Today Only'}</Button>
<p class="font-bold text-xl mb-4">Summary</p>
</div>
{:else} {:else}
<p class="font-bold text-xl">Nothing to do yet 😀<br />Add some here or from the Calculator!</p> <p class="font-bold text-xl">Nothing to do yet 😀<br />Add some here or from the Calculator!</p>
{/if} {/if}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View file

@ -0,0 +1,4 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=https://genshin-impact.fandom.com/
HostUrl=https://static.wikia.nocookie.net/gensin-impact/images/0/04/Item_Crown_of_Insight.png/revision/latest/scale-to-width-down/256?cb=20201115225803

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Some files were not shown because too many files have changed in this diff Show more