mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Breach
This commit is contained in:
parent
7ed66f29bf
commit
90f3b671c3
@ -201,7 +201,7 @@
|
||||
Simple(Hammer(VigorousBash), "common.abilities.hammer.vigorous_bash"),
|
||||
Simple(Hammer(Retaliate), "common.abilities.hammer.retaliate"),
|
||||
Simple(Hammer(SpineCracker), "common.abilities.hammer.spine_cracker"),
|
||||
// Simple(Hammer(Breach), "common.abilities.hammer.breach"),
|
||||
Simple(Hammer(Breach), "common.abilities.hammer.breach"),
|
||||
// Contextualized(
|
||||
// pseudo_id: "common.abilities.hammer.iron_tempest",
|
||||
// abilities: [
|
||||
|
21
assets/common/abilities/hammer/breach.ron
Normal file
21
assets/common/abilities/hammer/breach.ron
Normal file
@ -0,0 +1,21 @@
|
||||
BasicMelee(
|
||||
energy_cost: 20,
|
||||
buildup_duration: 0.4,
|
||||
swing_duration: 0.1,
|
||||
hit_timing: 0.5,
|
||||
recover_duration: 0.2,
|
||||
melee_constructor: (
|
||||
kind: Bash(
|
||||
damage: 15,
|
||||
poise: 20,
|
||||
knockback: 0,
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 15.0,
|
||||
attack_effect: Some((Poise(40), TargetBlocking)),
|
||||
precision_flank_multiplier: 1.5,
|
||||
precision_flank_invert: true,
|
||||
),
|
||||
ori_modifier: 0.6,
|
||||
)
|
BIN
assets/voxygen/element/skills/hammer/breach.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/skills/hammer/breach.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -410,4 +410,7 @@ common-abilities-hammer-retaliate = Retaliate
|
||||
common-abilities-hammer-spine_cracker = Spine Cracker
|
||||
.desc =
|
||||
When you foe turns their back to you, strike them hard in the back, targeting the weak part of their spine.
|
||||
common-abilities-hammer-breach = Breach
|
||||
.desc =
|
||||
Breach through your enemy's attempt at defense with a heavy strike from your hammer.
|
||||
|
||||
|
@ -663,6 +663,9 @@ impl Attack {
|
||||
false
|
||||
}
|
||||
},
|
||||
CombatRequirement::TargetBlocking => target.char_state.map_or(false, |cs| {
|
||||
cs.is_block(attack_source) || cs.is_parry(attack_source)
|
||||
}),
|
||||
});
|
||||
if requirements_met {
|
||||
is_applied = true;
|
||||
@ -1023,6 +1026,7 @@ pub enum CombatRequirement {
|
||||
TargetHasBuff(BuffKind),
|
||||
TargetPoised,
|
||||
BehindTarget,
|
||||
TargetBlocking,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
@ -1643,8 +1647,15 @@ pub fn precision_mult_from_flank(
|
||||
attack_dir: Vec3<f32>,
|
||||
target_ori: Option<&Ori>,
|
||||
precision_flank_multiplier: f32,
|
||||
precision_flank_invert: bool,
|
||||
) -> Option<f32> {
|
||||
let angle = target_ori.map(|t_ori| t_ori.look_dir().angle_between(attack_dir));
|
||||
let angle = target_ori.map(|t_ori| {
|
||||
t_ori.look_dir().angle_between(if precision_flank_invert {
|
||||
-attack_dir
|
||||
} else {
|
||||
attack_dir
|
||||
})
|
||||
});
|
||||
match angle {
|
||||
Some(angle) if angle < FULL_FLANK_ANGLE => {
|
||||
Some(MAX_BACK_FLANK_PRECISION * precision_flank_multiplier)
|
||||
|
@ -1114,6 +1114,7 @@ impl Default for CharacterAbility {
|
||||
simultaneous_hits: 1,
|
||||
custom_combo: None,
|
||||
precision_flank_multiplier: 1.0,
|
||||
precision_flank_invert: false,
|
||||
},
|
||||
ori_modifier: 1.0,
|
||||
frontend_specifier: None,
|
||||
|
@ -24,6 +24,7 @@ pub struct Melee {
|
||||
pub break_block: Option<(Vec3<i32>, Option<ToolKind>)>,
|
||||
pub simultaneous_hits: u32,
|
||||
pub precision_flank_multiplier: f32,
|
||||
pub precision_flank_invert: bool,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
@ -81,6 +82,8 @@ pub struct MeleeConstructor {
|
||||
pub custom_combo: Option<CustomCombo>,
|
||||
#[serde(default = "default_precision_flank_multiplier")]
|
||||
pub precision_flank_multiplier: f32,
|
||||
#[serde(default)]
|
||||
pub precision_flank_invert: bool,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
@ -391,6 +394,7 @@ impl MeleeConstructor {
|
||||
break_block: None,
|
||||
simultaneous_hits: self.simultaneous_hits,
|
||||
precision_flank_multiplier: self.precision_flank_multiplier,
|
||||
precision_flank_invert: self.precision_flank_invert,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -264,6 +264,7 @@ impl<'a> System<'a> for Sys {
|
||||
beam.bezier.ctrl - beam.bezier.start,
|
||||
target_info.ori,
|
||||
1.0,
|
||||
false,
|
||||
);
|
||||
|
||||
let precision_from_time = {
|
||||
|
@ -249,6 +249,7 @@ impl<'a> System<'a> for Sys {
|
||||
.unwrap_or(ori.look_vec()),
|
||||
target_ori,
|
||||
melee_attack.precision_flank_multiplier,
|
||||
melee_attack.precision_flank_invert,
|
||||
);
|
||||
|
||||
let precision_from_poise = {
|
||||
|
@ -390,7 +390,7 @@ fn dispatch_hit(
|
||||
.map_or(false, |i| i.projectiles);
|
||||
|
||||
let precision_from_flank =
|
||||
combat::precision_mult_from_flank(*projectile_dir, target_info.ori, 1.0);
|
||||
combat::precision_mult_from_flank(*projectile_dir, target_info.ori, 1.0, false);
|
||||
|
||||
let precision_from_head = {
|
||||
// This performs a cylinder and line segment intersection check. The cylinder is
|
||||
|
@ -133,6 +133,27 @@ impl Animation for AlphaAnimation {
|
||||
next.control_l.orientation.rotate_z(move2 * -2.3);
|
||||
next.control_r.orientation.rotate_z(move2 * -2.3);
|
||||
},
|
||||
Some("common.abilities.hammer.breach") => {
|
||||
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 move1 = move1 * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
|
||||
next.control.orientation.rotate_x(move1 * 2.5);
|
||||
next.control.orientation.rotate_z(move1 * -4.8);
|
||||
next.control.position += Vec3::new(-12.0, 0.0, 22.0) * move1;
|
||||
twist_back(&mut next, move1, 0.6, 0.2, 0.0, 0.3);
|
||||
|
||||
twist_forward(&mut next, move2, 1.6, 0.4, 0.2, 0.7);
|
||||
next.control.orientation.rotate_x(move2 * -4.5);
|
||||
next.control.position += Vec3::new(0.0, 0.0, -20.0) * move2;
|
||||
},
|
||||
_ => {
|
||||
let (move1, move2, _move3, move2h) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0),
|
||||
|
@ -91,6 +91,7 @@ fn maps_basic_melee() {
|
||||
simultaneous_hits: 1,
|
||||
custom_combo: None,
|
||||
precision_flank_multiplier: 1.0,
|
||||
precision_flank_invert: false,
|
||||
},
|
||||
ori_modifier: 1.0,
|
||||
ability_info: empty_ability_info(),
|
||||
|
@ -324,6 +324,7 @@ image_ids! {
|
||||
hammer_intercept: "voxygen.element.skills.hammer.intercept",
|
||||
hammer_retaliate: "voxygen.element.skills.hammer.retaliate",
|
||||
hammer_spine_cracker: "voxygen.element.skills.hammer.spine_cracker",
|
||||
hammer_breach: "voxygen.element.skills.hammer.breach",
|
||||
// Skilltree Icons
|
||||
health_plus_skill: "voxygen.element.skills.skilltree.health_plus",
|
||||
energy_plus_skill: "voxygen.element.skills.skilltree.energy_plus",
|
||||
|
@ -633,6 +633,7 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id {
|
||||
"common.abilities.hammer.dual_intercept" => imgs.hammer_intercept,
|
||||
"common.abilities.hammer.retaliate" => imgs.hammer_retaliate,
|
||||
"common.abilities.hammer.spine_cracker" => imgs.hammer_spine_cracker,
|
||||
"common.abilities.hammer.breach" => imgs.hammer_breach,
|
||||
// Bow
|
||||
"common.abilities.bow.charged" => imgs.bow_m1,
|
||||
"common.abilities.bow.repeater" => imgs.bow_m2,
|
||||
|
Loading…
Reference in New Issue
Block a user