tavern_keeper/src/events/person_genesis.rs

22 lines
482 B
Rust

use std::rc::Rc;
use crate::{state::{GameState, Action}, world::Town, person::Creature};
pub struct PersonGenesis {
pub town: Rc<Town>,
pub person: Creature,
}
impl Action for PersonGenesis {
fn apply(&self, state: &mut GameState) {
state.add_person(self.person.clone());
}
fn description(&self) -> String {
format!("{} was sent by the Gods to {}", self.person.name, self.town.name)
}
fn notable(&self) -> bool {
true
}
}