From 5f3b4d9354442608c964e5bca3a6d83bc06d822c Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 26 Mar 2019 20:01:13 +1100 Subject: [PATCH] hatred applies dmg to red/blue --- server/WORKLOG.md | 1 - server/src/skill.rs | 31 +++++++++++++------------------ 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/server/WORKLOG.md b/server/WORKLOG.md index d7144933..b452d6db 100644 --- a/server/WORKLOG.md +++ b/server/WORKLOG.md @@ -21,7 +21,6 @@ cryp vbox ensure all skills impl ez Skill::Slay -> red attack with bonus somethingorother for blue / maim no healing - Hatred -> damage received converted into bonus dmg siphon test diff --git a/server/src/skill.rs b/server/src/skill.rs index 7c6ea839..fc0066b9 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -43,6 +43,9 @@ pub fn resolve(skill: Skill, source: &mut Cryp, target: &mut Cryp, mut resolutio Skill::Banish => banish(source, target, resolutions), // TODO prevent all actions Skill::Blast => blast(source, target, resolutions), Skill::Block => block(source, target, resolutions), + Skill::Clutch => clutch(source, target, resolutions), + Skill::Corrupt => corrupt(source, target, resolutions), + Skill::CorruptionTick => corruption_tick(source, target, resolutions), Skill::Curse => curse(source, target, resolutions), Skill::Decay => decay(source, target, resolutions), // dot Skill::DecayTick => decay_tick(source, target, resolutions), // dot @@ -50,36 +53,29 @@ pub fn resolve(skill: Skill, source: &mut Cryp, target: &mut Cryp, mut resolutio Skill::Haste => haste(source, target, resolutions), // speed slow Skill::Heal => heal(source, target, resolutions), Skill::Hex => hex(source, target, resolutions), // todo prevent casting + Skill::Hostility => hostility(source, target, resolutions), Skill::Invert => invert(source, target, resolutions), // todo prevent casting Skill::Parry => parry(source, target, resolutions), Skill::Purge => purge(source, target, resolutions), // dispel all buffs Skill::Purify => purify(source, target, resolutions), // dispel all debuffs Skill::Recharge => recharge(source, target, resolutions), // target is immune to magic damage and fx + Skill::Reflect => reflect(source, target, resolutions), + Skill::Ruin => ruin(source, target, resolutions), Skill::Shield => shield(source, target, resolutions), // target is immune to magic damage and fx Skill::Silence => silence(source, target, resolutions), // target cannot cast spells Skill::Siphon => siphon(source, target, resolutions), Skill::SiphonTick => siphon_tick(source, target, resolutions), // hot + Skill::Slay => unimplemented!(), Skill::Slow => slow(source, target, resolutions), // speed slow Skill::Snare => snare(source, target, resolutions), // TODO prevent physical moves + Skill::Strangle => strangle(source, target, resolutions), + Skill::StrangleTick => strangle_tick(source, target, resolutions), Skill::Strike => strike(source, target, resolutions), Skill::Stun => stun(source, target, resolutions), + Skill::Taunt => taunt(source, target, resolutions), Skill::Throw => throw(source, target, resolutions), // no damage stun, adds vulnerable Skill::Triage => triage(source, target, resolutions), // hot Skill::TriageTick => triage_tick(source, target, resolutions), // hot - Skill::Clutch => clutch(source, target, resolutions), - Skill::Strangle => strangle(source, target, resolutions), - Skill::StrangleTick => strangle_tick(source, target, resolutions), - - Skill::Reflect => reflect(source, target, resolutions), - Skill::Ruin => ruin(source, target, resolutions), - Skill::Slay => unimplemented!(), - Skill::Taunt => taunt(source, target, resolutions), - - Skill::Hostility => hostility(source, target, resolutions), - - Skill::Corrupt => corrupt(source, target, resolutions), - Skill::Corruption => panic!("corruption should not be castable"), - Skill::CorruptionTick => corruption_tick(source, target, resolutions), // ----------------- // Test @@ -326,6 +322,8 @@ impl Effect { Effect::Vulnerable => vec![Stat::RedDamageTaken], Effect::Block => vec![Stat::RedDamageTaken], + Effect::Hatred => vec![Stat::RedDamage, Stat::BlueDamage], + Effect::Amplify => vec![Stat::BlueDamage], Effect::Curse => vec![Stat::BlueDamageTaken], @@ -537,7 +535,6 @@ pub enum Skill { Hostility, Corrupt, - Corruption, CorruptionTick, @@ -606,7 +603,6 @@ impl Skill { Skill::Taunt => Some(1), Skill::Corrupt => Some(1), - Skill::Corruption => None, Skill::CorruptionTick => None, Skill::Hostility => Some(1), @@ -695,7 +691,6 @@ impl Skill { Skill::Hostility => Category::Blue, Skill::Corrupt => Category::Blue, - Skill::Corruption => Category::Blue, Skill::CorruptionTick => Category::Blue, // ----------------- @@ -962,7 +957,7 @@ fn corruption(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions) -> let effect = CrypEffect::new(Effect::Corruption) .set_tick(Cast::new_tick(source, target, Skill::CorruptionTick)); - results.push(Resolution::new(source, target).event(target.add_effect(Skill::Corruption, effect))); + results.push(Resolution::new(source, target).event(target.add_effect(Skill::Corrupt, effect))); return corruption_tick(source, target, results); }