Merge branch 'anims-change' of ssh://mnml.gg:40022/~/mnml into anims-change
This commit is contained in:
+8
-2
@@ -9,11 +9,16 @@ use game::{Game};
|
||||
use effect::{Effect, Colour, Cooldown};
|
||||
|
||||
pub fn dev_resolve(a_id: Uuid, b_id: Uuid, skill: Skill) -> Resolutions {
|
||||
let mut resolutions = vec![];
|
||||
|
||||
let mut a = Construct::new();
|
||||
a.id = a_id;
|
||||
let mut b = Construct::new();
|
||||
b.id = b_id;
|
||||
return resolve(skill, &mut a, &mut b, vec![]);
|
||||
if skill.aoe() { // Send an aoe skill event for anims
|
||||
resolutions.push(Resolution::new(&a, &b).event(Event::AoeSkill { skill }));
|
||||
}
|
||||
return resolve(skill, &mut a, &mut b, resolutions);
|
||||
}
|
||||
|
||||
pub fn resolution_steps(cast: &Cast, game: &mut Game) -> Resolutions {
|
||||
@@ -31,7 +36,7 @@ pub fn pre_resolve(cast: &Cast, game: &mut Game, mut resolutions: Resolutions) -
|
||||
|
||||
if skill.aoe() { // Send an aoe skill event for anims
|
||||
resolutions.push(Resolution::new(&source,
|
||||
&game.construct_by_id(cast.target_construct_id).unwrap().clone()).event(Event::Skill { skill }));
|
||||
&game.construct_by_id(cast.target_construct_id).unwrap().clone()).event(Event::AoeSkill { skill }));
|
||||
}
|
||||
|
||||
for target_id in targets {
|
||||
@@ -460,6 +465,7 @@ pub enum Event {
|
||||
Recharge { skill: Skill, red: u64, blue: u64 },
|
||||
Inversion { skill: Skill },
|
||||
Reflection { skill: Skill },
|
||||
AoeSkill { skill: Skill },
|
||||
Skill { skill: Skill },
|
||||
Effect { skill: Skill, effect: Effect, duration: u8, construct_effects: Vec<ConstructEffect> },
|
||||
Removal { effect: Effect, construct_effects: Vec<ConstructEffect> },
|
||||
|
||||
Reference in New Issue
Block a user