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,
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) => {
69                biped_large_alpha_sword(&mut next, s_a, move1, move2);
70            },
71            Some(ToolKind::Hammer) => {
72                biped_large_alpha_hammer(&mut next, s_a, move1, move2);
73            },
74            Some(ToolKind::Axe) => match ability_id {
75                Some("common.abilities.custom.gigas_frost.cleave") => {
76                    next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
77                    next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
78
79                    next.control.position = Vec3::new(
80                        4.0 + move1 * -12.0 + move2 * 28.0,
81                        (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * -5.0,
82                        (-s_a.grip.0 / 0.8) + move1 * 2.0 + move2 * -6.0,
83                    );
84                    next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
85                        * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
86                    next.upper_torso.orientation =
87                        Quaternion::rotation_z(move1 * 0.6 + move2 * -0.9);
88                    next.lower_torso.orientation =
89                        Quaternion::rotation_z(move1 * -0.6 + move2 * 0.9);
90
91                    next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 0.8)
92                        * Quaternion::rotation_y(-0.0);
93                    next.control_r.orientation =
94                        Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
95                            * Quaternion::rotation_y(0.0)
96                            * Quaternion::rotation_z(0.0);
97
98                    next.control.orientation = Quaternion::rotation_x(-0.3 + move2 * -1.5)
99                        * Quaternion::rotation_y(move1 * -0.9 + move2 * 2.0)
100                        * Quaternion::rotation_z(-0.3);
101                },
102                Some("common.abilities.custom.gigas_frost.wide_cleave") => {
103                    next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
104                    next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
105
106                    next.control.position = Vec3::new(
107                        4.0 + move1 * -12.0 + move2 * 28.0,
108                        (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * -5.0,
109                        (-s_a.grip.0 / 0.8) + move1 * 2.0 + move2 * 8.0,
110                    );
111                    next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
112                        * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
113                    next.upper_torso.orientation =
114                        Quaternion::rotation_z(move1 * 0.6 + move2 * -0.9);
115                    next.lower_torso.orientation =
116                        Quaternion::rotation_z(move1 * -0.6 + move2 * 0.9);
117
118                    next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 0.8)
119                        * Quaternion::rotation_y(-0.0);
120                    next.control_r.orientation =
121                        Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
122                            * Quaternion::rotation_y(0.0)
123                            * Quaternion::rotation_z(0.0);
124
125                    next.control.orientation =
126                        Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
127                            * Quaternion::rotation_y(-1.8 + move1 * -0.4 + move2 * 3.5)
128                            * Quaternion::rotation_z(move1 * -1.0 + move2 * -1.5);
129                },
130                Some("common.abilities.custom.gigas_frost.bonk") => {
131                    next.head.orientation = Quaternion::rotation_x(move1 * 0.8 + move2 * -1.2);
132                    next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
133                    next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
134                    next.control_l.position = Vec3::new(-0.5, 4.0, 1.0);
135                    next.control_r.position = Vec3::new(-0.5, 4.0, 1.0);
136                    next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
137                    next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
138                    next.weapon_l.position =
139                        Vec3::new(-12.0 + (move1 * 20.0).min(10.0), -1.0, -15.0);
140                    next.weapon_r.position =
141                        Vec3::new(12.0 + (move1 * -20.0).max(-10.0), -1.0, -15.0);
142
143                    next.weapon_l.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
144                        * Quaternion::rotation_z(move1 * -1.0);
145                    next.weapon_r.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
146                        * Quaternion::rotation_z(move1 * 1.0);
147
148                    next.shoulder_l.orientation =
149                        Quaternion::rotation_x(-0.3 + move1 * 2.0 + move2 * -1.0);
150
151                    next.shoulder_r.orientation =
152                        Quaternion::rotation_x(-0.3 + move1 * 2.0 + move2 * -1.0);
153
154                    next.control.orientation = Quaternion::rotation_x(move1 * 1.5 + move2 * -0.4);
155
156                    let twist = move1 * 0.6 + move3 * -0.6;
157                    next.upper_torso.position =
158                        Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1);
159                    next.upper_torso.orientation =
160                        Quaternion::rotation_x(move1 * 0.4 + move2 * -1.1)
161                            * Quaternion::rotation_z(twist * -0.2 + move1 * -0.1 + move2 * 0.3);
162
163                    next.lower_torso.orientation =
164                        Quaternion::rotation_x(move1 * -0.4 + move2 * 1.1)
165                            * Quaternion::rotation_z(twist);
166
167                    next.foot_l.position = Vec3::new(
168                        -s_a.foot.0,
169                        s_a.foot.1 + move1 * -7.0 + move2 * 7.0,
170                        s_a.foot.2,
171                    );
172                    next.foot_l.orientation = Quaternion::rotation_x(move1 * -0.8 + move2 * 0.8)
173                        * Quaternion::rotation_z(move1 * 0.3 + move2 * -0.3);
174
175                    next.foot_r.position = Vec3::new(
176                        s_a.foot.0,
177                        s_a.foot.1 + move1 * 5.0 + move2 * -5.0,
178                        s_a.foot.2,
179                    );
180                    next.foot_r.orientation = Quaternion::rotation_y(move1 * -0.3 + move2 * 0.3)
181                        * Quaternion::rotation_z(move1 * 0.4 + move2 * -0.4);
182                    next.main.position = Vec3::new(-5.0 + (move1 * 20.0).min(10.0), 6.0, 4.0);
183                    next.main.orientation = Quaternion::rotation_y(move1 * 0.4 + move2 * -1.2);
184                },
185                _ => {
186                    biped_large_alpha_axe(&mut next, s_a, move1, move2);
187                },
188            },
189            Some(ToolKind::Natural) => match ability_id {
190                Some("common.abilities.custom.wendigomagic.singlestrike") => {
191                    next.torso.position = Vec3::new(0.0, 0.0, move1 * -2.18);
192                    next.upper_torso.orientation =
193                        Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4);
194                    next.lower_torso.orientation =
195                        Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4);
196
197                    next.control_l.position =
198                        Vec3::new(-9.0 + move2 * 6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 10.5);
199                    next.control_r.position =
200                        Vec3::new(9.0 + move2 * -6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 14.5);
201
202                    next.control_l.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
203                        * Quaternion::rotation_y(-0.15)
204                        * Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6);
205                    next.control_r.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
206                        * Quaternion::rotation_y(0.15)
207                        * Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6);
208                    next.head.orientation = Quaternion::rotation_x(move1 * 0.3);
209                },
210                Some("common.abilities.custom.minotaur.cripplingstrike") => {
211                    next.control_l.position = Vec3::new(0.0, 4.0, 5.0);
212                    next.control_r.position = Vec3::new(0.0, 4.0, 5.0);
213                    next.weapon_l.position = Vec3::new(
214                        -12.0 + move1 * -9.0 + move2 * 16.0,
215                        -6.0 + move2 * 8.0,
216                        -18.0 + move1 * 8.0 + move2 * -4.0,
217                    );
218                    next.weapon_r.position = Vec3::new(
219                        12.0 + move1 * 9.0 + move2 * -16.0,
220                        -6.0 + move2 * 8.0,
221                        -18.0 + move1 * 8.0 + move2 * -8.0,
222                    );
223
224                    next.weapon_l.orientation = Quaternion::rotation_x(-1.67)
225                        * Quaternion::rotation_y(move1 * -0.3 + move2 * 1.0)
226                        * Quaternion::rotation_z(move1 * 0.8 + move2 * -1.8);
227                    next.weapon_r.orientation = Quaternion::rotation_x(-1.67)
228                        * Quaternion::rotation_y(move1 * 0.3 + move2 * -0.6)
229                        * Quaternion::rotation_z(move1 * -0.8 + move2 * 1.8);
230
231                    next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 1.0);
232                    next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 1.0);
233
234                    next.shoulder_l.orientation = Quaternion::rotation_x(-0.3)
235                        * Quaternion::rotation_y(move1 * 0.7 + move2 * -0.7);
236
237                    next.shoulder_r.orientation = Quaternion::rotation_x(-0.3)
238                        * Quaternion::rotation_y(move1 * -0.7 + move2 * 0.7);
239                    next.second.scale = Vec3::one() * 1.0;
240                    next.head.orientation = Quaternion::rotation_x(move1 * -0.6 + move2 * 0.4)
241                },
242                Some("common.abilities.custom.yeti.strike") => {
243                    next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
244                    next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
245
246                    next.control.position = Vec3::new(
247                        4.0 + move1 * -12.0 + move2 * 20.0,
248                        (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 5.0,
249                        (-s_a.grip.0 / 0.8) + move1 * -2.0 + move2 * 8.0,
250                    );
251                    next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
252                        * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
253                    next.upper_torso.orientation =
254                        Quaternion::rotation_z(move1 * 0.2 + move2 * -0.4);
255                    next.lower_torso.orientation =
256                        Quaternion::rotation_z(move1 * -0.2 + move2 * 0.2);
257
258                    next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 0.8)
259                        * Quaternion::rotation_y(-0.0);
260                    next.control_r.orientation =
261                        Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
262                            * Quaternion::rotation_y(0.0)
263                            * Quaternion::rotation_z(0.0);
264
265                    next.control.orientation =
266                        Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
267                            * Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
268                            * Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
269                },
270                Some("common.abilities.custom.harvester.scythe") => {
271                    next.head.orientation = Quaternion::rotation_x(move1 * -0.25 + move2 * 0.25)
272                        * Quaternion::rotation_z(move1 * -0.3 + move2 * 0.4);
273
274                    next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1 + move2 * -0.5);
275                    next.jaw.orientation = Quaternion::rotation_x(move2 * -0.15);
276
277                    next.upper_torso.orientation =
278                        Quaternion::rotation_x(move1 * 0.2 + move2 * -0.2)
279                            * Quaternion::rotation_z(move1 * -1.0 + move2 * 1.0);
280
281                    next.shoulder_l.position = Vec3::new(
282                        -s_a.shoulder.0,
283                        s_a.shoulder.1,
284                        s_a.shoulder.2 - foothorir * 1.0,
285                    );
286                    next.shoulder_l.orientation =
287                        Quaternion::rotation_x(-0.4 + move1 * 1.0 + move2 * -1.0)
288                            * Quaternion::rotation_y(move1 * -0.2);
289                    next.shoulder_r.orientation =
290                        Quaternion::rotation_y(0.4 + move1 * -0.8 + move2 * 0.8)
291                            * Quaternion::rotation_x(0.4 + move1 * -0.4 + move2 * 0.8);
292
293                    if speed == 0.0 {
294                        next.leg_l.orientation = Quaternion::rotation_x(move1 * 0.4 + move2 * -0.4);
295
296                        next.foot_l.position = Vec3::new(
297                            -s_a.foot.0,
298                            s_a.foot.1,
299                            s_a.foot.2 + move1 * 2.0 + move2 * -2.0,
300                        );
301                        next.foot_l.orientation =
302                            Quaternion::rotation_x(move1 * -0.6 + move2 * 0.6);
303                    }
304
305                    next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
306                    next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
307
308                    next.control.position = Vec3::new(
309                        -7.0 + move1 * 26.0 - move2 * 32.0,
310                        0.0 + s_a.grip.0 / 1.0 - move1 * 4.0,
311                        -s_a.grip.0 / 0.8,
312                    );
313
314                    next.control_l.orientation = Quaternion::rotation_x(PI / 2.0)
315                        * Quaternion::rotation_y(-0.0)
316                        * Quaternion::rotation_z(PI);
317                    next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2)
318                        * Quaternion::rotation_y(-1.0 + move1 * 1.0)
319                        * Quaternion::rotation_z(0.0);
320
321                    next.control.orientation = Quaternion::rotation_x(-1.4 + move1 * -0.4)
322                        * Quaternion::rotation_y(-2.8 + move1 * 3.0 + move2 * -3.0)
323                        * Quaternion::rotation_z(move1 * -1.5);
324                },
325                Some(
326                    "common.abilities.custom.husk_brute.singlestrike"
327                    | "common.abilities.vampire.strigoi.singlestrike",
328                ) => {
329                    next.shoulder_l.position =
330                        Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
331                    next.shoulder_r.position =
332                        Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
333                    next.hand_l.position = Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2);
334                    next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2);
335
336                    if mirror > 0.0 {
337                        next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 1.0)
338                            * Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
339
340                        next.shoulder_r.orientation = Quaternion::rotation_x(move1 * -0.6);
341
342                        next.upper_torso.orientation =
343                            Quaternion::rotation_z(move1 * 0.4 + move2 * -1.1);
344                        next.lower_torso.orientation =
345                            Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
346
347                        next.hand_l.orientation = Quaternion::rotation_x(move1 * 1.2)
348                            * Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
349
350                        next.hand_r.orientation = Quaternion::rotation_z(move1 * 1.0)
351                            * Quaternion::rotation_y(move1 * 0.8 + move2 * -1.2);
352                    } else {
353                        next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 1.0)
354                            * Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
355
356                        next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.6);
357
358                        next.upper_torso.orientation =
359                            Quaternion::rotation_z(move1 * -0.4 + move2 * 1.1);
360                        next.lower_torso.orientation =
361                            Quaternion::rotation_z(move1 * 0.2 + move2 * -0.6);
362
363                        next.hand_r.orientation = Quaternion::rotation_x(move1 * 1.2)
364                            * Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
365
366                        next.hand_l.orientation = Quaternion::rotation_z(move1 * 1.0)
367                            * Quaternion::rotation_y(move1 * -0.8 + move2 * 1.2);
368                    }
369                },
370                Some("common.abilities.custom.beastclaws.basic") => {
371                    next.shoulder_l.position =
372                        Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
373                    next.shoulder_r.position =
374                        Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
375                    next.hand_l.position =
376                        Vec3::new(-s_a.hand.0 - 3.0, s_a.hand.1 + 4.5, s_a.hand.2 + 0.0);
377                    next.hand_r.position =
378                        Vec3::new(s_a.hand.0 + 3.0, s_a.hand.1 + 4.5, s_a.hand.2 + 0.0);
379
380                    if mirror > 0.0 {
381                        next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 1.0)
382                            * Quaternion::rotation_y(move1 * 0.5 + move2 * -1.0);
383
384                        next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 0.6);
385
386                        next.upper_torso.orientation =
387                            Quaternion::rotation_z(move1 * 0.4 + move2 * -1.1);
388                        next.lower_torso.orientation =
389                            Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
390
391                        next.hand_l.orientation = Quaternion::rotation_x(move1 * 1.2)
392                            * Quaternion::rotation_y(move1 * 0.2 + move2 * -0.5)
393                            * Quaternion::rotation_z(move1 * 2.0);
394
395                        next.hand_r.orientation = Quaternion::rotation_z(move1 * -2.0)
396                            * Quaternion::rotation_y(move1 * 0.8 + move2 * -0.6);
397                    } else {
398                        next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 1.0)
399                            * Quaternion::rotation_y(move1 * -0.5 + move2 * 1.0);
400
401                        next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.6);
402
403                        next.upper_torso.orientation =
404                            Quaternion::rotation_z(move1 * -0.4 + move2 * 1.1);
405                        next.lower_torso.orientation =
406                            Quaternion::rotation_z(move1 * 0.2 + move2 * -0.6);
407
408                        next.hand_r.orientation = Quaternion::rotation_x(move1 * 1.2)
409                            * Quaternion::rotation_y(move1 * -0.3 + move2 * 0.5)
410                            * Quaternion::rotation_z(move1 * -2.0);
411
412                        next.hand_l.orientation = Quaternion::rotation_z(move1 * 1.0)
413                            * Quaternion::rotation_y(move1 * -0.8 + move2 * 0.6);
414                    }
415                },
416                Some("common.abilities.custom.tursus.tursus_claws") => {
417                    next.shoulder_l.position =
418                        Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
419                    next.shoulder_r.position =
420                        Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
421                    next.hand_l.position = Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2 + 4.0);
422                    next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2 + 4.0);
423
424                    if mirror > 0.0 {
425                        next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 1.0)
426                            * Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
427
428                        next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 0.6);
429
430                        next.upper_torso.orientation =
431                            Quaternion::rotation_z(move1 * 0.4 + move2 * -1.1);
432                        next.lower_torso.orientation =
433                            Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
434
435                        next.hand_l.orientation = Quaternion::rotation_x(move1 * 1.2)
436                            * Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
437
438                        next.hand_r.orientation = Quaternion::rotation_z(move1 * -1.0)
439                            * Quaternion::rotation_y(move1 * 0.8 + move2 * -1.2);
440                    } else {
441                        next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 1.0)
442                            * Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
443
444                        next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.6);
445
446                        next.upper_torso.orientation =
447                            Quaternion::rotation_z(move1 * -0.4 + move2 * 1.1);
448                        next.lower_torso.orientation =
449                            Quaternion::rotation_z(move1 * 0.2 + move2 * -0.6);
450
451                        next.hand_r.orientation = Quaternion::rotation_x(move1 * 1.2)
452                            * Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
453
454                        next.hand_l.orientation = Quaternion::rotation_z(move1 * 1.0)
455                            * Quaternion::rotation_y(move1 * -0.8 + move2 * 1.2);
456                    }
457                },
458                _ => {},
459            },
460            Some(ToolKind::Spear) => match ability_id {
461                Some("common.abilities.custom.tidalwarrior.pincer") => {
462                    next.head.orientation = Quaternion::rotation_z(move1 * -0.75);
463                    next.upper_torso.orientation =
464                        Quaternion::rotation_x(move1 * 0.2 + move2 * 0.4)
465                            * Quaternion::rotation_z(move1 * 1.0 + move2 * -1.3);
466                    next.lower_torso.orientation =
467                        Quaternion::rotation_x(move1 * 0.2 + move2 * -0.9)
468                            * Quaternion::rotation_y(move1 * 0.1 + move2 * -0.2)
469                            * Quaternion::rotation_z(move1 * -1.0 + move2 * 1.2);
470
471                    next.hand_r.position = Vec3::new(
472                        14.0 + move1 * 2.0 + move2 * 3.0,
473                        6.0 + move2 * 2.0,
474                        -6.0 - move2 * 3.0,
475                    );
476
477                    next.hand_r.orientation = Quaternion::rotation_y(move2 * -0.5);
478                    next.hand_l.position = Vec3::new(-14.0, 7.0, -9.0);
479
480                    next.hand_l.orientation =
481                        Quaternion::rotation_x(0.1 * move2) * Quaternion::rotation_z(-0.35);
482                    next.torso.position = Vec3::new(0.0, move2 * -10.35, move2 * -1.0);
483
484                    next.main.position = Vec3::new(-14.0, 0.0, -14.0);
485                    next.main.orientation = Quaternion::rotation_x(PI / -2.0 - 0.2 * move2)
486                        * Quaternion::rotation_y(0.4 + 0.4 * move2);
487                },
488                _ => {},
489            },
490            _ => {},
491        }
492
493        next
494    }
495}