reflect no longer triggers on ticks

This commit is contained in:
Mashy 2019-10-02 14:39:36 +10:00
parent 85ec220511
commit 16d319c706
2 changed files with 4 additions and 2 deletions

View File

@ -51,6 +51,7 @@
- click in to scroll
* elo + leaderboards
* reflect event stages (for animations)
* mnml tv
## LATER

View File

@ -78,7 +78,7 @@ pub fn resolve(skill: Skill, source: &mut Construct, target: &mut Construct, mut
return resolutions;
}
if target.affected(Effect::Reflect) && skill.colours().contains(&Colour::Blue) {
if target.affected(Effect::Reflect) && skill.colours().contains(&Colour::Blue) && !skill.is_tick() {
// guard against overflow
if source.affected(Effect::Reflect) {
return resolutions;
@ -303,7 +303,8 @@ fn post_resolve(_skill: Skill, game: &mut Game, mut resolutions: Resolutions) ->
if !(source.affected(Effect::Reflect) && target.affected(Effect::Reflect)) {
// Check reflect don't bother if electrocute is procing on death
if source.affected(Effect::Reflect) && !target.is_ko() {
resolutions.push(Resolution::new(&target, &source).event(Event::Reflection { skill: s }).stages(EventStages::EndPost));
resolutions.push(Resolution::new(&target, &source)
.event(Event::Reflection { skill: s }).stages(EventStages::EndPost));
resolutions = electrocute(&mut source, &mut target, resolutions, s);
} else {
resolutions = electrocute(&mut target, &mut source, resolutions, s);