mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Seismic shock
This commit is contained in:
parent
caac8025c6
commit
171125e73e
@ -217,7 +217,7 @@
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Simple(Hammer(Thunderclap), "common.abilities.hammer.thunderclap"),
|
Simple(Hammer(Thunderclap), "common.abilities.hammer.thunderclap"),
|
||||||
// Simple(Hammer(SeismicShock), "common.abilities.hammer.seismic_shock"),
|
Simple(Hammer(SeismicShock), "common.abilities.hammer.seismic_shock"),
|
||||||
Contextualized(
|
Contextualized(
|
||||||
pseudo_id: "common.abilities.hammer.heavy_whorl",
|
pseudo_id: "common.abilities.hammer.heavy_whorl",
|
||||||
abilities: [
|
abilities: [
|
||||||
|
22
assets/common/abilities/hammer/seismic_shock.ron
Normal file
22
assets/common/abilities/hammer/seismic_shock.ron
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
Shockwave(
|
||||||
|
energy_cost: 0,
|
||||||
|
buildup_duration: 0.6,
|
||||||
|
swing_duration: 0.2,
|
||||||
|
recover_duration: 0.6,
|
||||||
|
damage: 60,
|
||||||
|
poise_damage: 80,
|
||||||
|
knockback: (strength: 25.0, direction: Up),
|
||||||
|
shockwave_angle: 360.0,
|
||||||
|
shockwave_vertical_angle: 45.0,
|
||||||
|
shockwave_speed: 8.0,
|
||||||
|
shockwave_duration: 2.5,
|
||||||
|
dodgeable: Jump,
|
||||||
|
move_efficiency: 0.0,
|
||||||
|
damage_kind: Crushing,
|
||||||
|
specifier: Ground,
|
||||||
|
ori_rate: 0.0,
|
||||||
|
timing: PostAction,
|
||||||
|
emit_outcome: false,
|
||||||
|
minimum_combo: 20,
|
||||||
|
combo_consumption: Cost,
|
||||||
|
)
|
@ -14,4 +14,5 @@ FinisherMelee(
|
|||||||
angle: 15.0,
|
angle: 15.0,
|
||||||
),
|
),
|
||||||
minimum_combo: 20,
|
minimum_combo: 20,
|
||||||
|
combo_consumption: Cost,
|
||||||
)
|
)
|
BIN
assets/voxygen/element/skills/hammer/seismic_shock.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/skills/hammer/seismic_shock.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -443,3 +443,6 @@ common-abilities-hammer-tenacity = Tenacity
|
|||||||
common-abilities-hammer-thunderclap = Thunderclap
|
common-abilities-hammer-thunderclap = Thunderclap
|
||||||
.desc =
|
.desc =
|
||||||
Unleash a devastating, adrenaline-fueled overhead strike against your foe.
|
Unleash a devastating, adrenaline-fueled overhead strike against your foe.
|
||||||
|
common-abilities-hammer-seismic_shock = Seismic Shock
|
||||||
|
.desc =
|
||||||
|
After buildup up enough momentum in your hammer, strike the ground with enough force that it erupts outward, throwing your foes into the air.
|
||||||
|
@ -943,6 +943,10 @@ pub enum CharacterAbility {
|
|||||||
timing: shockwave::Timing,
|
timing: shockwave::Timing,
|
||||||
emit_outcome: bool,
|
emit_outcome: bool,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
minimum_combo: u32,
|
||||||
|
#[serde(default)]
|
||||||
|
combo_consumption: ComboConsumption,
|
||||||
|
#[serde(default)]
|
||||||
meta: AbilityMeta,
|
meta: AbilityMeta,
|
||||||
},
|
},
|
||||||
BasicBeam {
|
BasicBeam {
|
||||||
@ -1174,7 +1178,6 @@ impl CharacterAbility {
|
|||||||
| CharacterAbility::BasicRanged { energy_cost, .. }
|
| CharacterAbility::BasicRanged { energy_cost, .. }
|
||||||
| CharacterAbility::ChargedRanged { energy_cost, .. }
|
| CharacterAbility::ChargedRanged { energy_cost, .. }
|
||||||
| CharacterAbility::ChargedMelee { energy_cost, .. }
|
| CharacterAbility::ChargedMelee { energy_cost, .. }
|
||||||
| CharacterAbility::Shockwave { energy_cost, .. }
|
|
||||||
| CharacterAbility::BasicBlock { energy_cost, .. }
|
| CharacterAbility::BasicBlock { energy_cost, .. }
|
||||||
| CharacterAbility::RiposteMelee { energy_cost, .. }
|
| CharacterAbility::RiposteMelee { energy_cost, .. }
|
||||||
| CharacterAbility::ComboMelee2 {
|
| CharacterAbility::ComboMelee2 {
|
||||||
@ -1217,6 +1220,11 @@ impl CharacterAbility {
|
|||||||
energy_cost,
|
energy_cost,
|
||||||
combo_cost: minimum_combo,
|
combo_cost: minimum_combo,
|
||||||
..
|
..
|
||||||
|
}
|
||||||
|
| CharacterAbility::Shockwave {
|
||||||
|
energy_cost,
|
||||||
|
minimum_combo,
|
||||||
|
..
|
||||||
} => {
|
} => {
|
||||||
data.combo.map_or(false, |c| c.counter() >= *minimum_combo)
|
data.combo.map_or(false, |c| c.counter() >= *minimum_combo)
|
||||||
&& update.energy.try_change_by(-*energy_cost).is_ok()
|
&& update.energy.try_change_by(-*energy_cost).is_ok()
|
||||||
@ -1569,6 +1577,8 @@ impl CharacterAbility {
|
|||||||
ref mut damage_effect,
|
ref mut damage_effect,
|
||||||
timing: _,
|
timing: _,
|
||||||
emit_outcome: _,
|
emit_outcome: _,
|
||||||
|
minimum_combo: _,
|
||||||
|
combo_consumption: _,
|
||||||
meta: _,
|
meta: _,
|
||||||
} => {
|
} => {
|
||||||
*buildup_duration /= stats.speed;
|
*buildup_duration /= stats.speed;
|
||||||
@ -1892,6 +1902,10 @@ impl CharacterAbility {
|
|||||||
}
|
}
|
||||||
| SelfBuff {
|
| SelfBuff {
|
||||||
combo_cost: combo, ..
|
combo_cost: combo, ..
|
||||||
|
}
|
||||||
|
| Shockwave {
|
||||||
|
minimum_combo: combo,
|
||||||
|
..
|
||||||
} => *combo,
|
} => *combo,
|
||||||
BasicMelee { .. }
|
BasicMelee { .. }
|
||||||
| BasicRanged { .. }
|
| BasicRanged { .. }
|
||||||
@ -1902,7 +1916,6 @@ impl CharacterAbility {
|
|||||||
| LeapShockwave { .. }
|
| LeapShockwave { .. }
|
||||||
| ChargedMelee { .. }
|
| ChargedMelee { .. }
|
||||||
| ChargedRanged { .. }
|
| ChargedRanged { .. }
|
||||||
| Shockwave { .. }
|
|
||||||
| BasicBlock { .. }
|
| BasicBlock { .. }
|
||||||
| ComboMelee2 { .. }
|
| ComboMelee2 { .. }
|
||||||
| DiveMelee { .. }
|
| DiveMelee { .. }
|
||||||
@ -2645,6 +2658,8 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState {
|
|||||||
damage_effect,
|
damage_effect,
|
||||||
timing,
|
timing,
|
||||||
emit_outcome,
|
emit_outcome,
|
||||||
|
minimum_combo,
|
||||||
|
combo_consumption,
|
||||||
meta: _,
|
meta: _,
|
||||||
} => CharacterState::Shockwave(shockwave::Data {
|
} => CharacterState::Shockwave(shockwave::Data {
|
||||||
static_data: shockwave::StaticData {
|
static_data: shockwave::StaticData {
|
||||||
@ -2667,6 +2682,9 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState {
|
|||||||
ori_rate: *ori_rate,
|
ori_rate: *ori_rate,
|
||||||
timing: *timing,
|
timing: *timing,
|
||||||
emit_outcome: *emit_outcome,
|
emit_outcome: *emit_outcome,
|
||||||
|
minimum_combo: *minimum_combo,
|
||||||
|
combo_on_use: data.combo.map_or(0, |c| c.counter()),
|
||||||
|
combo_consumption: *combo_consumption,
|
||||||
},
|
},
|
||||||
timer: Duration::default(),
|
timer: Duration::default(),
|
||||||
stage_section: StageSection::Buildup,
|
stage_section: StageSection::Buildup,
|
||||||
|
@ -59,6 +59,9 @@ pub struct StaticData {
|
|||||||
pub ori_rate: f32,
|
pub ori_rate: f32,
|
||||||
/// Timing of shockwave
|
/// Timing of shockwave
|
||||||
pub timing: Timing,
|
pub timing: Timing,
|
||||||
|
pub minimum_combo: u32,
|
||||||
|
pub combo_on_use: u32,
|
||||||
|
pub combo_consumption: ComboConsumption,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
@ -194,6 +197,12 @@ impl CharacterBehavior for Data {
|
|||||||
|
|
||||||
impl Data {
|
impl Data {
|
||||||
fn attack(&self, data: &JoinData, output_events: &mut OutputEvents) {
|
fn attack(&self, data: &JoinData, output_events: &mut OutputEvents) {
|
||||||
|
self.static_data.combo_consumption.consume(
|
||||||
|
data,
|
||||||
|
output_events,
|
||||||
|
self.static_data.minimum_combo,
|
||||||
|
);
|
||||||
|
|
||||||
let poise = AttackEffect::new(
|
let poise = AttackEffect::new(
|
||||||
Some(GroupTarget::OutOfGroup),
|
Some(GroupTarget::OutOfGroup),
|
||||||
CombatEffect::Poise(self.static_data.poise_damage),
|
CombatEffect::Poise(self.static_data.poise_damage),
|
||||||
|
@ -159,6 +159,33 @@ impl Animation for ShockwaveAnimation {
|
|||||||
next.torso.orientation.rotate_x(move2 * -0.6);
|
next.torso.orientation.rotate_x(move2 * -0.6);
|
||||||
next.control.orientation.rotate_x(move2 * 0.6);
|
next.control.orientation.rotate_x(move2 * 0.6);
|
||||||
},
|
},
|
||||||
|
Some("common.abilities.hammer.seismic_shock") => {
|
||||||
|
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.position += Vec3::new(0.0, 0.0, 28.0) * move1;
|
||||||
|
next.head.orientation.rotate_x(move1 * 0.3);
|
||||||
|
next.chest.orientation.rotate_x(move1 * 0.3);
|
||||||
|
next.belt.orientation.rotate_x(move1 * -0.2);
|
||||||
|
next.shorts.orientation.rotate_x(move1 * -0.3);
|
||||||
|
|
||||||
|
next.control.orientation.rotate_z(move2 * 2.0);
|
||||||
|
next.control.orientation.rotate_x(move2 * -4.0);
|
||||||
|
next.control.position += Vec3::new(-6.0, 0.0, -30.0) * move2;
|
||||||
|
next.head.orientation.rotate_x(move2 * -0.9);
|
||||||
|
next.chest.orientation.rotate_x(move2 * -0.5);
|
||||||
|
next.belt.orientation.rotate_x(move2 * 0.2);
|
||||||
|
next.shorts.orientation.rotate_x(move2 * 0.4);
|
||||||
|
},
|
||||||
_ => {},
|
_ => {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,6 +333,7 @@ image_ids! {
|
|||||||
hammer_rampart: "voxygen.element.skills.hammer.rampart",
|
hammer_rampart: "voxygen.element.skills.hammer.rampart",
|
||||||
hammer_tenacity: "voxygen.element.skills.hammer.tenacity",
|
hammer_tenacity: "voxygen.element.skills.hammer.tenacity",
|
||||||
hammer_thunderclap: "voxygen.element.skills.hammer.thunderclap",
|
hammer_thunderclap: "voxygen.element.skills.hammer.thunderclap",
|
||||||
|
hammer_seismic_shock: "voxygen.element.skills.hammer.seismic_shock",
|
||||||
// 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",
|
||||||
|
@ -659,6 +659,7 @@ pub fn ability_image(imgs: &img_ids::Imgs, ability_id: &str) -> image::Id {
|
|||||||
"common.abilities.hammer.rampart" => imgs.hammer_rampart,
|
"common.abilities.hammer.rampart" => imgs.hammer_rampart,
|
||||||
"common.abilities.hammer.tenacity" => imgs.hammer_tenacity,
|
"common.abilities.hammer.tenacity" => imgs.hammer_tenacity,
|
||||||
"common.abilities.hammer.thunderclap" => imgs.hammer_thunderclap,
|
"common.abilities.hammer.thunderclap" => imgs.hammer_thunderclap,
|
||||||
|
"common.abilities.hammer.seismic_shock" => imgs.hammer_seismic_shock,
|
||||||
// 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