diff --git a/Cargo.toml b/Cargo.toml index 4840517..7b14d19 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ resolver = "3" # edition = "2024" # license = "MIT OR Apache-2.0" [workspace.package] -version = "0.3.33" +version = "0.3.34" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/monsters/src/monster_analysis/attack_analysis.rs b/crates/monsters/src/monster_analysis/attack_analysis.rs index f45feeb..08c9030 100644 --- a/crates/monsters/src/monster_analysis/attack_analysis.rs +++ b/crates/monsters/src/monster_analysis/attack_analysis.rs @@ -72,9 +72,14 @@ pub fn attack_player( }) .sum::(); let damage_incoming = avg_damage_incomming; - let damage_tanked = (damage_incoming - (victim.protection + victim.strength) as f64).max(0.0); - let armor_loss = + let mut damage_tanked = + (damage_incoming - (victim.protection + victim.strength) as f64).max(0.0); + let mut armor_loss = (damage_incoming - victim.protection as f64).clamp(0.0, attack.armor_break as f64); + if avg_successes_left > 0. { + armor_loss += attack.antimaterial as f64; + damage_tanked += attack.armor_pierce.min(victim.protection) as f64; + } let report = DamageReport { damage_incoming, damage_tanked, diff --git a/crates/monsters/src/monster_analysis/monster_analysis_structs.rs b/crates/monsters/src/monster_analysis/monster_analysis_structs.rs index 2334dc6..d4edc34 100644 --- a/crates/monsters/src/monster_analysis/monster_analysis_structs.rs +++ b/crates/monsters/src/monster_analysis/monster_analysis_structs.rs @@ -29,6 +29,8 @@ impl From for Vec { target_damage: sub_attack.target_damage_category.into(), target_ab: sub_attack.target_ab_category.into(), target_stance: sub_attack.target_stance.into(), + antimaterial: from_opt_i64(sub_attack.antimaterial.as_ref()), + armor_pierce: from_opt_i64(sub_attack.armor_pierce.as_ref()), } }) .filter(|sub| !sub.damage.is_empty()) @@ -76,6 +78,10 @@ pub struct MonsterBalancingAttack { pub target_ab: ArmorBreakCategory, #[TEXT(name = "stance_t")] pub target_stance: ProfileStance, + #[SKIP(name = "AM")] + pub antimaterial: i64, + #[SKIP(name = "AP")] + pub armor_pierce: i64, } pub struct DamageDone { diff --git a/crates/monsters/src/monster_structs.rs b/crates/monsters/src/monster_structs.rs index ecde404..263aa8e 100644 --- a/crates/monsters/src/monster_structs.rs +++ b/crates/monsters/src/monster_structs.rs @@ -203,6 +203,12 @@ pub struct MonsterSingleAttack { /// Armor_break of the ability. #[INTEGER] pub armor_break: Option, + /// armor_pierce of the ability. + #[INTEGER] + pub armor_pierce: Option, + /// antimaterial of the ability. + #[INTEGER] + pub antimaterial: Option, /// Action‑point cost (used in systems where actions and fatigue are separate). #[INTEGER] pub cost_action: Option, diff --git a/helper_config.toml b/helper_config.toml index cb18b1e..bafd1f8 100644 --- a/helper_config.toml +++ b/helper_config.toml @@ -277,7 +277,7 @@ master_part = ''' {{#each phase as | attack_group |}} \hline {{#each attack_group.attacklist}} -\SetCell{bg={{{../color}}}} & {{{name}}} & {{{attack_type}}} & {{{prerequisites}}} & {{{targetting}}} & {{{cost_fatigue}}} & {{{cost_action}}} & {{{element}}} & {{{damage_fatigue}}} & {{{damage_regular}}} {{{success}}} & {{#if armor_break}} {{{armor_break}}}\arbreakk{} {{/if}} {{{effects}}} & {{{threshold_parry}}} & {{{threshold_dodge}}} \\ +\SetCell{bg={{{../color}}}} & {{{name}}} & {{{attack_type}}} & {{{prerequisites}}} & {{{targetting}}} & {{{cost_fatigue}}} & {{{cost_action}}} & {{{element}}} & {{{damage_fatigue}}} & {{{damage_regular}}} {{{success}}} & {{#if armor_break}} {{{armor_break}}}\arbreakk{} {{/if}}{{#if armor_pierce}} {{{armor_pierce}}}\arpierce{} {{/if}}{{#if antimaterial}} {{{antimaterial}}}\antimateriel{} {{/if}} {{{effects}}} & {{{threshold_parry}}} & {{{threshold_dodge}}} \\ {{/each}} {{#if description_final}}\SetCell{bg={{{color}}}} & \SetCell[c=12]{j} {{{description_final}}} & & & & & & & & & & \\ {{/if}} \hline diff --git a/ravenous_databases b/ravenous_databases index 3bdf694..60223d6 160000 --- a/ravenous_databases +++ b/ravenous_databases @@ -1 +1 @@ -Subproject commit 3bdf69472426e570c987efcf4159600fa019b3cb +Subproject commit 60223d6bc06b5a819d169fbb3d6df739af627f6d