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.
113 lines
2.7 KiB
Rust
113 lines
2.7 KiB
Rust
use super::character::{create_character, Character};
|
|
use super::class::Class;
|
|
use super::equipment::{Armor, WeaponType};
|
|
use super::stats::StatBlock;
|
|
|
|
/*
|
|
* Bob has chosen to play a knight who is also an [NPC].
|
|
* He has chosen to make a knight who is strong and dexterous.
|
|
* He has also decided that his knight is not charismatic, but rather athletic.
|
|
*/
|
|
pub fn get_bob() -> Character {
|
|
create_character(
|
|
"Bob".to_owned(),
|
|
Class::Knight,
|
|
Class::NPC,
|
|
StatBlock::from((1, 1, 0, 0, 0, 0, 0, 0)),
|
|
StatBlock::from((0, 0, 2, 0, 0, 0, 0, -2)),
|
|
Armor::Medium,
|
|
WeaponType::BladedWeapon.create_weapon("Longsword".to_owned()),
|
|
)
|
|
}
|
|
|
|
/*
|
|
* George is a swashbuckler.
|
|
* He has chosen to be more dextrous, and have better composure.
|
|
* George is a himbo.
|
|
*/
|
|
pub fn get_george() -> Character {
|
|
create_character(
|
|
"George".to_owned(),
|
|
Class::Swashbuckler,
|
|
Class::NPC,
|
|
StatBlock::from((0, 1, 0, 0, 0, 0, 1, 0)),
|
|
StatBlock::from((0, 2, 1, 0, -2, -1, 0, 0)),
|
|
Armor::None,
|
|
WeaponType::BladedWeapon.create_weapon("Rapier".to_owned()),
|
|
)
|
|
}
|
|
|
|
/*
|
|
* Drub is a ~~goblin~~ drub.
|
|
*/
|
|
pub fn get_drub() -> Character {
|
|
let mut drub = create_character(
|
|
String::from("Drub"),
|
|
Class::NPC,
|
|
Class::NPC,
|
|
StatBlock::from((1, 3, 1, 0, 1, 0, -3, -2)),
|
|
StatBlock::default(),
|
|
Armor::Light,
|
|
WeaponType::SimpleWeapon.create_weapon(String::from("Knife")),
|
|
);
|
|
|
|
drub.proficiencies.simple_weapons = true;
|
|
drub.proficiencies.light_armor = true;
|
|
|
|
return drub;
|
|
}
|
|
|
|
/*
|
|
* Just an average bandit.
|
|
*/
|
|
pub fn get_bandit() -> Character {
|
|
let mut drub = create_character(
|
|
String::from("Bandit"),
|
|
Class::NPC,
|
|
Class::NPC,
|
|
StatBlock::from((1, 0, 2, 1, 1, 1, 0, 1)),
|
|
StatBlock::default(),
|
|
Armor::Medium,
|
|
WeaponType::BladedWeapon.create_weapon(String::from("Shortsword")),
|
|
);
|
|
|
|
drub.proficiencies.bladed_weapons = true;
|
|
drub.proficiencies.medium_armor = true;
|
|
|
|
return drub;
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod premade_tests {
|
|
|
|
use super::{get_bandit, get_bob, get_drub, get_george};
|
|
|
|
#[test]
|
|
fn print_bob() {
|
|
let bob = get_bob();
|
|
|
|
println!("{}", bob);
|
|
}
|
|
|
|
#[test]
|
|
fn print_george() {
|
|
let george = get_george();
|
|
|
|
println!("{}", george);
|
|
}
|
|
|
|
#[test]
|
|
fn print_drub() {
|
|
let drub = get_drub();
|
|
|
|
println!("{}", drub);
|
|
}
|
|
|
|
#[test]
|
|
fn print_bandit() {
|
|
let bandit = get_bandit();
|
|
|
|
println!("{}", bandit);
|
|
}
|
|
}
|