Minor fixes

This commit is contained in:
Dandaedre 2026-07-26 19:22:31 +02:00
parent 7be200c749
commit 44db2ca294
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
3 changed files with 12 additions and 13 deletions

View File

@ -37,7 +37,7 @@ pub fn show_balancing_data(
table.add_row(vec![
creature.id.to_cell(),
match creature.balancing.monster_groupsize {
0 | 1 => creature.name.clone(),
1. => creature.name.clone(),
n => format!("{} x {}", creature.name, n),
}
.to_cell()

View File

@ -24,8 +24,7 @@ pub(crate) fn display_player_attacks(
.body_parts
.iter()
.map(|body_part| {
let ratio = creature.balancing.monster_groupsize as f64
/ creature.balancing.player_groupsize as f64;
let ratio = creature.balancing.monster_groupsize / creature.balancing.player_groupsize;
let damage_done_p1 =
damage_done_to_part(body_part, &profiles[&ProfileStance::Neutral], Phases::P1);
let damage_done_p2 =
@ -244,10 +243,10 @@ pub struct DefenseReport {
/// (Fixed) The number of monsters in a single group.
/// Usually `1`, but can be > 1 for bosses that spawn multiple instances.
#[SKIP]
pub monster_groupsize: i64,
pub monster_groupsize: f64,
/// (Fixed) Number of players this fight was designed for.
#[SKIP]
pub player_groupsize: i64,
pub player_groupsize: f64,
/// (Fixed) Health points during phase 1.
#[SKIP]
pub health_p1: i64,

View File

@ -57,7 +57,7 @@ pub struct FullMonster {
}
/// One row from the `creature` table.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, FieldsAsSlice)]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, FieldsAsSlice)]
pub struct CreatureData {
/// Primary key – auto‑incremented by SQLite.
#[INTEGER]
@ -74,8 +74,8 @@ pub struct CreatureData {
#[TEXT]
pub image: String,
/// The HSE danger level
#[INTEGER]
pub danger_level: i64,
#[REAL]
pub danger_level: f64,
/// The footprints and such
#[TEXT]
pub traces: Option<String>,
@ -413,7 +413,7 @@ pub struct CreatureStats {
pub blood_carve: i64,
}
/// Balancing metadata for a creature.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, FieldsAsSlice)]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, FieldsAsSlice)]
pub struct CreatureBalancing {
#[INTEGER]
pub creature_id: i64,
@ -432,12 +432,12 @@ pub struct CreatureBalancing {
#[INTEGER]
/// (GOAL) Avg. turns to kill a single target.
pub time_to_player_kill: i64,
#[INTEGER]
#[REAL]
/// (FIXED) Size of a single monster group (usually one).
pub monster_groupsize: i64,
#[INTEGER]
pub monster_groupsize: f64,
#[REAL]
/// (FIXED) The number of players this fight was designed for
pub player_groupsize: i64,
pub player_groupsize: f64,
}
/// Balancing info on all the player depending on their level