move actions into fns

This commit is contained in:
ntr 2019-12-13 11:23:40 +10:00
parent 02311680ae
commit 1e09e08714
2 changed files with 1165 additions and 881 deletions

View File

@ -539,7 +539,7 @@ impl Game {
return self.execute(Cast { target: cast.source, ..cast }, events); return self.execute(Cast { target: cast.source, ..cast }, events);
} }
for action in cast.actions() { for action in cast.actions(self, &events) {
let new_events = match action { let new_events = match action {
Action::Cast => vec![self.cast(cast)], Action::Cast => vec![self.cast(cast)],
Action::Hit => vec![self.hit(cast)], Action::Hit => vec![self.hit(cast)],

File diff suppressed because it is too large Load Diff