From a2deac19ee1cbd94a8c620bee106357bf167a325 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 20 May 2023 13:25:49 -0400 Subject: [PATCH] Furor --- assets/common/abilities/axe/furor.ron | 31 +++++++----------------- assets/voxygen/i18n/en/buff.ftl | 3 +++ common/src/cmd.rs | 1 + common/src/comp/buff.rs | 6 ++++- voxygen/anim/src/character/selfbuff.rs | 33 ++++++++++++++++++++++++++ voxygen/i18n-helpers/src/lib.rs | 3 ++- voxygen/src/hud/mod.rs | 4 ++++ voxygen/src/hud/util.rs | 6 +++-- 8 files changed, 61 insertions(+), 26 deletions(-) diff --git a/assets/common/abilities/axe/furor.ron b/assets/common/abilities/axe/furor.ron index b4732b4a2f..664bfc0d76 100644 --- a/assets/common/abilities/axe/furor.ron +++ b/assets/common/abilities/axe/furor.ron @@ -1,22 +1,9 @@ -ComboMelee2( - strikes: [ - ( - melee_constructor: ( - kind: Slash( - damage: 4, - poise: 5, - knockback: 0, - energy_regen: 5, - ), - range: 3.0, - angle: 45.0, - ), - buildup_duration: 0.15, - swing_duration: 0.05, - hit_timing: 0.5, - recover_duration: 0.1, - ori_modifier: 0.6, - ), - ], - energy_cost_per_strike: 0, -) \ No newline at end of file +SelfBuff( + buildup_duration: 0.3, + cast_duration: 0.3, + recover_duration: 0.2, + buff_kind: Fury, + buff_strength: 0.4, + buff_duration: Some(15.0), + energy_cost: 20, +) diff --git a/assets/voxygen/i18n/en/buff.ftl b/assets/voxygen/i18n/en/buff.ftl index 34efb7ac4f..787266bdf2 100644 --- a/assets/voxygen/i18n/en/buff.ftl +++ b/assets/voxygen/i18n/en/buff.ftl @@ -94,6 +94,9 @@ buff-desc-salamanderaspect = You cannot burn and move fast through lava. ## Imminent Critical buff-title-imminentcritical = Imminent Critical buff-desc-imminentcritical = Your next attack will critically hit the enemy. +## Fury +buff-title-fury = Fury +buff-desc-fury = With your fury, you attack more swiftly. ## Util buff-text-over_seconds = over { $dur_secs } seconds buff-text-for_seconds = for { $dur_secs } seconds diff --git a/common/src/cmd.rs b/common/src/cmd.rs index f275930a39..ebddaa9888 100644 --- a/common/src/cmd.rs +++ b/common/src/cmd.rs @@ -173,6 +173,7 @@ lazy_static! { BuffKind::Lifesteal => "lifesteal", // BuffKind::SalamanderAspect => "salamander_aspect", BuffKind::ImminentCritical => "imminent_critical", + BuffKind::Fury => "fury", }; let mut buff_parser = HashMap::new(); for kind in BuffKind::iter() { diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index fdc780bb11..732da7addd 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -84,6 +84,8 @@ pub enum BuffKind { /// hackily by adding 100% to the crit, will need to be adjusted if we ever /// allow double crits instead of treating 100 as a ceiling. ImminentCritical, + /// Increases attack speed linearly with strength, 1.0 is a 100% increase + Fury, // Debuffs /// Does damage to a creature over time. /// Strength should be the DPS of the debuff. @@ -147,7 +149,8 @@ impl BuffKind { | BuffKind::Frigid | BuffKind::Lifesteal //| BuffKind::SalamanderAspect - | BuffKind::ImminentCritical => true, + | BuffKind::ImminentCritical + | BuffKind::Fury => true, BuffKind::Bleeding | BuffKind::Cursed | BuffKind::Burning @@ -340,6 +343,7 @@ impl BuffKind { kind: ModifierKind::Additive, val: 1.0, }], + BuffKind::Fury => vec![BuffEffect::AttackSpeed(1.0 + data.strength)], } } diff --git a/voxygen/anim/src/character/selfbuff.rs b/voxygen/anim/src/character/selfbuff.rs index 319c18d68e..92e1774d33 100644 --- a/voxygen/anim/src/character/selfbuff.rs +++ b/voxygen/anim/src/character/selfbuff.rs @@ -290,6 +290,39 @@ impl Animation for SelfBuffAnimation { next.control.orientation.rotate_z(move2 * -1.3); next.control.orientation.rotate_y(move2 * 0.8); }, + Some("common.abilities.axe.furor") => { + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), + Some(StageSection::Action) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let move1 = move1 * pullback; + let move2 = move2 * pullback; + + next.hand_l.position = Vec3::new(s_a.ahl.0, s_a.ahl.1, s_a.ahl.2); + next.hand_l.orientation = + Quaternion::rotation_x(s_a.ahl.3) * Quaternion::rotation_y(s_a.ahl.4); + next.hand_r.position = Vec3::new(s_a.ahr.0, s_a.ahr.1, s_a.ahr.2); + next.hand_r.orientation = + Quaternion::rotation_x(s_a.ahr.3) * Quaternion::rotation_z(s_a.ahr.5); + + next.control.position = Vec3::new(s_a.ac.0, s_a.ac.1, s_a.ac.2); + next.control.orientation = Quaternion::rotation_x(s_a.ac.3) + * Quaternion::rotation_y(s_a.ac.4) + * Quaternion::rotation_z(s_a.ac.5 - move1 * PI); + + next.control.orientation.rotate_x(move1 * -1.0); + next.control.position += Vec3::new(move1 * 3.0, move1 * -2.0, move1 * 14.0); + next.control.orientation.rotate_z(move1 * 1.5); + + next.control.orientation.rotate_y(move2 * -1.0); + next.control.orientation.rotate_z(move2 * -1.6); + next.control.orientation.rotate_y(move2 * 0.7); + next.control.orientation.rotate_x(move2 * -0.5); + next.control.position += Vec3::new(move2 * 9.0, move2 * -3.0, move2 * -14.0); + }, _ => {}, } diff --git a/voxygen/i18n-helpers/src/lib.rs b/voxygen/i18n-helpers/src/lib.rs index 4d6184bba0..ba16a5fad2 100644 --- a/voxygen/i18n-helpers/src/lib.rs +++ b/voxygen/i18n-helpers/src/lib.rs @@ -121,7 +121,8 @@ pub fn localize_chat_message( | BuffKind::Frigid | BuffKind::Lifesteal // | BuffKind::SalamanderAspect - | BuffKind::ImminentCritical => { + | BuffKind::ImminentCritical + | BuffKind::Fury => { tracing::error!("Player was killed by a positive buff!"); "hud-outcome-mysterious" }, diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 6831d99058..c5d634b983 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -5114,6 +5114,8 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id { // BuffKind::SalamanderAspect => imgs.debuff_burning_0, // TODO: Get buff image BuffKind::ImminentCritical => imgs.buff_reckless, + // TODO: Get buff image + BuffKind::Fury => imgs.buff_reckless, // Debuffs BuffKind::Bleeding => imgs.debuff_bleed_0, BuffKind::Cursed => imgs.debuff_skull_0, @@ -5151,6 +5153,7 @@ pub fn get_buff_title(buff: BuffKind, localized_strings: &Localization) -> Cow localized_strings.get_msg("buff-title-reckless"), // BuffKind::SalamanderAspect => localized_strings.get_msg("buff-title-salamanderaspect"), BuffKind::ImminentCritical => localized_strings.get_msg("buff-title-imminentcritical"), + BuffKind::Fury => localized_strings.get_msg("buff-title-fury"), // Debuffs BuffKind::Bleeding { .. } => localized_strings.get_msg("buff-title-bleed"), BuffKind::Cursed { .. } => localized_strings.get_msg("buff-title-cursed"), @@ -5195,6 +5198,7 @@ pub fn get_buff_desc(buff: BuffKind, data: BuffData, localized_strings: &Localiz BuffKind::Reckless => localized_strings.get_msg("buff-desc-reckless"), // BuffKind::SalamanderAspect => localized_strings.get_msg("buff-desc-salamanderaspect"), BuffKind::ImminentCritical => localized_strings.get_msg("buff-desc-imminentcritical"), + BuffKind::Fury => localized_strings.get_msg("buff-desc-fury"), // Debuffs BuffKind::Bleeding { .. } => localized_strings.get_msg("buff-desc-bleed"), BuffKind::Cursed { .. } => localized_strings.get_msg("buff-desc-cursed"), diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 1debe375ca..7c174b2aca 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -210,7 +210,8 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec { | BuffKind::Frigid | BuffKind::Lifesteal // | BuffKind::SalamanderAspect - | BuffKind::ImminentCritical => Cow::Borrowed(""), + | BuffKind::ImminentCritical + | BuffKind::Fury => Cow::Borrowed(""), }; write!(&mut description, "{}", buff_desc).unwrap(); @@ -253,7 +254,8 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec { | BuffKind::Frigid | BuffKind::Lifesteal // | BuffKind::SalamanderAspect - | BuffKind::ImminentCritical => Cow::Borrowed(""), + | BuffKind::ImminentCritical + | BuffKind::Fury => Cow::Borrowed(""), } } else if let BuffKind::Saturation | BuffKind::Regeneration