mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Pile Driver
This commit is contained in:
parent
90f3b671c3
commit
76dc196996
@ -232,7 +232,7 @@
|
|||||||
((), (Hammer(Intercept), "common.abilities.hammer.intercept")),
|
((), (Hammer(Intercept), "common.abilities.hammer.intercept")),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
// Simple(Hammer(PileDriver), "common.abilities.hammer.pile_driver"),
|
Simple(Hammer(PileDriver), "common.abilities.hammer.pile_driver"),
|
||||||
// Simple(Hammer(LungPummel), "common.abilities.hammer.lung_pummel"),
|
// Simple(Hammer(LungPummel), "common.abilities.hammer.lung_pummel"),
|
||||||
// Simple(Hammer(HelmCrusher), "common.abilities.hammer.helm_crusher"),
|
// Simple(Hammer(HelmCrusher), "common.abilities.hammer.helm_crusher"),
|
||||||
// Simple(Hammer(Rampart), "common.abilities.hammer.rampart"),
|
// Simple(Hammer(Rampart), "common.abilities.hammer.rampart"),
|
||||||
|
24
assets/common/abilities/hammer/pile_driver.ron
Normal file
24
assets/common/abilities/hammer/pile_driver.ron
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
BasicMelee(
|
||||||
|
energy_cost: 20,
|
||||||
|
buildup_duration: 0.4,
|
||||||
|
swing_duration: 0.1,
|
||||||
|
hit_timing: 0.9,
|
||||||
|
recover_duration: 0.2,
|
||||||
|
melee_constructor: (
|
||||||
|
kind: Bash(
|
||||||
|
damage: 25,
|
||||||
|
poise: 30,
|
||||||
|
knockback: 0,
|
||||||
|
energy_regen: 0,
|
||||||
|
),
|
||||||
|
range: 3.0,
|
||||||
|
angle: 15.0,
|
||||||
|
damage_effect: Some(Buff((
|
||||||
|
kind: Rooted,
|
||||||
|
dur_secs: 4.0,
|
||||||
|
strength: Value(1.0),
|
||||||
|
chance: 1.0,
|
||||||
|
))),
|
||||||
|
),
|
||||||
|
ori_modifier: 0.6,
|
||||||
|
)
|
BIN
assets/voxygen/element/de_buffs/debuff_rooted.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/de_buffs/debuff_rooted.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/skills/hammer/pile_driver.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/skills/hammer/pile_driver.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -124,6 +124,9 @@ buff-heatstroke = Heatstroke
|
|||||||
## Scornful Taunt
|
## Scornful Taunt
|
||||||
buff-scornfultaunt = Scornful Taunt
|
buff-scornfultaunt = Scornful Taunt
|
||||||
.desc = You scornfully taunt your enemies, granting you bolstered fortitude and stamina. However, your death will bolster your killer.
|
.desc = You scornfully taunt your enemies, granting you bolstered fortitude and stamina. However, your death will bolster your killer.
|
||||||
|
## Rooted
|
||||||
|
buff-rooted = Rooted
|
||||||
|
.desc = You are stuck in place and cannot move.
|
||||||
## Util
|
## Util
|
||||||
buff-text-over_seconds = over { $dur_secs } seconds
|
buff-text-over_seconds = over { $dur_secs } seconds
|
||||||
buff-text-for_seconds = for { $dur_secs } seconds
|
buff-text-for_seconds = for { $dur_secs } seconds
|
||||||
|
@ -413,4 +413,6 @@ common-abilities-hammer-spine_cracker = Spine Cracker
|
|||||||
common-abilities-hammer-breach = Breach
|
common-abilities-hammer-breach = Breach
|
||||||
.desc =
|
.desc =
|
||||||
Breach through your enemy's attempt at defense with a heavy strike from your hammer.
|
Breach through your enemy's attempt at defense with a heavy strike from your hammer.
|
||||||
|
common-abilities-hammer-pile_driver = Pile Driver
|
||||||
|
.desc =
|
||||||
|
Strike your enemy into the ground, stopping their movement until they free their legs.
|
||||||
|
@ -190,6 +190,7 @@ lazy_static! {
|
|||||||
BuffKind::Berserk => "berserk",
|
BuffKind::Berserk => "berserk",
|
||||||
BuffKind::Heatstroke => "heatstroke",
|
BuffKind::Heatstroke => "heatstroke",
|
||||||
BuffKind::ScornfulTaunt => "scornful_taunt",
|
BuffKind::ScornfulTaunt => "scornful_taunt",
|
||||||
|
BuffKind::Rooted => "rooted",
|
||||||
};
|
};
|
||||||
let mut buff_parser = HashMap::new();
|
let mut buff_parser = HashMap::new();
|
||||||
for kind in BuffKind::iter() {
|
for kind in BuffKind::iter() {
|
||||||
|
@ -177,6 +177,14 @@ pub enum BuffKind {
|
|||||||
/// 33.3% and energy reward reduced by 200%. Energy reward can't be
|
/// 33.3% and energy reward reduced by 200%. Energy reward can't be
|
||||||
/// reduced by more than 200%, to a minimum value of -100%.
|
/// reduced by more than 200%, to a minimum value of -100%.
|
||||||
Heatstroke,
|
Heatstroke,
|
||||||
|
/// Reduces movement speed to 0.
|
||||||
|
/// Strength increases the relative mass of the creature that can be
|
||||||
|
/// targeted. A strength of 1.0 means that a creature of the same mass gets
|
||||||
|
/// rooted for the full duration. A strength of 2.0 means a creature of
|
||||||
|
/// twice the mass gets rooted for the full duration. If the target's mass
|
||||||
|
/// is higher than the strength allows for, duration gets reduced using a
|
||||||
|
/// mutiplier from the ratio of masses.
|
||||||
|
Rooted,
|
||||||
// Complex, non-obvious buffs
|
// Complex, non-obvious buffs
|
||||||
/// Changed into another body.
|
/// Changed into another body.
|
||||||
Polymorphed,
|
Polymorphed,
|
||||||
@ -239,7 +247,8 @@ impl BuffKind {
|
|||||||
| BuffKind::Poisoned
|
| BuffKind::Poisoned
|
||||||
| BuffKind::Parried
|
| BuffKind::Parried
|
||||||
| BuffKind::PotionSickness
|
| BuffKind::PotionSickness
|
||||||
| BuffKind::Heatstroke => BuffDescriptor::SimpleNegative,
|
| BuffKind::Heatstroke
|
||||||
|
| BuffKind::Rooted => BuffDescriptor::SimpleNegative,
|
||||||
BuffKind::Polymorphed => BuffDescriptor::Complex,
|
BuffKind::Polymorphed => BuffDescriptor::Complex,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -479,6 +488,7 @@ impl BuffKind {
|
|||||||
duration: data.duration,
|
duration: data.duration,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
BuffKind::Rooted => vec![BuffEffect::MovementSpeed(0.0)],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -493,6 +503,21 @@ impl BuffKind {
|
|||||||
}
|
}
|
||||||
cat_ids
|
cat_ids
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn modify_data(&self, mut data: BuffData) -> BuffData {
|
||||||
|
// TODO: Remove clippy allow after another buff needs this
|
||||||
|
#[allow(clippy::single_match)]
|
||||||
|
match self {
|
||||||
|
BuffKind::Rooted => {
|
||||||
|
let source_mass = 50.0;
|
||||||
|
let dest_mass = 50.0_f64;
|
||||||
|
let ratio = (source_mass / dest_mass).min(1.0);
|
||||||
|
data.duration = data.duration.map(|dur| Secs(dur.0 * ratio));
|
||||||
|
},
|
||||||
|
_ => {},
|
||||||
|
}
|
||||||
|
data
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Struct used to store data relevant to a buff
|
// Struct used to store data relevant to a buff
|
||||||
@ -687,6 +712,7 @@ impl Buff {
|
|||||||
time: Time,
|
time: Time,
|
||||||
stats: Option<&Stats>,
|
stats: Option<&Stats>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
|
let data = kind.modify_data(data);
|
||||||
let effects = kind.effects(&data, stats);
|
let effects = kind.effects(&data, stats);
|
||||||
let cat_ids = kind.extend_cat_ids(cat_ids);
|
let cat_ids = kind.extend_cat_ids(cat_ids);
|
||||||
let start_time = Time(time.0 + data.delay.map_or(0.0, |delay| delay.0));
|
let start_time = Time(time.0 + data.delay.map_or(0.0, |delay| delay.0));
|
||||||
|
@ -4551,7 +4551,8 @@ fn build_buff(
|
|||||||
| BuffKind::Parried
|
| BuffKind::Parried
|
||||||
| BuffKind::PotionSickness
|
| BuffKind::PotionSickness
|
||||||
| BuffKind::Heatstroke
|
| BuffKind::Heatstroke
|
||||||
| BuffKind::ScornfulTaunt => {
|
| BuffKind::ScornfulTaunt
|
||||||
|
| BuffKind::Rooted => {
|
||||||
if buff_kind.is_simple() {
|
if buff_kind.is_simple() {
|
||||||
unreachable!("is_simple() above")
|
unreachable!("is_simple() above")
|
||||||
} else {
|
} else {
|
||||||
|
@ -154,6 +154,31 @@ impl Animation for AlphaAnimation {
|
|||||||
next.control.orientation.rotate_x(move2 * -4.5);
|
next.control.orientation.rotate_x(move2 * -4.5);
|
||||||
next.control.position += Vec3::new(0.0, 0.0, -20.0) * move2;
|
next.control.position += Vec3::new(0.0, 0.0, -20.0) * move2;
|
||||||
},
|
},
|
||||||
|
Some("common.abilities.hammer.pile_driver") => {
|
||||||
|
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 shake = (move1 * 15.0).sin();
|
||||||
|
let move1 = (move1 * 2.0).min(1.0) * pullback;
|
||||||
|
let move2 = move2 * pullback;
|
||||||
|
|
||||||
|
twist_back(&mut next, move1, 0.9, 0.3, 0.1, 0.5);
|
||||||
|
next.control.orientation.rotate_x(move1 * 2.4);
|
||||||
|
next.control.position += Vec3::new(-14.0, 0.0, 14.0) * move1;
|
||||||
|
next.control.orientation.rotate_z(move1 * 1.8);
|
||||||
|
|
||||||
|
next.control.orientation.rotate_x(shake * 0.15);
|
||||||
|
|
||||||
|
twist_forward(&mut next, move2, 1.6, 0.5, 0.2, 0.9);
|
||||||
|
next.control.orientation.rotate_x(move2 * -4.0);
|
||||||
|
next.control.orientation.rotate_z(move2 * 0.4);
|
||||||
|
next.control.position += Vec3::new(0.0, 0.0, -12.0) * move2;
|
||||||
|
},
|
||||||
_ => {
|
_ => {
|
||||||
let (move1, move2, _move3, move2h) = match stage_section {
|
let (move1, move2, _move3, move2h) = match stage_section {
|
||||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0),
|
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0),
|
||||||
|
@ -406,7 +406,8 @@ fn get_buff_ident(buff: BuffKind) -> &'static str {
|
|||||||
| BuffKind::Parried
|
| BuffKind::Parried
|
||||||
| BuffKind::PotionSickness
|
| BuffKind::PotionSickness
|
||||||
| BuffKind::Polymorphed
|
| BuffKind::Polymorphed
|
||||||
| BuffKind::Heatstroke => {
|
| BuffKind::Heatstroke
|
||||||
|
| BuffKind::Rooted => {
|
||||||
tracing::error!("Player was killed by a debuff that doesn't do damage!");
|
tracing::error!("Player was killed by a debuff that doesn't do damage!");
|
||||||
"mysterious"
|
"mysterious"
|
||||||
},
|
},
|
||||||
|
@ -325,6 +325,7 @@ image_ids! {
|
|||||||
hammer_retaliate: "voxygen.element.skills.hammer.retaliate",
|
hammer_retaliate: "voxygen.element.skills.hammer.retaliate",
|
||||||
hammer_spine_cracker: "voxygen.element.skills.hammer.spine_cracker",
|
hammer_spine_cracker: "voxygen.element.skills.hammer.spine_cracker",
|
||||||
hammer_breach: "voxygen.element.skills.hammer.breach",
|
hammer_breach: "voxygen.element.skills.hammer.breach",
|
||||||
|
hammer_pile_driver: "voxygen.element.skills.hammer.pile_driver",
|
||||||
// Skilltree Icons
|
// Skilltree Icons
|
||||||
health_plus_skill: "voxygen.element.skills.skilltree.health_plus",
|
health_plus_skill: "voxygen.element.skills.skilltree.health_plus",
|
||||||
energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus",
|
energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus",
|
||||||
@ -814,6 +815,7 @@ image_ids! {
|
|||||||
debuff_potionsickness_0: "voxygen.element.de_buffs.debuff_potionsickness_0",
|
debuff_potionsickness_0: "voxygen.element.de_buffs.debuff_potionsickness_0",
|
||||||
debuff_polymorphed: "voxygen.element.de_buffs.debuff_polymorphed",
|
debuff_polymorphed: "voxygen.element.de_buffs.debuff_polymorphed",
|
||||||
debuff_heatstroke_0: "voxygen.element.de_buffs.debuff_heatstroke_0",
|
debuff_heatstroke_0: "voxygen.element.de_buffs.debuff_heatstroke_0",
|
||||||
|
debuff_rooted: "voxygen.element.de_buffs.debuff_rooted",
|
||||||
|
|
||||||
// Animation Frames
|
// Animation Frames
|
||||||
// Buff Frame
|
// Buff Frame
|
||||||
|
@ -5275,6 +5275,7 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id {
|
|||||||
BuffKind::PotionSickness => imgs.debuff_potionsickness_0,
|
BuffKind::PotionSickness => imgs.debuff_potionsickness_0,
|
||||||
BuffKind::Polymorphed => imgs.debuff_polymorphed,
|
BuffKind::Polymorphed => imgs.debuff_polymorphed,
|
||||||
BuffKind::Heatstroke => imgs.debuff_heatstroke_0,
|
BuffKind::Heatstroke => imgs.debuff_heatstroke_0,
|
||||||
|
BuffKind::Rooted => imgs.debuff_rooted,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,6 +210,7 @@ fn buff_key(buff: BuffKind) -> &'static str {
|
|||||||
BuffKind::Parried => "buff-parried",
|
BuffKind::Parried => "buff-parried",
|
||||||
BuffKind::PotionSickness => "buff-potionsickness",
|
BuffKind::PotionSickness => "buff-potionsickness",
|
||||||
BuffKind::Heatstroke => "buff-heatstroke",
|
BuffKind::Heatstroke => "buff-heatstroke",
|
||||||
|
BuffKind::Rooted => "buff-rooted",
|
||||||
// Neutral
|
// Neutral
|
||||||
BuffKind::Polymorphed => "buff-polymorphed",
|
BuffKind::Polymorphed => "buff-polymorphed",
|
||||||
}
|
}
|
||||||
@ -320,7 +321,8 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec<String> {
|
|||||||
| BuffKind::Bloodfeast
|
| BuffKind::Bloodfeast
|
||||||
| BuffKind::Berserk
|
| BuffKind::Berserk
|
||||||
| BuffKind::Heatstroke
|
| BuffKind::Heatstroke
|
||||||
| BuffKind::ScornfulTaunt => Cow::Borrowed(""),
|
| BuffKind::ScornfulTaunt
|
||||||
|
| BuffKind::Rooted => Cow::Borrowed(""),
|
||||||
};
|
};
|
||||||
|
|
||||||
write!(&mut description, "{}", buff_desc).unwrap();
|
write!(&mut description, "{}", buff_desc).unwrap();
|
||||||
@ -371,7 +373,8 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec<String> {
|
|||||||
| BuffKind::Bloodfeast
|
| BuffKind::Bloodfeast
|
||||||
| BuffKind::Berserk
|
| BuffKind::Berserk
|
||||||
| BuffKind::Heatstroke
|
| BuffKind::Heatstroke
|
||||||
| BuffKind::ScornfulTaunt => Cow::Borrowed(""),
|
| BuffKind::ScornfulTaunt
|
||||||
|
| BuffKind::Rooted => Cow::Borrowed(""),
|
||||||
}
|
}
|
||||||
} else if let BuffKind::Saturation
|
} else if let BuffKind::Saturation
|
||||||
| BuffKind::Regeneration
|
| BuffKind::Regeneration
|
||||||
@ -634,6 +637,7 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id {
|
|||||||
"common.abilities.hammer.retaliate" => imgs.hammer_retaliate,
|
"common.abilities.hammer.retaliate" => imgs.hammer_retaliate,
|
||||||
"common.abilities.hammer.spine_cracker" => imgs.hammer_spine_cracker,
|
"common.abilities.hammer.spine_cracker" => imgs.hammer_spine_cracker,
|
||||||
"common.abilities.hammer.breach" => imgs.hammer_breach,
|
"common.abilities.hammer.breach" => imgs.hammer_breach,
|
||||||
|
"common.abilities.hammer.pile_driver" => imgs.hammer_pile_driver,
|
||||||
// Bow
|
// Bow
|
||||||
"common.abilities.bow.charged" => imgs.bow_m1,
|
"common.abilities.bow.charged" => imgs.bow_m1,
|
||||||
"common.abilities.bow.repeater" => imgs.bow_m2,
|
"common.abilities.bow.repeater" => imgs.bow_m2,
|
||||||
|
Loading…
Reference in New Issue
Block a user