Switch to stable, cleanup
Build Successful The build was successful
Ravenous/ravenous-tools/pipeline/head This commit looks good
Details
Build Successful The build was successful
Ravenous/ravenous-tools/pipeline/head This commit looks good
Details
This commit is contained in:
parent
70cde5aa52
commit
a449407ab4
|
|
@ -6,7 +6,7 @@ resolver = "3"
|
|||
# edition = "2024"
|
||||
# license = "MIT OR Apache-2.0"
|
||||
[workspace.package]
|
||||
version = "0.3.20"
|
||||
version = "0.3.21"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
|
|||
|
|
@ -61,35 +61,20 @@ pub fn attack_player(
|
|||
} + victim.specialty_def;
|
||||
|
||||
let bin = helpers::binomial_dice_distribution(threshold, victim.successes_def);
|
||||
// let successes_left = attack.successes - thld(victim.successes_def, threshold);
|
||||
let avg_successes_left: f64 = bin
|
||||
.iter()
|
||||
.map(|(dice, p)| (attack.successes - dice) as f64 * p)
|
||||
.sum::<f64>();
|
||||
// TODO : Pretty sure
|
||||
// / bin.len() as f64;
|
||||
let avg_damage_incomming: f64 = bin
|
||||
.iter()
|
||||
.map(|(dices, p)| {
|
||||
helpers::how_much_with_succeses(&attack.damage, attack.successes - dices) as f64 * p
|
||||
})
|
||||
.sum::<f64>();
|
||||
// / bin.len() as f64;
|
||||
|
||||
// println!(
|
||||
// "{} DMG:{:?} {:.2?} Left[{avg_successes_left:.2}/{} with {}] = {avg_damage_incomming}",
|
||||
// attack.name, attack.damage, bin, attack.successes, victim.successes_def
|
||||
// );
|
||||
// let mut damage_incoming = how_much_with_succeses(&attack.damage, successes_left);
|
||||
let damage_incoming = avg_damage_incomming;
|
||||
let damage_tanked = (damage_incoming - (victim.protection + victim.strength) as f64).max(0.0);
|
||||
let armor_loss =
|
||||
(damage_incoming - victim.protection as f64).clamp(0.0, attack.armor_break as f64);
|
||||
// if avg_successes_left < 0.0 {
|
||||
// damage_incoming = 0.0;
|
||||
// damage_tanked = 0.0;
|
||||
// armor_loss = 0.0;
|
||||
// }
|
||||
let report = DamageReport {
|
||||
damage_incoming,
|
||||
damage_tanked,
|
||||
|
|
@ -105,7 +90,7 @@ pub fn attack_player(
|
|||
player_health: victim.health,
|
||||
player_integrity: victim.integrity,
|
||||
threshold,
|
||||
attack_successes: attack.fatigue,
|
||||
attack_successes: attack.successes,
|
||||
mode,
|
||||
showcase,
|
||||
fatigue: attack.fatigue,
|
||||
|
|
|
|||
|
|
@ -216,12 +216,12 @@ pub struct DefenseReport {
|
|||
pub damage_per_turn_p1: f64,
|
||||
/// (Actual) Turns needed to reach phase 2.
|
||||
/// Computed from the monster’s health and damage output or from simulation data.
|
||||
#[INTEGER(name = "P1 🠲 P2")]
|
||||
#[REAL(name = "P1 🠲 P2")]
|
||||
pub time_to_p2: f64,
|
||||
/// (Goal) Desired turns to reach phase 2.
|
||||
/// If the current `time_to_p2` exceeds this value, the fight is considered inefficient.
|
||||
#[SKIP]
|
||||
pub time_to_p2_target: i64,
|
||||
pub time_to_p2_target: f64,
|
||||
/// Damage per turn while in phase 2.
|
||||
#[INTEGER(name = "DPT P2")]
|
||||
pub damage_per_turn_p2: f64,
|
||||
|
|
@ -232,14 +232,14 @@ pub struct DefenseReport {
|
|||
/// (Goal) Desired turns to kill the monster.
|
||||
/// If actual `time_to_kill` is larger, you may need to adjust attack power or strategy.
|
||||
#[SKIP]
|
||||
pub time_to_kill_target: i64,
|
||||
pub time_to_kill_target: f64,
|
||||
/// (Goal) Desired turns until the monster’s armor breaks.
|
||||
/// A lower value indicates a more aggressive strategy.
|
||||
#[SKIP(name = "ttAB")]
|
||||
pub time_to_armorbreak_target: i64,
|
||||
pub time_to_armorbreak_target: f64,
|
||||
/// (Goal) Average turns to kill a single player
|
||||
#[SKIP(name = "ttPK")]
|
||||
pub time_to_player_kill: i64,
|
||||
pub time_to_player_kill: f64,
|
||||
/// (Fixed) The number of monsters in a single group.
|
||||
/// Usually `1`, but can be > 1 for bosses that spawn multiple instances.
|
||||
#[SKIP]
|
||||
|
|
|
|||
|
|
@ -249,19 +249,15 @@ impl ToRow for DefenseReport {
|
|||
format!("{:.1?}/{}", self.armor_break_per_turn, self.integrity_p1)
|
||||
.to_cell()
|
||||
.fg(Color::DarkGrey),
|
||||
compare_vals(
|
||||
"t",
|
||||
self.time_to_armorbreak,
|
||||
self.time_to_armorbreak_target as f64,
|
||||
),
|
||||
compare_vals("t", self.time_to_armorbreak, self.time_to_armorbreak_target),
|
||||
format!("{:.1?}/{}", self.damage_per_turn_p1, self.health_p1)
|
||||
.to_cell()
|
||||
.fg(Color::DarkGrey),
|
||||
compare_vals("t", self.time_to_p2, self.time_to_p2_target as f64),
|
||||
compare_vals("t", self.time_to_p2, self.time_to_p2_target),
|
||||
format!("{:.1?}/{}", self.damage_per_turn_p2, self.health_p2)
|
||||
.to_cell()
|
||||
.fg(Color::DarkGrey),
|
||||
compare_vals("t", self.time_to_kill, self.time_to_kill_target as f64),
|
||||
compare_vals("t", self.time_to_kill, self.time_to_kill_target),
|
||||
format!(
|
||||
"[{:.0} & {:.0}] ⇝ {}",
|
||||
self.damage_through_p1,
|
||||
|
|
|
|||
|
|
@ -420,18 +420,18 @@ pub struct CreatureBalancing {
|
|||
#[TEXT]
|
||||
/// (Fixed) HSE profile of the monster (see `ProfileHSE`).
|
||||
pub profile_hse: ProfileHSE,
|
||||
#[INTEGER]
|
||||
#[REAL]
|
||||
/// (Goal) Turns needed to reach phase 2.
|
||||
pub time_to_p2: i64,
|
||||
#[INTEGER]
|
||||
pub time_to_p2: f64,
|
||||
#[REAL]
|
||||
/// (Goal) Turns needed to kill from phase 2.
|
||||
pub time_to_kill: i64,
|
||||
#[INTEGER]
|
||||
pub time_to_kill: f64,
|
||||
#[REAL]
|
||||
/// (Goal) Turns until the monster’s armor breaks.
|
||||
pub time_to_armorbreak: i64,
|
||||
#[INTEGER]
|
||||
pub time_to_armorbreak: f64,
|
||||
#[REAL]
|
||||
/// (GOAL) Avg. turns to kill a single target.
|
||||
pub time_to_player_kill: i64,
|
||||
pub time_to_player_kill: f64,
|
||||
#[REAL]
|
||||
/// (FIXED) Size of a single monster group (usually one).
|
||||
pub monster_groupsize: f64,
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ master_part = '''
|
|||
}
|
||||
& \SetCell[c=2]{c} P1 & & \SetCell[c=2]{c} P2 & & & \SetCell[c=7]{c} Stats & & & & & & & & \SetCell[c=4]{c} Mouvement & & & & & Extra & \\
|
||||
\cline{2-3} \cline{4-5} \cline{7-13} \cline{15-18} \cline{20-21}
|
||||
\rb{Initiative} & \rb{Valeur} & \rb{Actions} & \rb{Valeur} & \rb{Actions} & & \rb{Force} & \rb{Perception} & \rb{Volonté} & \rb{Res Alt} & \rb{Torque} & \rb{Vigilance} & \rb{Fatigue} & & \rb{Marche} & \rb{Trot} & \rb{Course} & \rb{Vol} & & \rb{Bon. Phy} {{#if elemental_bonus_dmg}}& \rb{Bon. Élém} {{/if}}\\
|
||||
\rb{Initiative} & \rb{Valeur} & \rb{Actions} & \rb{Valeur} & \rb{Actions} & & \rb{Force} & \rb{Perception} & \rb{Volonté} & \rb{Res Alt} & \rb{Torque} & \rb{Vigilance} & \rb{Fatigue} & & \rb{Marche} & \rb{Trot} & \rb{Course} & \rb{Vol} & & \rb{Bon. Phy} {{#if elemental_bonus}}& \rb{Bon. Élém} {{/if}}\\
|
||||
{{#each init_full}}
|
||||
{{#if @index}}
|
||||
\SetCell{font=\footnotesize} $t_{{(plus @index 1)}} $ & ${{{p1_value}}} $ & {{{pt1_actions}}} & ${{{p2_value}}} $ & {{{p2_actions}}} \\
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit b1532527561263e6ae23b8e5a0fe6d4acc52b553
|
||||
Subproject commit 2eb936d1b8b2f2fc897141b1d353692d1bc82476
|
||||
Loading…
Reference in New Issue