mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Auras will now refresh buffs if a buff was already present that had a lesser duration.
Attack effects can now have multiple requirements. Fix for sceptre heal not requiring energy. Nerfed warding aura protection. Added icon for warding aura. Changelog.
This commit is contained in:
parent
16222948a3
commit
de5ef03ac4
@ -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
|
||||
|
||||
|
@ -5,7 +5,7 @@ BasicAura(
|
||||
targets: InGroup,
|
||||
aura: (
|
||||
kind: ProtectingWard,
|
||||
strength: 0.5,
|
||||
strength: 0.33,
|
||||
duration: Some(10.0),
|
||||
category: Magical,
|
||||
),
|
||||
|
@ -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,
|
||||
|
BIN
assets/voxygen/element/icons/sceptre_protection.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/sceptre_protection.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -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<GroupTarget>,
|
||||
effect: CombatEffect,
|
||||
requirement: Option<CombatRequirement>,
|
||||
requirements: Vec<CombatRequirement>,
|
||||
}
|
||||
|
||||
#[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
|
||||
}
|
||||
|
||||
|
@ -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),
|
||||
}
|
||||
|
||||
|
@ -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::*;
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -498,8 +498,9 @@ impl ParticleMgr {
|
||||
|| {
|
||||
let rand_dist = aura.radius * (1.0 - rng.gen::<f32>().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,
|
||||
|
Loading…
Reference in New Issue
Block a user