This commit is contained in:
Mashy 2019-11-05 13:56:43 +10:00
parent 2bafc2eac6
commit 8bce5fd285

View File

@ -1794,13 +1794,19 @@ fn link(source: &mut Construct, target: &mut Construct, mut results: Resolutions
None => 0
};
target.deal_blue_damage(skill, swap)
.into_iter()
.for_each(|e| results.push(Resolution::new(source, target).event(e)));
source.deal_green_damage(skill, swap)
.into_iter()
.for_each(|e| results.push(Resolution::new(source, source).event(e).stages(EventStages::PostOnly)));
let link_events = target.deal_blue_damage(skill, swap);
for e in link_events {
match e {
Event::Damage { amount, mitigation: _, colour: _, skill: _ } => {
results.push(Resolution::new(source, target).event(e));
let heal = source.deal_green_damage(skill, amount);
for h in heal {
results.push(Resolution::new(source, source).event(h).stages(EventStages::PostOnly));
};
},
_ => results.push(Resolution::new(source, target).event(e)),
}
}
results.push(Resolution::new(source, source)
.event(source.add_effect(skill, skill.effect()[0])).stages(EventStages::PostOnly));