mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'gGmMsS/Burning' into 'master'
Added burning debuff for Staff M2 See merge request veloren/veloren!2134
This commit is contained in:
commit
c962c5f12e
@ -6,7 +6,12 @@ BasicBeam(
|
|||||||
tick_rate: 3.0,
|
tick_rate: 3.0,
|
||||||
range: 20.0,
|
range: 20.0,
|
||||||
max_angle: 15.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_regen: 0,
|
||||||
energy_drain: 350,
|
energy_drain: 350,
|
||||||
orientation_behavior: Normal,
|
orientation_behavior: Normal,
|
||||||
|
BIN
assets/voxygen/element/de_buffs/debuff_burning_0.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/de_buffs/debuff_burning_0.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -24,6 +24,8 @@
|
|||||||
"buff.desc.bleed": "Inflicts regular damage.",
|
"buff.desc.bleed": "Inflicts regular damage.",
|
||||||
"buff.title.cursed": "Cursed",
|
"buff.title.cursed": "Cursed",
|
||||||
"buff.desc.cursed": "You are cursed.",
|
"buff.desc.cursed": "You are cursed.",
|
||||||
|
"buff.title.burn": "On Fire",
|
||||||
|
"buff.desc.burn": "You are burning alive",
|
||||||
// Buffs stats
|
// Buffs stats
|
||||||
"buff.stat.health": "Restores {str_total} Health",
|
"buff.stat.health": "Restores {str_total} Health",
|
||||||
"buff.stat.increase_max_stamina": "Raises Maximum Stamina by {strength}",
|
"buff.stat.increase_max_stamina": "Raises Maximum Stamina by {strength}",
|
||||||
|
@ -14,6 +14,8 @@ use std::{cmp::Ordering, time::Duration};
|
|||||||
/// This is used to determine what effects a buff will have
|
/// This is used to determine what effects a buff will have
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Serialize, Deserialize, PartialOrd, Ord)]
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Serialize, Deserialize, PartialOrd, Ord)]
|
||||||
pub enum BuffKind {
|
pub enum BuffKind {
|
||||||
|
/// Does damage to a creature over time
|
||||||
|
Burning,
|
||||||
/// Restores health/time for some period
|
/// Restores health/time for some period
|
||||||
Regeneration,
|
Regeneration,
|
||||||
/// Restores health/time for some period for consumables
|
/// Restores health/time for some period for consumables
|
||||||
@ -51,6 +53,7 @@ impl BuffKind {
|
|||||||
BuffKind::IncreaseMaxHealth => true,
|
BuffKind::IncreaseMaxHealth => true,
|
||||||
BuffKind::Invulnerability => true,
|
BuffKind::Invulnerability => true,
|
||||||
BuffKind::ProtectingWard => true,
|
BuffKind::ProtectingWard => true,
|
||||||
|
BuffKind::Burning => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,6 +239,14 @@ impl Buff {
|
|||||||
)],
|
)],
|
||||||
data.duration,
|
data.duration,
|
||||||
),
|
),
|
||||||
|
BuffKind::Burning => (
|
||||||
|
vec![BuffEffect::HealthChangeOverTime {
|
||||||
|
rate: -data.strength,
|
||||||
|
accumulated: 0.0,
|
||||||
|
kind: ModifierKind::Additive,
|
||||||
|
}],
|
||||||
|
data.duration,
|
||||||
|
),
|
||||||
};
|
};
|
||||||
Buff {
|
Buff {
|
||||||
kind,
|
kind,
|
||||||
|
@ -566,6 +566,7 @@ image_ids! {
|
|||||||
// Debuffs
|
// Debuffs
|
||||||
debuff_skull_0: "voxygen.element.de_buffs.debuff_skull_0",
|
debuff_skull_0: "voxygen.element.de_buffs.debuff_skull_0",
|
||||||
debuff_bleed_0: "voxygen.element.de_buffs.debuff_bleed_0",
|
debuff_bleed_0: "voxygen.element.de_buffs.debuff_bleed_0",
|
||||||
|
debuff_burning_0: "voxygen.element.de_buffs.debuff_burning_0",
|
||||||
|
|
||||||
// Animation Frames
|
// Animation Frames
|
||||||
// Buff Frame
|
// Buff Frame
|
||||||
|
@ -3447,6 +3447,7 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id {
|
|||||||
// Debuffs
|
// Debuffs
|
||||||
BuffKind::Bleeding { .. } => imgs.debuff_bleed_0,
|
BuffKind::Bleeding { .. } => imgs.debuff_bleed_0,
|
||||||
BuffKind::Cursed { .. } => imgs.debuff_skull_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
|
// Debuffs
|
||||||
BuffKind::Bleeding { .. } => localized_strings.get("buff.title.bleed"),
|
BuffKind::Bleeding { .. } => localized_strings.get("buff.title.bleed"),
|
||||||
BuffKind::Cursed { .. } => localized_strings.get("buff.title.cursed"),
|
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
|
// Debuffs
|
||||||
BuffKind::Bleeding { .. } => localized_strings.get("buff.desc.bleed"),
|
BuffKind::Bleeding { .. } => localized_strings.get("buff.desc.bleed"),
|
||||||
BuffKind::Cursed { .. } => localized_strings.get("buff.desc.cursed"),
|
BuffKind::Cursed { .. } => localized_strings.get("buff.desc.cursed"),
|
||||||
|
BuffKind::Burning { .. } => localized_strings.get("buff.desc.burn"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,6 +115,7 @@ pub fn consumable_desc(effects: &[Effect], i18n: &Localization) -> String {
|
|||||||
.replace("{strength}", &strength.to_string()),
|
.replace("{strength}", &strength.to_string()),
|
||||||
BuffKind::Invulnerability => i18n.get("buff.stat.invulnerability").to_string(),
|
BuffKind::Invulnerability => i18n.get("buff.stat.invulnerability").to_string(),
|
||||||
BuffKind::Bleeding
|
BuffKind::Bleeding
|
||||||
|
| BuffKind::Burning
|
||||||
| BuffKind::CampfireHeal
|
| BuffKind::CampfireHeal
|
||||||
| BuffKind::Cursed
|
| BuffKind::Cursed
|
||||||
| BuffKind::ProtectingWard => continue,
|
| BuffKind::ProtectingWard => continue,
|
||||||
@ -133,6 +134,7 @@ pub fn consumable_desc(effects: &[Effect], i18n: &Localization) -> String {
|
|||||||
.get("buff.text.for_seconds")
|
.get("buff.text.for_seconds")
|
||||||
.replace("{dur_secs}", &dur_secs.to_string()),
|
.replace("{dur_secs}", &dur_secs.to_string()),
|
||||||
BuffKind::Bleeding
|
BuffKind::Bleeding
|
||||||
|
| BuffKind::Burning
|
||||||
| BuffKind::Potion
|
| BuffKind::Potion
|
||||||
| BuffKind::CampfireHeal
|
| BuffKind::CampfireHeal
|
||||||
| BuffKind::Cursed
|
| BuffKind::Cursed
|
||||||
|
@ -807,7 +807,7 @@ impl ParticleMgr {
|
|||||||
for (buff_kind, _) in buffs.kinds.iter() {
|
for (buff_kind, _) in buffs.kinds.iter() {
|
||||||
#[allow(clippy::single_match)]
|
#[allow(clippy::single_match)]
|
||||||
match buff_kind {
|
match buff_kind {
|
||||||
buff::BuffKind::Cursed => {
|
buff::BuffKind::Cursed | buff::BuffKind::Burning => {
|
||||||
self.particles.resize_with(
|
self.particles.resize_with(
|
||||||
self.particles.len()
|
self.particles.len()
|
||||||
+ usize::from(self.scheduler.heartbeats(Duration::from_millis(15))),
|
+ usize::from(self.scheduler.heartbeats(Duration::from_millis(15))),
|
||||||
@ -826,7 +826,11 @@ impl ParticleMgr {
|
|||||||
Particle::new_directed(
|
Particle::new_directed(
|
||||||
Duration::from_secs(1),
|
Duration::from_secs(1),
|
||||||
time,
|
time,
|
||||||
ParticleMode::CultistFlame,
|
if matches!(buff_kind, buff::BuffKind::Cursed) {
|
||||||
|
ParticleMode::CultistFlame
|
||||||
|
} else {
|
||||||
|
ParticleMode::FlameThrower
|
||||||
|
},
|
||||||
start_pos,
|
start_pos,
|
||||||
end_pos,
|
end_pos,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user