diff --git a/.gitmodules b/.gitmodules index 4fb3f36..952b3ce 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "ravenous_databases"] path = ravenous_databases # url = git@git.dandaedre.com:Ravenous/ravenous_databases.git - url = https://proxy.dandaedre.com/gitea/Ravenous/ravenous-tools.git + url = https://proxy.dandaedre.com/gitea/Ravenous/ravenous_databases.git diff --git a/badges/testmonster.tex b/badges/testmonster.tex new file mode 100644 index 0000000..002f688 --- /dev/null +++ b/badges/testmonster.tex @@ -0,0 +1,113 @@ +\begin{tblr}{ + vspan=even, hspan=minimal, + colspec={X[-1] X[-1]}, + cell{1}{1}={c=2}{c}, + } + +\includegraphics[height=5cm] ./bob.png & \\ +& \\ +Nom & Bobifron 3000 \\ +Dénomination & \\ +Calamité & Yanouïlle \\ +Niveau de danger (HSE) & 9001 \\ +& \\ +Habitat & \SetCell{font=\footnotesize} House \\ +Dysmorphisme & \SetCell{font=\footnotesize} \\ +Couleurs & \SetCell{font=\footnotesize} 7 \\ +Réaction à l'homme & \SetCell{font=\footnotesize} 8 \\ +Variantes & \SetCell{font=\footnotesize} 8\\ +Mœurs & \SetCell{font=\footnotesize} 9 \\ +\end{tblr} +\vfill +\begin{tblr}{ + colspec={X[-1]}, + hline{2,4,6}, + row{2,4,6}={font=\footnotesize} + } +\textbf{Description} \\ +9 \\ +\textbf{Annotations} \\ +8 \\ +\textbf{Récompenses} \\ +\end{tblr} +\begin{tblr}{ + colspec={X[-1] X[-1,c] X[-1,j]}, + vspan=even, hspan=minimal, + row{1-Z}={font=\footnotesize}, + rows={m}, +} + \SetCell[c=2]{j} Sang (base, combat, dépeçage) & & 10, 5, 5 \\ + Larewoard & Reward & 4\blood{}, 4\Tox. Gives much love. \\ +\end{tblr} +\vfill +\begin{tblr}{ + colspec={X[l,-1] X[-1] X[-1] X[] X[] X[-1] X[-1] X[] X[]}, + rowspec={X[t] X[t,c] X[c,2em] X[c,2em] X[c,2em] X[c,2em] X[c,2em] X[c,2em] X[c,2em] X[c,2em] X[c,2em] X[j,5em]}, + hspan=minimal, + cell{1}{2}={c=4}{c}, + cell{1}{6}={c=4}{c}, + row{2,12}={font=\footnotesize}, + vline{6} = {2-11}{solid}, +} + & P1 & & & & P2 & \\ + & Seuil & Prot & Intégrité & PV & Seuil & Prot & Intégrité & PV\\ +\hline +\SetCell{font=\footnotesize} VV & $1$ & $2$ & \SetCell{r,f}\tiny$3$ & \SetCell{r,f}\tiny$4$ & $5$ & $6$ & \SetCell{r,f}\tiny$7$ & \SetCell{r,f}\tiny$8$\\ \hline +\SetCell[c=9]{j,h} {\textbf{Notes} \\ \\ +\hline +\end{tblr} \center{ +\begin{tblr}{ + colspec={Q[3.5em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em]}, + rowspec={Q[c,f] Q[c,m] Q[c] Q[c] Q[c] Q[c] Q[c] Q[c] Q[c] Q[c] Q[c]}, + row{3-11}={font=\tiny}, +} + & & & & & & & \small{*} & & & & \small{*} & \small{*} & \\ +\SetCell{c} Res & \slash & \pierce & \blunt & \symceleste & \symfire & \symearth & \symwood & \symmagma & \symabyss & \symwater & \symwind & \symice & \symthunder \\ +\hline + \SetCell{font=\footnotesize} & $9$ & $$ & $10$ & $12$ & $13$ & $15$ & $16$ & $14$ & $$ & $19$ & $18$ & $20$ & $21$ \\ + \end{tblr}\begin{tblr}{ + colspec={c c c c c c c c c c c c c c c c c c c}, + row{2}={font=\footnotesize}, + row{3-6}={font=\tiny}, +} + & \SetCell[c=2]{c} P1 & & \SetCell[c=2]{c} P2 & & & \SetCell[c=7]{c} Stats & & & & & & & & \SetCell[c=4]{c} Mouvement & & & & \\ + \cline{2-3} \cline{4-5} \cline{7-13} \cline{15-18} +\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} \\ +\SetCell{font=\footnotesize}$t_1$ & ${{p1_init}}$ & $4$A & ${{p2_init}}$ & $4$A & & ${{strength}}$ & ${{perception}}$ & ${{willpower}}$ & ${{alteration_resistance}}$ & ${{torque}}$ & ${{awareness}}$ & ${{fatigue}}$ & & ${{mvt_walk}}$ & ${{mvt_trot}}$ & ${{mvt_run}}$ & ${{mvt_flight}}$ \\ +\begin{tblr}{ + colspec={c c c c c c c c c c c c c c c c c c c}, + row{2}={font=\footnotesize}, + row{3-6}={font=\tiny}, +} + & \SetCell[c=2]{c} P1 & & \SetCell[c=2]{c} P2 & & & \SetCell[c=7]{c} Stats & & & & & & & & \SetCell[c=4]{c} Mouvement & & & & \\ + \cline{2-3} \cline{4-5} \cline{7-13} \cline{15-18} +\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} \\ +\SetCell{font=\footnotesize}$t_1$ & $500$ & $4$A & $22$ & $4$A & & $8$ & $6$ & $5$ & $4$ & $40$ & $6$ & $20$ & & $10$ & $20$ & $50$ & $0$ \\ +\SetCell{font=\footnotesize}$t_2$ & $10$ & & $12$ & 52A \\ +\SetCell{font=\footnotesize}$t_3$ & $5$ & & $2$ & 21A \\ +\scriptsize{ +\begin{tblr}{ + colspec={X[0.05] X[4,l] X[1,c] X[1,c] X[0.3,c] X[0.3,c] X[0.3,c] X[0.3,c] X[0.3,c] X[2,r] X[2,c] X[0.3,c] X[0.3,c]}, + hspan=minimal, + colsep=2pt, + row{2}={font=\tiny}, +} + & & & & & \SetCell[c=2]{c} Coûts & & & \SetCell[c=2]{c} Dégâts & & & \SetCell[c=2]{c} Seuils & \\ +\cline{6-7} \cline{9-10} \cline{12-13} +& \SetCell{c} & {ID} & {Type} & \rb{Ciblage} & \rb{Fatigue} & \rb{Action} & \rb{Élément} & \rb{Fatigue} & \SetCell{c} \rb{Normaux} & {Effets} & \rb{Parade} & \rb{Esquive} \\ +\SetHline{1-13}{solid} + \end{tblr} +} +\vfill +\renewcommand{\rb}{\undefined} + \begin{tblr}{ + colspec={X[7] X[3]}, + rowspec={X[c] X[j,h,8cm]}, + vline{2}, + hline{2}, + row{2}={font=\footnotesize}, +} +Plan de combat & Graphique d'intentions \\ +9 & 7 \\ +\end{tblr} +\vfill diff --git a/crates/config/src/monsters.rs b/crates/config/src/monsters.rs index 663c02b..29caf04 100644 --- a/crates/config/src/monsters.rs +++ b/crates/config/src/monsters.rs @@ -15,23 +15,39 @@ pub struct MonsterConfig { /// Special target pub target: MonsterTarget, + /// A special export path + #[arg(long, default_value = "./Monsters")] + pub destination: String, + /// Database to load from #[arg(short, long, default_value = "./ravenous_databases/monsters.db")] pub database: String, - /// Clean all the artefacts (including generated images) - #[arg(short, long)] + + /// Export the full monsters as full_bestiaire.tex + #[arg(long, default_value_t = false)] + pub master: bool, + + /// Export the player monsters as player_bestiaire.tex + #[arg(long, default_value_t = false)] + pub player: bool, + + /// Export both + #[arg(long, default_value_t = false)] pub all: bool, + // /// Clean all the artefacts (including generated images) + // #[arg(short, long)] + // pub all: bool, } #[derive(ValueEnum, Debug, Clone)] /// The action to execute pub enum MonsterTarget { - /// Clean the generated monsters directory - Clean, + // /// Clean the generated monsters directory + // Clean, /// Generate the monster list Export, - /// Show useful data - Show, + // /// Show useful data + // Show, } /// Configuration data for generating a monster sheet. diff --git a/crates/make/src/makepdf.rs b/crates/make/src/makepdf.rs index 90a2e3e..6573b42 100644 --- a/crates/make/src/makepdf.rs +++ b/crates/make/src/makepdf.rs @@ -30,7 +30,7 @@ use tokio::{ process::Command, }; -use anyhow::{Result, anyhow}; +use anyhow::{Context, Result, anyhow}; use crate::makepdf_functions::{ BuilderParseResult, make_clean, make_file, make_glossaries, make_list, @@ -102,7 +102,7 @@ async fn launch_subprocess( // Specify that we want the command's standard output piped back to us. cmd.stdout(Stdio::piped()); - let mut child = cmd.spawn().expect("Failed to spawn command"); + let mut child = cmd.spawn().context("Failed to spawn command")?; let stdout = child .stdout diff --git a/crates/monsters/src/lib.rs b/crates/monsters/src/lib.rs index 21ae410..e1af0f6 100644 --- a/crates/monsters/src/lib.rs +++ b/crates/monsters/src/lib.rs @@ -14,6 +14,7 @@ //! use crate::monster_export::generate_monsters_tex; +use config::monsters::MonsterTarget; use anyhow::Context; mod monster_database; @@ -32,12 +33,10 @@ pub fn monsters_dispatch(args: &MonsterConfig, config: &Config) -> Result<()> { let connection = Connection::open(&args.database).context(format!("Opening database {}", args.database))?; - generate_monsters_tex(args, config, connection)?; - // templates - // match args.target { - // MonsterTarget::Clean => todo!("implement cleaning logic"), - // MonsterTarget::Export => todo!("implement export logic"), - // MonsterTarget::Show => todo!("implement show logic"), - // } + match args.target { + // MonsterTarget::Clean => unimplemented!("implement cleaning logic"), + MonsterTarget::Export => generate_monsters_tex(args, config, connection)?, + // MonsterTarget::Show => unimplemented!("implement show logic"), + } Ok(()) } diff --git a/crates/monsters/src/monster_export.rs b/crates/monsters/src/monster_export.rs index c1336a0..5423263 100644 --- a/crates/monsters/src/monster_export.rs +++ b/crates/monsters/src/monster_export.rs @@ -8,6 +8,8 @@ use indexmap::IndexMap; use rusqlite::Connection; use serde::Serialize; use std::fmt::Write; +use std::fs::File; +use std::io::Write as OtherWrite; use crate::{ monster_database::fetch_all_data, @@ -33,9 +35,9 @@ macro_rules! template_load { }}; } -pub trait ToTex { - fn export_to_tex(self) -> String; -} +// pub trait ToTex { +// fn export_to_tex(self) -> String; +// } fn load_templates(config: &Config) -> Result> { let mut templates = Handlebars::new(); @@ -65,58 +67,78 @@ pub fn generate_monsters_tex( let all_monsters = fetch_all_data(connection)?; let templates = load_templates(config)?; - let mut out = String::new(); + let mut player_out = String::new(); + let mut master_out = String::new(); let creature = &all_monsters[0]; - write!(out, "{}", templates.render("intro", &creature.data)?)?; + write!(player_out, "{}", templates.render("intro", &creature.data)?)?; write!( - out, + player_out, "{}", templates.render("blood_reward", &creature.stats)? )?; for reward in creature.rewards.rewards.iter() { - write!(out, "{}", templates.render("rewards_row", reward)?)?; + write!(player_out, "{}", templates.render("rewards_row", reward)?)?; } - write!(out, "{}", &config.monster.rewards_end)?; - write!(out, "{}", &config.monster.body_parts_intro)?; - for part in creature.body_parts.body_parts.iter() { - write!(out, "{}", templates.render("body_parts_row", part)?)?; - } - write!( - out, - "{}", - templates.render("body_parts_end", &creature.data)? - )?; - // TODO: Maybe add modularity and not print empty resists - write!(out, "{}", &config.monster.resists_intro)?; - for part in creature.body_parts.body_parts.iter() { - write!(out, "{}", templates.render("resists_row", part)?)?; - } - write!(out, "{}", &config.monster.resists_end)?; - write!(out, "{}", &config.monster.stats)?; - write!(out, "{}", templates.render("stats", &creature.stats)?)?; - for init in MonsterRepetableInitRow::vec_from( - &creature.stats.p1_init, - &creature.stats.p2_init, - &creature.stats.p1_actions, - &creature.stats.p2_actions, - ) - .iter() - .skip(1) - { - write!(out, "{}", templates.render("init_rows", init)?)?; + write!(player_out, "{}", &config.monster.rewards_end)?; + if args.master { + write!(master_out, "{}", &config.monster.body_parts_intro)?; + for part in creature.body_parts.body_parts.iter() { + write!(master_out, "{}", templates.render("body_parts_row", part)?)?; + } + write!( + master_out, + "{}", + templates.render("body_parts_end", &creature.data)? + )?; + // TODO: Maybe add modularity and not print empty resists + write!(master_out, "{}", &config.monster.resists_intro)?; + for part in creature.body_parts.body_parts.iter() { + write!(master_out, "{}", templates.render("resists_row", part)?)?; + } + write!(master_out, "{}", &config.monster.resists_end)?; + write!( + master_out, + "{}", + templates.render("stats", &creature.stats)? + )?; + for init in MonsterRepetableInitRow::vec_from( + &creature.stats.p1_init, + &creature.stats.p2_init, + &creature.stats.p1_actions, + &creature.stats.p2_actions, + ) + .iter() + .skip(1) + { + write!(master_out, "{}", templates.render("init_rows", init)?)?; + } + write!(master_out, "{}", &config.monster.init_end)?; + + let all_attacks = MonsterAllAttacks::from_retrieved_data(&creature.attacks.attacks); + write!(master_out, "{}", &config.monster.attacks_intro)?; + write!(master_out, "{}", all_attacks.to_tex(&templates, config)?)?; + write!(master_out, "{}", &config.monster.attacks_end)?; + write!( + master_out, + "{}", + templates.render("intent_table", &creature.data)? + )?; } - let all_attacks = MonsterAllAttacks::from_retrieved_data(&creature.attacks.attacks); - println!("{:#?}", all_attacks); - all_attacks.to_tex(&templates, config)?; - write!(out, "{}", &config.monster.attacks_intro)?; - - write!(out, "{}", &config.monster.attacks_end)?; - write!(out, "{}", templates.render("intent_table", &creature.data)?)?; - - // println!("{}", out); + if args.player || args.all { + println!("Generating player bestiaire"); + let mut f = File::create(format!("{}/player_bestiaire.tex", args.destination))?; + write!(f, "{}", player_out)?; + } + if args.master || args.all { + println!("Generating master bestiaire"); + let mut f = File::create(format!("{}/master_bestiaire.tex", args.destination))?; + write!(f, "{}", player_out)?; + write!(f, "{}", master_out)?; + } Ok(()) } + impl MonsterAllAttacks { pub fn from_retrieved_data(original_data: &[MonsterSingleAttack]) -> MonsterAllAttacks { let mut initial_phases: IndexMap<&String, Vec<&MonsterSingleAttack>> = IndexMap::new(); @@ -134,6 +156,7 @@ impl MonsterAllAttacks { IndexMap::new(); let phase_name = phase.to_string(); phases.insert(phase_name.clone(), Vec::new()); + // Pregroup attacks for &atk in phase_atks { if let Some(values) = grouped_attacks.get_mut(&atk.attack_group) { values.push(atk); @@ -141,11 +164,13 @@ impl MonsterAllAttacks { grouped_attacks.insert(&atk.attack_group, vec![atk]); } } + // Ungroup them to have nice bundles for (group, atk) in grouped_attacks { if group.is_some() { let group_attack = MonsterFullAttack { attacklist: atk.iter().map(|&v| v.clone()).collect(), - color: atk.first().unwrap().short_name.clone(), + // color: atk.first().unwrap().short_name.clone(), + size: atk.len() + 1, description: atk.first().unwrap().effects.clone(), }; phases.get_mut(&phase_name).unwrap().push(group_attack); @@ -156,7 +181,7 @@ impl MonsterAllAttacks { .unwrap() .push(MonsterFullAttack { attacklist: vec![single_atk.clone()], - color: single_atk.short_name.clone(), + size: 2, description: single_atk.effects.clone(), }); } @@ -169,25 +194,36 @@ impl MonsterAllAttacks { #[derive(Serialize)] struct Coloring<'a> { color: &'a str, + size: usize, +} +#[derive(Serialize)] +struct PhaseName<'a> { + phase_name: &'a String, } impl MonsterAllAttacks { pub fn to_tex(&self, templates: &Handlebars<'_>, config: &Config) -> Result { let mut out = String::new(); - for (phase, list_full_attacks) in &self.phases { + for (phase_name, list_full_attacks) in &self.phases { // Print phase name - write!(out, "{}", templates.render("phase_row", phase)?)?; + write!( + out, + "{}", + templates.render("phase_row", &PhaseName { phase_name })? + )?; for attack in list_full_attacks { write!(out, "{}", config.monster.attack_before_repeat)?; + + let color = Coloring { + size: attack.size, + color: config + .monster + .color_table + .inner + .get(&attack.attacklist[0].short_name) + .unwrap_or(&config.monster.default_color), + }; + write!(out, "{}", templates.render("attack_color", &color)?)?; for sub_attack in &attack.attacklist { - let color = Coloring { - color: config - .monster - .color_table - .inner - .get(&attack.color) - .unwrap_or(&config.monster.default_color), - }; - write!(out, "{}", templates.render("attack_color", &color)?)?; write!( out, "{}", @@ -201,9 +237,6 @@ impl MonsterAllAttacks { templates.render("attack_info_row", &list_full_attacks[0])? )?; } - // Print all attacks in that phase - - println!("{}", out); } Ok(out) } diff --git a/crates/monsters/src/monster_structs.rs b/crates/monsters/src/monster_structs.rs index c3b2f6a..b8212f8 100644 --- a/crates/monsters/src/monster_structs.rs +++ b/crates/monsters/src/monster_structs.rs @@ -49,6 +49,8 @@ pub struct CreatureData { /// Text columns – stored as plain UTF‑8 text in SQLite. #[TEXT] pub name: String, + #[TEXT] + pub denomination: Option, /// The calamity type of the creature #[TEXT] pub calamity: String, @@ -367,6 +369,7 @@ pub struct MonsterAllAttacks { #[derive(Serialize, Deserialize, Debug)] pub struct MonsterFullAttack { pub attacklist: Vec, - pub color: String, + // pub color: String, + pub size: usize, pub description: String, } diff --git a/helper_config.toml b/helper_config.toml index 8ff4a0c..76744f0 100644 --- a/helper_config.toml +++ b/helper_config.toml @@ -154,7 +154,7 @@ intro = '''\begin{tblr}{ cell{1}{1}={c=2}{c}, } -\includegraphics[height=5cm]{{image}} & \\ +\includegraphics[height=5cm]{ {{image}} } & \\ & \\ Nom & {{name}} \\ Dénomination & {{denomination}} \\ @@ -193,8 +193,10 @@ blood_reward=''' rewards_row=''' {{name}} & {{category}} & {{effect}} \\ ''' -rewards_end='''\end{tblr} +rewards_end=''' +\end{tblr} \vfill +\pagebreak ''' body_parts_intro=''' @@ -211,12 +213,12 @@ body_parts_intro=''' & Seuil & Prot & Intégrité & PV & Seuil & Prot & Intégrité & PV\\ \hline ''' -body_parts_row='''\SetCell{font=\footnotesize} {{body_part_name}} & ${{threshold_p1}}$ & ${{protection_p1}}$ & \SetCell{r,f}\tiny${{integrity_p1}}$ & \SetCell{r,f}\tiny${{life_points_p1}}$ & ${{threshold_p2}}$ & ${{protection_p2}}$ & \SetCell{r,f}\tiny${{integrity_p2}}$ & \SetCell{r,f}\tiny${{life_points_p2}}$\\''' +body_parts_row='''\SetCell{font=\footnotesize} {{body_part_name}} & ${{threshold_p1}} $ & ${{protection_p1}} $ & \SetCell{r,f}\tiny ${{integrity_p1}} $ & \SetCell{r,f}\tiny ${{life_points_p1}} $ & ${{threshold_p2}} $ & ${{protection_p2}} $ & \SetCell{r,f}\tiny ${{integrity_p2}} $ & \SetCell{r,f}\tiny ${{life_points_p2}} $\\''' body_parts_end= ''' \hline -\SetCell[c=9]{j,h} {\textbf{Notes} \\ {{annotations_master}}\\ +\SetCell[c=9]{j,h} {\textbf{Notes} \\ {{annotations_master}}}\\ \hline \end{tblr}''' -resists_intro=''' \center{ +resists_intro=''' \begin{center} \begin{tblr}{ colspec={Q[3.5em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em] Q[1.6em]}, rowspec={Q[c,f] Q[c,m] Q[c] Q[c] Q[c] Q[c] Q[c] Q[c] Q[c] Q[c] Q[c]}, @@ -226,9 +228,12 @@ resists_intro=''' \center{ \SetCell{c} Res & \slash & \pierce & \blunt & \symceleste & \symfire & \symearth & \symwood & \symmagma & \symabyss & \symwater & \symwind & \symice & \symthunder \\ \hline ''' -resists_row= ''' \SetCell{font=\footnotesize} {{name}} & ${{slash}}$ & ${{pierce}}$ & ${{blunt}}$ & ${{celestial}}$ & ${{fire}}$ & ${{earth}}$ & ${{wood}}$ & ${{magma}}$ & ${{celeste}}$ & ${{water}}$ & ${{wind}}$ & ${{ice}}$ & ${{thunder}}$ \\ +resists_row= ''' \SetCell{font=\footnotesize} {{body_part_name}} & ${{slash}} $ & ${{pierce}} $ & ${{blunt}} $ & ${{celestial}} $ & ${{fire}} $ & ${{earth}} $ & ${{wood}} $ & ${{magma}} $ & ${{celeste}} $ & ${{water}} $ & ${{wind}} $ & ${{ice}} $ & ${{thunder}} $ \\ +''' +resists_end=''' +\end{tblr} +\end{center} ''' -resists_end=' \end{tblr}' stats='''\begin{tblr}{ colspec={c c c c c c c c c c c c c c c c c c c}, @@ -238,16 +243,17 @@ stats='''\begin{tblr}{ & \SetCell[c=2]{c} P1 & & \SetCell[c=2]{c} P2 & & & \SetCell[c=7]{c} Stats & & & & & & & & \SetCell[c=4]{c} Mouvement & & & & \\ \cline{2-3} \cline{4-5} \cline{7-13} \cline{15-18} \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} \\ -\SetCell{font=\footnotesize}$t_1$ & ${{p1_init}}$ & $4$A & ${{p2_init}}$ & $4$A & & ${{strength}}$ & ${{perception}}$ & ${{willpower}}$ & ${{alteration_resistance}}$ & ${{torque}}$ & ${{awareness}}$ & ${{fatigue}}$ & & ${{mvt_walk}}$ & ${{mvt_trot}}$ & ${{mvt_run}}$ & ${{mvt_flight}}$ \\ +\SetCell{font=\footnotesize} $t_1 $ & ${{p1_init}} $ & $4 $A & ${{p2_init}} $ & $4 $A & & ${{strength}} $ & ${{perception}} $ & ${{willpower}} $ & ${{alteration_resistance}} $ & ${{torque}} $ & ${{awareness}} $ & ${{fatigue}} $ & & ${{mvt_walk}} $ & ${{mvt_trot}} $ & ${{mvt_run}} $ & ${{mvt_flight}} $ \\ ''' init_rows=''' -\SetCell{font=\footnotesize}$t_{{turn}}$ & ${{p1_value}}$ & {{pt1_actions}} & ${{p2_value}}$ & {{p2_actions}} \\ +\SetCell{font=\footnotesize} $t_{{turn}} $ & ${{p1_value}} $ & {{pt1_actions}} & ${{p2_value}} $ & {{p2_actions}} \\ ''' init_end= ''' \end{tblr} -} -\vfill ''' -attacks_intro= '''\scriptsize{ +\vfill +''' +attacks_intro= ''' +{\scriptsize \begin{tblr}{ colspec={X[0.05] X[4,l] X[1,c] X[1,c] X[0.3,c] X[0.3,c] X[0.3,c] X[0.3,c] X[0.3,c] X[2,r] X[2,c] X[0.3,c] X[0.3,c]}, hspan=minimal, @@ -265,7 +271,7 @@ phase_row= ''' ''' attack_before_repeat=' \hline' -attack_color='\SetCell[r=2]{bg={{color}}}' # Very ugly hack, going to bed +attack_color='\SetCell[r={{size}}]{bg={{color}}}' # Very ugly hack, going to bed attack_repeatable_row= ''' & {{name}} & {{short_name}} & {{atk_type}} & {{targetting}} & {{cost_fatigue}} & {{cost_action}} & {{element}} & {{damage_fatigue}} &{{damage_regular}} & {{effects}} & {{threshold_parry}} & {{threshold_dodge}} \\ ''' attack_info_row='''& \SetCell[c=12]{j} {{description}} & & & & & & & & & & \\ @@ -274,10 +280,11 @@ attack_info_row='''& \SetCell[c=12]{j} {{description}} & & & & & & & & & & \\ attacks_end= ''' \end{tblr} } \vfill -\renewcommand{\rb}{\undefined} ''' -intent_table=''' \begin{tblr}{ +intent_table=''' +\pagebreak + \begin{tblr}{ colspec={X[7] X[3]}, rowspec={X[c] X[j,h,8cm]}, vline{2}, @@ -290,7 +297,7 @@ Plan de combat & Graphique d'intentions \\ \vfill ''' color_table=''' - THB: \ravblue - TBD: \nocolor + THB: ravred + TBD: ''' -default_color='\blu' +default_color='' diff --git a/ravenous_databases b/ravenous_databases index 211b22d..440b8da 160000 --- a/ravenous_databases +++ b/ravenous_databases @@ -1 +1 @@ -Subproject commit 211b22dbe327b66f0da9f5c5a780dd6ec00a88d8 +Subproject commit 440b8dad8361811e14419ac19a90bc7b003ba3e0