From b922c3d5392e72e7bc14191390945662ca04ca96 Mon Sep 17 00:00:00 2001 From: Mashy Date: Tue, 7 May 2019 14:54:25 +1000 Subject: [PATCH] modified multis, cleaned up anims --- CHANGELOG.md | 8 +++++-- client/src/utils.jsx | 5 ++++- server/src/game.rs | 6 +++--- server/src/instance.rs | 2 +- server/src/skill.rs | 49 ++++++++++++++++++++++-------------------- 5 files changed, 40 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67672e8a..40e7849a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed ### Changed -## [0.1.2] - YYYY-MM-DD +## [0.1.2] - 2019-05-07 ### Added (Proposed changes not all impl) @@ -21,7 +21,7 @@ New skill `Impurity` Combines - Buff + GB New buff that does the following - Increase target green damage by 50% - Blue attacks do an additional blast equal to 20% source green damage + Blue attacks do an additional blast equal to 25% source green damage ### Fixed @@ -51,6 +51,7 @@ New skill `Impurity` Changed to Buff + RG (was Buff + RB) Buff causes target to deal an extra attack when using red attack base skills (strike / slay / chaos) Extra attack does 25% source speed as red damage + Cooldown increased to 2T - Heal Changed multiplier 120% -> 130% @@ -69,6 +70,9 @@ New skill `Impurity` Changed to Buff + RR (was Buff + RG) Now recharges 80% source red damage as red life to target +- Throw + Stun duration reduced from 2T -> 1T + - Triage Multiplier changed 65% -> 75% diff --git a/client/src/utils.jsx b/client/src/utils.jsx index 1ce650e3..b87e0c4c 100644 --- a/client/src/utils.jsx +++ b/client/src/utils.jsx @@ -236,7 +236,10 @@ function getCombatSequence(event) { if (['Effect'].includes(event[0]) - && event[1].skill === 'Decay' && event[1].effect === 'Wither') return ['POST_SKILL']; + && ((event[1].skill === 'Decay' && event[1].effect === 'Wither') + || event[1].skill === 'Ruin' + || event[1].skill === 'Taunt' + || event[1].skill === 'Strangling')) return ['POST_SKILL']; if (['Damage'].includes(event[0]) && ((event[1].skill === 'Chaos' && event[1].colour === 'RedDamage') diff --git a/server/src/game.rs b/server/src/game.rs index d4874419..8487140b 100644 --- a/server/src/game.rs +++ b/server/src/game.rs @@ -1206,7 +1206,6 @@ mod tests { assert!(game.skill_phase_finished()); game = game.resolve_phase_start(); - game.resolved.remove(0); let ruins = game.resolved .into_iter() .filter(|r| { @@ -1217,7 +1216,8 @@ mod tests { assert!(*effect == Effect::Ruin); assert!(*duration == 1); true - } + }, + Event::Skill { skill } => false, _ => panic!("ruin result not effect {:?}", event), } false => false, @@ -1256,7 +1256,7 @@ mod tests { game = game.resolve_phase_start(); - assert!(game.resolved.len() == 4); + assert!(game.resolved.len() == 5); while let Some(r) = game.resolved.pop() { let Resolution { source , target, event: _ } = r; if [i_cryp.id, j_cryp.id].contains(&source.id) { diff --git a/server/src/instance.rs b/server/src/instance.rs index dbe15e4a..32f71bbf 100644 --- a/server/src/instance.rs +++ b/server/src/instance.rs @@ -271,7 +271,7 @@ impl Instance { fn next_round(&mut self) -> &mut Instance { self.phase = InstancePhase::InProgress; self.phase_end = Utc::now() - .checked_add_signed(Duration::seconds(12000)) + .checked_add_signed(Duration::seconds(150)) .expect("could not set phase end"); diff --git a/server/src/skill.rs b/server/src/skill.rs index 462b578b..802b6ae6 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -585,15 +585,15 @@ impl Skill { match self { // Attack Base Skill::Attack => 80, // Base + Skill::Blast => 110, // BB Skill::Chaos => 40, // BR Skill::Heal => 130, //GG Skill::SiphonTick => 40, // GB Skill::Slay => 70, // RG - Skill::Strike => 90, //RR - Skill::StrikeII => 110, - Skill::StrikeIII => 130, + Skill::StrikeII => 110, + Skill::StrikeIII => 130, // Block Base Skill::CorruptionTick => 80, @@ -614,8 +614,10 @@ impl Skill { // Buff base Skill::ImpureBlast => 25, Skill::HasteStrike => 30, + Skill::Taunt => 80, Skill::TriageTick => 75, + _ => 100, } } @@ -635,10 +637,10 @@ impl Skill { Skill::Stun => 2, Skill::Sleep => 3, - Skill::Throw => 2, + Skill::Throw => 1, Skill::Snare => 3, - Skill::Taunt => 1, + Skill::Taunt => 2, Skill::Impurity => 3, Skill::Invert => 1, @@ -716,7 +718,7 @@ impl Skill { Skill::Purge => None, Skill::Banish => Some(1), Skill::Hex => Some(1), - Skill::Haste => None, + Skill::Haste => Some(2), Skill::HasteStrike => None, // Used in haste Skill::Slow => None, @@ -729,7 +731,7 @@ impl Skill { Skill::Strangle => Some(2), Skill::StrangleTick => None, Skill::Clutch => Some(2), - Skill::Taunt => Some(1), + Skill::Taunt => Some(2), Skill::Injure => Some(2), Skill::Corrupt => Some(1), @@ -862,7 +864,6 @@ impl Skill { Skill::Block => true, Skill::Parry => true, Skill::Clutch => true, - // Skill::Taunt => true, Skill::Corrupt => true, Skill::TestBlock => true, @@ -958,6 +959,9 @@ fn clutch(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill: } fn taunt(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill: Skill) -> Resolutions { + let red_amount = source.red_damage().pct(skill.multiplier()); + results.push(Resolution::new(source, target).event(target.recharge(skill, red_amount, 0))); + let effect = CrypEffect::new(Effect::Taunt, skill.duration()); results.push(Resolution::new(source, target).event(target.add_effect(skill, effect))); return results; @@ -1028,13 +1032,13 @@ fn snare(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill: let snare = CrypEffect::new(Effect::Snare, skill.duration()); results.push(Resolution::new(source, target).event(target.add_effect(skill, snare))); - let mut s_multi: u64 = 100; - for cs in target.skills.iter() { - s_multi += match cs.skill.category() { - Category::Red => 45, - _ => 0, - } - } + let s_multi = target.skills + .iter() + .fold(100, |acc, cs| match cs.skill.category() { + Category::Red => acc + 45, + _ => acc, + }); + let amount = source.red_damage().pct(skill.multiplier()).pct(s_multi); target.deal_red_damage(skill, amount) @@ -1173,7 +1177,7 @@ fn corruption_tick(source: &mut Cryp, target: &mut Cryp, mut results: Resolution } fn ruin(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill: Skill) -> Resolutions { - // results.push(Resolution::new(source, target).event(Event::Skill { skill })); + results.push(Resolution::new(source, target).event(Event::Skill { skill })); let effect = CrypEffect::new(Effect::Ruin, skill.duration()); results.push(Resolution::new(source, target).event(target.add_effect(skill, effect))); return results;; @@ -1274,13 +1278,12 @@ fn silence(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill let silence = CrypEffect::new(Effect::Silence, skill.duration()); results.push(Resolution::new(source, target).event(target.add_effect(skill, silence))); - let mut s_multi: u64 = 100; - for cs in target.skills.iter() { - s_multi += match cs.skill.category() { - Category::Blue => 45, - _ => 0, - } - } + let s_multi = target.skills + .iter() + .fold(100, |acc, cs| match cs.skill.category() { + Category::Blue => acc + 45, + _ => acc, + }); let amount = source.blue_damage().pct(skill.multiplier()).pct(s_multi); target.deal_blue_damage(skill, amount)