veloren_voxygen_anim/biped_large/
alpha.rs

1use super::{
2    super::{Animation, vek::*},
3    BipedLargeSkeleton, SkeletonAttr, biped_large_alpha_axe, biped_large_alpha_hammer,
4    biped_large_alpha_sword, init_biped_large_alpha, init_gigas_fire,
5};
6use common::{
7    comp::item::tool::{AbilitySpec, ToolKind},
8    states::utils::StageSection,
9};
10use core::f32::consts::PI;
11
12pub struct AlphaAnimation;
13
14impl Animation for AlphaAnimation {
15    type Dependency<'a> = (
16        Option<ToolKind>,
17        (Option<ToolKind>, Option<&'a AbilitySpec>),
18        Vec3<f32>,
19        f32,
20        Option<StageSection>,
21        f32,
22        f32,
23        Option<&'a str>,
24    );
25    type Skeleton = BipedLargeSkeleton;
26
27    #[cfg(feature = "use-dyn-lib")]
28    const UPDATE_FN: &'static [u8] = b"biped_large_alpha\0";
29
30    #[cfg_attr(feature = "be-dyn-lib", unsafe(export_name = "biped_large_alpha"))]
31    fn update_skeleton_inner(
32        skeleton: &Self::Skeleton,
33        (
34            active_tool_kind,
35            _second_tool,
36            velocity,
37            global_time,
38            stage_section,
39            acc_vel,
40            timer,
41            ability_id,
42        ): Self::Dependency<'_>,
43        anim_time: f32,
44        rate: &mut f32,
45        s_a: &SkeletonAttr,
46    ) -> Self::Skeleton {
47        *rate = 1.0;
48        let mut next = (*skeleton).clone();
49
50        let (move1base, move2base, move3) = match stage_section {
51            Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
52            Some(StageSection::Action) => (1.0, anim_time, 0.0),
53            Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
54            _ => (0.0, 0.0, 0.0),
55        };
56        let pullback = 1.0 - move3;
57        let move1 = move1base * pullback;
58        let move2 = move2base * pullback;
59
60        let subtract = global_time - timer;
61        let check = subtract - subtract.trunc();
62        let mirror = (check - 0.5).signum();
63        let speed = Vec2::<f32>::from(velocity).magnitude();
64
65        let foothorir = init_biped_large_alpha(&mut next, s_a, speed, acc_vel, move1);
66
67        match active_tool_kind {
68            Some(ToolKind::Sword) => match ability_id {
69                Some("common.abilities.custom.gigas_fire.fast_slash") => {
70                    init_gigas_fire(&mut next);
71
72                    next.head.orientation.rotate_z(-PI / 9.0 * move1base);
73                    next.torso.orientation.rotate_z(PI / 5.0 * move1base);
74                    next.lower_torso.orientation.rotate_z(-PI / 9.0 * move1base);
75                    next.control.position += Vec3::new(-10.0, 4.0, 5.0) * move1base;
76                    next.control.orientation.rotate_x(PI / 4.0 * move1);
77                    next.shoulder_l.position += Vec3::new(3.0, 3.0, 0.0) * move1base;
78                    next.shoulder_l.orientation.rotate_z(-PI / 8.0 * move1base);
79                    next.shoulder_r.position += Vec3::new(-3.0, 3.0, 0.0) * move1base;
80                    next.shoulder_r.orientation.rotate_z(PI / 4.0 * move1base);
81                    next.control_l.orientation.rotate_x(-PI / 4.0 * move1);
82                    next.control_r.orientation.rotate_z(PI / 3.0 * move1);
83                    next.foot_l.position += Vec3::new(-2.0, -2.0, 0.0) * move1;
84                    next.foot_l.orientation.rotate_z(PI / 5.0 * move1);
85
86                    next.head
87                        .orientation
88                        .rotate_z(PI / 9.0 * move2base + PI / 9.0 * move2);
89                    next.torso
90                        .orientation
91                        .rotate_z(-PI / 5.0 * move2base - PI / 5.0 * move2);
92                    next.lower_torso
93                        .orientation
94                        .rotate_z(PI / 9.0 * move2base + PI / 9.0 * move2);
95                    next.control.position += Vec3::new(10.0, -4.0, -5.0) * move2base;
96                    next.control.orientation.rotate_x(-PI / 1.2 * move2);
97                    next.control.orientation.rotate_y(-PI / 4.0 * move2);
98                    next.control.orientation.rotate_z(PI / 8.0 * move2);
99                    next.shoulder_l.position += Vec3::new(-3.0, -3.0, 0.0) * move2base;
100                    next.shoulder_r.position += Vec3::new(3.0, -3.0, 0.0) * move2base;
101                    next.shoulder_r.orientation.rotate_z(-PI / 4.0 * move2base);
102                    next.control_l.orientation.rotate_x(PI / 3.0 * move2);
103                    next.control_l.orientation.rotate_y(PI / 6.0 * move2);
104                    next.control_l.orientation.rotate_z(-PI / 8.0 * move2);
105                    next.control_r.orientation.rotate_x(PI / 3.0 * move2);
106                    next.control_r.orientation.rotate_y(PI / 6.0 * move2);
107                    next.control_r.orientation.rotate_z(PI / 6.0 * move2);
108                    next.leg_l.position += Vec3::new(1.0, 1.0, 0.0) * move2;
109                    next.leg_l.orientation.rotate_x(PI / 8.0 * move2);
110                    next.foot_l.position += Vec3::new(4.0, 4.0, 0.0) * move2;
111                    next.foot_l.orientation.rotate_z(-PI / 5.0 * move2);
112                    next.foot_r.position += Vec3::new(2.0, -2.0, 0.0) * move2;
113                    next.foot_r.orientation.rotate_z(-PI / 5.0 * move2);
114                },
115                // Mirrored version of the fast slash
116                Some("common.abilities.custom.gigas_fire.slow_slash") => {
117                    init_gigas_fire(&mut next);
118
119                    next.head.orientation.rotate_z(PI / 9.0 * move1base);
120                    next.torso.orientation.rotate_z(-PI / 5.0 * move1base);
121                    next.lower_torso.orientation.rotate_z(PI / 9.0 * move1base);
122                    next.control.position += Vec3::new(10.0, 4.0, 5.0) * move1base;
123                    next.control.orientation.rotate_x(PI / 4.0 * move1);
124                    next.shoulder_l.position += Vec3::new(3.0, 3.0, 0.0) * move1base;
125                    next.shoulder_l.orientation.rotate_z(-PI / 4.0 * move1base);
126                    next.shoulder_r.position += Vec3::new(-3.0, 3.0, 0.0) * move1base;
127                    next.shoulder_r.orientation.rotate_z(PI / 8.0 * move1base);
128                    next.control_l.orientation.rotate_z(-PI / 3.0 * move1);
129                    next.control_r.orientation.rotate_x(-PI / 4.0 * move1);
130                    next.foot_r.position += Vec3::new(2.0, -2.0, 0.0) * move1;
131                    next.foot_r.orientation.rotate_z(-PI / 5.0 * move1);
132
133                    next.head
134                        .orientation
135                        .rotate_z(-PI / 9.0 * move2base - PI / 9.0 * move2);
136                    next.torso
137                        .orientation
138                        .rotate_z(PI / 5.0 * move2base + PI / 5.0 * move2);
139                    next.lower_torso
140                        .orientation
141                        .rotate_z(-PI / 9.0 * move2base - PI / 9.0 * move2);
142                    next.control.position += Vec3::new(-10.0, -4.0, -5.0) * move2base;
143                    next.control.orientation.rotate_x(-PI / 1.2 * move2);
144                    next.control.orientation.rotate_y(PI / 4.0 * move2);
145                    next.control.orientation.rotate_z(-PI / 8.0 * move2);
146                    next.shoulder_l.position += Vec3::new(-3.0, -3.0, 0.0) * move2base;
147                    next.shoulder_l.orientation.rotate_z(PI / 4.0 * move2base);
148                    next.shoulder_r.position += Vec3::new(3.0, -3.0, 0.0) * move2base;
149                    next.control_l.orientation.rotate_x(PI / 3.0 * move2);
150                    next.control_l.orientation.rotate_y(-PI / 6.0 * move2);
151                    next.control_l.orientation.rotate_z(-PI / 6.0 * move2);
152                    next.control_r.orientation.rotate_x(PI / 3.0 * move2);
153                    next.control_r.orientation.rotate_y(-PI / 6.0 * move2);
154                    next.control_r.orientation.rotate_z(PI / 8.0 * move2);
155                    next.foot_l.position += Vec3::new(-2.0, -2.0, 0.0) * move2;
156                    next.foot_l.orientation.rotate_z(PI / 5.0 * move2);
157                    next.leg_r.position += Vec3::new(-1.0, 1.0, 0.0) * move2;
158                    next.leg_r.orientation.rotate_x(PI / 8.0 * move2);
159                    next.foot_r.position += Vec3::new(-4.0, 4.0, 0.0) * move2;
160                    next.foot_r.orientation.rotate_z(PI / 5.0 * move2);
161                },
162                Some("common.abilities.custom.gigas_fire.fast_thrust") => {
163                    init_gigas_fire(&mut next);
164
165                    next.foot_l.position += Vec3::new(-1.0, -1.0, 0.0) * move1;
166                    next.foot_l.orientation.rotate_z(PI / 5.0 * move1);
167                    next.leg_r.position += Vec3::new(1.0, 1.0, 0.0) * move1;
168                    next.leg_r.orientation.rotate_x(PI / 8.0 * move1);
169                    next.foot_r.position += Vec3::new(3.0, 3.0, 0.0) * move1;
170                    next.foot_r.orientation.rotate_z(-PI / 6.0 * move1);
171                    next.torso.orientation.rotate_z(PI / 2.0 * move1);
172                    next.lower_torso.orientation.rotate_z(-PI / 4.0 * move1);
173                    next.head.orientation.rotate_z(-PI / 4.0 * move1);
174                    next.control.orientation.rotate_y(PI / 2.0 * move1);
175                    next.control.orientation.rotate_x(-PI / 2.5 * move1);
176                    next.shoulder_l.position += Vec3::new(5.0, 5.0, 0.0) * move1;
177                    next.shoulder_l.orientation.rotate_z(-PI / 4.0 * move1);
178                    next.control_l.orientation.rotate_x(PI / 3.0 * move1);
179                    next.control_l.orientation.rotate_y(-PI / 6.0 * move1);
180                    next.shoulder_r.position += Vec3::new(-2.0, 2.0, 0.0) * move1;
181                    next.shoulder_r.orientation.rotate_z(PI / 6.0 * move1);
182                    next.control_r.orientation.rotate_z(PI / 4.0 * move1);
183                    next.control_r.orientation.rotate_y(-PI / 4.0 * move1);
184
185                    next.leg_r.orientation.rotate_x(-PI / 8.0 * move2);
186                    next.foot_r.position += Vec3::new(-2.0, -2.0, 0.0) * move2;
187                    next.foot_r.orientation.rotate_z(PI / 5.0 * move2);
188                    next.foot_l.position += Vec3::new(-1.0, 2.0, 0.0) * move2;
189                    next.torso.orientation.rotate_z(-PI / 1.5 * move2);
190                    next.lower_torso.orientation.rotate_z(PI / 4.0 * move2);
191                    next.head.orientation.rotate_z(PI / 4.0 * move2);
192                    next.control.position += Vec3::new(-10.0, 5.0, -8.0) * move2;
193                    next.control
194                        .orientation
195                        .rotate_x(PI / 2.5 * (4.0 * move2).min(1.0));
196                    next.control.orientation.rotate_y(PI / 20.0 * move2);
197                    next.control.orientation.rotate_z(PI / 1.7 * move2);
198                    next.main.position += Vec3::new(-3.0, 0.0, -3.0) * move2;
199                    next.shoulder_l.position += Vec3::new(-2.0, -2.0, 0.0) * move2;
200                    next.shoulder_l.orientation.rotate_z(PI / 6.0 * move2);
201                    next.control_l.orientation.rotate_x(-PI / 8.0 * move2);
202                    next.control_l.orientation.rotate_y(PI / 6.0 * move2);
203                    next.control_l.orientation.rotate_z(-PI / 1.8 * move2);
204                    next.control_r.orientation.rotate_x(PI / 3.0 * move2);
205                    next.control_r.orientation.rotate_z(-PI / 4.0 * move2);
206                },
207                // Mirrored version of the fast thrust
208                Some("common.abilities.custom.gigas_fire.slow_thrust") => {
209                    init_gigas_fire(&mut next);
210
211                    next.leg_l.position += Vec3::new(-1.0, 1.0, 0.0) * move1;
212                    next.leg_l.orientation.rotate_x(PI / 8.0 * move1);
213                    next.foot_l.position += Vec3::new(-3.0, 3.0, 0.0) * move1;
214                    next.foot_l.orientation.rotate_z(PI / 6.0 * move1);
215                    next.foot_r.position += Vec3::new(1.0, -1.0, 0.0) * move1;
216                    next.foot_r.orientation.rotate_z(-PI / 5.0 * move1);
217                    next.torso.orientation.rotate_z(-PI / 2.0 * move1);
218                    next.lower_torso.orientation.rotate_z(PI / 4.0 * move1);
219                    next.head.orientation.rotate_z(PI / 4.0 * move1);
220                    next.control.orientation.rotate_y(-PI / 2.0 * move1);
221                    next.control.orientation.rotate_x(-PI / 2.5 * move1);
222                    next.shoulder_l.position += Vec3::new(2.0, 2.0, 0.0) * move1;
223                    next.shoulder_l.orientation.rotate_z(-PI / 6.0 * move1);
224                    next.control_l.orientation.rotate_z(-PI / 4.0 * move1);
225                    next.control_l.orientation.rotate_y(PI / 4.0 * move1);
226                    next.shoulder_r.position += Vec3::new(-5.0, 5.0, 0.0) * move1;
227                    next.shoulder_r.orientation.rotate_z(PI / 4.0 * move1);
228                    next.control_r.orientation.rotate_x(PI / 3.0 * move1);
229                    next.control_r.orientation.rotate_y(PI / 6.0 * move1);
230
231                    next.foot_r.position += Vec3::new(1.0, 2.0, 0.0) * move2;
232                    next.leg_l.orientation.rotate_x(-PI / 8.0 * move2);
233                    next.foot_l.position += Vec3::new(2.0, -2.0, 0.0) * move2;
234                    next.foot_l.orientation.rotate_z(-PI / 5.0 * move2);
235                    next.torso.orientation.rotate_z(PI / 1.5 * move2);
236                    next.lower_torso.orientation.rotate_z(-PI / 4.0 * move2);
237                    next.head.orientation.rotate_z(-PI / 4.0 * move2);
238                    next.control.position += Vec3::new(10.0, 5.0, -8.0) * move2;
239                    next.control
240                        .orientation
241                        .rotate_x(PI / 2.5 * (4.0 * move2).min(1.0));
242                    next.control.orientation.rotate_y(-PI / 20.0 * move2);
243                    next.control.orientation.rotate_z(-PI / 1.7 * move2);
244                    next.main.position += Vec3::new(3.0, 0.0, -3.0) * move2;
245                    next.control_l.orientation.rotate_x(PI / 3.0 * move2);
246                    next.control_l.orientation.rotate_z(PI / 3.0 * move2);
247                    next.shoulder_r.position += Vec3::new(2.0, -2.0, 0.0) * move2;
248                    next.shoulder_r.orientation.rotate_z(-PI / 6.0 * move2);
249                    next.control_r.orientation.rotate_x(-PI / 8.0 * move2);
250                    next.control_r.orientation.rotate_y(-PI / 6.0 * move2);
251                    next.control_r.orientation.rotate_z(PI / 1.8 * move2);
252                },
253                Some("common.abilities.custom.gigas_fire.whirlwind") => {
254                    let move1 = move1base * pullback;
255                    let move2 = move2base;
256
257                    init_gigas_fire(&mut next);
258
259                    next.head.orientation.rotate_z(-PI / 8.0 * move1);
260                    next.lower_torso.orientation.rotate_z(-PI / 6.0 * move1base);
261                    next.shoulder_r.position += Vec3::new(-4.0, 4.0, 0.0) * move1base;
262                    next.shoulder_r.orientation.rotate_z(PI / 5.0 * move1base);
263                    next.control_l.orientation.rotate_x(-PI / 4.0 * move1);
264                    next.control_r.orientation.rotate_z(PI / 4.0 * move1);
265                    next.control_r.orientation.rotate_y(PI / 4.0 * move1);
266                    next.control.position += Vec3::new(-5.0, -5.0, -5.0) * move1;
267                    next.control.orientation.rotate_y(-PI / 2.3 * move1);
268                    next.control.orientation.rotate_z(PI / 6.0 * move1 * move1);
269                    next.leg_r.position += Vec3::new(1.5, -4.0, 0.0) * move1base;
270                    next.leg_r.orientation.rotate_x(-PI / 8.0 * move1base);
271                    next.leg_r.orientation.rotate_y(-PI / 8.0 * move1base);
272                    next.leg_r.orientation.rotate_z(-PI / 8.0 * move1base);
273                    next.foot_r.position += Vec3::new(3.0, -8.0, 0.0) * move1base;
274                    next.foot_r.orientation.rotate_z(-PI / 4.0 * move1base);
275
276                    next.head.orientation.rotate_z(-PI / 8.0 * move2);
277                    next.torso.orientation.rotate_z(-2.0 * PI * move2);
278                    next.lower_torso.orientation.rotate_z(PI / 6.0 * move2base);
279                    next.shoulder_r.position += Vec3::new(4.0, -4.0, 0.0) * move2base;
280                    next.shoulder_r.orientation.rotate_z(-PI / 5.0 * move2base);
281                    next.shoulder_l.position += Vec3::new(4.0, 4.0, 0.0) * move2;
282                    next.shoulder_l.orientation.rotate_z(-PI / 7.0 * move2);
283                    next.control_l.orientation.rotate_x(PI / 2.0 * move2);
284                    next.control_l.orientation.rotate_z(PI / 3.0 * move2);
285                    next.control_r.orientation.rotate_z(PI / 2.4 * move2);
286                    next.control_r.orientation.rotate_y(PI / 2.8 * move2);
287                    next.control_r.orientation.rotate_x(PI / 2.8 * move2);
288                    next.control.position += Vec3::new(4.0, 0.0, 0.0) * move2;
289                    next.control.orientation.rotate_z(-PI / 1.2 * move2);
290                    next.control.orientation.rotate_x(-PI / 5.0 * move2);
291                    next.leg_r.position += Vec3::new(-1.5, 4.0, 0.0) * move2base.powi(2);
292                    next.leg_r
293                        .orientation
294                        .rotate_x(PI / 8.0 * move2base.powi(2));
295                    next.leg_r
296                        .orientation
297                        .rotate_y(PI / 8.0 * move2base.powi(2));
298                    next.leg_r
299                        .orientation
300                        .rotate_z(PI / 8.0 * move2base.powi(2));
301                    next.foot_r.position += Vec3::new(-3.0, 8.0, 0.0) * move2base.powi(2);
302                    next.foot_r
303                        .orientation
304                        .rotate_z(PI / 4.0 * move2base.powi(2));
305                    next.foot_r.orientation.rotate_z(-PI / 8.0 * move2.powi(2));
306                    next.leg_l.position += Vec3::new(0.0, 2.5, 0.0) * move2.powi(2);
307                    next.leg_l.orientation.rotate_x(PI / 6.0 * move2.powi(2));
308                    next.foot_l.position += Vec3::new(0.0, 5.0, 0.0) * move2.powi(2);
309                    if matches!(stage_section, Some(StageSection::Action)) {
310                        next.leg_l.position.z += 3.0 * (PI * move2).sin();
311                        next.foot_l.position.z += 3.0 * (PI * move2).sin();
312                    }
313                    next.foot_l.orientation.rotate_z(-PI / 8.0 * move2);
314                },
315                Some("common.abilities.custom.gigas_fire.vertical_strike") => {
316                    let pullback = (1.0 - move3).powi(3);
317                    let move1 = move1base * pullback;
318                    let move2 = move2base * pullback;
319
320                    init_gigas_fire(&mut next);
321
322                    next.control.position += Vec3::new(5.0, 0.0, -20.0) * move1;
323                    next.control.orientation.rotate_y(PI / 2.5 * move1);
324                    next.control.orientation.rotate_x(-PI / 3.0 * move1);
325                    next.control.orientation.rotate_z(-PI / 4.0 * move1);
326                    next.shoulder_l.position += Vec3::new(5.0, 5.0, 0.0) * move1;
327                    next.shoulder_l.orientation.rotate_z(-PI / 4.0 * move1);
328                    next.torso.orientation.rotate_z(-PI / 3.0 * move1);
329                    next.lower_torso.orientation.rotate_z(PI / 8.0 * move1);
330                    next.leg_r.position += Vec3::new(2.0, -2.0, 0.0) * move1;
331                    next.leg_r.orientation.rotate_y(-PI / 8.0 * move1);
332                    next.leg_r.orientation.rotate_z(-PI / 8.0 * move1);
333                    next.foot_r.position += Vec3::new(4.0, -4.0, 0.0) * move1;
334                    next.foot_r.orientation.rotate_z(-PI / 7.0 * move1);
335                    next.leg_l.position += Vec3::new(2.0, 3.0, 0.0) * move1;
336                    next.leg_l.orientation.rotate_y(PI / 8.0 * move1);
337                    next.leg_l.orientation.rotate_z(-PI / 8.0 * move1);
338                    next.foot_l.position += Vec3::new(0.0, 4.0, 0.0) * move1;
339                    next.foot_l.orientation.rotate_z(PI / 8.0 * move1);
340
341                    next.control.position += Vec3::new(-8.0, -6.0, 40.0) * move2;
342                    next.control.orientation.rotate_y(1.3 * PI * move2);
343                    next.control
344                        .orientation
345                        .rotate_x(PI / 3.0 * (PI * move2).sin());
346                    next.control.orientation.rotate_z(-PI / 1.1 * move2);
347                    next.shoulder_l.position += Vec3::new(-5.0, -5.0, 0.0) * move2;
348                    next.shoulder_l.orientation.rotate_z(PI / 4.0 * move2);
349                    next.shoulder_l.orientation.rotate_x(PI / 2.5 * move2);
350                    next.shoulder_r.position += Vec3::new(-5.0, 5.0, 0.0) * move2;
351                    next.shoulder_r.orientation.rotate_z(PI / 4.0 * move2);
352                    next.shoulder_r.orientation.rotate_x(PI / 2.5 * move2);
353                    next.torso.orientation.rotate_z(PI / 2.0 * move2);
354                    next.lower_torso.orientation.rotate_z(-PI / 8.0 * move2);
355                    next.foot_r.position += Vec3::new(-2.0, 8.0, 0.0) * move2
356                        + Vec3::new(0.0, 0.0, 5.0) * move2.powi(2);
357                    next.leg_r.position += Vec3::new(-2.0, 4.0, 0.0) * move2
358                        + Vec3::new(0.0, 0.0, 5.0) * move2.powi(2);
359                    next.leg_r.orientation.rotate_z(PI / 4.0 * move2);
360                    next.foot_l.position += Vec3::new(0.0, -8.0, 0.0) * move2;
361                    next.foot_l.orientation.rotate_z(-PI / 5.0 * move2);
362                    next.leg_l.position += Vec3::new(0.0, -4.0, 0.0) * move2;
363                    next.leg_l.orientation.rotate_z(PI / 4.0 * move2);
364                },
365                // Mirrored version of the vertical strike
366                Some("common.abilities.custom.gigas_fire.parry_punish") => {
367                    let pullback = (1.0 - move3).powi(3);
368                    let move1 = move1base * pullback;
369                    let move2 = move2base * pullback;
370
371                    init_gigas_fire(&mut next);
372
373                    next.control.position += Vec3::new(0.0, 0.0, -20.0) * move1;
374                    next.control.orientation.rotate_y(-PI / 2.5 * move1);
375                    next.control.orientation.rotate_x(-PI / 3.0 * move1);
376                    next.control.orientation.rotate_z(PI / 4.0 * move1);
377                    next.shoulder_r.position += Vec3::new(-5.0, 5.0, 0.0) * move1;
378                    next.shoulder_r.orientation.rotate_z(PI / 4.0 * move1);
379                    next.torso.orientation.rotate_z(PI / 3.0 * move1);
380                    next.lower_torso.orientation.rotate_z(-PI / 8.0 * move1);
381                    next.leg_l.position += Vec3::new(-2.0, -2.0, 0.0) * move1;
382                    next.leg_l.orientation.rotate_y(PI / 8.0 * move1);
383                    next.leg_l.orientation.rotate_z(PI / 8.0 * move1);
384                    next.foot_l.position += Vec3::new(-4.0, -4.0, 0.0) * move1;
385                    next.foot_l.orientation.rotate_z(PI / 7.0 * move1);
386                    next.leg_r.position += Vec3::new(-2.0, 3.0, 0.0) * move1;
387                    next.leg_r.orientation.rotate_y(-PI / 8.0 * move1);
388                    next.leg_r.orientation.rotate_z(PI / 8.0 * move1);
389                    next.foot_r.position += Vec3::new(0.0, 4.0, 0.0) * move1;
390                    next.foot_r.orientation.rotate_z(-PI / 8.0 * move1);
391
392                    next.control.position += Vec3::new(-3.0, -6.0, 40.0) * move2;
393                    next.control.orientation.rotate_y(-1.3 * PI * move2);
394                    next.control
395                        .orientation
396                        .rotate_x(PI / 3.0 * (PI * move2).sin());
397                    next.control.orientation.rotate_z(PI / 1.1 * move2);
398                    next.shoulder_r.position += Vec3::new(5.0, -5.0, 0.0) * move2;
399                    next.shoulder_r.orientation.rotate_z(-PI / 4.0 * move2);
400                    next.shoulder_r.orientation.rotate_x(PI / 2.5 * move2);
401                    next.shoulder_l.position += Vec3::new(5.0, 5.0, 0.0) * move2;
402                    next.shoulder_l.orientation.rotate_z(-PI / 4.0 * move2);
403                    next.shoulder_l.orientation.rotate_x(PI / 2.5 * move2);
404                    next.torso.orientation.rotate_z(-PI / 2.0 * move2);
405                    next.lower_torso.orientation.rotate_z(PI / 8.0 * move2);
406                    next.foot_l.position +=
407                        Vec3::new(2.0, 8.0, 0.0) * move2 + Vec3::new(0.0, 0.0, 5.0) * move2.powi(2);
408                    next.leg_l.position +=
409                        Vec3::new(2.0, 4.0, 0.0) * move2 + Vec3::new(0.0, 0.0, 5.0) * move2.powi(2);
410                    next.leg_l.orientation.rotate_z(-PI / 4.0 * move2);
411                    next.foot_r.position += Vec3::new(0.0, -8.0, 0.0) * move2;
412                    next.foot_r.orientation.rotate_z(PI / 5.0 * move2);
413                    next.leg_r.position += Vec3::new(0.0, -4.0, 0.0) * move2;
414                    next.leg_r.orientation.rotate_z(-PI / 4.0 * move2);
415                },
416                Some("common.abilities.custom.gigas_fire.explosive_strike") => {
417                    let (move1base, move2base, move3) = match stage_section {
418                        Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
419                        Some(StageSection::Action) => (1.0, anim_time, 0.0),
420                        Some(StageSection::Recover) => (1.0, 1.0, anim_time),
421                        _ => (0.0, 0.0, 0.0),
422                    };
423
424                    let (pre_move1base, move1base) = if move1base < 0.2 {
425                        (5.0 * move1base, 0.0)
426                    } else {
427                        (1.0, 1.25 * (move1base - 0.2))
428                    };
429
430                    let pullback = 1.0 - move3;
431                    let pre_move1 = pre_move1base * pullback;
432                    let move2 = move2base * pullback;
433
434                    init_gigas_fire(&mut next);
435
436                    next.torso.orientation.rotate_z(PI / 8.0 * pre_move1base);
437                    next.lower_torso
438                        .orientation
439                        .rotate_z(-PI / 16.0 * pre_move1);
440                    next.shoulder_l
441                        .orientation
442                        .rotate_x(PI / 3.0 * pre_move1base);
443                    next.shoulder_r
444                        .orientation
445                        .rotate_x(PI / 3.0 * pre_move1base);
446                    next.shoulder_r.position += Vec3::new(-2.0, 8.0, 0.0) * pre_move1base;
447                    next.shoulder_r
448                        .orientation
449                        .rotate_z(PI / 5.0 * pre_move1base);
450                    next.control.position +=
451                        Vec3::new(-15.0 * pre_move1base, 0.0, 25.0 * pre_move1base);
452                    next.control.orientation.rotate_x(PI / 2.5 * pre_move1);
453                    next.leg_l.position += Vec3::new(0.0, -2.5, 0.0) * pre_move1base;
454                    next.leg_l.orientation.rotate_x(-PI / 8.0 * pre_move1base);
455                    next.foot_l.position += Vec3::new(0.0, -5.0, 0.0) * pre_move1base;
456                    next.foot_l.orientation.rotate_z(PI / 4.0 * pre_move1base);
457
458                    next.torso.orientation.rotate_z(-PI / 8.0 * move1base);
459                    next.control.orientation.rotate_z(2.0 * PI * move1base);
460                    next.leg_l.position += Vec3::new(0.0, 2.5, 0.0) * move1base;
461                    next.leg_l.orientation.rotate_x(PI / 8.0 * move1base);
462                    next.foot_l.position += Vec3::new(0.0, 5.0, 0.0) * move1base;
463
464                    next.torso.position += Vec3::new(0.0, -10.0, 0.0) * move2;
465                    next.torso.orientation.rotate_z(-PI / 8.0 * move2);
466                    next.torso.orientation.rotate_x(-PI / 8.0 * move2);
467                    next.lower_torso.orientation.rotate_z(PI / 8.0 * move2);
468                    next.lower_torso.orientation.rotate_x(PI / 8.0 * move2);
469                    next.torso.position += Vec3::new(0.0, 0.0, 1.5) * move2;
470                    next.shoulder_l.orientation.rotate_x(-PI / 3.0 * move2base);
471                    next.shoulder_l.orientation.rotate_z(-PI / 4.0 * move2);
472                    next.shoulder_r.position += Vec3::new(2.0, -8.0, 0.0) * move2base;
473                    next.shoulder_r.orientation.rotate_z(-PI / 5.0 * move2base);
474                    next.shoulder_r.orientation.rotate_x(-PI / 3.0 * move2base);
475                    next.control.position +=
476                        Vec3::new(15.0 * move2base, 0.0, -25.0 * move2base - 20.0 * move2);
477                    next.control.orientation.rotate_x(-PI * move2);
478                    next.leg_l.position += Vec3::new(0.0, 1.0, 0.0) * move2;
479                    next.foot_l.position += Vec3::new(0.0, 2.5, 0.0) * move2;
480                    next.foot_l.orientation.rotate_z(-PI / 4.0 * move2base);
481                },
482                _ => {
483                    biped_large_alpha_sword(&mut next, s_a, move1, move2);
484                },
485            },
486            Some(ToolKind::Hammer) => {
487                biped_large_alpha_hammer(&mut next, s_a, move1, move2);
488            },
489            Some(ToolKind::Axe) => match ability_id {
490                Some("common.abilities.custom.gigas_frost.cleave") => {
491                    next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
492                    next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
493
494                    next.control.position = Vec3::new(
495                        4.0 + move1 * -12.0 + move2 * 28.0,
496                        (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * -5.0,
497                        (-s_a.grip.0 / 0.8) + move1 * 2.0 + move2 * -6.0,
498                    );
499                    next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
500                        * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
501                    next.upper_torso.orientation =
502                        Quaternion::rotation_z(move1 * 0.6 + move2 * -0.9);
503                    next.lower_torso.orientation =
504                        Quaternion::rotation_z(move1 * -0.6 + move2 * 0.9);
505
506                    next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 0.8)
507                        * Quaternion::rotation_y(-0.0);
508                    next.control_r.orientation =
509                        Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
510                            * Quaternion::rotation_y(0.0)
511                            * Quaternion::rotation_z(0.0);
512
513                    next.control.orientation = Quaternion::rotation_x(-0.3 + move2 * -1.5)
514                        * Quaternion::rotation_y(move1 * -0.9 + move2 * 2.0)
515                        * Quaternion::rotation_z(-0.3);
516                },
517                Some("common.abilities.custom.gigas_frost.wide_cleave") => {
518                    next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
519                    next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
520
521                    next.control.position = Vec3::new(
522                        4.0 + move1 * -12.0 + move2 * 28.0,
523                        (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * -5.0,
524                        (-s_a.grip.0 / 0.8) + move1 * 2.0 + move2 * 8.0,
525                    );
526                    next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
527                        * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
528                    next.upper_torso.orientation =
529                        Quaternion::rotation_z(move1 * 0.6 + move2 * -0.9);
530                    next.lower_torso.orientation =
531                        Quaternion::rotation_z(move1 * -0.6 + move2 * 0.9);
532
533                    next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 0.8)
534                        * Quaternion::rotation_y(-0.0);
535                    next.control_r.orientation =
536                        Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
537                            * Quaternion::rotation_y(0.0)
538                            * Quaternion::rotation_z(0.0);
539
540                    next.control.orientation =
541                        Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
542                            * Quaternion::rotation_y(-1.8 + move1 * -0.4 + move2 * 3.5)
543                            * Quaternion::rotation_z(move1 * -1.0 + move2 * -1.5);
544                },
545                Some("common.abilities.custom.gigas_frost.bonk") => {
546                    next.head.orientation = Quaternion::rotation_x(move1 * 0.8 + move2 * -1.2);
547                    next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
548                    next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
549                    next.control_l.position = Vec3::new(-0.5, 4.0, 1.0);
550                    next.control_r.position = Vec3::new(-0.5, 4.0, 1.0);
551                    next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
552                    next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
553                    next.weapon_l.position =
554                        Vec3::new(-12.0 + (move1 * 20.0).min(10.0), -1.0, -15.0);
555                    next.weapon_r.position =
556                        Vec3::new(12.0 + (move1 * -20.0).max(-10.0), -1.0, -15.0);
557
558                    next.weapon_l.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
559                        * Quaternion::rotation_z(move1 * -1.0);
560                    next.weapon_r.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
561                        * Quaternion::rotation_z(move1 * 1.0);
562
563                    next.shoulder_l.orientation =
564                        Quaternion::rotation_x(-0.3 + move1 * 2.0 + move2 * -1.0);
565
566                    next.shoulder_r.orientation =
567                        Quaternion::rotation_x(-0.3 + move1 * 2.0 + move2 * -1.0);
568
569                    next.control.orientation = Quaternion::rotation_x(move1 * 1.5 + move2 * -0.4);
570
571                    let twist = move1 * 0.6 + move3 * -0.6;
572                    next.upper_torso.position =
573                        Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1);
574                    next.upper_torso.orientation =
575                        Quaternion::rotation_x(move1 * 0.4 + move2 * -1.1)
576                            * Quaternion::rotation_z(twist * -0.2 + move1 * -0.1 + move2 * 0.3);
577
578                    next.lower_torso.orientation =
579                        Quaternion::rotation_x(move1 * -0.4 + move2 * 1.1)
580                            * Quaternion::rotation_z(twist);
581
582                    next.foot_l.position = Vec3::new(
583                        -s_a.foot.0,
584                        s_a.foot.1 + move1 * -7.0 + move2 * 7.0,
585                        s_a.foot.2,
586                    );
587                    next.foot_l.orientation = Quaternion::rotation_x(move1 * -0.8 + move2 * 0.8)
588                        * Quaternion::rotation_z(move1 * 0.3 + move2 * -0.3);
589
590                    next.foot_r.position = Vec3::new(
591                        s_a.foot.0,
592                        s_a.foot.1 + move1 * 5.0 + move2 * -5.0,
593                        s_a.foot.2,
594                    );
595                    next.foot_r.orientation = Quaternion::rotation_y(move1 * -0.3 + move2 * 0.3)
596                        * Quaternion::rotation_z(move1 * 0.4 + move2 * -0.4);
597                    next.main.position = Vec3::new(-5.0 + (move1 * 20.0).min(10.0), 6.0, 4.0);
598                    next.main.orientation = Quaternion::rotation_y(move1 * 0.4 + move2 * -1.2);
599                },
600                _ => {
601                    biped_large_alpha_axe(&mut next, s_a, move1, move2);
602                },
603            },
604            Some(ToolKind::Natural) => match ability_id {
605                Some("common.abilities.custom.wendigomagic.singlestrike") => {
606                    next.torso.position = Vec3::new(0.0, 0.0, move1 * -2.18);
607                    next.upper_torso.orientation =
608                        Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4);
609                    next.lower_torso.orientation =
610                        Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4);
611
612                    next.control_l.position =
613                        Vec3::new(-9.0 + move2 * 6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 10.5);
614                    next.control_r.position =
615                        Vec3::new(9.0 + move2 * -6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 14.5);
616
617                    next.control_l.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
618                        * Quaternion::rotation_y(-0.15)
619                        * Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6);
620                    next.control_r.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
621                        * Quaternion::rotation_y(0.15)
622                        * Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6);
623                    next.head.orientation = Quaternion::rotation_x(move1 * 0.3);
624                },
625                Some("common.abilities.custom.minotaur.cripplingstrike") => {
626                    next.control_l.position = Vec3::new(0.0, 4.0, 5.0);
627                    next.control_r.position = Vec3::new(0.0, 4.0, 5.0);
628                    next.weapon_l.position = Vec3::new(
629                        -12.0 + move1 * -9.0 + move2 * 16.0,
630                        -6.0 + move2 * 8.0,
631                        -18.0 + move1 * 8.0 + move2 * -4.0,
632                    );
633                    next.weapon_r.position = Vec3::new(
634                        12.0 + move1 * 9.0 + move2 * -16.0,
635                        -6.0 + move2 * 8.0,
636                        -18.0 + move1 * 8.0 + move2 * -8.0,
637                    );
638
639                    next.weapon_l.orientation = Quaternion::rotation_x(-1.67)
640                        * Quaternion::rotation_y(move1 * -0.3 + move2 * 1.0)
641                        * Quaternion::rotation_z(move1 * 0.8 + move2 * -1.8);
642                    next.weapon_r.orientation = Quaternion::rotation_x(-1.67)
643                        * Quaternion::rotation_y(move1 * 0.3 + move2 * -0.6)
644                        * Quaternion::rotation_z(move1 * -0.8 + move2 * 1.8);
645
646                    next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 1.0);
647                    next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 1.0);
648
649                    next.shoulder_l.orientation = Quaternion::rotation_x(-0.3)
650                        * Quaternion::rotation_y(move1 * 0.7 + move2 * -0.7);
651
652                    next.shoulder_r.orientation = Quaternion::rotation_x(-0.3)
653                        * Quaternion::rotation_y(move1 * -0.7 + move2 * 0.7);
654                    next.second.scale = Vec3::one() * 1.0;
655                    next.head.orientation = Quaternion::rotation_x(move1 * -0.6 + move2 * 0.4)
656                },
657                Some("common.abilities.custom.yeti.strike") => {
658                    next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
659                    next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
660
661                    next.control.position = Vec3::new(
662                        4.0 + move1 * -12.0 + move2 * 20.0,
663                        (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 5.0,
664                        (-s_a.grip.0 / 0.8) + move1 * -2.0 + move2 * 8.0,
665                    );
666                    next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
667                        * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
668                    next.upper_torso.orientation =
669                        Quaternion::rotation_z(move1 * 0.2 + move2 * -0.4);
670                    next.lower_torso.orientation =
671                        Quaternion::rotation_z(move1 * -0.2 + move2 * 0.2);
672
673                    next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 0.8)
674                        * Quaternion::rotation_y(-0.0);
675                    next.control_r.orientation =
676                        Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
677                            * Quaternion::rotation_y(0.0)
678                            * Quaternion::rotation_z(0.0);
679
680                    next.control.orientation =
681                        Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
682                            * Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
683                            * Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
684                },
685                Some("common.abilities.custom.harvester.scythe") => {
686                    next.head.orientation = Quaternion::rotation_x(move1 * -0.25 + move2 * 0.25)
687                        * Quaternion::rotation_z(move1 * -0.3 + move2 * 0.4);
688
689                    next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1 + move2 * -0.5);
690                    next.jaw.orientation = Quaternion::rotation_x(move2 * -0.15);
691
692                    next.upper_torso.orientation =
693                        Quaternion::rotation_x(move1 * 0.2 + move2 * -0.2)
694                            * Quaternion::rotation_z(move1 * -1.0 + move2 * 1.0);
695
696                    next.shoulder_l.position = Vec3::new(
697                        -s_a.shoulder.0,
698                        s_a.shoulder.1,
699                        s_a.shoulder.2 - foothorir * 1.0,
700                    );
701                    next.shoulder_l.orientation =
702                        Quaternion::rotation_x(-0.4 + move1 * 1.0 + move2 * -1.0)
703                            * Quaternion::rotation_y(move1 * -0.2);
704                    next.shoulder_r.orientation =
705                        Quaternion::rotation_y(0.4 + move1 * -0.8 + move2 * 0.8)
706                            * Quaternion::rotation_x(0.4 + move1 * -0.4 + move2 * 0.8);
707
708                    if speed == 0.0 {
709                        next.leg_l.orientation = Quaternion::rotation_x(move1 * 0.4 + move2 * -0.4);
710
711                        next.foot_l.position = Vec3::new(
712                            -s_a.foot.0,
713                            s_a.foot.1,
714                            s_a.foot.2 + move1 * 2.0 + move2 * -2.0,
715                        );
716                        next.foot_l.orientation =
717                            Quaternion::rotation_x(move1 * -0.6 + move2 * 0.6);
718                    }
719
720                    next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
721                    next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
722
723                    next.control.position = Vec3::new(
724                        -7.0 + move1 * 26.0 - move2 * 32.0,
725                        0.0 + s_a.grip.0 / 1.0 - move1 * 4.0,
726                        -s_a.grip.0 / 0.8,
727                    );
728
729                    next.control_l.orientation = Quaternion::rotation_x(PI / 2.0)
730                        * Quaternion::rotation_y(-0.0)
731                        * Quaternion::rotation_z(PI);
732                    next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2)
733                        * Quaternion::rotation_y(-1.0 + move1 * 1.0)
734                        * Quaternion::rotation_z(0.0);
735
736                    next.control.orientation = Quaternion::rotation_x(-1.4 + move1 * -0.4)
737                        * Quaternion::rotation_y(-2.8 + move1 * 3.0 + move2 * -3.0)
738                        * Quaternion::rotation_z(move1 * -1.5);
739                },
740                Some(
741                    "common.abilities.custom.husk_brute.singlestrike"
742                    | "common.abilities.vampire.strigoi.singlestrike",
743                ) => {
744                    next.shoulder_l.position =
745                        Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
746                    next.shoulder_r.position =
747                        Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
748                    next.hand_l.position = Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2);
749                    next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2);
750
751                    if mirror > 0.0 {
752                        next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 1.0)
753                            * Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
754
755                        next.shoulder_r.orientation = Quaternion::rotation_x(move1 * -0.6);
756
757                        next.upper_torso.orientation =
758                            Quaternion::rotation_z(move1 * 0.4 + move2 * -1.1);
759                        next.lower_torso.orientation =
760                            Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
761
762                        next.hand_l.orientation = Quaternion::rotation_x(move1 * 1.2)
763                            * Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
764
765                        next.hand_r.orientation = Quaternion::rotation_z(move1 * 1.0)
766                            * Quaternion::rotation_y(move1 * 0.8 + move2 * -1.2);
767                    } else {
768                        next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 1.0)
769                            * Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
770
771                        next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.6);
772
773                        next.upper_torso.orientation =
774                            Quaternion::rotation_z(move1 * -0.4 + move2 * 1.1);
775                        next.lower_torso.orientation =
776                            Quaternion::rotation_z(move1 * 0.2 + move2 * -0.6);
777
778                        next.hand_r.orientation = Quaternion::rotation_x(move1 * 1.2)
779                            * Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
780
781                        next.hand_l.orientation = Quaternion::rotation_z(move1 * 1.0)
782                            * Quaternion::rotation_y(move1 * -0.8 + move2 * 1.2);
783                    }
784                },
785                Some("common.abilities.custom.beastclaws.basic") => {
786                    next.shoulder_l.position =
787                        Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
788                    next.shoulder_r.position =
789                        Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
790                    next.hand_l.position =
791                        Vec3::new(-s_a.hand.0 - 3.0, s_a.hand.1 + 4.5, s_a.hand.2 + 0.0);
792                    next.hand_r.position =
793                        Vec3::new(s_a.hand.0 + 3.0, s_a.hand.1 + 4.5, s_a.hand.2 + 0.0);
794
795                    if mirror > 0.0 {
796                        next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 1.0)
797                            * Quaternion::rotation_y(move1 * 0.5 + move2 * -1.0);
798
799                        next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 0.6);
800
801                        next.upper_torso.orientation =
802                            Quaternion::rotation_z(move1 * 0.4 + move2 * -1.1);
803                        next.lower_torso.orientation =
804                            Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
805
806                        next.hand_l.orientation = Quaternion::rotation_x(move1 * 1.2)
807                            * Quaternion::rotation_y(move1 * 0.2 + move2 * -0.5)
808                            * Quaternion::rotation_z(move1 * 2.0);
809
810                        next.hand_r.orientation = Quaternion::rotation_z(move1 * -2.0)
811                            * Quaternion::rotation_y(move1 * 0.8 + move2 * -0.6);
812                    } else {
813                        next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 1.0)
814                            * Quaternion::rotation_y(move1 * -0.5 + move2 * 1.0);
815
816                        next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.6);
817
818                        next.upper_torso.orientation =
819                            Quaternion::rotation_z(move1 * -0.4 + move2 * 1.1);
820                        next.lower_torso.orientation =
821                            Quaternion::rotation_z(move1 * 0.2 + move2 * -0.6);
822
823                        next.hand_r.orientation = Quaternion::rotation_x(move1 * 1.2)
824                            * Quaternion::rotation_y(move1 * -0.3 + move2 * 0.5)
825                            * Quaternion::rotation_z(move1 * -2.0);
826
827                        next.hand_l.orientation = Quaternion::rotation_z(move1 * 1.0)
828                            * Quaternion::rotation_y(move1 * -0.8 + move2 * 0.6);
829                    }
830                },
831                Some("common.abilities.custom.tursus.tursus_claws") => {
832                    next.shoulder_l.position =
833                        Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
834                    next.shoulder_r.position =
835                        Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
836                    next.hand_l.position = Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2 + 4.0);
837                    next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2 + 4.0);
838
839                    if mirror > 0.0 {
840                        next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 1.0)
841                            * Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
842
843                        next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 0.6);
844
845                        next.upper_torso.orientation =
846                            Quaternion::rotation_z(move1 * 0.4 + move2 * -1.1);
847                        next.lower_torso.orientation =
848                            Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
849
850                        next.hand_l.orientation = Quaternion::rotation_x(move1 * 1.2)
851                            * Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
852
853                        next.hand_r.orientation = Quaternion::rotation_z(move1 * -1.0)
854                            * Quaternion::rotation_y(move1 * 0.8 + move2 * -1.2);
855                    } else {
856                        next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 1.0)
857                            * Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
858
859                        next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.6);
860
861                        next.upper_torso.orientation =
862                            Quaternion::rotation_z(move1 * -0.4 + move2 * 1.1);
863                        next.lower_torso.orientation =
864                            Quaternion::rotation_z(move1 * 0.2 + move2 * -0.6);
865
866                        next.hand_r.orientation = Quaternion::rotation_x(move1 * 1.2)
867                            * Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
868
869                        next.hand_l.orientation = Quaternion::rotation_z(move1 * 1.0)
870                            * Quaternion::rotation_y(move1 * -0.8 + move2 * 1.2);
871                    }
872                },
873                _ => {},
874            },
875            Some(ToolKind::Spear) => match ability_id {
876                Some("common.abilities.custom.tidalwarrior.pincer") => {
877                    next.head.orientation = Quaternion::rotation_z(move1 * -0.75);
878                    next.upper_torso.orientation =
879                        Quaternion::rotation_x(move1 * 0.2 + move2 * 0.4)
880                            * Quaternion::rotation_z(move1 * 1.0 + move2 * -1.3);
881                    next.lower_torso.orientation =
882                        Quaternion::rotation_x(move1 * 0.2 + move2 * -0.9)
883                            * Quaternion::rotation_y(move1 * 0.1 + move2 * -0.2)
884                            * Quaternion::rotation_z(move1 * -1.0 + move2 * 1.2);
885
886                    next.hand_r.position = Vec3::new(
887                        14.0 + move1 * 2.0 + move2 * 3.0,
888                        6.0 + move2 * 2.0,
889                        -6.0 - move2 * 3.0,
890                    );
891
892                    next.hand_r.orientation = Quaternion::rotation_y(move2 * -0.5);
893                    next.hand_l.position = Vec3::new(-14.0, 7.0, -9.0);
894
895                    next.hand_l.orientation =
896                        Quaternion::rotation_x(0.1 * move2) * Quaternion::rotation_z(-0.35);
897                    next.torso.position = Vec3::new(0.0, move2 * -10.35, move2 * -1.0);
898
899                    next.main.position = Vec3::new(-14.0, 0.0, -14.0);
900                    next.main.orientation = Quaternion::rotation_x(PI / -2.0 - 0.2 * move2)
901                        * Quaternion::rotation_y(0.4 + 0.4 * move2);
902                },
903                _ => {},
904            },
905            _ => {},
906        }
907
908        next
909    }
910}