Added more spirits to the list and some small design changes

master
Wynd 2024-10-06 15:07:05 +03:00
parent 1825e5c64b
commit 66ece3ccdf
9 changed files with 991 additions and 28 deletions

View File

@ -0,0 +1,214 @@
{
"spirit": "Hebby Repp",
"order": 6,
"routes": [
{
"id": 0,
"name": "Wheeler",
"color": "purple",
"tips": [
{
"to": "Salamander",
"tip": "Head"
},
{
"to": "Serpent",
"tip": "Head"
},
{
"to": "Hydra",
"tip": "Chest"
}
]
},
{
"id": 1,
"name": "Salamander",
"color": "yellow",
"tips": [
{
"to": "Hydra",
"tip": "Head"
},
{
"to": "Serpent",
"tip": "Head"
},
{
"to": "Wheeler",
"tip": "Chest"
}
]
},
{
"id": 2,
"name": "Serpent",
"color": "blue",
"tips": [
{
"to": "Wheeler",
"tip": "Head"
},
{
"to": "Hydra",
"tip": "Head"
},
{
"to": "Salamander",
"tip": "Tail"
}
]
},
{
"id": 3,
"name": "Hydra",
"color": "green",
"tips": [
{
"to": "Salamander",
"tip": "Head"
},
{
"to": "Wheeler",
"tip": "Head"
},
{
"to": "Serpent",
"tip": "Chest"
}
]
}
],
"abilities": [
{
"name": "Start",
"pos": "A1",
"type": "Start",
"price": "",
"path": ["E"]
},
{
"name": "Fire Screen",
"pos": "A4",
"type": "Stat",
"price": "60 LP",
"route": 0,
"path": ["E", "S"]
},
{
"name": "Defense Boost",
"pos": "A5",
"type": "Stat",
"price": "100 LP",
"route": 0,
"path": ["N"]
},
{
"name": "Fire",
"pos": "B1",
"type": "Magic",
"price": "10 LP",
"path": ["W", "E"]
},
{
"name": "Fire Screen",
"pos": "B3",
"type": "Stat",
"price": "20 LP",
"path": ["E", "S"]
},
{
"name": "Fire Boost",
"pos": "B4",
"type": "Stat",
"price": "50 LP",
"path": ["N", "W", "S"]
},
{
"name": "Fire Screen",
"pos": "B5",
"type": "Stat",
"price": "40 LP",
"path": ["N", "E"]
},
{
"name": "HP Boost",
"pos": "C1",
"type": "Stat",
"price": "30 LP",
"path": ["W", "E"]
},
{
"name": "Magic Boost",
"pos": "C3",
"type": "Stat",
"price": "100 LP",
"path": ["W", "E"]
},
{
"name": "Fire Boost",
"pos": "C5",
"type": "Stat",
"price": "100 LP",
"path": ["W", "E"]
},
{
"name": "Fire Boost",
"pos": "D1",
"type": "Stat",
"price": "30 LP",
"path": ["W", "S"]
},
{
"name": "Slow Block",
"pos": "D2",
"type": "Stat",
"price": "30 LP",
"path": ["N", "S"]
},
{
"name": "Magic Haste",
"pos": "D3",
"type": "Stat",
"price": "30 LP",
"path": ["N", "W", "E"]
},
{
"name": "Fira",
"pos": "D4",
"type": "Magic",
"price": "100 LP",
"path": ["S"]
},
{
"name": "Checkpoint",
"pos": "D5",
"type": "Checkpoint",
"price": "Link x3",
"path": ["W", "N", "S"]
},
{
"name": "Fire Windmill",
"pos": "D6",
"type": "Attack",
"price": "150 LP",
"path": ["N"]
},
{
"name": "HP Boost",
"pos": "E3",
"type": "Stat",
"price": "50 LP",
"route": 1,
"path": ["W", "E"]
},
{
"name": "Magic Haste",
"pos": "F3",
"type": "Stat",
"price": "50 LP",
"route": 1,
"path": ["W"]
}
]
}

View File

@ -0,0 +1,236 @@
{
"spirit": "Pricklemane",
"order": 5,
"routes": [
{
"id": 0,
"name": "Intellectual",
"color": "blue",
"tips": [
{
"to": "Volcano",
"tip": "Feet"
},
{
"to": "Bouncer",
"tip": "Face"
},
{
"to": "Scrapper",
"tip": "Feet"
}
]
},
{
"id": 1,
"name": "Volcano",
"color": "purple",
"tips": [
{
"to": "Intellectual",
"tip": "Face"
},
{
"to": "Bouncer",
"tip": "Face"
},
{
"to": "Scrapper",
"tip": "Tail"
}
]
},
{
"id": 2,
"name": "Scrapper",
"color": "yellow",
"tips": [
{
"to": "Bouncer",
"tip": "Tail"
},
{
"to": "Volcano",
"tip": "Face"
},
{
"to": "Intellectual",
"tip": "Feet"
}
]
},
{
"id": 3,
"name": "Bouncer",
"color": "green",
"tips": [
{
"to": "Scrapper",
"tip": "Face"
},
{
"to": "Volcano",
"tip": "Face"
},
{
"to": "Intellectual",
"tip": "Tail"
}
]
},
{
"id": 100,
"name": "Secret Route 1",
"color": "secret1",
"tips": []
}
],
"abilities": [
{
"name": "HP Boost",
"pos": "A3",
"type": "Stat",
"price": "30 LP",
"path": ["E"]
},
{
"name": "Attack Boost",
"pos": "A5",
"type": "Stat",
"price": "100 LP",
"path": ["E"]
},
{
"name": "HP Boost",
"pos": "A6",
"type": "Stat",
"price": "50 LP",
"route": 100,
"path": ["E"]
},
{
"name": "Start",
"pos": "B1",
"type": "Start",
"price": "",
"path": ["S"]
},
{
"name": "Strike Raid",
"pos": "B2",
"type": "Attack",
"price": "10 LP",
"path": ["N", "S"]
},
{
"name": "Item Boost",
"pos": "B3",
"type": "Stat",
"price": "30 LP",
"path": ["N", "S", "W", "E"]
},
{
"name": "Time Bomb",
"pos": "B4",
"type": "Magic",
"price": "100 LP",
"path": ["N", "S", "E"]
},
{
"name": "Attack Haste",
"pos": "B5",
"type": "Stat",
"price": "30 LP",
"path": ["N", "S", "W", "E"]
},
{
"name": "Secret",
"pos": "B6",
"type": "Secret",
"price": "10 LP",
"path": ["N", "S", "W", "E"]
},
{
"name": "Poison Block",
"pos": "B7",
"type": "Stat",
"price": "30 LP",
"route": 100,
"path": ["N", "S"]
},
{
"name": "Circle Raid",
"pos": "B8",
"type": "Attack",
"price": "100 LP",
"route": 100,
"path": ["N"]
},
{
"name": "Stop Block",
"pos": "C2",
"type": "Stat",
"price": "30 LP",
"route": 0,
"path": ["S", "E"]
},
{
"name": "Sleep Block",
"pos": "C3",
"type": "Stat",
"price": "30 LP",
"path": ["W", "E", "N"]
},
{
"name": "Checkpoint",
"pos": "C4",
"type": "Checkpoint",
"price": "Level 10",
"path": ["W", "E"]
},
{
"name": "Fire Screen",
"pos": "C5",
"type": "Stat",
"price": "20 LP",
"path": ["W"]
},
{
"name": "Attack Haste",
"pos": "C6",
"type": "Stat",
"price": "50 LP",
"route": 100,
"path": ["W"]
},
{
"name": "Attack Haste",
"pos": "D2",
"type": "Stat",
"price": "100 LP",
"route": 0,
"path": ["W"]
},
{
"name": "Checkpoint",
"pos": "D3",
"type": "Checkpoint",
"price": "Link x5",
"path": ["W", "E"]
},
{
"name": "Defense Boost",
"pos": "D4",
"type": "Stat",
"price": "100 LP",
"path": ["W"]
},
{
"name": "Combo Plus",
"pos": "E3",
"type": "Support",
"price": "200 LP",
"path": ["W"]
}
]
}

View File

@ -0,0 +1,237 @@
{
"spirit": "Tama Sheep",
"order": 2,
"routes": [
{
"id": 0,
"name": "Mumbler",
"color": "blue",
"tips": [
{
"to": "Picker-Upper",
"tip": "Face"
},
{
"to": "Snooze Maker",
"tip": "Face"
},
{
"to": "Pillow Fluffer",
"tip": "Horn"
}
]
},
{
"id": 1,
"name": "Picker-Upper",
"color": "purple",
"tips": [
{
"to": "Mumbler",
"tip": "Face"
},
{
"to": "Pillow Fluffer",
"tip": "Face"
},
{
"to": "Snooze Maker",
"tip": "Horn"
}
]
},
{
"id": 2,
"name": "Snooze Maker",
"color": "yellow",
"tips": [
{
"to": "Pillow Fluffer",
"tip": "Feet"
},
{
"to": "Picker-Upper",
"tip": "Face"
},
{
"to": "Mumbler",
"tip": "Feet"
}
]
},
{
"id": 3,
"name": "Pillow Fluffer",
"color": "green",
"tips": [
{
"to": "Snooze Maker",
"tip": "Face"
},
{
"to": "Picker-Upper",
"tip": "Face"
},
{
"to": "Mumbler",
"tip": "Feet"
}
]
},
{
"id": 100,
"name": "Secret Route 1",
"color": "secret1",
"tips": []
}
],
"abilities": [
{
"name": "Start",
"pos": "A1",
"type": "Start",
"price": "",
"path": ["S"]
},
{
"name": "Sleep",
"pos": "A2",
"type": "Magic",
"price": "10 LP",
"path": ["N", "S", "E"]
},
{
"name": "Magic Boost",
"pos": "A3",
"type": "Stat",
"price": "100 LP",
"path": ["N", "S"]
},
{
"name": "Sleep Block",
"pos": "A4",
"type": "Stat",
"price": "30 LP",
"path": ["N", "E"]
},
{
"name": "Magic Haste",
"pos": "B2",
"type": "Stat",
"price": "30 LP",
"path": ["E", "W"]
},
{
"name": "Defense Boost",
"pos": "B4",
"type": "Stat",
"price": "100 LP",
"path": ["E", "W"]
},
{
"name": "Water Screen",
"pos": "C2",
"type": "Stat",
"price": "20 LP",
"path": ["E", "W"]
},
{
"name": "Slow Block",
"pos": "C4",
"type": "Stat",
"price": "30 LP",
"path": ["E", "W"]
},
{
"name": "Secret",
"pos": "D2",
"type": "Secret",
"price": "10 LP",
"path": ["W", "S"]
},
{
"name": "Balloon",
"pos": "D3",
"type": "Magic",
"price": "50 LP",
"route": 100,
"path": ["N", "E"]
},
{
"name": "Checkpoint",
"pos": "D4",
"type": "Checkpoint",
"price": "Link x1",
"path": ["E", "W"]
},
{
"name": "Stop Block",
"pos": "E2",
"type": "Stat",
"price": "30 LP",
"route": 100,
"path": ["S", "E"]
},
{
"name": "HP Boost",
"pos": "E3",
"type": "Stat",
"price": "30 LP",
"route": 100,
"path": ["W", "N"]
},
{
"name": "Sleepra",
"pos": "E4",
"type": "Magic",
"price": "100 LP",
"path": ["E", "W"]
},
{
"name": "Magic Haste",
"pos": "F2",
"type": "Stat",
"price": "50 LP",
"route": 100,
"path": ["E", "W", "S"]
},
{
"name": "Water Screen",
"pos": "F3",
"type": "Stat",
"price": "40 LP",
"route": 0,
"path": ["N", "E"]
},
{
"name": "Checkpoint",
"pos": "F4",
"type": "Checkpoint",
"price": "Link x2",
"path": ["E", "W"]
},
{
"name": "Magic Haste",
"pos": "G2",
"type": "Stat",
"price": "100 LP",
"route": 100,
"path": ["W"]
},
{
"name": "Support Boost",
"pos": "G3",
"type": "Support",
"price": "200 LP",
"route": 0,
"path": ["W"]
},
{
"name": "Sleepga",
"pos": "G4",
"type": "Magic",
"price": "150 LP",
"path": ["W"]
}
]
}

View File

@ -0,0 +1,228 @@
{
"spirit": "Yoggy Ram",
"order": 3,
"routes": [
{
"id": 0,
"name": "Trailblazer",
"color": "yellow",
"tips": [
{
"to": "Jumper",
"tip": "Face"
},
{
"to": "Leader",
"tip": "Face"
},
{
"to": "Powerhouse",
"tip": "Chest"
}
]
},
{
"id": 1,
"name": "Powerhouse",
"color": "purple",
"tips": [
{
"to": "Leader",
"tip": "Chest"
},
{
"to": "Trailblazer",
"tip": "Face"
},
{
"to": "Jumper",
"tip": "Chest"
}
]
},
{
"id": 2,
"name": "Leader",
"color": "blue",
"tips": [
{
"to": "Powerhouse",
"tip": "Hind Legs"
},
{
"to": "Jumper",
"tip": "Face"
},
{
"to": "Trailblazer",
"tip": "Hind Legs"
}
]
},
{
"id": 3,
"name": "Jumper",
"color": "green",
"tips": [
{
"to": "Trailblazer",
"tip": "Face"
},
{
"to": "Powerhouse",
"tip": "Face"
},
{
"to": "Leader",
"tip": "Tail"
}
]
}
],
"abilities": [
{
"name": "Fire Screen",
"pos": "A3",
"type": "Stat",
"price": "80 LP",
"route": 0,
"path": ["E", "S"]
},
{
"name": "Defense Boost",
"pos": "A4",
"type": "Stat",
"price": "200 LP",
"route": 0,
"path": ["N"]
},
{
"name": "Start",
"pos": "B2",
"type": "Start",
"price": "",
"path": ["S", "E"]
},
{
"name": "Esuna",
"pos": "B3",
"type": "Magic",
"price": "10 LP",
"path": ["N", "S", "E", "W"]
},
{
"name": "Fire Screen",
"pos": "B4",
"type": "Stat",
"price": "20 LP",
"path": ["N", "S"]
},
{
"name": "Bind Block",
"pos": "B5",
"type": "Stat",
"price": "30 LP",
"path": ["N", "S"]
},
{
"name": "Fire Screen",
"pos": "B6",
"type": "Stat",
"price": "40 LP",
"path": ["N", "S"]
},
{
"name": "Fire Screen",
"pos": "B7",
"type": "Stat",
"price": "60 LP",
"path": ["N", "S"]
},
{
"name": "Defense Boost",
"pos": "B8",
"type": "Stat",
"price": "100 LP",
"path": ["N"]
},
{
"name": "HP Boost",
"pos": "C1",
"type": "Stat",
"price": "30 LP",
"route": 1,
"path": ["S", "E"]
},
{
"name": "Fire",
"pos": "C2",
"type": "Magic",
"price": "10 LP",
"path": ["N", "S", "W", "E"]
},
{
"name": "Checkpoint",
"pos": "C3",
"type": "Checkpoint",
"price": "Link x4",
"path": ["N", "S", "W", "E"]
},
{
"name": "Treasure Magnet",
"pos": "C4",
"type": "Support",
"price": "50 LP",
"path": ["N"]
},
{
"name": "Fire Screen",
"pos": "D1",
"type": "Stat",
"price": "100 LP",
"route": 1,
"path": ["W"]
},
{
"name": "Fire Boost",
"pos": "D2",
"type": "Stat",
"price": "30 LP",
"path": ["W", "E"]
},
{
"name": "Fire Windmill",
"pos": "D3",
"type": "Attack",
"price": "150 LP",
"path": ["W"]
},
{
"name": "Checkpoint",
"pos": "E2",
"type": "Checkpoint",
"price": "Level 10",
"path": ["W", "E"]
},
{
"name": "Fira",
"pos": "F2",
"type": "Magic",
"price": "100 LP",
"path": ["W", "E"]
},
{
"name": "Checkpoint",
"pos": "G2",
"type": "Checkpoint",
"price": "Level 20",
"path": ["W", "E"]
},
{
"name": "Firaga",
"pos": "H2",
"type": "Magic",
"price": "150 LP",
"path": ["W"]
}
]
}

View File

@ -24,16 +24,24 @@ impl Board {
pub fn init_routes(&mut self) {
self.routes.iter_mut().for_each(|r| {
r.interaction = match r.color {
DispositionColor::Blue => Interaction::Poke,
DispositionColor::Purple => Interaction::Poke,
DispositionColor::Yellow => Interaction::Rub,
DispositionColor::Green => Interaction::Rub,
Color::Blue => Interaction::Poke,
Color::Purple => Interaction::Poke,
Color::Yellow => Interaction::Rub,
Color::Green => Interaction::Rub,
// Doesn't really matter but I didn't wanna turn this into an Option
Color::SecretGreen => Interaction::Poke,
Color::SecretRed => Interaction::Poke,
}
});
let routes = self.routes.clone();
let routes = self
.routes
.clone()
.into_iter()
.filter(|r| r.id < 100)
.collect_vec();
self.routes.iter_mut().for_each(|r| {
self.routes.iter_mut().filter(|r| r.id < 100).for_each(|r| {
r.tips.iter_mut().for_each(|t| {
let route = routes.iter().find(|r| r.name == t.to);
if let Some(route) = route {
@ -115,6 +123,10 @@ impl Board {
char::from_u32(64 + *i).unwrap_or('0')
}
pub fn get_dispositions(&self) -> Vec<&Route> {
self.routes.iter().filter(|r| r.id < 100).collect_vec()
}
pub fn get_supports(&self) -> Vec<&Ability> {
self.abilities
.iter()
@ -122,10 +134,14 @@ impl Board {
.collect_vec()
}
pub fn get_magics(&self) -> Vec<&Ability> {
pub fn get_commands(&self) -> Vec<&Ability> {
self.abilities
.iter()
.filter(|&ability| ability.r#type == AbilityType::Magic)
.filter(|&ability| {
ability.r#type == AbilityType::Magic
|| ability.r#type == AbilityType::Attack
|| ability.r#type == AbilityType::Support
})
.collect_vec()
}
@ -141,14 +157,14 @@ impl Board {
struct Route {
id: u32,
name: String,
color: DispositionColor,
color: Color,
tips: Vec<Tip>,
#[serde(skip_deserializing)]
interaction: Interaction,
}
#[derive(Debug, Deserialize, PartialEq, Eq, Clone)]
enum DispositionColor {
enum Color {
#[serde(alias = "blue")]
Blue,
#[serde(alias = "purple")]
@ -157,15 +173,23 @@ enum DispositionColor {
Yellow,
#[serde(alias = "green")]
Green,
#[serde(alias = "secret1")]
SecretGreen,
#[serde(alias = "secret2")]
SecretRed,
}
impl Display for DispositionColor {
impl Display for Color {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
DispositionColor::Blue => f.write_str("blue"),
DispositionColor::Purple => f.write_str("purple"),
DispositionColor::Yellow => f.write_str("yellow"),
DispositionColor::Green => f.write_str("green"),
Color::Blue => f.write_str("blue"),
Color::Purple => f.write_str("purple"),
Color::Yellow => f.write_str("yellow"),
Color::Green => f.write_str("green"),
Color::SecretGreen => f.write_str("secret1"),
Color::SecretRed => f.write_str("secret2"),
}
}
}
@ -174,12 +198,12 @@ impl Display for DispositionColor {
struct Tip {
to: String,
#[serde(skip_deserializing, default = "default_disposition_color")]
to_color: DispositionColor,
to_color: Color,
tip: String,
}
fn default_disposition_color() -> DispositionColor {
DispositionColor::Blue
fn default_disposition_color() -> Color {
Color::Blue
}
#[derive(Debug, Deserialize, PartialEq, Eq)]
@ -192,6 +216,8 @@ enum AbilityType {
Support,
Attack,
Magic,
Reprisal,
Defense,
}
type BoardPosition = (u32, u32);

View File

@ -3,7 +3,11 @@
<h2>Stats</h2>
<ul>
{% for val in board.stats %}
<li>x{{+ val.0 +}} {{+ val.1 +}}</li>
{% if val.0 > 1 %}
<li>x{{+ val.0 +}} {{+ val.1 +}}</li>
{% else %}
<li>{{+ val.1 +}}</li>
{% endif %}
{% endfor %}
</ul>
</div>
@ -30,4 +34,15 @@
</ul>
</div>
{% endif %}
{% let commands = board.get_commands() %}
{% if commands.len() > 0 %}
<div>
<h2>Commands</h2>
<ul>
{% for ability in commands %}
<li>{{ ability.name }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>

View File

@ -1,5 +1,10 @@
<h2>Board</h2>
<ul>
<li>Total LP Needed: {{+ board.total_lp +}}</li>
<li>Max Level Needed: {{+ board.max_level +}}</li>
</ul>
<table class="board">
<tbody>
<tr>

View File

@ -1,6 +1,6 @@
<h2>Dispositions</h2>
{% for route in board.routes %}
{% for route in board.get_dispositions() %}
<div class="route">
<div>
<div class="disposition {{+ route.color +}}"></div>
@ -10,7 +10,7 @@
{% for tip in route.tips %}
<li>
<div class="disposition {{+ tip.to_color +}}"></div>
{{+ tip.to +}}: {{+ tip.tip +}}
{{+ tip.to +}} {{+ tip.tip +}}
</li>
{% endfor %}
</ul>

View File

@ -17,7 +17,15 @@
}
.yellow {
background-color: #d6cb35;
background-color: #d3c949;
}
.secret1 {
background-color: #497331;
}
.secret2 {
background-color: #881a22;
}
div.abilities {
@ -187,12 +195,6 @@
{% block content %}
{% for board in boards %}
<h1>{{+ board.spirit +}}</h1>
<ul>
<li>Total LP Needed: {{+ board.total_lp +}}</li>
<li>Max Level Needed: {{+ board.max_level +}}</li>
</ul>
{% include "components/ddd/abilities.html" %}
{% include "components/ddd/dispositions.html" %}
{% include "components/ddd/board.html" %}