diff --git a/CHANGELOG.md b/CHANGELOG.md index e1cf9e0971..526503e167 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,6 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved static light rendering and illumination - Improved the tree spawning model to allow for overlapping forests - Changed sunlight (and, in general, static light) propagation through blocks to allow for more material properties +- Overhauled the sceptre ### Removed diff --git a/assets/common/abilities/sceptre/wardingaura.ron b/assets/common/abilities/sceptre/wardingaura.ron index 7872675f3d..116a678a8d 100644 --- a/assets/common/abilities/sceptre/wardingaura.ron +++ b/assets/common/abilities/sceptre/wardingaura.ron @@ -5,7 +5,7 @@ BasicAura( targets: InGroup, aura: ( kind: ProtectingWard, - strength: 0.5, + strength: 0.33, duration: Some(10.0), category: Magical, ), diff --git a/assets/common/abilities/unique/quadlowbeam/healingbeam.ron b/assets/common/abilities/unique/quadlowbeam/healingbeam.ron index ffbd29ff05..b3b5755ebf 100644 --- a/assets/common/abilities/unique/quadlowbeam/healingbeam.ron +++ b/assets/common/abilities/unique/quadlowbeam/healingbeam.ron @@ -3,13 +3,11 @@ BasicBeam( recover_duration: 0.25, beam_duration: 1.0, damage: 30, - //base_hps: 60, Don't merge until this comment is removed tick_rate: 2.0, range: 25.0, max_angle: 1.0, lifesteal_eff: 0.15, energy_regen: 25, - //energy_cost: 50, energy_drain: 0, orientation_behavior: Normal, specifier: HealingBeam, diff --git a/assets/voxygen/element/icons/sceptre_protection.png b/assets/voxygen/element/icons/sceptre_protection.png new file mode 100644 index 0000000000..788a6a65f2 --- /dev/null +++ b/assets/voxygen/element/icons/sceptre_protection.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3c781c717e2a10e270a590f9fbcd61b3123d522c6c8809c6d72f0741a2083bd +size 843 diff --git a/common/src/combat.rs b/common/src/combat.rs index 023b77770f..98a5b837aa 100644 --- a/common/src/combat.rs +++ b/common/src/combat.rs @@ -228,9 +228,9 @@ impl Attack { .filter(|e| e.target.map_or(true, |t| t == target_group)) .filter(|e| !(matches!(e.target, Some(GroupTarget::OutOfGroup)) && target_dodging)) { - if match &effect.requirement { - Some(CombatRequirement::AnyDamage) => accumulated_damage > 0.0, - Some(CombatRequirement::Energy(r)) => { + if effect.requirements.iter().all(|req| match req { + CombatRequirement::AnyDamage => accumulated_damage > 0.0, + CombatRequirement::Energy(r) => { if let Some(AttackerInfo { entity, energy: Some(e), @@ -253,7 +253,7 @@ impl Attack { false } }, - Some(CombatRequirement::Combo(r)) => { + CombatRequirement::Combo(r) => { if let Some(AttackerInfo { entity, combo: Some(c), @@ -273,8 +273,7 @@ impl Attack { false } }, - None => true, - } { + }) { match effect.effect { CombatEffect::Knockback(kb) => { let impulse = kb.calculate_impulse(dir); @@ -389,7 +388,7 @@ impl AttackDamage { pub struct AttackEffect { target: Option, effect: CombatEffect, - requirement: Option, + requirements: Vec, } #[cfg(not(target_arch = "wasm32"))] @@ -398,12 +397,12 @@ impl AttackEffect { Self { target, effect, - requirement: None, + requirements: Vec::new(), } } pub fn with_requirement(mut self, requirement: CombatRequirement) -> Self { - self.requirement = Some(requirement); + self.requirements.push(requirement); self } diff --git a/common/src/comp/character_state.rs b/common/src/comp/character_state.rs index c86b278d23..89df35baa7 100644 --- a/common/src/comp/character_state.rs +++ b/common/src/comp/character_state.rs @@ -83,7 +83,10 @@ pub enum CharacterState { BasicBeam(basic_beam::Data), /// Creates an aura that persists as long as you are actively casting BasicAura(basic_aura::Data), - /// A directed beam that heals targets in range + /// A directed beam that heals targets in range. This is separate from basic + /// beam as a large amount of functionality needed to be special cased + /// specifically for the healing beam. There was also functionality present + /// on basic beam which was unnecessary for the healing beam. HealingBeam(healing_beam::Data), } diff --git a/common/sys/src/aura.rs b/common/sys/src/aura.rs index 95074e9ea9..42728dda5e 100644 --- a/common/sys/src/aura.rs +++ b/common/sys/src/aura.rs @@ -128,13 +128,16 @@ impl<'a> System<'a> for Sys { if apply_buff { // Checks that target is not already receiving a buff from an // aura, where the buff is of the same kind, and is of at least - // the same strength + // the same strength and of at least the same duration // If no such buff is present, adds the buff let emit_buff = !target_buffs.buffs.iter().any(|(_, buff)| { buff.cat_ids.iter().any(|cat_id| { matches!(cat_id, BuffCategory::FromAura(_)) }) && buff.kind == kind && buff.data.strength >= data.strength + && buff.time.map_or(true, |dur| { + data.duration.map_or(false, |dur_2| dur >= dur_2) + }) }); if emit_buff { use buff::*; diff --git a/voxygen/src/hud/diary.rs b/voxygen/src/hud/diary.rs index f8fe98d048..dee5db1f5e 100644 --- a/voxygen/src/hud/diary.rs +++ b/voxygen/src/hud/diary.rs @@ -3264,7 +3264,7 @@ impl<'a> Widget for Diary<'a> { .set(state.skill_sceptre_lifesteal_0, ui); let skill = Skill::Sceptre(LDamage); if create_skill_button( - self.imgs.skill_sceptre_lifesteal, + self.imgs.magic_damage_skill, state.skills_top_l[1], &self.stats.skill_set, skill, @@ -3292,7 +3292,7 @@ impl<'a> Widget for Diary<'a> { }; let skill = Skill::Sceptre(LRange); if create_skill_button( - self.imgs.skill_sceptre_lifesteal, + self.imgs.magic_distance_skill, state.skills_top_l[2], &self.stats.skill_set, skill, @@ -3320,7 +3320,7 @@ impl<'a> Widget for Diary<'a> { }; let skill = Skill::Sceptre(LLifesteal); if create_skill_button( - self.imgs.skill_sceptre_lifesteal, + self.imgs.magic_lifesteal_skill, state.skills_top_l[3], &self.stats.skill_set, skill, @@ -3350,7 +3350,7 @@ impl<'a> Widget for Diary<'a> { }; let skill = Skill::Sceptre(LRegen); if create_skill_button( - self.imgs.skill_sceptre_lifesteal, + self.imgs.magic_energy_regen_skill, state.skills_top_l[4], &self.stats.skill_set, skill, @@ -3390,7 +3390,7 @@ impl<'a> Widget for Diary<'a> { .set(state.skill_sceptre_heal_0, ui); let skill = Skill::Sceptre(HHeal); if create_skill_button( - self.imgs.skill_sceptre_heal, + self.imgs.heal_heal_skill, state.skills_top_r[1], &self.stats.skill_set, skill, @@ -3416,7 +3416,7 @@ impl<'a> Widget for Diary<'a> { }; let skill = Skill::Sceptre(HCost); if create_skill_button( - self.imgs.skill_sceptre_heal, + self.imgs.heal_cost_skill, state.skills_top_r[2], &self.stats.skill_set, skill, @@ -3442,7 +3442,7 @@ impl<'a> Widget for Diary<'a> { }; let skill = Skill::Sceptre(HRange); if create_skill_button( - self.imgs.skill_sceptre_heal, + self.imgs.heal_distance_skill, state.skills_top_r[3], &self.stats.skill_set, skill, @@ -3497,7 +3497,7 @@ impl<'a> Widget for Diary<'a> { }; let skill = Skill::Sceptre(AStrength); if create_skill_button( - self.imgs.skill_sceptre_aura, + self.imgs.buff_damage_skill, state.skills_bot_l[1], &self.stats.skill_set, skill, @@ -3525,7 +3525,7 @@ impl<'a> Widget for Diary<'a> { }; let skill = Skill::Sceptre(ADuration); if create_skill_button( - self.imgs.skill_sceptre_aura, + self.imgs.buff_speed_skill, state.skills_bot_l[2], &self.stats.skill_set, skill, @@ -3553,7 +3553,7 @@ impl<'a> Widget for Diary<'a> { }; let skill = Skill::Sceptre(ARange); if create_skill_button( - self.imgs.skill_sceptre_aura, + self.imgs.buff_radius_skill, state.skills_bot_l[3], &self.stats.skill_set, skill, @@ -3581,7 +3581,7 @@ impl<'a> Widget for Diary<'a> { }; let skill = Skill::Sceptre(ACost); if create_skill_button( - self.imgs.skill_sceptre_aura, + self.imgs.buff_cost_skill, state.skills_bot_l[4], &self.stats.skill_set, skill, diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 07c0355202..958bfd8e2f 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -452,8 +452,7 @@ image_ids! { hammerleap: "voxygen.element.icons.skill_hammerleap", skill_axe_leap_slash: "voxygen.element.icons.skill_axe_leap_slash", skill_bow_jump_burst: "voxygen.element.icons.skill_bow_jump_burst", - // Do not merge until icon for this - skill_sceptre_aura: "voxygen.element.icons.heal_bomb", + skill_sceptre_aura: "voxygen.element.icons.sceptre_protection", missing_icon: "voxygen.element.icons.missing_icon_grey", // Buttons diff --git a/voxygen/src/scene/particle.rs b/voxygen/src/scene/particle.rs index 521331c2c1..eb8a8c7fee 100644 --- a/voxygen/src/scene/particle.rs +++ b/voxygen/src/scene/particle.rs @@ -498,8 +498,9 @@ impl ParticleMgr { || { let rand_dist = aura.radius * (1.0 - rng.gen::().powi(100)); let init_pos = Vec3::new(rand_dist, 0_f32, 0_f32); + let max_dur = Duration::from_secs(1); Particle::new_directed( - aura.duration.unwrap_or_else(|| Duration::from_secs(1)), + aura.duration.map_or(max_dur, |dur| dur.min(max_dur)), time, ParticleMode::EnergyNature, pos.0,