Compare commits

...

2 Commits

8 changed files with 523 additions and 2 deletions

View File

@ -154,6 +154,7 @@ type = "Checkpoint"
price = "Level 20"
route = 100
path = ["N", "S"]
tip = "Unlocks with Secret panel at B5"
[[abilities]]
name = "Zero Gravira"
@ -162,6 +163,7 @@ type = "Magic"
price = "100 LP"
route = 100
path = ["N", "S"]
tip = "Unlocks with Secret panel at B5"
[[abilities]]
name = "Checkpoint"
@ -170,6 +172,7 @@ type = "Checkpoint"
price = "Level 25"
route = 100
path = ["N", "E"]
tip = "Unlocks with Secret panel at B5"
[[abilities]]
name = "Sleep Block"
@ -206,6 +209,7 @@ type = "Magic"
price = "150 LP"
route = 100
path = ["W"]
tip = "Unlocks with Secret panel at B5"
[[abilities]]
name = "Support Boost"

View File

@ -0,0 +1,228 @@
spirit = "Kooma Panda"
order = 13
[[routes]]
id = 0
name = "Boxer"
color = "purple"
[[routes.tips]]
to = "Wrestler"
tip = "Head"
[[routes.tips]]
to = "Bruiser"
tip = "Belly or Back"
[[routes.tips]]
to = "Grappler"
tip = "Belly or Back"
[[routes]]
id = 1
name = "Wrestler"
color = "yellow"
[[routes.tips]]
to = "Boxer"
tip = "Belly"
[[routes.tips]]
to = "Bruiser"
tip = "Head or Back"
[[routes.tips]]
to = "Grappler"
tip = "Head or Back"
[[routes]]
id = 2
name = "Bruiser"
color = "blue"
[[routes.tips]]
to = "Boxer"
tip = "Back"
[[routes.tips]]
to = "Wrestler"
tip = "Back"
[[routes.tips]]
to = "Grappler"
tip = "Head or Belly"
[[routes]]
id = 3
name = "Grappler"
color = "green"
[[routes.tips]]
to = "Boxer"
tip = "Head or Back"
[[routes.tips]]
to = "Wrestler"
tip = "Head or Back"
[[routes.tips]]
to = "Bruiser"
tip = "Belly and Arms"
[[routes]]
id = 100
name = "Secret Route 1"
color = "secret1"
tips = []
[[abilities]]
name = "Bind Block"
pos = "A2"
type = "Stat"
price = "30 LP"
path = ["S", "E"]
[[abilities]]
name = "Checkpoint"
pos = "A3"
type = "Checkpoint"
price = "Link x3"
path = ["N", "S"]
[[abilities]]
name = "Aerial Slam"
pos = "A4"
type = "Attack"
price = "100 LP"
path = ["N"]
[[abilities]]
name = "Confusion Block"
pos = "A5"
type = "Stat"
price = "30 LP"
route = 1
path = ["E"]
[[abilities]]
name = "Defense Boost"
pos = "A6"
type = "Stat"
price = "30 LP"
route = 2
path = ["E"]
[[abilities]]
name = "Start"
pos = "B1"
type = "Start"
price = ""
path = ["S"]
[[abilities]]
name = "Circle Raid"
pos = "B2"
type = "Attack"
price = "10 LP"
path = ["N", "S", "W", "E"]
[[abilities]]
name = "Attack Boost"
pos = "B3"
type = "Stat"
price = "100 LP"
path = ["N", "S"]
[[abilities]]
name = "Blindness Block"
pos = "B4"
type = "Stat"
price = "30 LP"
path = ["N", "S"]
[[abilities]]
name = "Item Boost"
pos = "B5"
type = "Stat"
price = "30 LP"
path = ["N", "S", "W", "E"]
[[abilities]]
name = "Mini Block"
pos = "B6"
type = "Stat"
price = "30 LP"
path = ["N", "S", "W", "E"]
[[abilities]]
name = "Attack Boost"
pos = "B7"
type = "Stat"
price = "200 LP"
path = ["N"]
[[abilities]]
name = "HP Boost"
pos = "C2"
type = "Stat"
price = "30 LP"
path = ["W", "E"]
[[abilities]]
name = "HP Boost"
pos = "C5"
type = "Stat"
price = "50 LP"
route = 1
path = ["W"]
[[abilities]]
name = "Attack Haste"
pos = "C6"
type = "Stat"
price = "30 LP"
route = 2
path = ["W"]
[[abilities]]
name = "Secret"
pos = "D2"
type = "Secret"
price = "10 LP"
path = ["W", "E"]
[[abilities]]
name = "Bind"
pos = "E2"
type = "Magic"
price = "50 LP"
route = 100
path = ["W", "S"]
tip = "Unlocks with Secret panel at D2"
[[abilities]]
name = "Item Boost"
pos = "E3"
type = "Stat"
price = "50 LP"
route = 100
path = ["N", "S"]
tip = "Unlocks with Secret panel at D2"
[[abilities]]
name = "Checkpoint"
pos = "E4"
type = "Checkpoint"
price = "Level 20"
route = 100
path = ["N", "E"]
tip = "Unlocks with Secret panel at D2"
[[abilities]]
name = "Combo Plus"
pos = "F4"
type = "Support"
price = "200 LP"
route = 100
path = ["W"]
tip = "Unlocks with Secret panel at D2"

View File

@ -96,6 +96,7 @@ type = "Stat"
price = "50 LP"
route = 100
path = ["E"]
tip = "Unlocks with Secret panel at B7"
[[abilities]]
name = "Start"
@ -146,6 +147,7 @@ type = "Stat"
price = "30 LP"
route = 100
path = ["N", "S"]
tip = "Unlocks with Secret panel at B7"
[[abilities]]
name = "Circle Raid"
@ -154,6 +156,7 @@ type = "Attack"
price = "100 LP"
route = 100
path = ["N"]
tip = "Unlocks with Secret panel at B7"
[[abilities]]
name = "Stop Block"
@ -191,6 +194,7 @@ type = "Stat"
price = "50 LP"
route = 100
path = ["W"]
tip = "Unlocks with Secret panel at B7"
[[abilities]]
name = "Attack Haste"

View File

@ -145,6 +145,7 @@ type = "Magic"
price = "50 LP"
route = 100
path = ["N", "E"]
tip = "Unlocks with Secret panel at D2"
[[abilities]]
name = "Checkpoint"
@ -160,6 +161,7 @@ type = "Stat"
price = "30 LP"
route = 100
path = ["S", "E"]
tip = "Unlocks with Secret panel at D2"
[[abilities]]
name = "HP Boost"
@ -168,6 +170,7 @@ type = "Stat"
price = "30 LP"
route = 100
path = ["W", "N"]
tip = "Unlocks with Secret panel at D2"
[[abilities]]
name = "Sleepra"
@ -183,6 +186,7 @@ type = "Stat"
price = "50 LP"
route = 100
path = ["E", "W", "S"]
tip = "Unlocks with Secret panel at D2"
[[abilities]]
name = "Water Screen"
@ -206,6 +210,7 @@ type = "Stat"
price = "100 LP"
route = 100
path = ["W"]
tip = "Unlocks with Secret panel at D2"
[[abilities]]
name = "Support Boost"

View File

@ -0,0 +1,222 @@
spirit = "Thunderaffe"
order = 12
[[routes]]
id = 0
name = "Live Wire"
color = "purple"
[[routes.tips]]
to = "Photon Don"
tip = "Head or Legs"
[[routes.tips]]
to = "Smasher"
tip = "Body"
[[routes.tips]]
to = "Blue Streak"
tip = "Body"
[[routes]]
id = 1
name = "Photon Don"
color = "yellow"
[[routes.tips]]
to = "Live Wire"
tip = "Head or Body"
[[routes.tips]]
to = "Smasher"
tip = "Legs"
[[routes.tips]]
to = "Blue Streak"
tip = "Legs"
[[routes]]
id = 2
name = "Smasher"
color = "blue"
[[routes.tips]]
to = "Live Wire"
tip = "Body or Legs"
[[routes.tips]]
to = "Photon Don"
tip = "Body or Legs"
[[routes.tips]]
to = "Blue Streak"
tip = "Head"
[[routes]]
id = 3
name = "Blue Streak"
color = "green"
[[routes.tips]]
to = "Live Wire"
tip = "Legs"
[[routes.tips]]
to = "Photon Don"
tip = "Legs"
[[routes.tips]]
to = "Smasher"
tip = "Head or Body"
[[routes]]
id = 100
name = "Secret Route 1"
color = "secret2"
tips = []
[[abilities]]
name = "Start"
pos = "A2"
type = "Start"
price = ""
path = ["E"]
[[abilities]]
name = "Thunder Screen"
pos = "B1"
type = "Stat"
price = "20 LP"
path = ["S", "E"]
[[abilities]]
name = "Thundara"
pos = "B2"
type = "Magic"
price = "10 LP"
path = ["N", "W", "S", "E"]
[[abilities]]
name = "Checkpoint"
pos = "B3"
type = "Checkpoint"
price = "Link x3"
path = ["N", "S"]
[[abilities]]
name = "Damage Syphon"
pos = "B4"
type = "Support"
price = "300 LP"
path = ["N"]
[[abilities]]
name = "Attack Haste"
pos = "C1"
type = "Stat"
price = "30 LP"
path = ["W"]
[[abilities]]
name = "Thunder Boost"
pos = "C2"
type = "Stat"
price = "30 LP"
path = ["W", "E", "S"]
[[abilities]]
name = "Thunder Screen"
pos = "C3"
type = "Stat"
price = "60 LP"
route = 1
path = ["N", "E"]
[[abilities]]
name = "Checkpoint"
pos = "D1"
type = "Checkpoint"
price = "Link x3"
path = ["S", "E"]
[[abilities]]
name = "Thundaga / Triple Plasma"
pos = "D2"
type = "Magic"
price = "150 LP"
route = 100
path = ["W", "E", "N"]
tip = "Unlocks with Secret panel at E1"
[[abilities]]
name = "Thunder Boost"
pos = "D3"
type = "Stat"
price = "100 LP"
route = 1
path = ["W"]
[[abilities]]
name = "Secret"
pos = "E1"
type = "Secret"
price = "50 LP"
path = ["W"]
[[abilities]]
name = "Attack Haste"
pos = "E2"
type = "Stat"
price = "50 LP"
path = ["W", "E", "S"]
[[abilities]]
name = "Slow Block"
pos = "E3"
type = "Stat"
price = "30 LP"
path = ["N", "E"]
[[abilities]]
name = "Attack Haste"
pos = "F1"
type = "Stat"
price = "150 LP"
route = 3
path = ["S", "E"]
[[abilities]]
name = "Attack Haste"
pos = "F2"
type = "Stat"
price = "100 LP"
path = ["W", "E", "N"]
[[abilities]]
name = "Thunder Boost"
pos = "F3"
type = "Stat"
price = "50 LP"
path = ["W"]
[[abilities]]
name = "Attack Haste"
pos = "G1"
type = "Stat"
price = "200 LP"
route = 3
path = ["W"]
[[abilities]]
name = "Checkpoint"
pos = "G2"
type = "Checkpoint"
price = "Level 25"
path = ["W", "E"]
[[abilities]]
name = "Zantetsuken"
pos = "H2"
type = "Attack"
price = "200 LP"
path = ["W"]

View File

@ -21,6 +21,26 @@ struct Board {
}
impl Board {
pub fn init_ability_help(&mut self) {
for abl in &mut self.abilities {
if abl.tip.is_none() && abl.route.is_some() {
let route_id = abl.route.unwrap();
let mut route = None;
for r in &self.routes {
if r.id == route_id {
route = Some(r);
break;
}
}
if route_id < 10 && route.is_some() {
abl.tip = Some(format!("Unlocks with disposition {}", route.unwrap().name));
}
}
}
}
pub fn init_routes(&mut self) {
self.routes.iter_mut().for_each(|r| {
r.interaction = match r.color {
@ -261,9 +281,14 @@ struct Ability {
price: String,
route: Option<u32>,
path: Vec<Direction>,
tip: Option<String>,
}
impl Ability {
pub fn tip(&self) -> String {
self.tip.clone().unwrap_or_default()
}
pub fn get_slot_details(&self, board: &Board) -> String {
let mut details = String::new();
if let Some(route) = self.route {
@ -343,6 +368,7 @@ pub fn init() {
false => None,
})
.collect::<Vec<PathBuf>>();
for path in paths {
let board_str = std::fs::read_to_string(path).unwrap();
let mut board = toml::from_str::<Board>(&board_str).unwrap();
@ -351,6 +377,7 @@ pub fn init() {
board.init_total_lp();
board.init_max_level();
board.init_stats();
board.init_ability_help();
// dbg!(&board);
boards.push(board);

View File

@ -5,7 +5,10 @@
{% match ability %}
{% when Some with (val) %}
<td colspan="1" class="{{ val.get_slot_details(board) }}">
<div class="slot">
<div
class="slot tooltip-wrapper"
{% if val.tip.is_some() %}style="cursor: help"{% endif %}
>
<span>{{ val.name }}</span>
{% match val.type %}
{% when AbilityType::Checkpoint %}
@ -13,7 +16,12 @@
<span>{{ val.price }}</span>
{% when _ %}
{% endmatch %}
{% if val.tip.is_some() %}
<div class="tooltip">{{ val.tip() }}</div>
{% endif %}
</div>
<div class="path"></div>
</td>
{% when None %}

View File

@ -74,7 +74,6 @@
width: 120px;
height: 100px;
position: relative;
overflow: hidden;
& span {
position: inherit;
@ -94,6 +93,30 @@
box-shadow: 1px 1px 5px black;
}
.tooltip-wrapper {
.tooltip {
visibility: hidden;
background-color: #555;
max-width: 250px;
min-width: 150px;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 8px;
position: absolute;
z-index: 1;
bottom: 125%;
left: -50%;
opacity: 0;
transition: opacity 0.3s;
}
&:hover .tooltip {
visibility: visible;
opacity: 1;
}
}
&.slot-w {
height: 20px;
}