fixed multi RNG

This commit is contained in:
Mashy 2019-05-02 09:40:03 +10:00
parent 8c68f7fec9
commit 39ace02d92

View File

@ -716,7 +716,7 @@ impl Skill {
Skill::Invert => Category::Green,
Skill::Blast => Category::Blue,
Skill::Chaos => Category::Red,
Skill::Chaos => Category::Blue,
Skill::Amplify => Category::Blue,
Skill::Decay => Category::Blue, // dot
Skill::DecayTick => Category::BlueTick, // hot
@ -996,12 +996,12 @@ fn triage_tick(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, s
fn chaos(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill: Skill) -> Resolutions {
let mut rng = thread_rng();
let b_rng: u64 = rng.gen_range(0, 20);
let amount = source.blue_damage().pct(skill.multiplier()) + b_rng;
let amount = source.blue_damage().pct(skill.multiplier() + b_rng);
target.deal_blue_damage(skill, amount)
.into_iter()
.for_each(|e| results.push(Resolution::new(source, target).event(e)));
let r_rng: u64 = rng.gen_range(0, 20);
let amount = source.red_damage().pct(skill.multiplier()) + r_rng;
let amount = source.red_damage().pct(skill.multiplier() + r_rng);
target.deal_red_damage(skill, amount)
.into_iter()
.for_each(|e| results.push(Resolution::new(source, target).event(e)));