Merge branch 'develop' of ssh://git.mnml.gg:40022/~/mnml into develop

This commit is contained in:
ntr
2019-11-09 10:54:00 +11:00
9 changed files with 69 additions and 294 deletions
+12 -13
View File
@@ -554,7 +554,9 @@ impl Construct {
// Should red type immunity block recharge???
if let Some(immunity) = self.immune(skill) {
events.push(Event::Immunity { skill, immunity });
if !self.is_ko() {
events.push(Event::Immunity { skill, immunity });
}
return events;
}
@@ -642,10 +644,9 @@ impl Construct {
pub fn deal_green_damage(&mut self, skill: Skill, amount: u64) -> Vec<Event> {
let mut events = vec![];
if let Some(immunity) = self.immune(skill) {
events.push(Event::Immunity {
immunity,
skill,
});
if !self.is_ko() {
events.push(Event::Immunity { skill, immunity });
}
return events;
}
@@ -696,10 +697,9 @@ impl Construct {
let mut events = vec![];
if let Some(immunity) = self.immune(skill) {
events.push(Event::Immunity {
skill,
immunity,
});
if !self.is_ko() {
events.push(Event::Immunity { skill, immunity });
}
return events;
}
@@ -769,10 +769,9 @@ impl Construct {
let mut events = vec![];
if let Some(immunity) = self.immune(skill) {
events.push(Event::Immunity {
skill,
immunity,
});
if !self.is_ko() {
events.push(Event::Immunity { skill, immunity });
}
return events;
}
+8 -4
View File
@@ -469,6 +469,14 @@ impl Game {
let mut resolutions = resolution_steps(&cast, &mut self);
r_animation_ms = resolutions.iter().fold(r_animation_ms, |acc, r| acc + r.clone().get_delay());
// the cast itself goes into this temp vec to handle cooldowns
// if theres no resolution events, the skill didn't trigger (disable etc)
if resolutions.len() > 0 {
casts.push(cast);
}
self.resolved.append(&mut resolutions);
// while let Some(resolution) = resolutions.pop() {
@@ -477,10 +485,6 @@ impl Game {
// self.resolved.push(resolution);
// }
// the cast itself goes into this temp vec
// to handle cooldowns
casts.push(cast);
// sort the stack again in case speeds have changed
self.stack_sort_speed();
};
+1 -1
View File
@@ -353,8 +353,8 @@ fn post_resolve(_skill: Skill, game: &mut Game, mut resolutions: Resolutions) ->
};
if target.is_ko() {
// resolutions.push(Resolution::new(&source, &target).event(Event::Ko()).stages(EventStages::PostOnly));
target.effects.clear();
resolutions.push(Resolution::new(&source, &target).event(Event::Ko()).stages(EventStages::PostOnly));
}
game.update_construct(&mut source);