some tokens stuff (ye i started to work on the map, also i 'fixed' the context menu for msgs but still needs to be impl-ed)
This commit is contained in:
parent
97475599a7
commit
be6dd7c0e4
13 changed files with 296 additions and 76 deletions
|
@ -35,16 +35,9 @@ impl GameEntry for Entry {
|
|||
}
|
||||
}
|
||||
|
||||
fn to_chat(&self, source: &str) -> ChatMessage {
|
||||
ChatMessage {
|
||||
text: format!("{} - it might be a {{weapon/short_bow}} it might not", self.display_name()),
|
||||
roll: None,
|
||||
roll_target: None,
|
||||
actions: None,
|
||||
source: String::from(source),
|
||||
targets: None,
|
||||
id: 0,
|
||||
}
|
||||
fn to_chat(&self) -> ChatMessage {
|
||||
let text = format!("{} - it might be a {{weapon/short_bow}} it might not", self.display_name());
|
||||
ChatMessage::new(text)
|
||||
}
|
||||
|
||||
fn all(_filter: Option<&str>) -> Vec<String> {
|
||||
|
|
|
@ -88,25 +88,15 @@ impl Pathfinder2rCharacterSheet {
|
|||
impl Character<Entry> for Pathfinder2rCharacterSheet {
|
||||
fn use_action(&mut self, entry: &Entry, action: &ActionResult) -> ChatMessage {
|
||||
match entry {
|
||||
Entry::Weapon(_) => ChatMessage {
|
||||
text: String::from("Attack"),
|
||||
roll: Some(vec![RollDialogOption { name: String::from("pierce"), dice_type: 4, dice_amount: 1, constant: 0, extra: String::new(), enabled: true }]),
|
||||
roll_target: Some(10),
|
||||
actions: Some(vec!["damage".to_string(), "double".to_string()]),
|
||||
source: self.name.clone(),
|
||||
targets: None,
|
||||
id: 0,
|
||||
},
|
||||
Entry::Weapon(_) => ChatMessage::new("Attack".to_string())
|
||||
.with_roll(RollDialogOption { name: String::from("pierce"), dice_type: 4, dice_amount: 1, constant: 0, extra: String::new(), enabled: true })
|
||||
.roll_target(Some(10))
|
||||
.with_action("damage".to_string())
|
||||
.with_action("double".to_string()),
|
||||
Entry::Consumable(_consumable) => if action.name == "consume" {
|
||||
ChatMessage {
|
||||
text: "Heal".to_string(),
|
||||
roll: Some(vec![RollDialogOption { name: "heal".to_string(), dice_type: 6, dice_amount: 1, constant: 0, extra: String::new(), enabled: true }]),
|
||||
roll_target: None,
|
||||
actions: Some(vec!["heal".to_string()]),
|
||||
source: self.name.clone(),
|
||||
targets: None,
|
||||
id: 0,
|
||||
}
|
||||
ChatMessage::new("Heal".to_string())
|
||||
.with_roll(RollDialogOption { name: "heal".to_string(), dice_type: 6, dice_amount: 1, constant: 0, extra: String::new(), enabled: true })
|
||||
.with_action("heal".to_string())
|
||||
} else { todo!() },
|
||||
Entry::Spell(_spell) => todo!(),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue