18 lines
430 B
Rust
18 lines
430 B
Rust
use std::rc::Rc;
|
|
|
|
use crate::{state::{GameState, Effect}, world::Town, person::Person};
|
|
|
|
pub struct PersonGenesis {
|
|
pub town: Rc<Town>,
|
|
pub person: Rc<Person>,
|
|
}
|
|
|
|
impl Effect 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)
|
|
}
|
|
} |