Visual pathing for bbs finishers

master
Wynd 2026-03-04 01:13:06 +02:00
parent b8755b847c
commit b606c3b095
6 changed files with 143 additions and 35 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "khguide" name = "khguide"
version = "1.4.0" version = "1.4.1"
edition = "2024" edition = "2024"
[dependencies] [dependencies]

View File

@ -11,7 +11,8 @@ name = "Heat Slash 1"
char = ["A", "V", "T"] char = ["A", "V", "T"]
level = 2 level = 2
row = 1 row = 1
next = ["finish"] path = [false, false, true]
previous = ["finish"]
goal = "Activate the Firestorm Command Style 8 times" goal = "Activate the Firestorm Command Style 8 times"
color = "#d00000" color = "#d00000"
@ -20,7 +21,8 @@ name = "Heat Slash 2"
char = ["A"] char = ["A"]
level = 3 level = 3
row = 1 row = 1
next = ["heat-slash-1"] path = [false, true, false]
previous = ["heat-slash-1"]
goal = "Activate the Firestorm Command Style 12 times" goal = "Activate the Firestorm Command Style 12 times"
color = "#d00000" color = "#d00000"
@ -29,7 +31,8 @@ name = "Rising Rock 1"
char = ["T"] char = ["T"]
level = 2 level = 2
row = 3 row = 3
next = ["finish"] path = [false, true, false]
previous = ["finish"]
goal = "Earn 2000 CP" goal = "Earn 2000 CP"
color = "#683000" color = "#683000"
@ -38,7 +41,8 @@ name = "Rising Rock 2"
char = ["T"] char = ["T"]
level = 3 level = 3
row = 3 row = 3
next = ["rising-rock-1"] path = [false, true, false]
previous = ["rising-rock-1"]
goal = "Earn 4200 CP" goal = "Earn 4200 CP"
color = "#683000" color = "#683000"
@ -47,7 +51,8 @@ name = "Dark Star 1"
char = ["T"] char = ["T"]
level = 4 level = 4
row = 2 row = 2
next = ["rising-rock-2"] path = [false, false, true]
previous = ["rising-rock-2"]
goal = "Defeat 420 enemies" goal = "Defeat 420 enemies"
color = "#683000" color = "#683000"
@ -56,7 +61,8 @@ name = "Dark Star 2"
char = ["T"] char = ["T"]
level = 5 level = 5
row = 1 row = 1
next = ["dark-star-1"] path = [false, false, true]
previous = ["dark-star-1"]
goal = "Defeat 550 enemies" goal = "Defeat 550 enemies"
color = "#683000" color = "#683000"
@ -65,7 +71,8 @@ name = "Air Flair 1"
char = ["V"] char = ["V"]
level = 2 level = 2
row = 3 row = 3
next = ["finish"] path = [false, true, false]
previous = ["finish"]
goal = "Earn 2000 CP" goal = "Earn 2000 CP"
color = "#0088f8" color = "#0088f8"
@ -74,7 +81,8 @@ name = "Air Flair 2"
char = ["V"] char = ["V"]
level = 3 level = 3
row = 3 row = 3
next = ["air-flair-1"] path = [false, true, false]
previous = ["air-flair-1"]
goal = "Earn 4000 CP" goal = "Earn 4000 CP"
color = "#0088f8" color = "#0088f8"
@ -83,7 +91,8 @@ name = "Air Flair 3"
char = ["V"] char = ["V"]
level = 4 level = 4
row = 2 row = 2
next = ["air-flair-2"] path = [false, false, true]
previous = ["air-flair-2"]
goal = "Take 4500 steps" goal = "Take 4500 steps"
color = "#0088f8" color = "#0088f8"
@ -92,7 +101,8 @@ name = "Air Flair 4"
char = ["V"] char = ["V"]
level = 5 level = 5
row = 1 row = 1
next = ["air-flair-3"] path = [false, false, true]
previous = ["air-flair-3"]
goal = "Take 7000 steps" goal = "Take 7000 steps"
color = "#0088f8" color = "#0088f8"
@ -101,7 +111,8 @@ name = "Magic Pulse 1"
char = ["A"] char = ["A"]
level = 2 level = 2
row = 3 row = 3
next = ["finish"] path = [false, true, false]
previous = ["finish"]
goal = "Earn 2000 CP" goal = "Earn 2000 CP"
color = "#7000d0" color = "#7000d0"
@ -110,7 +121,8 @@ name = "Magic Pulse 2"
char = ["A"] char = ["A"]
level = 3 level = 3
row = 3 row = 3
next = ["magic-pulse-1"] path = [false, true, false]
previous = ["magic-pulse-1"]
goal = "Earn 3800 CP" goal = "Earn 3800 CP"
color = "#7000d0" color = "#7000d0"
@ -119,7 +131,8 @@ name = "Magic Pulse 3"
char = ["A"] char = ["A"]
level = 4 level = 4
row = 2 row = 2
next = ["magic-pulse-2"] path = [false, false, true]
previous = ["magic-pulse-2"]
goal = "Defeat 350 enemies" goal = "Defeat 350 enemies"
color = "#7000d0" color = "#7000d0"
@ -128,7 +141,8 @@ name = "Magic Pulse 4"
char = ["A"] char = ["A"]
level = 5 level = 5
row = 1 row = 1
next = ["magic-pulse-3"] path = [false, false, true]
previous = ["magic-pulse-3"]
goal = "Defeat 500 enemies" goal = "Defeat 500 enemies"
color = "#7000d0" color = "#7000d0"
@ -137,7 +151,8 @@ name = "Gold Rush"
char = ["A", "V", "T"] char = ["A", "V", "T"]
level = 2 level = 2
row = 5 row = 5
next = ["finish"] path = [true, false, false]
previous = ["finish"]
goal = "Collect 1000 munny" goal = "Collect 1000 munny"
color = "#e8d800" color = "#e8d800"
@ -146,7 +161,8 @@ name = "Ramuh's Judgement"
char = ["A", "V", "T"] char = ["A", "V", "T"]
level = 3 level = 3
row = 2 row = 2
next = ["air-flair-1", "magic-pulse-1", "rising-rock-1"] path = [false, false, true]
previous = ["air-flair-1", "magic-pulse-1", "rising-rock-1"]
goal = "Activate the Thunderbolt Command Style 12 times" goal = "Activate the Thunderbolt Command Style 12 times"
color = "green" color = "green"
@ -155,7 +171,8 @@ name = "Twisted Hours"
char = ["A", "V", "T"] char = ["A", "V", "T"]
level = 3 level = 3
row = 4 row = 4
next = ["air-flair-1", "magic-pulse-1", "rising-rock-1", "gold-rush"] path = [true, false, true]
previous = ["air-flair-1", "magic-pulse-1", "rising-rock-1", "gold-rush"]
goal = "Take 7000 steps" goal = "Take 7000 steps"
color = "gray" color = "gray"
@ -164,7 +181,8 @@ name = "Surprise! 1"
char = ["A", "V", "T"] char = ["A", "V", "T"]
level = 3 level = 3
row = 5 row = 5
next = ["gold-rush"] path = [false, true, false]
previous = ["gold-rush"]
goal = "Collect 1400 munny" goal = "Collect 1400 munny"
color = "#e8d800" color = "#e8d800"
@ -172,8 +190,9 @@ color = "#e8d800"
name = "Surprise! 2" name = "Surprise! 2"
char = ["A", "V", "T"] char = ["A", "V", "T"]
level = 4 level = 4
row = 4 row = 5
next = ["twisted-hours", "surprise-1"] path = [true, true, false]
previous = ["twisted-hours", "surprise-1"]
goal = "Collect 5200 munny" goal = "Collect 5200 munny"
color = "#e8d800" color = "#e8d800"
@ -182,7 +201,8 @@ name = "Heal Strike"
char = ["A", "V", "T"] char = ["A", "V", "T"]
level = 4 level = 4
row = 3 row = 3
next = ["rising-rock-2", "air-flair-2", "magic-pulse-2"] path = [false, true, false]
previous = ["rising-rock-2", "air-flair-2", "magic-pulse-2"]
goal = "Use the effect of Second Chance or Once More to survive lethal damage 5 times" goal = "Use the effect of Second Chance or Once More to survive lethal damage 5 times"
color = "green" color = "green"
@ -191,7 +211,8 @@ name = "Random End"
char = ["T"] char = ["T"]
level = 4 level = 4
row = 4 row = 4
next = ["twisted-hours"] path = [false, true, false]
previous = ["twisted-hours"]
goal = "Take 8000 steps" goal = "Take 8000 steps"
color = "gray" color = "gray"
@ -200,7 +221,8 @@ name = "Explosion"
char = ["A", "V", "T"] char = ["A", "V", "T"]
level = 5 level = 5
row = 2 row = 2
next = ["dark-star-1", "air-flair-3", "magic-pulse-3"] path = [false, true, false]
previous = ["dark-star-1", "air-flair-3", "magic-pulse-3"]
goal = "Earn 6400 CP" goal = "Earn 6400 CP"
color = "orange" color = "orange"
@ -208,8 +230,9 @@ color = "orange"
name = "Celebration" name = "Celebration"
char = ["V"] char = ["V"]
level = 5 level = 5
row = 4 row = 5
next = ["surprise-2"] path = [false, true, false]
previous = ["surprise-2"]
goal = "Collect 7000 munny" goal = "Collect 7000 munny"
color = "#e8d800" color = "#e8d800"
@ -218,7 +241,8 @@ name = "Ice Burst"
char = ["A"] char = ["A"]
level = 5 level = 5
row = 3 row = 3
next = ["magic-pulse-3"] path = [true, false, false]
previous = ["magic-pulse-3"]
goal = "Activate the Diamond Dust Command Style 15 times" goal = "Activate the Diamond Dust Command Style 15 times"
color = "#50b8e8" color = "#50b8e8"
@ -227,7 +251,8 @@ name = "Demolition"
char = ["T"] char = ["T"]
level = 6 level = 6
row = 1 row = 1
next = ["dark-star-2"] path = [false, true, false]
previous = ["dark-star-2"]
goal = "Earn 10000 CP" goal = "Earn 10000 CP"
color = "#183050" color = "#183050"
@ -236,7 +261,8 @@ name = "Stratosphere"
char = ["V"] char = ["V"]
level = 6 level = 6
row = 1 row = 1
next = ["air-flair-4"] path = [false, true, false]
previous = ["air-flair-4"]
goal = "Defeat 800 enemies" goal = "Defeat 800 enemies"
color = "#e8e8d0" color = "#e8e8d0"
@ -245,6 +271,7 @@ name = "Teleport Spike"
char = ["A"] char = ["A"]
level = 6 level = 6
row = 1 row = 1
next = ["magic-pulse-4"] path = [false, true, false]
previous = ["magic-pulse-4"]
goal = "Defeat 800 enemies" goal = "Defeat 800 enemies"
color = "#b830a0" color = "#b830a0"

View File

@ -5,7 +5,7 @@ document.addEventListener("DOMContentLoaded", (event) => {
'input[type="radio"][name="charFilter"]', 'input[type="radio"][name="charFilter"]',
); );
let detailsField = document.getElementById("finisherDetails"); const detailsField = document.getElementById("finisher-details");
charFilters[0].checked = true; charFilters[0].checked = true;
charFilters.forEach(function (item, _) { charFilters.forEach(function (item, _) {

View File

@ -9,6 +9,7 @@ table {
& td, & td,
& td:first-child { & td:first-child {
position: relative;
border: 0px; border: 0px;
height: 33px; height: 33px;
text-shadow: 2px 2px #000; text-shadow: 2px 2px #000;
@ -23,9 +24,57 @@ table {
} }
} }
#finisherDetails { .path {
position: absolute;
top: -38px;
left: -50%;
font-size: 100px;
width: 100%;
height: 100%;
z-index: 2;
pointer-events: none;
clip-path: circle(22% at 155px 60px);
&::after {
content: "─";
}
&.top {
/* top: -56px; */
z-index: 1;
&::after {
content: "└";
}
}
&.bottom {
/* top: -20px; */
z-index: 1;
&::after {
content: "┌";
}
}
}
#finisher-details {
text-align: center; text-align: center;
font-size: 18px; font-size: 18px;
margin-top: 16px; margin-top: 16px;
text-shadow: 2px 2px #000; text-shadow: 2px 2px #000;
} }
@media (max-width: 768px) {
table {
width: 200%;
}
#finisher-details {
width: 200%;
}
.path {
top: 5px;
font-size: 30px;
clip-path: none;
}
}

View File

@ -2,15 +2,33 @@ use serde::Deserialize;
use super::Character; use super::Character;
type Path = (bool, bool, bool);
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
pub struct Finisher { pub struct Finisher {
pub name: String, pub name: String,
pub char: Vec<Character>, pub char: Vec<Character>,
pub level: u8, pub level: u8,
#[serde(default)] #[serde(default)]
pub next: Vec<String>, pub previous: Vec<String>,
#[serde(default)]
pub path: Path,
#[serde(default)] #[serde(default)]
pub row: u8, pub row: u8,
pub goal: String, pub goal: String,
pub color: String, pub color: String,
} }
impl Finisher {
pub fn has_top_path(&self) -> bool {
self.path.0
}
pub fn has_mid_path(&self) -> bool {
self.path.1
}
pub fn has_bottom_path(&self) -> bool {
self.path.2
}
}

View File

@ -28,7 +28,21 @@
{% for lvl in 1..=6u8 %} {% for lvl in 1..=6u8 %}
{% match get_at(char, *lvl, *row) %} {% match get_at(char, *lvl, *row) %}
{% when Some with (val) %} {% when Some with (val) %}
<td class="finisher" style="color: {{val.color}};" data-goal="{{ val.goal }}">{{ val.name }}</td> <td class="finisher" style="color: {{val.color}};" data-goal="{{ val.goal }}">
{{ val.name }}
{% if val.has_top_path() %}
<div class="path top"></div>
{% endif %}
{% if val.has_mid_path() %}
<div class="path"></div>
{% endif %}
{% if val.has_bottom_path() %}
<div class="path bottom"></div>
{% endif %}
</td>
{% when None %} {% when None %}
<td></td> <td></td>
{% endmatch %} {% endmatch %}
@ -39,6 +53,6 @@
{% endfor %} {% endfor %}
</table> </table>
<div id="finisherDetails">---</div> <div id="finisher-details">---</div>
{% endblock %} {% endblock %}