Regex includes the alphanum #160
|
|
@ -16,12 +16,11 @@ Cargo.lock
|
|||
# MSVC Windows builds of rustc generate these, which store debugging information
|
||||
*.pdb
|
||||
|
||||
|
||||
|
||||
# Added by cargo
|
||||
|
||||
/target
|
||||
|
||||
*.html
|
||||
.cargo/
|
||||
.tracey/
|
||||
*.json.gz
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ resolver = "3"
|
|||
# edition = "2024"
|
||||
# license = "MIT OR Apache-2.0"
|
||||
[workspace.package]
|
||||
version = "0.3.21"
|
||||
version = "0.3.23"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ pub(super) enum LineType {
|
|||
// #[regex(r"[\) ]*\(\./[A-z/]+\.tex", |lex| lex.slice().split("(").nth(1).unwrap_or("").to_string())]
|
||||
// #[regex(r"[\) ]*(\[[0-9]+\] )?\(\./[A-z/-_]+\.tex", |lex| lex.slice().split("(").nth(1).unwrap_or("").to_string())]
|
||||
// #[regex(r"[\) 0-9\[\]]*\(\./[A-z/-_]+\.tex", |lex| lex.slice().split("(").nth(1).unwrap_or("").to_string())]
|
||||
#[regex(r"\(\./[A-z/_-]+\.(gls|tex)", |lex| lex.slice().split("(").nth(1).unwrap_or("").to_string())]
|
||||
#[regex(r"\(\./[A-z/0-9_-]+\.(gls|tex)", |lex| lex.slice().split("(").nth(1).unwrap_or("").to_string())]
|
||||
EnteringDocument(String),
|
||||
|
||||
/// Info on the loading of a library
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ pub fn show_balancing_data(
|
|||
table
|
||||
.load_preset(comfy_table::presets::UTF8_FULL_CONDENSED)
|
||||
.apply_modifier(modifiers::UTF8_ROUND_CORNERS)
|
||||
.set_width(120)
|
||||
.set_content_arrangement(comfy_table::ContentArrangement::Dynamic);
|
||||
table.add_row(vec![
|
||||
creature.id.to_cell(),
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ impl From<FullMonster> for Vec<MonsterBalancingAttack> {
|
|||
successes: from_successes(sub_attack.success.as_ref()),
|
||||
armor_break: from_opt_i64(sub_attack.armor_break.as_ref()),
|
||||
action_cost: from_actions(sub_attack.cost_action.as_ref()),
|
||||
fatigue: from_opt_str(sub_attack.damage_fatigue.as_ref()),
|
||||
fatigue: from_opt_fatigue(sub_attack.damage_fatigue.as_ref()),
|
||||
name: sub_attack.name,
|
||||
threshold_parry: from_opt_i64(sub_attack.threshold_parry.as_ref()),
|
||||
threshold_dodge: from_opt_i64(sub_attack.threshold_dodge.as_ref()),
|
||||
|
|
@ -58,7 +58,7 @@ impl PlayerBalancing {
|
|||
pub struct MonsterBalancingAttack {
|
||||
pub name: String,
|
||||
pub damage: Vec<i64>,
|
||||
#[INTEGER(name = "s")]
|
||||
#[INTEGER(name = "r")]
|
||||
pub successes: i64,
|
||||
#[INTEGER(name = "ab")]
|
||||
pub armor_break: i64,
|
||||
|
|
@ -200,6 +200,12 @@ pub(crate) fn from_actions(str: Option<&String>) -> i64 {
|
|||
None => 0,
|
||||
}
|
||||
}
|
||||
pub(crate) fn from_opt_fatigue(str: Option<&String>) -> i64 {
|
||||
match str {
|
||||
Some(str) => str.replace("F", "").parse().unwrap_or_default(),
|
||||
None => 0,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn from_opt_str(str: Option<&String>) -> i64 {
|
||||
match str {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
use crate::monster_analysis::{
|
||||
defense_analysis::DefenseReport, helpers, monster_analysis_structs::Showcase,
|
||||
defense_analysis::DefenseReport,
|
||||
helpers::{self, shorten_string},
|
||||
monster_analysis_structs::Showcase,
|
||||
};
|
||||
use comfy_table::{Color, Table, *};
|
||||
|
||||
|
|
@ -50,6 +52,7 @@ impl ToRow for MonsterBalancingAttack {
|
|||
self.damage.to_cell(),
|
||||
self.successes.to_cell(),
|
||||
self.armor_break.to_cell(),
|
||||
self.fatigue.to_cell(),
|
||||
self.action_cost.to_cell(),
|
||||
self.target_damage.to_cell(),
|
||||
self.target_ab.to_cell(),
|
||||
|
|
@ -97,7 +100,7 @@ impl ToRow for DamageReport {
|
|||
fn to_row(&self) -> Row {
|
||||
vec![
|
||||
match self.showcase {
|
||||
Showcase::Balancing => self.name.to_cell().fg(Color::Green),
|
||||
Showcase::Balancing => shorten_string(&self.name, 24).to_cell().fg(Color::Green),
|
||||
Showcase::Display => self.stance.to_string().to_cell().fg(Color::DarkGrey),
|
||||
},
|
||||
dim_if_not!(
|
||||
|
|
|
|||
|
|
@ -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}}& \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 stats.elemental_bonus_dmg}}& \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 2eb936d1b8b2f2fc897141b1d353692d1bc82476
|
||||
Subproject commit 6b764e823b4b2d1cff73665c23ae05392063689b
|
||||
Loading…
Reference in New Issue