hatred applies dmg to red/blue

This commit is contained in:
ntr 2019-03-26 20:01:13 +11:00
parent 556557089d
commit 5f3b4d9354
2 changed files with 13 additions and 19 deletions

View File

@ -21,7 +21,6 @@ cryp vbox
ensure all skills impl ensure all skills impl
ez ez
Skill::Slay -> red attack with bonus somethingorother for blue / maim no healing Skill::Slay -> red attack with bonus somethingorother for blue / maim no healing
Hatred -> damage received converted into bonus dmg
siphon test siphon test

View File

@ -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::Banish => banish(source, target, resolutions), // TODO prevent all actions
Skill::Blast => blast(source, target, resolutions), Skill::Blast => blast(source, target, resolutions),
Skill::Block => block(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::Curse => curse(source, target, resolutions),
Skill::Decay => decay(source, target, resolutions), // dot Skill::Decay => decay(source, target, resolutions), // dot
Skill::DecayTick => decay_tick(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::Haste => haste(source, target, resolutions), // speed slow
Skill::Heal => heal(source, target, resolutions), Skill::Heal => heal(source, target, resolutions),
Skill::Hex => hex(source, target, resolutions), // todo prevent casting 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::Invert => invert(source, target, resolutions), // todo prevent casting
Skill::Parry => parry(source, target, resolutions), Skill::Parry => parry(source, target, resolutions),
Skill::Purge => purge(source, target, resolutions), // dispel all buffs Skill::Purge => purge(source, target, resolutions), // dispel all buffs
Skill::Purify => purify(source, target, resolutions), // dispel all debuffs Skill::Purify => purify(source, target, resolutions), // dispel all debuffs
Skill::Recharge => recharge(source, target, resolutions), // target is immune to magic damage and fx 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::Shield => shield(source, target, resolutions), // target is immune to magic damage and fx
Skill::Silence => silence(source, target, resolutions), // target cannot cast spells Skill::Silence => silence(source, target, resolutions), // target cannot cast spells
Skill::Siphon => siphon(source, target, resolutions), Skill::Siphon => siphon(source, target, resolutions),
Skill::SiphonTick => siphon_tick(source, target, resolutions), // hot Skill::SiphonTick => siphon_tick(source, target, resolutions), // hot
Skill::Slay => unimplemented!(),
Skill::Slow => slow(source, target, resolutions), // speed slow Skill::Slow => slow(source, target, resolutions), // speed slow
Skill::Snare => snare(source, target, resolutions), // TODO prevent physical moves 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::Strike => strike(source, target, resolutions),
Skill::Stun => stun(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::Throw => throw(source, target, resolutions), // no damage stun, adds vulnerable
Skill::Triage => triage(source, target, resolutions), // hot Skill::Triage => triage(source, target, resolutions), // hot
Skill::TriageTick => triage_tick(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 // Test
@ -326,6 +322,8 @@ impl Effect {
Effect::Vulnerable => vec![Stat::RedDamageTaken], Effect::Vulnerable => vec![Stat::RedDamageTaken],
Effect::Block => vec![Stat::RedDamageTaken], Effect::Block => vec![Stat::RedDamageTaken],
Effect::Hatred => vec![Stat::RedDamage, Stat::BlueDamage],
Effect::Amplify => vec![Stat::BlueDamage], Effect::Amplify => vec![Stat::BlueDamage],
Effect::Curse => vec![Stat::BlueDamageTaken], Effect::Curse => vec![Stat::BlueDamageTaken],
@ -537,7 +535,6 @@ pub enum Skill {
Hostility, Hostility,
Corrupt, Corrupt,
Corruption,
CorruptionTick, CorruptionTick,
@ -606,7 +603,6 @@ impl Skill {
Skill::Taunt => Some(1), Skill::Taunt => Some(1),
Skill::Corrupt => Some(1), Skill::Corrupt => Some(1),
Skill::Corruption => None,
Skill::CorruptionTick => None, Skill::CorruptionTick => None,
Skill::Hostility => Some(1), Skill::Hostility => Some(1),
@ -695,7 +691,6 @@ impl Skill {
Skill::Hostility => Category::Blue, Skill::Hostility => Category::Blue,
Skill::Corrupt => Category::Blue, Skill::Corrupt => Category::Blue,
Skill::Corruption => Category::Blue,
Skill::CorruptionTick => 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) let effect = CrypEffect::new(Effect::Corruption)
.set_tick(Cast::new_tick(source, target, Skill::CorruptionTick)); .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); return corruption_tick(source, target, results);
} }