diff --git a/assets/common/abilities/staff/flamethrower.ron b/assets/common/abilities/staff/flamethrower.ron index 9ea6a41c73..4e0194fbe3 100644 --- a/assets/common/abilities/staff/flamethrower.ron +++ b/assets/common/abilities/staff/flamethrower.ron @@ -6,7 +6,12 @@ BasicBeam( tick_rate: 3.0, range: 20.0, max_angle: 15.0, - damage_effect: None, + damage_effect: Some(Buff(( + kind: Burning, + dur_secs: 10.0, + strength: DamageFraction(0.5), + chance: 0.25, + ))), energy_regen: 0, energy_drain: 350, orientation_behavior: Normal, diff --git a/assets/voxygen/element/de_buffs/debuff_burning_0.png b/assets/voxygen/element/de_buffs/debuff_burning_0.png new file mode 100644 index 0000000000..3d154f7ddb --- /dev/null +++ b/assets/voxygen/element/de_buffs/debuff_burning_0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89f5c6858fb365952dfc66acc6c00a8958df4ac8c4d3c6f980f92b1a53a9f45f +size 246 diff --git a/assets/voxygen/i18n/en/buff.ron b/assets/voxygen/i18n/en/buff.ron index 9fa2439d4a..ea4187e202 100644 --- a/assets/voxygen/i18n/en/buff.ron +++ b/assets/voxygen/i18n/en/buff.ron @@ -24,6 +24,8 @@ "buff.desc.bleed": "Inflicts regular damage.", "buff.title.cursed": "Cursed", "buff.desc.cursed": "You are cursed.", + "buff.title.burn": "On Fire", + "buff.desc.burn": "You are burning alive", // Buffs stats "buff.stat.health": "Restores {str_total} Health", "buff.stat.increase_max_stamina": "Raises Maximum Stamina by {strength}", diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index 5d5f76a187..d0ab0b04ec 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -14,6 +14,8 @@ use std::{cmp::Ordering, time::Duration}; /// This is used to determine what effects a buff will have #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Serialize, Deserialize, PartialOrd, Ord)] pub enum BuffKind { + /// Does damage to a creature over time + Burning, /// Restores health/time for some period Regeneration, /// Restores health/time for some period for consumables @@ -51,6 +53,7 @@ impl BuffKind { BuffKind::IncreaseMaxHealth => true, BuffKind::Invulnerability => true, BuffKind::ProtectingWard => true, + BuffKind::Burning => false, } } @@ -236,6 +239,14 @@ impl Buff { )], data.duration, ), + BuffKind::Burning => ( + vec![BuffEffect::HealthChangeOverTime { + rate: -data.strength, + accumulated: 0.0, + kind: ModifierKind::Additive, + }], + data.duration, + ), }; Buff { kind, diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 33c6cabf6a..3a3af7b30e 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -566,6 +566,7 @@ image_ids! { // Debuffs debuff_skull_0: "voxygen.element.de_buffs.debuff_skull_0", debuff_bleed_0: "voxygen.element.de_buffs.debuff_bleed_0", + debuff_burning_0: "voxygen.element.de_buffs.debuff_burning_0", // Animation Frames // Buff Frame diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 56eb81ea86..22b707b82c 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -3447,6 +3447,7 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id { // Debuffs BuffKind::Bleeding { .. } => imgs.debuff_bleed_0, BuffKind::Cursed { .. } => imgs.debuff_skull_0, + BuffKind::Burning { .. } => imgs.debuff_burning_0, } } @@ -3464,6 +3465,7 @@ pub fn get_buff_title(buff: BuffKind, localized_strings: &Localization) -> &str // Debuffs BuffKind::Bleeding { .. } => localized_strings.get("buff.title.bleed"), BuffKind::Cursed { .. } => localized_strings.get("buff.title.cursed"), + BuffKind::Burning { .. } => localized_strings.get("buff.title.burn"), } } @@ -3481,6 +3483,7 @@ pub fn get_buff_desc(buff: BuffKind, localized_strings: &Localization) -> &str { // Debuffs BuffKind::Bleeding { .. } => localized_strings.get("buff.desc.bleed"), BuffKind::Cursed { .. } => localized_strings.get("buff.desc.cursed"), + BuffKind::Burning { .. } => localized_strings.get("buff.desc.burn"), } } diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index aa5c18b5c6..8b6dcf69fc 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -115,6 +115,7 @@ pub fn consumable_desc(effects: &[Effect], i18n: &Localization) -> String { .replace("{strength}", &strength.to_string()), BuffKind::Invulnerability => i18n.get("buff.stat.invulnerability").to_string(), BuffKind::Bleeding + | BuffKind::Burning | BuffKind::CampfireHeal | BuffKind::Cursed | BuffKind::ProtectingWard => continue, @@ -133,6 +134,7 @@ pub fn consumable_desc(effects: &[Effect], i18n: &Localization) -> String { .get("buff.text.for_seconds") .replace("{dur_secs}", &dur_secs.to_string()), BuffKind::Bleeding + | BuffKind::Burning | BuffKind::Potion | BuffKind::CampfireHeal | BuffKind::Cursed diff --git a/voxygen/src/scene/particle.rs b/voxygen/src/scene/particle.rs index 9f2f6a4606..b58bbff27f 100644 --- a/voxygen/src/scene/particle.rs +++ b/voxygen/src/scene/particle.rs @@ -807,7 +807,7 @@ impl ParticleMgr { for (buff_kind, _) in buffs.kinds.iter() { #[allow(clippy::single_match)] match buff_kind { - buff::BuffKind::Cursed => { + buff::BuffKind::Cursed | buff::BuffKind::Burning => { self.particles.resize_with( self.particles.len() + usize::from(self.scheduler.heartbeats(Duration::from_millis(15))), @@ -826,7 +826,11 @@ impl ParticleMgr { Particle::new_directed( Duration::from_secs(1), time, - ParticleMode::CultistFlame, + if matches!(buff_kind, buff::BuffKind::Cursed) { + ParticleMode::CultistFlame + } else { + ParticleMode::FlameThrower + }, start_pos, end_pos, )