This commit is contained in:
Sam 2024-03-04 23:24:29 -05:00
parent b25e91e79a
commit e1ce09e0a1
15 changed files with 149 additions and 12 deletions

View File

@ -209,13 +209,13 @@
((), (Hammer(IronTempest), "common.abilities.hammer.iron_tempest")),
],
),
// Contextualized(
// pseudo_id: "common.abilities.hammer.upheaval",
// abilities: [
// ((dual_wielding_same_kind: true), (Hammer(Upheaval), "common.abilities.hammer.dual_upheaval")),
// ((), (Hammer(Upheaval), "common.abilities.hammer.upheaval")),
// ],
// ),
Contextualized(
pseudo_id: "common.abilities.hammer.upheaval",
abilities: [
((dual_wielding_same_kind: true), (Hammer(Upheaval), "common.abilities.hammer.dual_upheaval")),
((), (Hammer(Upheaval), "common.abilities.hammer.upheaval")),
],
),
// Simple(Hammer(Thunderclap), "common.abilities.hammer.thunderclap"),
// Simple(Hammer(SeismicShock), "common.abilities.hammer.seismic_shock"),
Contextualized(

View File

@ -0,0 +1,25 @@
BasicMelee(
energy_cost: 10,
buildup_duration: 0.6,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.4,
melee_constructor: (
kind: Bash(
damage: 15,
poise: 15,
knockback: 30,
energy_regen: 0,
),
range: 3,
angle: 20,
multi_target: Some(Normal),
damage_effect: Some(Buff((
kind: Staggered,
dur_secs: 10.0,
strength: Value(0.5),
chance: 1.0,
))),
),
ori_modifier: 0.2,
)

View File

@ -0,0 +1,24 @@
BasicMelee(
energy_cost: 10,
buildup_duration: 0.6,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.4,
melee_constructor: (
kind: Bash(
damage: 20,
poise: 20,
knockback: 40,
energy_regen: 0,
),
range: 3,
angle: 20,
damage_effect: Some(Buff((
kind: Staggered,
dur_secs: 10.0,
strength: Value(0.5),
chance: 1.0,
))),
),
ori_modifier: 0.2,
)

BIN
assets/voxygen/element/de_buffs/debuff_staggered.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/element/skills/hammer/upheaval.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -133,6 +133,9 @@ buff-winded = Winded
## Concussion
buff-concussion = Concussion
.desc = You have been hit hard on the head and have trouble focusing, preventing you from using some of your more complex attacks.
## Staggered
buff-title-staggered = Staggered
buff-desc-staggered = You are off balance and more susceptible to heavy attacks.
## Util
buff-text-over_seconds = over { $dur_secs } seconds
buff-text-for_seconds = for { $dur_secs } seconds

View File

@ -428,3 +428,9 @@ common-abilities-hammer-iron_tempest = Iron Tempest
common-abilities-hammer-dual_iron_tempest = Iron Tempest
.desc =
Swing swiftly enough that your hammers becomes like a storm, scattering your enemies.
common-abilities-hammer-upheaval = Upheaval
.desc =
Slam your hammer into your foe, knocking them into the air and leaving them vulnerable to staggers.
common-abilities-hammer-dual_upheaval = Upheaval
.desc =
Slam your hammers into your foes, knocking them into the air and leaving them vulnerable to staggers.

View File

@ -193,6 +193,7 @@ lazy_static! {
BuffKind::Rooted => "rooted",
BuffKind::Winded => "winded",
BuffKind::Concussion => "concussion",
BuffKind::Staggered => "staggered",
};
let mut buff_parser = HashMap::new();
for kind in BuffKind::iter() {

View File

@ -193,6 +193,10 @@ pub enum BuffKind {
/// Prevents use of auxiliary abilities.
/// Does not scale with strength
Concussion,
/// Increases amount of poise damage received
/// Scales linearly with strength, 1.0 leads to 100% more poise damage
/// received
Staggered,
// Complex, non-obvious buffs
/// Changed into another body.
Polymorphed,
@ -258,7 +262,8 @@ impl BuffKind {
| BuffKind::Heatstroke
| BuffKind::Rooted
| BuffKind::Winded
| BuffKind::Concussion => BuffDescriptor::SimpleNegative,
| BuffKind::Concussion
| BuffKind::Staggered => BuffDescriptor::SimpleNegative,
BuffKind::Polymorphed => BuffDescriptor::Complex,
}
}
@ -507,6 +512,7 @@ impl BuffKind {
BuffEffect::EnergyReward(1.0 - nn_scaling(data.strength)),
],
BuffKind::Concussion => vec![BuffEffect::DisableAuxiliaryAbilities],
BuffKind::Staggered => vec![BuffEffect::PoiseReduction(-data.strength)],
}
}

View File

@ -4554,7 +4554,8 @@ fn build_buff(
| BuffKind::ScornfulTaunt
| BuffKind::Rooted
| BuffKind::Winded
| BuffKind::Concussion => {
| BuffKind::Concussion
| BuffKind::Staggered => {
if buff_kind.is_simple() {
unreachable!("is_simple() above")
} else {

View File

@ -179,6 +179,62 @@ impl Animation for AlphaAnimation {
next.control.orientation.rotate_z(move2 * 0.4);
next.control.position += Vec3::new(0.0, 0.0, -12.0) * move2;
},
Some("common.abilities.hammer.upheaval") => {
hammer_start(&mut next, s_a);
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 move1base = move1;
let move1 = move1 * pullback;
let move2base = move2;
let move2 = move2 * pullback;
let move1_twist = move1 * (move1 * PI * 1.5).sin();
twist_forward(&mut next, move1_twist, 0.8, 0.3, 0.0, 0.4);
let angle1 = 5.0;
let angle2 = 4.0;
next.control
.orientation
.rotate_x(move1base * (2.0 - angle1) + move2base * (2.0 - angle2));
next.control.orientation.rotate_y(move1 * -0.8);
next.control
.orientation
.rotate_x(move1base * angle1 + move2base * angle2);
next.control.orientation.rotate_z(move1 * 1.0);
next.control.orientation.rotate_x(move2 * 6.0);
next.control.orientation.rotate_z(move2 * -0.6);
next.control.position += Vec3::new(-16.0, 0.0, 0.0) * move1;
next.control.position += Vec3::new(12.0, 0.0, 10.0) * move2;
twist_forward(&mut next, move2, 1.0, 0.9, 0.4, 1.1);
},
Some("common.abilities.hammer.dual_upheaval") => {
dual_wield_start(&mut next);
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 move1base = move1;
let move1_return = (3.0 * move1).sin();
let move1 = move1 * pullback;
let move2base = move2;
let move2 = move2 * pullback;
next.control.orientation.rotate_x(4.0 * move1base);
next.control_l.orientation.rotate_z(move1 * 0.6);
next.control_r.orientation.rotate_z(move1 * -0.6);
next.control.position += Vec3::new(0.0, 6.0, 8.0) * move1_return;
next.control.orientation.rotate_x(3.5 * move2base);
next.control_l.orientation.rotate_z(move2 * -1.4);
next.control_r.orientation.rotate_z(move2 * 1.4);
next.control.position += Vec3::new(0.0, 12.0, 10.0) * move2;
},
_ => {
let (move1, move2, _move3, move2h) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0),

View File

@ -409,7 +409,8 @@ fn get_buff_ident(buff: BuffKind) -> &'static str {
| BuffKind::Heatstroke
| BuffKind::Rooted
| BuffKind::Winded
| BuffKind::Concussion => {
| BuffKind::Concussion
| BuffKind::Staggered => {
tracing::error!("Player was killed by a debuff that doesn't do damage!");
"mysterious"
},

View File

@ -329,6 +329,7 @@ image_ids! {
hammer_lung_pummel: "voxygen.element.skills.hammer.lung_pummel",
hammer_helm_crusher: "voxygen.element.skills.hammer.helm_crusher",
hammer_iron_tempest: "voxygen.element.skills.hammer.iron_tempest",
hammer_upheaval: "voxygen.element.skills.hammer.upheaval",
// Skilltree Icons
health_plus_skill: "voxygen.element.skills.skilltree.health_plus",
energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus",
@ -821,6 +822,7 @@ image_ids! {
debuff_rooted: "voxygen.element.de_buffs.debuff_rooted",
debuff_winded: "voxygen.element.de_buffs.debuff_winded",
debuff_concussion: "voxygen.element.de_buffs.debuff_concussion",
debuff_staggered: "voxygen.element.de_buffs.debuff_staggered",
// Animation Frames
// Buff Frame

View File

@ -5280,6 +5280,7 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id {
BuffKind::Rooted => imgs.debuff_rooted,
BuffKind::Winded => imgs.debuff_winded,
BuffKind::Concussion => imgs.debuff_concussion,
BuffKind::Staggered => imgs.debuff_staggered,
}
}

View File

@ -213,6 +213,7 @@ fn buff_key(buff: BuffKind) -> &'static str {
BuffKind::Rooted => "buff-rooted",
BuffKind::Winded => "buff-winded",
BuffKind::Concussion => "buff-concussion",
BuffKind::Staggered => "buff-staggered",
// Neutral
BuffKind::Polymorphed => "buff-polymorphed",
}
@ -326,7 +327,8 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec<String> {
| BuffKind::ScornfulTaunt
| BuffKind::Rooted
| BuffKind::Winded
| BuffKind::Concussion => Cow::Borrowed(""),
| BuffKind::Concussion
| BuffKind::Staggered => Cow::Borrowed(""),
};
write!(&mut description, "{}", buff_desc).unwrap();
@ -380,7 +382,8 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec<String> {
| BuffKind::ScornfulTaunt
| BuffKind::Rooted
| BuffKind::Winded
| BuffKind::Concussion => Cow::Borrowed(""),
| BuffKind::Concussion
| BuffKind::Staggered => Cow::Borrowed(""),
}
} else if let BuffKind::Saturation
| BuffKind::Regeneration
@ -648,6 +651,8 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id {
"common.abilities.hammer.helm_crusher" => imgs.hammer_helm_crusher,
"common.abilities.hammer.iron_tempest" => imgs.hammer_iron_tempest,
"common.abilities.hammer.dual_iron_tempest" => imgs.hammer_iron_tempest,
"common.abilities.hammer.upheaval" => imgs.hammer_upheaval,
"common.abilities.hammer.dual_upheaval" => imgs.hammer_upheaval,
// Bow
"common.abilities.bow.charged" => imgs.bow_m1,
"common.abilities.bow.repeater" => imgs.bow_m2,