Added all the KH3 enemies and a page for them

master
Wynd 2025-07-08 00:47:18 +03:00
parent 7863a5519e
commit ee877c9b83
47 changed files with 1100 additions and 43 deletions

View File

@ -1,8 +1,13 @@
name = "Berserker"
kind = "nobody"
[[world]]
name = "Twilight Town"
rooms = ["The Old Mansion: Battlegate 3"]
[[world]]
name = "Arendelle"
rooms = ["Middle Tier: Battlegate 9"]
[[drops]]
name = "Betwixt Crystal"

View File

@ -0,0 +1,34 @@
name = "Magic Popcat"
[[world]]
name = "Toy Box"
[[world]]
name = "Arendelle"
[[drops]]
name = "Wellspring Stone"
kind = "material"
chance = 8
[drops.material]
category = "wellspring"
kind = "stone"
[[drops]]
name = "Hungry Shard"
kind = "material"
chance = 8
[drops.material]
category = "hungry"
kind = "shard"
[[drops]]
name = "Hungry Stone"
kind = "material"
chance = 4
[drops.material]
category = "hungry"
kind = "stone"

View File

@ -0,0 +1,25 @@
name = "Malachite Bolero"
[[world]]
name = "Kingdom of Corona"
[[world]]
name = "The Caribbean"
[[drops]]
name = "Lucid Stone"
kind = "material"
chance = 12
[drops.material]
category = "lucid"
kind = "stone"
[[drops]]
name = "Lucid Gem"
kind = "material"
chance = 6
[drops.material]
category = "lucid"
kind = "gem"

View File

@ -0,0 +1,25 @@
name = "Marine Rumba"
[[world]]
name = "Kingdom of Corona"
[[world]]
name = "The Caribbean"
[[drops]]
name = "Soothing Stone"
kind = "material"
chance = 12
[drops.material]
category = "soothing"
kind = "stone"
[[drops]]
name = "Soothing Gem"
kind = "material"
chance = 6
[drops.material]
category = "soothing"
kind = "gem"

View File

@ -0,0 +1,22 @@
name = "Marionette"
[[world]]
name = "Toy Box"
[[drops]]
name = "Lightning Shard"
kind = "material"
chance = 12
[drops.material]
category = "lightning"
kind = "shard"
[[drops]]
name = "Lightning Stone"
kind = "material"
chance = 6
[drops.material]
category = "lightning"
kind = "stone"

View File

@ -0,0 +1,31 @@
name = "Mechanitaur"
[[world]]
name = "San Fransokyo"
[[drops]]
name = "Wellspring Gem"
kind = "material"
chance = 12
[drops.material]
category = "wellspring"
kind = "gem"
[[drops]]
name = "Hungry Crystal"
kind = "material"
chance = 8
[drops.material]
category = "hungry"
kind = "crystal"
[[drops]]
name = "Writhing Crystal"
kind = "material"
chance = 8
[drops.material]
category = "writhing"
kind = "crystal"

View File

@ -0,0 +1,22 @@
name = "Metal Troll"
[[world]]
name = "San Fransokyo"
[[drops]]
name = "Wellspring Stone"
kind = "material"
chance = 30
[drops.material]
category = "wellspring"
kind = "stone"
[[drops]]
name = "Wellspring Gem"
kind = "material"
chance = 20
[drops.material]
category = "wellspring"
kind = "gem"

View File

@ -0,0 +1,34 @@
name = "Munny Popcat"
[[world]]
name = "Toy Box"
[[world]]
name = "Kingdom of Corona"
[[drops]]
name = "Wellspring Stone"
kind = "material"
chance = 8
[drops.material]
category = "wellspring"
kind = "stone"
[[drops]]
name = "Hungry Shard"
kind = "material"
chance = 8
[drops.material]
category = "hungry"
kind = "shard"
[[drops]]
name = "Hungry Stone"
kind = "material"
chance = 4
[drops.material]
category = "hungry"
kind = "stone"

View File

@ -0,0 +1,31 @@
name = "Neoshadow"
[[world]]
name = "San Fransokyo"
[[drops]]
name = "Writhing Stone"
kind = "material"
chance = 8
[drops.material]
category = "writhing"
kind = "stone"
[[drops]]
name = "Wellspring Stone"
kind = "material"
chance = 8
[drops.material]
category = "wellspring"
kind = "stone"
[[drops]]
name = "Writhing Gem"
kind = "material"
chance = 4
[drops.material]
category = "writhing"
kind = "gem"

View File

@ -0,0 +1,32 @@
name = "Ninja"
kind = "nobody"
[[world]]
name = "Arendelle"
[[drops]]
name = "Betwixt Stone"
kind = "material"
chance = 18
[drops.material]
category = "betwixt"
kind = "stone"
[[drops]]
name = "Betwixt Gem"
kind = "material"
chance = 12
[drops.material]
category = "betwixt"
kind = "gem"
[[drops]]
name = "Betwixt Crystal"
kind = "material"
chance = 6
[drops.material]
category = "betwixt"
kind = "crystal"

View File

@ -0,0 +1,31 @@
name = "Parasol Beauty"
[[world]]
name = "Kingdom of Corona"
[[drops]]
name = "Wellspring Shard"
kind = "material"
chance = 12
[drops.material]
category = "wellspring"
kind = "shard"
[[drops]]
name = "Wellspring Stone"
kind = "material"
chance = 8
[drops.material]
category = "wellspring"
kind = "stone"
[[drops]]
name = "Hungry Stone"
kind = "material"
chance = 4
[drops.material]
category = "hungry"
kind = "stone"

View File

@ -0,0 +1,31 @@
name = "Patchwork Animals"
[[world]]
name = "Toy Box"
[[drops]]
name = "Wellspring Shard"
kind = "material"
chance = 12
[drops.material]
category = "wellspring"
kind = "shard"
[[drops]]
name = "Wellspring Stone"
kind = "material"
chance = 4
[drops.material]
category = "wellspring"
kind = "stone"
[[drops]]
name = "Hungry Shard"
kind = "material"
chance = 8
[drops.material]
category = "hungry"
kind = "shard"

View File

@ -0,0 +1,31 @@
name = "Pogo Shovel"
[[world]]
name = "San Fransokyo"
[[drops]]
name = "Pulsing Gem"
kind = "material"
chance = 8
[drops.material]
category = "pulsing"
kind = "gem"
[[drops]]
name = "Wellspring Stone"
kind = "material"
chance = 8
[drops.material]
category = "wellspring"
kind = "stone"
[[drops]]
name = "Wellspring Gem"
kind = "material"
chance = 4
[drops.material]
category = "wellspring"
kind = "gem"

View File

@ -0,0 +1,31 @@
name = "Pole Cannon"
[[world]]
name = "San Fransokyo"
[[drops]]
name = "Blazing Shard"
kind = "material"
chance = 12
[drops.material]
category = "blazing"
kind = "shard"
[[drops]]
name = "Blazing Stone"
kind = "material"
chance = 6
[drops.material]
category = "blazing"
kind = "stone"
[[drops]]
name = "Wellspring Stone"
kind = "material"
chance = 4
[drops.material]
category = "wellspring"
kind = "stone"

View File

@ -0,0 +1,25 @@
name = "Popcat"
[[world]]
name = "Olympus"
[[world]]
name = "Arendelle"
[[drops]]
name = "Hungry Shard"
kind = "material"
chance = 8
[drops.material]
category = "hungry"
kind = "shard"
[[drops]]
name = "Hungry Stone"
kind = "material"
chance = 4
[drops.material]
category = "hungry"
kind = "stone"

View File

@ -0,0 +1,31 @@
name = "Powerwild"
[[world]]
name = "The Carribean"
[[drops]]
name = "Pulsing Shard"
kind = "material"
chance = 12
[drops.material]
category = "pulsing"
kind = "shard"
[[drops]]
name = "Pulsing Stone"
kind = "material"
chance = 6
[drops.material]
category = "pulsing"
kind = "stone"
[[drops]]
name = "Wellspring Shard"
kind = "material"
chance = 8
[drops.material]
category = "wellspring"
kind = "shard"

View File

@ -0,0 +1,22 @@
name = "Puffball"
[[world]]
name = "Kingdom of Corona"
[[drops]]
name = "Lucid Shard"
kind = "material"
chance = 8
[drops.material]
category = "lucid"
kind = "shard"
[[drops]]
name = "Lucid Stone"
kind = "material"
chance = 4
[drops.material]
category = "lucid"
kind = "stone"

View File

@ -0,0 +1,32 @@
name = "Reaper"
kind = "nobody"
[[world]]
name = "Kingdom of Corona"
[[drops]]
name = "Betwixt Shard"
kind = "material"
chance = 18
[drops.material]
category = "betwixt"
kind = "shard"
[[drops]]
name = "Betwixt Stone"
kind = "material"
chance = 12
[drops.material]
category = "betwixt"
kind = "stone"
[[drops]]
name = "Betwixt Gem"
kind = "material"
chance = 8
[drops.material]
category = "betwixt"
kind = "gem"

View File

@ -0,0 +1,22 @@
name = "Rock Troll"
[[world]]
name = "Olympus"
[[drops]]
name = "Wellspring Stone"
kind = "material"
chance = 30
[drops.material]
category = "wellspring"
kind = "stone"
[[drops]]
name = "Wellspring Gem"
kind = "material"
chance = 20
[drops.material]
category = "wellspring"
kind = "gem"

View File

@ -0,0 +1,34 @@
name = "Satyr"
[[world]]
name = "Olympus"
[[world]]
name = "Arendelle"
[[drops]]
name = "Pulsing Stone"
kind = "material"
chance = 8
[drops.material]
category = "pulsing"
kind = "stone"
[[drops]]
name = "Pulsing Gem"
kind = "material"
chance = 4
[drops.material]
category = "pulsing"
kind = "gem"
[[drops]]
name = "Wellspring Shard"
kind = "material"
chance = 8
[drops.material]
category = "wellspring"
kind = "shard"

View File

@ -0,0 +1,94 @@
name = "Sea Sprite"
[[world]]
name = "The Caribbean"
[[drops]]
name = "Frost Stone"
kind = "material"
chance = 12
info = "When blue"
[drops.material]
category = "frost"
kind = "stone"
[[drops]]
name = "Frost Gem"
kind = "material"
chance = 6
info = "When blue"
[drops.material]
category = "frost"
kind = "gem"
[[drops]]
name = "Blazing Stone"
kind = "material"
chance = 12
info = "When red"
[drops.material]
category = "blazing"
kind = "stone"
[[drops]]
name = "Blazing Gem"
kind = "material"
chance = 6
info = "When red"
[drops.material]
category = "blazing"
kind = "gem"
[[drops]]
name = "Lightning Stone"
kind = "material"
chance = 12
info = "When yellow"
[drops.material]
category = "lightning"
kind = "stone"
[[drops]]
name = "Lightning Gem"
kind = "material"
chance = 6
info = "When yellow"
[drops.material]
category = "lightning"
kind = "gem"
[[drops]]
name = "Soothing Stone"
kind = "material"
chance = 12
info = "When iridescent"
[drops.material]
category = "soothing"
kind = "stone"
[[drops]]
name = "Soothing Gem"
kind = "material"
chance = 6
info = "When iridescent"
[drops.material]
category = "soothing"
kind = "gem"
[[drops]]
name = "Wellspring Gem"
kind = "material"
chance = 8
info = "When iridescent"
[drops.material]
category = "wellspring"
kind = "gem"

View File

@ -0,0 +1,22 @@
name = "Shadow"
[[world]]
name = "Dark World"
[[drops]]
name = "Writhing Shard"
kind = "material"
chance = 8
[drops.material]
category = "writhing"
kind = "shard"
[[drops]]
name = "Writhing Stone"
kind = "material"
chance = 4
[drops.material]
category = "writhing"
kind = "stone"

View File

@ -0,0 +1,23 @@
name = "Sniper"
kind = "nobody"
[[world]]
name = "Arendelle"
[[drops]]
name = "Betwixt Shard"
kind = "material"
chance = 18
[drops.material]
category = "betwixt"
kind = "shard"
[[drops]]
name = "Betwixt Stone"
kind = "material"
chance = 12
[drops.material]
category = "betwixt"
kind = "stone"

View File

@ -0,0 +1,31 @@
name = "Soldier"
[[world]]
name = "Olympus"
[[drops]]
name = "Pulsing Shard"
kind = "material"
chance = 8
[drops.material]
category = "pulsing"
kind = "shard"
[[drops]]
name = "Lightning Shard"
kind = "material"
chance = 8
[drops.material]
category = "lightning"
kind = "shard"
[[drops]]
name = "Wellspring Shard"
kind = "material"
chance = 4
[drops.material]
category = "wellspring"
kind = "shard"

View File

@ -0,0 +1,23 @@
name = "Sorcerer"
kind = "nobody"
[[world]]
name = "Twilight Town"
[[drops]]
name = "Twilight Crystal"
kind = "material"
chance = 80
[drops.material]
category = "twilight"
kind = "crystal"
[[drops]]
name = "Hungry Crystal"
kind = "material"
chance = 20
[drops.material]
category = "hungry"
kind = "crystal"

View File

@ -0,0 +1,31 @@
name = "Spear Lizard"
[[world]]
name = "The Caribbean"
[[drops]]
name = "Soothing Stone"
kind = "material"
chance = 8
[drops.material]
category = "soothing"
kind = "stone"
[[drops]]
name = "Soothing Gem"
kind = "material"
chance = 4
[drops.material]
category = "soothing"
kind = "gem"
[[drops]]
name = "Soothing Crystal"
kind = "material"
chance = 2
[drops.material]
category = "soothing"
kind = "crystal"

View File

@ -0,0 +1,32 @@
name = "Spiked Turtletoad"
kind = "unversed"
[[world]]
name = "Monstropolis"
[[drops]]
name = "Sinister Crystal"
kind = "material"
chance = 20
[drops.material]
category = "sinister"
kind = "crystal"
[[drops]]
name = "Wellspring Gem"
kind = "material"
chance = 10
[drops.material]
category = "wellspring"
kind = "gem"
[[drops]]
name = "Pulsing Gem"
kind = "material"
chance = 8
[drops.material]
category = "pulsing"
kind = "gem"

View File

@ -0,0 +1,31 @@
name = "Supreme Smasher"
[[world]]
name = "Toy Box"
[[drops]]
name = "Wellspring Shard"
kind = "material"
chance = 162
[drops.material]
category = "wellspring"
kind = "shard"
[[drops]]
name = "Wellspring Stone"
kind = "material"
chance = 8
[drops.material]
category = "wellspring"
kind = "stone"
[[drops]]
name = "Hungry Shard"
kind = "material"
chance = 8
[drops.material]
category = "hungry"
kind = "shard"

View File

@ -0,0 +1,31 @@
name = "Tireblade"
[[world]]
name = "San Fransokyo"
[[drops]]
name = "Lightning Stone"
kind = "material"
chance = 8
[drops.material]
category = "lightning"
kind = "stone"
[[drops]]
name = "Lightning Gem"
kind = "material"
chance = 4
[drops.material]
category = "lightning"
kind = "gem"
[[drops]]
name = "Lightning Crystal"
kind = "material"
chance = 2
[drops.material]
category = "lightning"
kind = "crystal"

View File

@ -0,0 +1,23 @@
name = "Turtletoad"
kind = "unversed"
[[world]]
name = "Monstropolis"
[[drops]]
name = "Sinister Gem"
kind = "material"
chance = 16
[drops.material]
category = "sinister"
kind = "gem"
[[drops]]
name = "Wellspring Stone"
kind = "material"
chance = 8
[drops.material]
category = "wellspring"
kind = "stone"

View File

@ -0,0 +1,31 @@
name = "Vaporfly"
[[world]]
name = "The Caribbean"
[[drops]]
name = "Lucid Stone"
kind = "material"
chance = 8
[drops.material]
category = "lucid"
kind = "stone"
[[drops]]
name = "Lucid Gem"
kind = "material"
chance = 6
[drops.material]
category = "lucid"
kind = "gem"
[[drops]]
name = "Wellspring Gem"
kind = "material"
chance = 4
[drops.material]
category = "wellspring"
kind = "gem"

View File

@ -0,0 +1,22 @@
name = "Vermilion Samba"
[[world]]
name = "Monstropolis"
[[drops]]
name = "Blazing Stone"
kind = "material"
chance = 12
[drops.material]
category = "blazing"
kind = "stone"
[[drops]]
name = "Blazing Gem"
kind = "material"
chance = 6
[drops.material]
category = "blazing"
kind = "gem"

View File

@ -0,0 +1,34 @@
name = "Vitality Popcat"
[[world]]
name = "Toy Box"
[[world]]
name = "Arendelle"
[[drops]]
name = "Wellspring Stone"
kind = "material"
chance = 8
[drops.material]
category = "wellspring"
kind = "stone"
[[drops]]
name = "Hungry Shard"
kind = "material"
chance = 8
[drops.material]
category = "hungry"
kind = "shard"
[[drops]]
name = "Hungry Stone"
kind = "material"
chance = 4
[drops.material]
category = "hungry"
kind = "stone"

View File

@ -0,0 +1,28 @@
name = "Water Core"
[[world]]
name = "Olympus"
[[world]]
name = "Kingdom of Corona"
[[world]]
name = "The Caribbean"
[[drops]]
name = "Soothing Shard"
kind = "material"
chance = 15
[drops.material]
category = "soothing"
kind = "shard"
[[drops]]
name = "Soothing Stone"
kind = "material"
chance = 10
[drops.material]
category = "soothing"
kind = "stone"

View File

@ -0,0 +1,22 @@
name = "Winterhorn"
[[world]]
name = "Arendelle"
[[drops]]
name = "Frost Shard"
kind = "material"
chance = 16
[drops.material]
category = "frost"
kind = "shard"
[[drops]]
name = "Frost Stone"
kind = "material"
chance = 8
[drops.material]
category = "frost"
kind = "stone"

View File

@ -1,12 +0,0 @@
import {
init,
kindFilter,
showOnlyTracked,
track,
} from "../common/mat-kind-filter.js";
document.addEventListener("DOMContentLoaded", (event) => {
init();
});
Object.assign(window, { track });

View File

@ -11,6 +11,7 @@
.enemy {
display: flex;
cursor: pointer;
}
.drop {

View File

@ -1 +0,0 @@
@import url("../common/drops.css");

View File

@ -1 +0,0 @@
@import url("../common/drops.css");

View File

@ -322,7 +322,7 @@ impl MaterialDrops {
return GENERIC_MATERIAL_ICON.to_string();
}
let category = self.category.get_category(game);
let category = self.category.get_texture_group();
let kind = self.kind.to_string();
let path = format!(
"{}/materials/{}/{}.webp",
@ -330,7 +330,7 @@ impl MaterialDrops {
);
let path = path::Path::new(&path);
if path.exists() {
format!("{}/{}", self.category.get_category(game), self.kind)
format!("{}/{}", self.category.get_texture_group(), self.kind)
} else {
GENERIC_MATERIAL_ICON.to_string()
}

View File

@ -1,12 +1,26 @@
use askama::Template;
use food::Recipes;
use itertools::Itertools;
use crate::{RuntimeModule, create_file};
use crate::{
RuntimeModule,
common::{Game, enemy::Enemy, materials::MaterialDrops},
create_file,
};
mod food;
const ENEMIES_PATH: &str = "./input/kh3/enemies";
const RECIPES_PATH: &str = "./input/kh3/recipes.toml";
#[derive(Template)]
#[template(path = "pages/kh3/drops.html")]
struct DropsTemplate {
pub game: Game,
pub drops: Vec<MaterialDrops>,
pub material_kinds: Vec<String>,
}
#[derive(Template)]
#[template(path = "pages/kh3/food-sim.html")]
struct RecipesTemplate {
@ -17,10 +31,29 @@ pub struct Module;
impl RuntimeModule for Module {
fn start_module() {
tracing::info!("Loading enemy data from {}", ENEMIES_PATH);
let enemies = Enemy::import(ENEMIES_PATH);
let drops = MaterialDrops::new(enemies);
let material_kinds = drops
.iter()
.map(|d| d.category.get_category(&Game::Kh3))
.dedup()
.collect();
tracing::info!("Loading recipes data from {}", RECIPES_PATH);
let recipes_str = std::fs::read_to_string(RECIPES_PATH).unwrap();
let recipes = toml::from_str::<Recipes>(&recipes_str).unwrap();
tracing::info!("Generating the KH3 drops template");
let drops_template = DropsTemplate {
game: Game::Kh3,
drops,
material_kinds,
};
create_file("./out/kh3", "drops", drops_template).unwrap();
tracing::info!("Generating the KH3 recipes template");
let food_template = RecipesTemplate { recipes };

View File

@ -0,0 +1,11 @@
{% include "components/common/only-tracked-filter.html" %}
<br />
{% include "components/common/kind-filters.html" %}
<br />
{% for drop in drops %}
{% call macros::drop("shard") %}
{% call macros::drop("stone") %}
{% call macros::drop("gem") %}
{% call macros::drop("crystal") %}
{% endfor %}

View File

@ -23,6 +23,7 @@
{% if cfg!(feature = "kh3") %}
<h1>Kingdom Hearts III</h1>
<ul>
<li><a href="./kh3/drops.html">Material Drops</a></li>
<li><a href="./kh3/food-sim.html">Food Simulator</a></li>
</ul>
{% endif %}

View File

@ -4,23 +4,13 @@
{% block title %}KH1 - Drops{% endblock %}
{% block head %}
<link rel="stylesheet" href="{{ crate::find_hash("/public/styles/kh1/drops.css") }}"></link>
<link rel="stylesheet" href="{{ crate::find_hash("/public/styles/common/drops.css") }}"></link>
<script
type="module"
src="{{ crate::find_hash("/public/scripts/kh1/drops.js") }}"
src="{{ crate::find_hash("/public/scripts/common/drops.js") }}"
></script>
{% endblock %}
{% block content %}
{% include "components/common/only-tracked-filter.html" %}
<br />
{% include "components/common/kind-filters.html" %}
<br />
{% for drop in drops %}
{% call macros::drop("shard") %}
{% call macros::drop("stone") %}
{% call macros::drop("gem") %}
{% call macros::drop("crystal") %}
{% endfor %}
{% include "components/common/drops.html" %}
{% endblock %}

View File

@ -4,23 +4,13 @@
{% block title %}KH2 - Drops{% endblock %}
{% block head %}
<link rel="stylesheet" href="{{ crate::find_hash("/public/styles/kh2/drops.css") }}"></link>
<link rel="stylesheet" href="{{ crate::find_hash("/public/styles/common/drops.css") }}"></link>
<script
type="module"
src="{{ crate::find_hash("/public/scripts/kh2/drops.js") }}"
src="{{ crate::find_hash("/public/scripts/common/drops.js") }}"
></script>
{% endblock %}
{% block content %}
{% include "components/common/only-tracked-filter.html" %}
<br />
{% include "components/common/kind-filters.html" %}
<br />
{% for drop in drops %}
{% call macros::drop("shard") %}
{% call macros::drop("stone") %}
{% call macros::drop("gem") %}
{% call macros::drop("crystal") %}
{% endfor %}
{% include "components/common/drops.html" %}
{% endblock %}

View File

@ -0,0 +1,16 @@
{% extends "layouts/base.html" %}
{% import "macros/common/macros.html" as macros %}
{% block title %}KH2 - Drops{% endblock %}
{% block head %}
<link rel="stylesheet" href="{{ crate::find_hash("/public/styles/common/drops.css") }}"></link>
<script
type="module"
src="{{ crate::find_hash("/public/scripts/common/drops.js") }}"
></script>
{% endblock %}
{% block content %}
{% include "components/common/drops.html" %}
{% endblock %}