mnml/server/src/mob.rs
2019-06-01 14:04:24 +10:00

23 lines
443 B
Rust

use uuid::Uuid;
use std::iter;
use construct::{Construct};
use names::{name};
pub fn generate_mob() -> Construct {
let mob = Construct::new()
.named(&name());
return mob;
}
pub fn instance_mobs(player_id: Uuid) -> Vec<Construct> {
iter::repeat_with(||
generate_mob()
.set_account(player_id))
// .learn(Skill::Attack))
.take(3)
.collect::<Vec<Construct>>()
}