diff --git a/assets/common/items/debug/cultist_purp_2h_boss-0.ron b/assets/common/items/debug/cultist_purp_2h_boss-0.ron index 760a44acbd..6c1fb695ab 100644 --- a/assets/common/items/debug/cultist_purp_2h_boss-0.ron +++ b/assets/common/items/debug/cultist_purp_2h_boss-0.ron @@ -3,7 +3,7 @@ ItemDef( description: "Shouldn't this be a hammer?", kind: Tool( ( - kind: Staff, + kind: Sceptre, stats: ( equip_time_millis: 0, power: 1000.0, diff --git a/assets/common/skill_trees/skill_max_levels.ron b/assets/common/skill_trees/skill_max_levels.ron index add2842774..aeb424ebb7 100644 --- a/assets/common/skill_trees/skill_max_levels.ron +++ b/assets/common/skill_trees/skill_max_levels.ron @@ -58,4 +58,15 @@ Staff(SKnockback): Some(2), Staff(SRange): Some(2), Staff(SCost): Some(2), + Sceptre(BHeal): Some(3), + Sceptre(BDamage): Some(2), + Sceptre(BRange): Some(2), + Sceptre(BLifesteal): Some(2), + Sceptre(BRegen): Some(2), + Sceptre(BCost): Some(2), + Sceptre(PHeal): Some(3), + Sceptre(PDamage): Some(2), + Sceptre(PRadius): Some(2), + Sceptre(PCost): Some(2), + Sceptre(PProjSpeed): Some(2), }) \ No newline at end of file diff --git a/assets/common/skill_trees/skill_prerequisites.ron b/assets/common/skill_trees/skill_prerequisites.ron index fa00788b4e..581414c051 100644 --- a/assets/common/skill_trees/skill_prerequisites.ron +++ b/assets/common/skill_trees/skill_prerequisites.ron @@ -59,4 +59,13 @@ Staff(SKnockback): {Staff(UnlockShockwave): None}, Staff(SRange): {Staff(UnlockShockwave): None}, Staff(SCost): {Staff(UnlockShockwave): None}, + Sceptre(BDamage): {Sceptre(BHeal): Some(1)}, + Sceptre(BRange): {Sceptre(BHeal): Some(1)}, + Sceptre(BLifesteal): {Sceptre(BHeal): Some(1)}, + Sceptre(BRegen): {Sceptre(BHeal): Some(1)}, + Sceptre(BCost): {Sceptre(BHeal): Some(1)}, + Sceptre(PDamage): {Sceptre(PHeal): Some(1)}, + Sceptre(PRadius): {Sceptre(PHeal): Some(1)}, + Sceptre(PCost): {Sceptre(PHeal): Some(1)}, + Sceptre(PProjSpeed): {Sceptre(PHeal): Some(1)}, }) \ No newline at end of file diff --git a/assets/common/skill_trees/skills_skill-groups_manifest.ron b/assets/common/skill_trees/skills_skill-groups_manifest.ron index 56dcb5b029..a9c6d1627d 100644 --- a/assets/common/skill_trees/skills_skill-groups_manifest.ron +++ b/assets/common/skill_trees/skills_skill-groups_manifest.ron @@ -90,6 +90,16 @@ Staff(SCost), ], Weapon(Sceptre): [ - Sceptre(Unlock404), + Sceptre(BHeal), + Sceptre(BDamage), + Sceptre(BRange), + Sceptre(BLifesteal), + Sceptre(BRegen), + Sceptre(BCost), + Sceptre(PHeal), + Sceptre(PDamage), + Sceptre(PRadius), + Sceptre(PCost), + Sceptre(PProjSpeed), ], }) \ No newline at end of file diff --git a/client/src/lib.rs b/client/src/lib.rs index 4ba7e69c6d..75e7c39186 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -1319,6 +1319,61 @@ impl Client { SkillGroupType::Weapon(Sceptre), ))); }, + "@unlock sceptre beam heal" => { + self.send_msg(ClientGeneral::UnlockSkill(Skill::Sceptre( + SceptreSkill::BHeal, + ))); + }, + "@unlock sceptre beam damage" => { + self.send_msg(ClientGeneral::UnlockSkill(Skill::Sceptre( + SceptreSkill::BDamage, + ))); + }, + "@unlock sceptre beam range" => { + self.send_msg(ClientGeneral::UnlockSkill(Skill::Sceptre( + SceptreSkill::BRange, + ))); + }, + "@unlock sceptre beam lifesteal" => { + self.send_msg(ClientGeneral::UnlockSkill(Skill::Sceptre( + SceptreSkill::BLifesteal, + ))); + }, + "@unlock sceptre beam regen" => { + self.send_msg(ClientGeneral::UnlockSkill(Skill::Sceptre( + SceptreSkill::BRegen, + ))); + }, + "@unlock sceptre beam cost" => { + self.send_msg(ClientGeneral::UnlockSkill(Skill::Sceptre( + SceptreSkill::BCost, + ))); + }, + "@unlock sceptre proj heal" => { + self.send_msg(ClientGeneral::UnlockSkill(Skill::Sceptre( + SceptreSkill::PHeal, + ))); + }, + "@unlock sceptre proj damage" => { + self.send_msg(ClientGeneral::UnlockSkill(Skill::Sceptre( + SceptreSkill::PDamage, + ))); + }, + "@unlock sceptre proj radius" => { + self.send_msg(ClientGeneral::UnlockSkill(Skill::Sceptre( + SceptreSkill::PRadius, + ))); + }, + "@unlock sceptre proj cost" => { + self.send_msg(ClientGeneral::UnlockSkill(Skill::Sceptre( + SceptreSkill::PCost, + ))); + }, + "@unlock sceptre proj speed" => { + self.send_msg(ClientGeneral::UnlockSkill(Skill::Sceptre( + SceptreSkill::PProjSpeed, + ))); + }, "@unlock health" => { self.send_msg(ClientGeneral::UnlockSkill(Skill::General( GeneralSkill::HealthIncrease, diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index a8d9f9a2f4..a698fdbfb8 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -336,7 +336,7 @@ impl CharacterAbility { } => { *buildup_duration = (*buildup_duration as f32 / speed) as u64; *recover_duration = (*recover_duration as f32 / speed) as u64; - *projectile = projectile.modified_projectile(power, 1_f32, 1_f32); + *projectile = projectile.modified_projectile(power, 1_f32, 1_f32, power); }, RepeaterRanged { ref mut movement_duration, @@ -350,7 +350,7 @@ impl CharacterAbility { *buildup_duration = (*buildup_duration as f32 / speed) as u64; *shoot_duration = (*shoot_duration as f32 / speed) as u64; *recover_duration = (*recover_duration as f32 / speed) as u64; - *projectile = projectile.modified_projectile(power, 1_f32, 1_f32); + *projectile = projectile.modified_projectile(power, 1_f32, 1_f32, power); }, Boost { ref mut movement_duration, @@ -829,7 +829,8 @@ impl CharacterAbility { skills.get(&Bow(BRegen)).copied().flatten().unwrap_or(0); let power = 1.3_f32.powi(damage_level.into()); let regen = 1.5_f32.powi(regen_level.into()); - *projectile = projectile.modified_projectile(power, regen, 1_f32); + *projectile = + projectile.modified_projectile(power, regen, 1_f32, 1_f32); } }, ChargedRanged { @@ -879,7 +880,8 @@ impl CharacterAbility { } if let Some(level) = skills.get(&Bow(RDamage)).copied().flatten() { let power = 1.3_f32.powi(level.into()); - *projectile = projectile.modified_projectile(power, 1_f32, 1_f32); + *projectile = + projectile.modified_projectile(power, 1_f32, 1_f32, 1_f32); } if !skills.contains_key(&Bow(RLeap)) { *leap = None; @@ -914,7 +916,8 @@ impl CharacterAbility { let power = 1.2_f32.powi(damage_level.into()); let regen = 1.2_f32.powi(regen_level.into()); let range = 1.1_f32.powi(range_level.into()); - *projectile = projectile.modified_projectile(power, regen, range); + *projectile = + projectile.modified_projectile(power, regen, range, 1_f32); } }, BasicBeam { @@ -928,10 +931,10 @@ impl CharacterAbility { *base_dps = (*base_dps as f32 * 1.3_f32.powi(level.into())) as u32; } if let Some(level) = skills.get(&Staff(FRange)).copied().flatten() { - *range *= 1.25_f32.powi(level.into()); + let range_mod = 1.25_f32.powi(level.into()); + *range *= range_mod; // Duration modified to keep velocity constant - *beam_duration = - (*beam_duration as f32 * 1.4_f32.powi(level.into())) as u64; + *beam_duration = (*beam_duration as f32 * range_mod) as u64; } if let Some(level) = skills.get(&Staff(FDrain)).copied().flatten() { *energy_drain = @@ -969,6 +972,81 @@ impl CharacterAbility { _ => {}, } }, + ToolKind::Sceptre => { + use skills::SceptreSkill::*; + match self { + BasicBeam { + ref mut base_hps, + ref mut base_dps, + ref mut lifesteal_eff, + ref mut range, + ref mut energy_regen, + ref mut energy_cost, + ref mut beam_duration, + .. + } => { + if let Some(level) = skills.get(&Sceptre(BHeal)).copied().flatten() { + *base_hps = (*base_hps as f32 * 1.3_f32.powi(level.into())) as u32; + } + if let Some(level) = skills.get(&Sceptre(BDamage)).copied().flatten() { + *base_dps = (*base_dps as f32 * 1.3_f32.powi(level.into())) as u32; + } + if let Some(level) = skills.get(&Sceptre(BRange)).copied().flatten() { + let range_mod = 1.25_f32.powi(level.into()); + *range *= range_mod; + // Duration modified to keep velocity constant + *beam_duration = (*beam_duration as f32 * range_mod) as u64; + } + if let Some(level) = skills.get(&Sceptre(BLifesteal)).copied().flatten() + { + *lifesteal_eff *= 1.5_f32.powi(level.into()); + } + if let Some(level) = skills.get(&Sceptre(BRegen)).copied().flatten() { + *energy_regen = + (*energy_regen as f32 * 1.25_f32.powi(level.into())) as u32; + } + if let Some(level) = skills.get(&Sceptre(BCost)).copied().flatten() { + *energy_cost = + (*energy_cost as f32 * 0.75_f32.powi(level.into())) as u32; + } + }, + BasicRanged { + ref mut energy_cost, + ref mut projectile, + ref mut projectile_speed, + .. + } => { + { + let heal_level = + skills.get(&Sceptre(PHeal)).copied().flatten().unwrap_or(0); + let damage_level = skills + .get(&Sceptre(PDamage)) + .copied() + .flatten() + .unwrap_or(0); + let range_level = skills + .get(&Sceptre(PRadius)) + .copied() + .flatten() + .unwrap_or(0); + let heal = 1.2_f32.powi(heal_level.into()); + let power = 1.2_f32.powi(damage_level.into()); + let range = 1.4_f32.powi(range_level.into()); + *projectile = + projectile.modified_projectile(power, 1_f32, range, heal); + } + if let Some(level) = skills.get(&Sceptre(PCost)).copied().flatten() { + *energy_cost = + (*energy_cost as f32 * 0.8_f32.powi(level.into())) as u32; + } + if let Some(level) = skills.get(&Sceptre(PProjSpeed)).copied().flatten() + { + *projectile_speed *= 1.25_f32.powi(level.into()); + } + }, + _ => {}, + } + }, _ => {}, } } diff --git a/common/src/comp/projectile.rs b/common/src/comp/projectile.rs index 2f458a4fca..60c9a2b463 100644 --- a/common/src/comp/projectile.rs +++ b/common/src/comp/projectile.rs @@ -224,7 +224,13 @@ impl ProjectileConstructor { } } - pub fn modified_projectile(mut self, power: f32, regen: f32, range: f32) -> Self { + pub fn modified_projectile( + mut self, + power: f32, + regen: f32, + range: f32, + heal_power: f32, + ) -> Self { use ProjectileConstructor::*; match self { Arrow { @@ -260,7 +266,7 @@ impl ProjectileConstructor { .. } => { *damage *= power; - *heal *= power; + *heal *= heal_power; *radius *= range; }, Possess => {}, diff --git a/common/src/comp/skills.rs b/common/src/comp/skills.rs index ce70f23f6a..124c99b7e1 100644 --- a/common/src/comp/skills.rs +++ b/common/src/comp/skills.rs @@ -184,7 +184,19 @@ pub enum StaffSkill { #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize)] pub enum SceptreSkill { - Unlock404, + // Beam upgrades + BHeal, + BDamage, + BRange, + BLifesteal, + BRegen, + BCost, + // Projectile upgrades + PHeal, + PDamage, + PRadius, + PCost, + PProjSpeed, } #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize)]