22 lines
484 B
Rust
22 lines
484 B
Rust
use std::rc::Rc;
|
|
|
|
use crate::{state::{GameState, Action}, world::Town, creature::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
|
|
}
|
|
} |