You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
Rust
41 lines
1.1 KiB
Rust
use simrust::{
|
|
character::create_character,
|
|
class::Class,
|
|
combat::EncounterType,
|
|
equipment::{Armor, WeaponType},
|
|
stats::StatBlock,
|
|
};
|
|
|
|
fn main() {
|
|
let mut bob = create_character(
|
|
String::from("Bob"),
|
|
Class::Guard,
|
|
Class::Brawler,
|
|
StatBlock::from((1, 0, 1, 0, 0, 0, 0, 0)),
|
|
StatBlock::from((2, 0, 2, 0, -1, -2, 0, -1)),
|
|
Armor::Medium,
|
|
WeaponType::BladedWeapon.create_weapon("Longsword".to_owned()),
|
|
);
|
|
|
|
let mut drub = create_character(
|
|
String::from("Drub"),
|
|
Class::Hunter,
|
|
Class::Thief,
|
|
StatBlock::from((0, 1, 1, 0, 0, 0, 0, 0)),
|
|
StatBlock::from((0, 2, 2, 0, -2, 0, 0, -2)),
|
|
Armor::Light,
|
|
WeaponType::RangedWeapon.create_weapon(String::from("Shortbow")),
|
|
);
|
|
|
|
bob.init_dice_pool(EncounterType::Physical);
|
|
drub.init_dice_pool(EncounterType::Physical);
|
|
|
|
println!("{}", bob);
|
|
println!("{}", drub);
|
|
|
|
bob.attacks(&mut drub);
|
|
|
|
println!("{}", bob);
|
|
println!("{}", drub);
|
|
}
|