This commit is contained in:
Sam 2023-05-20 13:25:49 -04:00
parent 1548db3760
commit a2deac19ee
8 changed files with 61 additions and 26 deletions

View File

@ -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,
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,
)

View File

@ -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

View File

@ -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() {

View File

@ -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)],
}
}

View File

@ -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);
},
_ => {},
}

View File

@ -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"
},

View File

@ -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<s
BuffKind::Reckless => 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"),

View File

@ -210,7 +210,8 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec<String> {
| 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<String> {
| BuffKind::Frigid
| BuffKind::Lifesteal
// | BuffKind::SalamanderAspect
| BuffKind::ImminentCritical => Cow::Borrowed(""),
| BuffKind::ImminentCritical
| BuffKind::Fury => Cow::Borrowed(""),
}
} else if let BuffKind::Saturation
| BuffKind::Regeneration