diff --git a/assets/common/abilities/sceptre/healingaura.ron b/assets/common/abilities/sceptre/healingaura.ron index 16c74e8e60..23465bed42 100644 --- a/assets/common/abilities/sceptre/healingaura.ron +++ b/assets/common/abilities/sceptre/healingaura.ron @@ -5,7 +5,7 @@ BasicAura( targets: InGroup, aura: ( kind: Regeneration, - strength: 4.0, + strength: 2.0, duration: Some(10.0), category: Magical, ), diff --git a/assets/common/skill_trees/skill_max_levels.ron b/assets/common/skill_trees/skill_max_levels.ron index a319299903..4febf73b1e 100644 --- a/assets/common/skill_trees/skill_max_levels.ron +++ b/assets/common/skill_trees/skill_max_levels.ron @@ -64,8 +64,9 @@ Sceptre(LLifesteal): Some(3), Sceptre(LRegen): Some(2), Sceptre(HHeal): Some(3), - Sceptre(HCost): Some(2), Sceptre(HRange): Some(2), + Sceptre(HDuration): Some(2), + Sceptre(HCost): Some(2), Sceptre(AStrength): Some(2), Sceptre(ADuration): Some(2), Sceptre(ARange): Some(2), diff --git a/assets/common/skill_trees/skills_skill-groups_manifest.ron b/assets/common/skill_trees/skills_skill-groups_manifest.ron index 641ba74520..557eb2ea24 100644 --- a/assets/common/skill_trees/skills_skill-groups_manifest.ron +++ b/assets/common/skill_trees/skills_skill-groups_manifest.ron @@ -101,8 +101,9 @@ Sceptre(LLifesteal), Sceptre(LRegen), Sceptre(HHeal), - Sceptre(HCost), Sceptre(HRange), + Sceptre(HDuration), + Sceptre(HCost), Sceptre(UnlockAura), Sceptre(AStrength), Sceptre(ADuration), diff --git a/assets/common/skillset/dungeon/tier-5/sceptre.ron b/assets/common/skillset/dungeon/tier-5/sceptre.ron index 7900d41229..2f9f21590e 100644 --- a/assets/common/skillset/dungeon/tier-5/sceptre.ron +++ b/assets/common/skillset/dungeon/tier-5/sceptre.ron @@ -9,9 +9,9 @@ // Heal Skill((Sceptre(HHeal), Some(1))), - Skill((Sceptre(HCost), Some(1))), + Skill((Sceptre(HStrength), Some(1))), Skill((Sceptre(HRange), Some(1))), - + Skill((Sceptre(HCost), Some(1))), // Ward Skill((Sceptre(UnlockAura), None)), Skill((Sceptre(AStrength), Some(1))), diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index 22ef67f214..0757115104 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -1364,8 +1364,7 @@ impl CharacterAbility { if let Ok(Some(level)) = skillset.skill_level(Sceptre(HHeal)) { aura.strength *= 1.15_f32.powi(level.into()); } - if let Ok(Some(level)) = skillset.skill_level(Sceptre(ADuration)) { - //TODO: make a proper healing duration ability + if let Ok(Some(level)) = skillset.skill_level(Sceptre(HDuration)) { aura.duration.map(|dur| dur * 1.2_f32.powi(level.into())); } if let Ok(Some(level)) = skillset.skill_level(Sceptre(HRange)) { diff --git a/common/src/comp/skills.rs b/common/src/comp/skills.rs index 15efdb7052..1c2fc229df 100644 --- a/common/src/comp/skills.rs +++ b/common/src/comp/skills.rs @@ -478,8 +478,9 @@ pub enum SceptreSkill { LRegen, // Healing beam upgrades HHeal, - HCost, HRange, + HDuration, + HCost, // Warding aura upgrades UnlockAura, AStrength, @@ -499,6 +500,7 @@ impl Boost for SceptreSkill { // Healing beam upgrades Self::HHeal => 20.into(), Self::HRange => 20.into(), + Self::HDuration => 20.into(), Self::HCost => (-20_i16).into(), // Warding aura upgrades Self::AStrength => 15.into(), diff --git a/common/src/states/basic_aura.rs b/common/src/states/basic_aura.rs index 128645b6b9..dfdfc5ba40 100644 --- a/common/src/states/basic_aura.rs +++ b/common/src/states/basic_aura.rs @@ -69,7 +69,7 @@ impl CharacterBehavior for Data { // Creates aura let targets = AuraTarget::from((Some(self.static_data.targets), Some(data.uid))); - let aura = self.static_data.aura.to_aura( + let mut aura = self.static_data.aura.to_aura( data.uid, self.static_data.range, Some(self.static_data.aura_duration), @@ -80,11 +80,11 @@ impl CharacterBehavior for Data { match aura.aura_kind { AuraKind::Buff { kind: _, - mut data, + ref mut data, category: _, source: _, } => { - data.strength *= 1.1_f32; + data.strength *= 1.0 + (combo as f32).log(2.0_f32); }, } update.server_events.push_front(ServerEvent::ComboChange { diff --git a/server/src/persistence/json_models.rs b/server/src/persistence/json_models.rs index d359cc4672..9b6cbc23da 100644 --- a/server/src/persistence/json_models.rs +++ b/server/src/persistence/json_models.rs @@ -122,8 +122,9 @@ pub fn skill_to_db_string(skill: comp::skills::Skill) -> String { Sceptre(SceptreSkill::LLifesteal) => "Sceptre LLifesteal", Sceptre(SceptreSkill::LRegen) => "Sceptre LRegen", Sceptre(SceptreSkill::HHeal) => "Sceptre HHeal", - Sceptre(SceptreSkill::HCost) => "Sceptre HCost", + Sceptre(SceptreSkill::HDuration) => "Sceptre HDuration", Sceptre(SceptreSkill::HRange) => "Sceptre HRange", + Sceptre(SceptreSkill::HCost) => "Sceptre HCost", Sceptre(SceptreSkill::UnlockAura) => "Sceptre UnlockAura", Sceptre(SceptreSkill::AStrength) => "Sceptre AStrength", Sceptre(SceptreSkill::ADuration) => "Sceptre ADuration", diff --git a/server/src/sys/agent.rs b/server/src/sys/agent.rs index 711fdc5d83..4f3e78e9d1 100644 --- a/server/src/sys/agent.rs +++ b/server/src/sys/agent.rs @@ -19,9 +19,9 @@ use common::{ }, skills::{AxeSkill, BowSkill, HammerSkill, SceptreSkill, Skill, StaffSkill, SwordSkill}, Agent, Alignment, BehaviorCapability, BehaviorState, Body, CharacterAbility, - CharacterState, ControlAction, ControlEvent, Controller, Energy, Health, HealthChange, - InputKind, Inventory, InventoryAction, LightEmitter, MountState, Ori, PhysicsState, Pos, - Scale, SkillSet, Stats, UnresolvedChatMsg, UtteranceKind, Vel, + CharacterState, Combo, ControlAction, ControlEvent, Controller, Energy, Health, + HealthChange, InputKind, Inventory, InventoryAction, LightEmitter, MountState, Ori, + PhysicsState, Pos, Scale, SkillSet, Stats, UnresolvedChatMsg, UtteranceKind, Vel, }, consts::GRAVITY, effect::{BuffEffect, Effect}, @@ -157,6 +157,7 @@ pub struct ReadData<'a> { world: ReadExpect<'a, Arc>, rtsim_entities: ReadStorage<'a, RtSimEntity>, buffs: ReadStorage<'a, Buffs>, + combos: ReadStorage<'a, Combo>, } // This is 3.1 to last longer than the last damage timer (3.0 seconds) @@ -2445,6 +2446,7 @@ impl<'a> AgentData<'a> { read_data: &ReadData, ) { const DESIRED_ENERGY_LEVEL: u32 = 500; + const DESIRED_COMBO_LEVEL: u32 = 8; // Logic to use abilities if attack_data.dist_sqrd > attack_data.min_attack_dist.powi(2) && can_see_tgt( @@ -2456,7 +2458,23 @@ impl<'a> AgentData<'a> { { // If far enough away, and can see target, check which skill is appropriate to // use - if self + if self.energy.current() > DESIRED_ENERGY_LEVEL + && match read_data.combos.get(*self.entity) { + Some(combo) => combo.counter() >= DESIRED_COMBO_LEVEL, + None => false, + } + && !read_data.buffs.get(*self.entity).iter().any(|buff| { + buff.iter_kind(BuffKind::Regeneration) + .peekable() + .peek() + .is_some() + }) + { + // If have enough energy and combo to use healing aura, do so + controller + .actions + .push(ControlAction::basic_input(InputKind::Secondary)); + } else if self .skill_set .has_skill(Skill::Sceptre(SceptreSkill::UnlockAura)) && self.energy.current() > DESIRED_ENERGY_LEVEL