don't send immune events when targetko
This commit is contained in:
parent
865abb2366
commit
35062db799
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -470,6 +470,9 @@ 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);
|
||||
}
|
||||
@ -482,9 +485,6 @@ impl Game {
|
||||
// self.resolved.push(resolution);
|
||||
// }
|
||||
|
||||
// the cast itself goes into this temp vec
|
||||
// to handle cooldowns
|
||||
|
||||
// sort the stack again in case speeds have changed
|
||||
self.stack_sort_speed();
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user