mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
placeholder for charge animal, animated leapmelee, small fixes
This commit is contained in:
parent
a1aa3efd29
commit
a27b086401
@ -1,6 +1,6 @@
|
||||
BasicRanged(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 0,
|
||||
buildup_duration: 1,
|
||||
recover_duration: 10,
|
||||
projectile: Possess,
|
||||
projectile_body: Object(ArrowSnake),
|
||||
|
17
assets/common/abilities/unique/quadmedcharge/dash.ron
Normal file
17
assets/common/abilities/unique/quadmedcharge/dash.ron
Normal file
@ -0,0 +1,17 @@
|
||||
DashMelee(
|
||||
energy_cost: 0,
|
||||
base_damage: 30,
|
||||
max_damage: 40,
|
||||
base_knockback: 8.0,
|
||||
max_knockback: 15.0,
|
||||
range: 2.0,
|
||||
angle: 45.0,
|
||||
energy_drain: 0,
|
||||
forward_speed: 2.0,
|
||||
buildup_duration: 500,
|
||||
charge_duration: 1300,
|
||||
swing_duration: 100,
|
||||
recover_duration: 500,
|
||||
infinite_charge: true,
|
||||
is_interruptible: true,
|
||||
)
|
@ -0,0 +1,36 @@
|
||||
ComboMelee(
|
||||
stage_data: [
|
||||
(
|
||||
stage: 1,
|
||||
base_damage: 100,
|
||||
max_damage: 120,
|
||||
damage_increase: 10,
|
||||
knockback: 10.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 900,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 300,
|
||||
forward_movement: 1.0,
|
||||
),
|
||||
(
|
||||
stage: 2,
|
||||
base_damage: 80,
|
||||
max_damage: 110,
|
||||
damage_increase: 15,
|
||||
knockback: 10.0,
|
||||
range: 3.5,
|
||||
angle: 30.0,
|
||||
base_buildup_duration: 500,
|
||||
base_swing_duration: 100,
|
||||
base_recover_duration: 300,
|
||||
forward_movement: 1.5,
|
||||
),
|
||||
],
|
||||
initial_energy_gain: 0,
|
||||
max_energy_gain: 100,
|
||||
energy_increase: 20,
|
||||
speed_increase: 0.05,
|
||||
max_speed_increase: 1.8,
|
||||
is_interruptible: true,
|
||||
)
|
@ -1,13 +1,13 @@
|
||||
LeapMelee(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 200,
|
||||
movement_duration: 200,
|
||||
swing_duration: 200,
|
||||
buildup_duration: 500,
|
||||
movement_duration: 400,
|
||||
swing_duration: 75,
|
||||
recover_duration: 200,
|
||||
base_damage: 240,
|
||||
knockback: 12.0,
|
||||
range: 4.5,
|
||||
max_angle: 30.0,
|
||||
forward_leap_strength: 28.0,
|
||||
vertical_leap_strength: 8.0,
|
||||
forward_leap_strength: 30.0,
|
||||
vertical_leap_strength: 18.0,
|
||||
)
|
||||
|
@ -71,6 +71,11 @@
|
||||
secondary: "common.abilities.unique.quadmedjump.leap",
|
||||
skills: [],
|
||||
),
|
||||
Unique(QuadMedCharge): (
|
||||
primary: "common.abilities.unique.quadmedcharge.doublestrike",
|
||||
secondary: "common.abilities.unique.quadmedcharge.dash",
|
||||
skills: [],
|
||||
),
|
||||
Unique(QuadMedBasic): (
|
||||
primary: "common.abilities.unique.quadmedbasic.triplestrike",
|
||||
secondary: "common.abilities.unique.quadmedbasic.triplestrike",
|
||||
|
15
assets/common/items/npc_weapons/unique/quadmedcharge.ron
Normal file
15
assets/common/items/npc_weapons/unique/quadmedcharge.ron
Normal file
@ -0,0 +1,15 @@
|
||||
ItemDef(
|
||||
name: "Quad Med Charge",
|
||||
description: "testing123",
|
||||
kind: Tool(
|
||||
(
|
||||
kind: Unique(QuadMedCharge),
|
||||
stats: (
|
||||
equip_time_millis: 10,
|
||||
power: 1.00,
|
||||
speed: 1.00,
|
||||
),
|
||||
)
|
||||
),
|
||||
quality: Low,
|
||||
)
|
@ -175,6 +175,7 @@ pub enum UniqueKind {
|
||||
QuadMedQuick,
|
||||
QuadMedJump,
|
||||
QuadMedBasic,
|
||||
QuadMedCharge,
|
||||
QuadLowRanged,
|
||||
QuadLowTail,
|
||||
QuadLowQuick,
|
||||
|
@ -104,7 +104,7 @@ impl LoadoutBuilder {
|
||||
_ => {},
|
||||
},
|
||||
Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species {
|
||||
quadruped_medium::Species::Wolf => {
|
||||
quadruped_medium::Species::Wolf | quadruped_medium::Species::Grolgar => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.quadmedquick",
|
||||
));
|
||||
@ -114,6 +114,11 @@ impl LoadoutBuilder {
|
||||
"common.items.npc_weapons.unique.quadmedjump",
|
||||
));
|
||||
},
|
||||
quadruped_medium::Species::Tuskram => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.quadmedcharge",
|
||||
));
|
||||
},
|
||||
_ => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.quadmedbasic",
|
||||
@ -121,37 +126,19 @@ impl LoadoutBuilder {
|
||||
},
|
||||
},
|
||||
Body::QuadrupedLow(quadruped_low) => match quadruped_low.species {
|
||||
quadruped_low::Species::Maneater => {
|
||||
quadruped_low::Species::Maneater | quadruped_low::Species::Asp => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.quadlowranged",
|
||||
));
|
||||
},
|
||||
quadruped_low::Species::Asp => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.quadlowranged",
|
||||
));
|
||||
},
|
||||
quadruped_low::Species::Crocodile => {
|
||||
quadruped_low::Species::Crocodile
|
||||
| quadruped_low::Species::Alligator
|
||||
| quadruped_low::Species::Salamander => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.quadlowtail",
|
||||
));
|
||||
},
|
||||
quadruped_low::Species::Alligator => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.quadlowtail",
|
||||
));
|
||||
},
|
||||
quadruped_low::Species::Salamander => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.quadlowtail",
|
||||
));
|
||||
},
|
||||
quadruped_low::Species::Monitor => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.quadlowquick",
|
||||
));
|
||||
},
|
||||
quadruped_low::Species::Pangolin => {
|
||||
quadruped_low::Species::Monitor | quadruped_low::Species::Pangolin => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.quadlowquick",
|
||||
));
|
||||
|
@ -8,9 +8,9 @@ use crate::{
|
||||
tool::{ToolKind, UniqueKind},
|
||||
ItemKind,
|
||||
},
|
||||
quadruped_low, Agent, Alignment, Body, CharacterState, ControlAction, ControlEvent,
|
||||
Controller, Energy, GroupManip, Health, LightEmitter, Loadout, MountState, Ori,
|
||||
PhysicsState, Pos, Scale, UnresolvedChatMsg, Vel,
|
||||
Agent, Alignment, Body, CharacterState, ControlAction, ControlEvent, Controller, Energy,
|
||||
GroupManip, Health, LightEmitter, Loadout, MountState, Ori, PhysicsState, Pos, Scale,
|
||||
UnresolvedChatMsg, Vel,
|
||||
},
|
||||
event::{EventBus, ServerEvent},
|
||||
metrics::SysMetrics,
|
||||
@ -334,6 +334,7 @@ impl<'a> System<'a> for Sys {
|
||||
Staff,
|
||||
StoneGolemBoss,
|
||||
Wolf,
|
||||
Ram,
|
||||
QuadLowRanged,
|
||||
TailSlap,
|
||||
QuadLowQuick,
|
||||
@ -357,6 +358,8 @@ impl<'a> System<'a> for Sys {
|
||||
Tactic::StoneGolemBoss
|
||||
},
|
||||
Some(ToolKind::Unique(UniqueKind::QuadMedQuick)) => Tactic::Wolf,
|
||||
Some(ToolKind::Unique(UniqueKind::QuadMedCharge)) => Tactic::Ram,
|
||||
|
||||
Some(ToolKind::Unique(UniqueKind::QuadMedJump)) => Tactic::QuadMedJump,
|
||||
Some(ToolKind::Unique(UniqueKind::QuadMedBasic)) => {
|
||||
Tactic::QuadLowBasic
|
||||
@ -466,6 +469,8 @@ impl<'a> System<'a> for Sys {
|
||||
&& dist_sqrd < (4.0 * MIN_ATTACK_DIST * scale).powf(2.0))
|
||||
|| (tactic == Tactic::Wolf
|
||||
&& dist_sqrd < (3.0 * MIN_ATTACK_DIST * scale).powf(2.0))
|
||||
|| (tactic == Tactic::Ram
|
||||
&& dist_sqrd < (15.0 * MIN_ATTACK_DIST * scale).powf(2.0))
|
||||
|| ((tactic == Tactic::TailSlap || tactic == Tactic::QuadLowBasic)
|
||||
&& dist_sqrd < (1.5 * MIN_ATTACK_DIST * scale).powf(2.0))
|
||||
|| dist_sqrd < (MIN_ATTACK_DIST * scale).powf(2.0)
|
||||
@ -473,7 +478,7 @@ impl<'a> System<'a> for Sys {
|
||||
controller.actions.push(ControlAction::Wield);
|
||||
// Movement
|
||||
match tactic {
|
||||
Tactic::Wolf => {
|
||||
Tactic::Wolf | Tactic::Ram => {
|
||||
// Run away from target to get clear
|
||||
controller.actions.push(ControlAction::Unwield);
|
||||
inputs.move_dir = (pos.0 - tgt_pos.0)
|
||||
@ -592,6 +597,9 @@ impl<'a> System<'a> for Sys {
|
||||
} else if tactic == Tactic::Wolf
|
||||
&& dist_sqrd < (4.0 * MIN_ATTACK_DIST * scale).powf(2.0)
|
||||
&& dist_sqrd > (3.0 * MIN_ATTACK_DIST * scale).powf(2.0)
|
||||
|| tactic == Tactic::Ram
|
||||
&& dist_sqrd < (16.0 * MIN_ATTACK_DIST * scale).powf(2.0)
|
||||
&& dist_sqrd > (15.0 * MIN_ATTACK_DIST * scale).powf(2.0)
|
||||
{
|
||||
if *powerup < 2.0 {
|
||||
controller.actions.push(ControlAction::Unwield);
|
||||
|
@ -23,22 +23,28 @@ impl Animation for TailwhipAnimation {
|
||||
) -> Self::Skeleton {
|
||||
let mut next = (*skeleton).clone();
|
||||
|
||||
let (movement1base, movement2base, movement3, twitch) = match stage_section {
|
||||
let (movement1base, movement2base, movement3, twitch1, twitch2) = match stage_section {
|
||||
Some(StageSection::Charge) => (
|
||||
(anim_time as f32).min(1.2),
|
||||
0.0,
|
||||
0.0,
|
||||
(anim_time as f32 * 15.0).sin(),
|
||||
0.0,
|
||||
),
|
||||
Some(StageSection::Swing) => (1.0, (anim_time as f32).powf(4.0), 0.0, 1.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powf(6.0), 1.0),
|
||||
_ => (0.0, 0.0, 0.0, 0.0),
|
||||
Some(StageSection::Swing) => (1.0, (anim_time as f32).powf(4.0), 0.0, 1.0, 0.0),
|
||||
Some(StageSection::Recover) => (
|
||||
1.0,
|
||||
1.0,
|
||||
(anim_time as f32).powf(6.0),
|
||||
1.0,
|
||||
(anim_time as f32 * 7.0).sin(),
|
||||
),
|
||||
_ => (0.0, 0.0, 0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = 1.0 - movement3;
|
||||
let subtract = global_time - timer;
|
||||
let check = subtract - subtract.trunc();
|
||||
let mirror = (check - 0.5).signum() as f32;
|
||||
let twitchfinal = mirror * (anim_time as f32 * 10.0).sin();
|
||||
let movement1 = mirror * movement1base * pullback;
|
||||
let movement2 = mirror * movement2base * pullback;
|
||||
let movement1abs = movement1base * pullback;
|
||||
@ -49,23 +55,28 @@ impl Animation for TailwhipAnimation {
|
||||
next.head_lower.orientation = Quaternion::rotation_z(movement1 * 0.7 + movement2 * -1.6);
|
||||
|
||||
next.chest.orientation = Quaternion::rotation_z(
|
||||
(mirror * twitch * 0.02 + movement1nopull * -0.4 + movement2nopull * 3.0)
|
||||
+ (movement3 * 4.0 * mirror),
|
||||
(mirror * twitch1 * 0.02 + movement1nopull * -0.4 + movement2nopull * 3.0)
|
||||
+ (movement3 * 4.0 * mirror)
|
||||
+ twitch2 * 0.1 * mirror,
|
||||
);
|
||||
|
||||
next.jaw.orientation = Quaternion::rotation_x(movement1 * -0.1 + movement2 * 0.1);
|
||||
|
||||
next.tail_front.orientation = Quaternion::rotation_x(0.15 + (movement1abs * -0.4))
|
||||
* Quaternion::rotation_z(
|
||||
(twitch * 0.15 + movement1 * -0.6 + movement2 * 0.9)
|
||||
* (1.0 - movement3 + twitchfinal * 0.2),
|
||||
mirror * twitch1 * 0.15
|
||||
+ movement1 * -0.6
|
||||
+ movement2 * 0.9
|
||||
+ twitch2 * 0.3 * mirror,
|
||||
);
|
||||
next.tail_rear.position = Vec3::new(0.0, s_a.tail_rear.0, s_a.tail_rear.1);
|
||||
|
||||
next.tail_rear.orientation = Quaternion::rotation_x(-0.12 + (movement1abs * -0.45))
|
||||
* Quaternion::rotation_z(
|
||||
(mirror * twitch * 0.2 + movement1 * -0.6 + movement2 * 0.7)
|
||||
* (1.0 - movement3 + twitchfinal * 0.2),
|
||||
mirror * twitch1 * 0.2
|
||||
+ movement1 * -0.6
|
||||
+ movement2 * 0.7
|
||||
+ twitch2 * 0.3 * mirror,
|
||||
);
|
||||
next
|
||||
}
|
||||
|
@ -24,55 +24,57 @@ impl Animation for LeapMeleeAnimation {
|
||||
let mut next = (*skeleton).clone();
|
||||
//let speed = (Vec2::<f32>::from(velocity).magnitude()).min(24.0);
|
||||
|
||||
let (movement1base, movement2base, movement3) = match stage_section {
|
||||
Some(StageSection::Buildup) => ((anim_time as f32).powf(1.0), 0.0, 0.0),
|
||||
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0),
|
||||
Some(StageSection::Recover) => (0.0, 1.0, (anim_time as f32).powf(4.0)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
let (movement1base, movement2base, movement3base, movement4) = match stage_section {
|
||||
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0, 0.0),
|
||||
Some(StageSection::Movement) => (1.0, anim_time as f32, 0.0, 0.0),
|
||||
Some(StageSection::Swing) => (1.0, 1.0, anim_time as f32, 0.0),
|
||||
Some(StageSection::Recover) => (0.0, 1.0, 1.0, (anim_time as f32).powf(4.0)),
|
||||
_ => (0.0, 0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = 1.0 - movement3;
|
||||
let pullback = 1.0 - movement4;
|
||||
let subtract = global_time - timer;
|
||||
let check = subtract - subtract.trunc();
|
||||
let mirror = (check - 0.5).signum() as f32;
|
||||
let movement1 = movement1base * mirror * pullback;
|
||||
let movement1abs = movement1base * pullback;
|
||||
//let movement2 = movement2base*mirror*pullback;
|
||||
let movement2abs = movement2base * pullback;
|
||||
let twitch1 = (movement1 * 10.0).sin() * pullback;
|
||||
let twitch2 = (movement3 * 5.0).sin() * pullback;
|
||||
let twitchmovement = twitch1 + twitch2;
|
||||
let movement3abs = movement3base * pullback;
|
||||
|
||||
next.head.orientation = Quaternion::rotation_x(movement1abs * 0.2 + movement2abs * 0.2)
|
||||
* Quaternion::rotation_y(twitchmovement * 0.3 * mirror);
|
||||
let twitch1 = (movement1base * 10.0).sin() * (1.0 - movement2base);
|
||||
let twitch3 = (movement3base * 5.0).sin() * mirror;
|
||||
let twitch1abs = twitch1 * mirror;
|
||||
|
||||
next.neck.orientation = Quaternion::rotation_x(movement1abs * -0.2)
|
||||
* Quaternion::rotation_y(twitchmovement * 0.1 * mirror);
|
||||
next.head.orientation = Quaternion::rotation_x(movement1abs * 0.2 + movement3abs * -0.7)
|
||||
* Quaternion::rotation_y(twitch1abs * 0.3 + twitch3 * 0.7);
|
||||
|
||||
next.jaw.orientation = Quaternion::rotation_x(twitchmovement * 0.1);
|
||||
next.neck.orientation = Quaternion::rotation_x(movement1abs * -0.2 + movement1abs * -0.2)
|
||||
* Quaternion::rotation_y(twitch1abs * 0.1);
|
||||
|
||||
next.tail.orientation = Quaternion::rotation_z(twitchmovement * 1.0 * mirror);
|
||||
next.jaw.orientation = Quaternion::rotation_x(movement1abs * -0.4 + twitch1 * 0.2);
|
||||
|
||||
next.tail.orientation = Quaternion::rotation_z(twitch1abs * 1.0);
|
||||
next.torso_front.position = Vec3::new(
|
||||
0.0,
|
||||
s_a.torso_front.0 + movement1abs * -4.0,
|
||||
s_a.torso_front.1,
|
||||
) * s_a.scaler
|
||||
/ 11.0;
|
||||
next.torso_front.orientation = Quaternion::rotation_x(movement1abs * 0.3)
|
||||
* Quaternion::rotation_y(twitchmovement * -0.1 * mirror);
|
||||
next.torso_front.orientation =
|
||||
Quaternion::rotation_x(movement1abs * 0.3 + movement2abs * -0.3 + movement3abs * 0.3)
|
||||
* Quaternion::rotation_y(twitch1abs * -0.1);
|
||||
|
||||
next.torso_back.orientation = Quaternion::rotation_x(movement1abs * -0.45)
|
||||
* Quaternion::rotation_y(twitchmovement * 0.1 * mirror);
|
||||
next.torso_back.orientation =
|
||||
Quaternion::rotation_x(movement1abs * -0.45) * Quaternion::rotation_y(twitch1abs * 0.1);
|
||||
|
||||
next.ears.orientation = Quaternion::rotation_x(twitchmovement * 0.1);
|
||||
next.leg_fl.orientation = Quaternion::rotation_x(movement1abs * 0.8)
|
||||
* Quaternion::rotation_y(twitchmovement * 0.1 * mirror);
|
||||
next.ears.orientation = Quaternion::rotation_x(twitch1 * 0.1);
|
||||
next.leg_fl.orientation = Quaternion::rotation_x(movement1abs * 0.8 + movement2abs * 0.4)
|
||||
* Quaternion::rotation_y(twitch1abs * 0.1);
|
||||
|
||||
next.leg_fr.orientation = Quaternion::rotation_x(movement1abs * 0.8)
|
||||
* Quaternion::rotation_y(twitchmovement * 0.1 * mirror);
|
||||
next.leg_fr.orientation = Quaternion::rotation_x(movement1abs * 0.8 + movement2abs * 0.4)
|
||||
* Quaternion::rotation_y(twitch1abs * 0.1);
|
||||
|
||||
next.leg_bl.orientation = Quaternion::rotation_x(movement1abs * 0.4);
|
||||
next.leg_bl.orientation = Quaternion::rotation_x(movement1abs * 0.4 + movement2abs * -1.2);
|
||||
|
||||
next.leg_br.orientation = Quaternion::rotation_x(movement1abs * 0.4);
|
||||
next.leg_br.orientation = Quaternion::rotation_x(movement1abs * 0.4 + movement2abs * -1.2);
|
||||
|
||||
next.foot_fl.orientation = Quaternion::rotation_x(movement1abs * -0.9);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user