some more progress on character stuff but its really hard
This commit is contained in:
parent
5cdfe71528
commit
e8291e15d9
5 changed files with 22 additions and 3 deletions
|
@ -14,6 +14,12 @@ pub struct Pathfinder2rCharacterSheet {
|
|||
#[Input("Weapons")]
|
||||
#[InputExpr(set_items, get_items)]
|
||||
weapon: [Option<Weapon>; 2],
|
||||
#[Input("Health")]
|
||||
#[Access(PartyMember)]
|
||||
health: i32,
|
||||
#[Input("Max Health")]
|
||||
#[Access(PartyMember)]
|
||||
max_health: i32,
|
||||
// Attributes
|
||||
#[Seperator]
|
||||
#[Input("Strength")]
|
||||
|
@ -124,4 +130,13 @@ impl Character<Entry> for Pathfinder2rCharacterSheet {
|
|||
.map(|s| ActionDefinition { name: s.0.to_string(), targets: s.1, display_name: None, source: None, rolls: None })
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn short(&self) -> CharacterShort {
|
||||
CharacterShort {
|
||||
title: self.name.clone(),
|
||||
sub_title: Some("A Character!".to_string()),
|
||||
health: Some([ "Dying", "Hurt", "Harmed", "Unharmed" ][((self.health * 4) / self.max_health) as usize].to_string()),
|
||||
level: Some(1),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue