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", 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.tidalwarrior.pincer") => {
211 if mirror > 0.0 {
212 next.head.orientation = Quaternion::rotation_z(move1 * 0.75);
213 next.upper_torso.orientation =
214 Quaternion::rotation_x(move1 * 0.2 + move2 * 0.7)
215 * Quaternion::rotation_z(move1 * -1.0 + move2 * 1.3);
216 next.lower_torso.orientation =
217 Quaternion::rotation_x(move1 * 0.2 + move2 * -0.7)
218 * Quaternion::rotation_y(move1 * -0.5 + move2 * 0.7)
219 * Quaternion::rotation_z(move1 * 1.0 + move2 * -1.2);
220
221 next.shoulder_l.orientation =
222 Quaternion::rotation_x(move1 * 0.3 + move2 * 0.8)
223 * Quaternion::rotation_y(move1 * -0.3 + move2 * -0.5);
224 next.hand_l.position = Vec3::new(
225 -14.0 + move1 * -2.0 + move2 * 4.0,
226 2.0 + move2 * 4.0,
227 -4.0 + move2 * 3.0,
228 );
229
230 next.hand_l.orientation = Quaternion::rotation_x(PI / 3.0 + move2 * 1.5)
231 * Quaternion::rotation_y(move2 * 0.5)
232 * Quaternion::rotation_z(-0.35 + move1 * -0.5 + move2 * 1.0);
233 next.hand_r.position = Vec3::new(14.0, 2.0, -4.0);
234
235 next.hand_r.orientation =
236 Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_z(0.35);
237
238 next.shoulder_r.orientation = Quaternion::rotation_x(0.0);
239 } else {
240 next.head.orientation = Quaternion::rotation_z(move1 * -0.75);
241 next.upper_torso.orientation =
242 Quaternion::rotation_x(move1 * 0.2 + move2 * 0.7)
243 * Quaternion::rotation_z(move1 * 1.0 + move2 * -1.3);
244 next.lower_torso.orientation =
245 Quaternion::rotation_x(move1 * 0.2 + move2 * -0.7)
246 * Quaternion::rotation_y(move1 * 0.5 + move2 * -0.7)
247 * Quaternion::rotation_z(move1 * -1.0 + move2 * 1.2);
248
249 next.shoulder_r.orientation =
250 Quaternion::rotation_x(move1 * 0.3 + move2 * 0.8)
251 * Quaternion::rotation_y(move1 * 0.3 + move2 * 0.5);
252 next.hand_r.position = Vec3::new(
253 14.0 + move1 * 2.0 + move2 * -4.0,
254 2.0 + move2 * 4.0,
255 -4.0 + move2 * 3.0,
256 );
257
258 next.hand_r.orientation = Quaternion::rotation_x(PI / 3.0 + move2 * 1.5)
259 * Quaternion::rotation_y(move2 * -0.5)
260 * Quaternion::rotation_z(0.35 + move1 * 0.5 + move2 * -1.0);
261 next.hand_l.position = Vec3::new(-14.0, 2.0, -4.0);
262
263 next.hand_l.orientation =
264 Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_z(-0.35);
265
266 next.shoulder_l.orientation = Quaternion::rotation_x(0.0);
267 };
268 next.torso.position = Vec3::new(0.0, move2 * -10.35, move2 * -4.7);
269 },
270 Some("common.abilities.custom.minotaur.cripplingstrike") => {
271 next.control_l.position = Vec3::new(0.0, 4.0, 5.0);
272 next.control_r.position = Vec3::new(0.0, 4.0, 5.0);
273 next.weapon_l.position = Vec3::new(
274 -12.0 + move1 * -9.0 + move2 * 16.0,
275 -6.0 + move2 * 8.0,
276 -18.0 + move1 * 8.0 + move2 * -4.0,
277 );
278 next.weapon_r.position = Vec3::new(
279 12.0 + move1 * 9.0 + move2 * -16.0,
280 -6.0 + move2 * 8.0,
281 -18.0 + move1 * 8.0 + move2 * -8.0,
282 );
283
284 next.weapon_l.orientation = Quaternion::rotation_x(-1.67)
285 * Quaternion::rotation_y(move1 * -0.3 + move2 * 1.0)
286 * Quaternion::rotation_z(move1 * 0.8 + move2 * -1.8);
287 next.weapon_r.orientation = Quaternion::rotation_x(-1.67)
288 * Quaternion::rotation_y(move1 * 0.3 + move2 * -0.6)
289 * Quaternion::rotation_z(move1 * -0.8 + move2 * 1.8);
290
291 next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 1.0);
292 next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 1.0);
293
294 next.shoulder_l.orientation = Quaternion::rotation_x(-0.3)
295 * Quaternion::rotation_y(move1 * 0.7 + move2 * -0.7);
296
297 next.shoulder_r.orientation = Quaternion::rotation_x(-0.3)
298 * Quaternion::rotation_y(move1 * -0.7 + move2 * 0.7);
299 next.second.scale = Vec3::one() * 1.0;
300 next.head.orientation = Quaternion::rotation_x(move1 * -0.6 + move2 * 0.4)
301 },
302 Some("common.abilities.custom.yeti.strike") => {
303 next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
304 next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
305
306 next.control.position = Vec3::new(
307 4.0 + move1 * -12.0 + move2 * 20.0,
308 (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 5.0,
309 (-s_a.grip.0 / 0.8) + move1 * -2.0 + move2 * 8.0,
310 );
311 next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
312 * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
313 next.upper_torso.orientation =
314 Quaternion::rotation_z(move1 * 0.2 + move2 * -0.4);
315 next.lower_torso.orientation =
316 Quaternion::rotation_z(move1 * -0.2 + move2 * 0.2);
317
318 next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 0.8)
319 * Quaternion::rotation_y(-0.0);
320 next.control_r.orientation =
321 Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
322 * Quaternion::rotation_y(0.0)
323 * Quaternion::rotation_z(0.0);
324
325 next.control.orientation =
326 Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
327 * Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
328 * Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
329 },
330 Some("common.abilities.custom.harvester.scythe") => {
331 next.head.orientation = Quaternion::rotation_x(move1 * -0.25 + move2 * 0.25)
332 * Quaternion::rotation_z(move1 * -0.3 + move2 * 0.4);
333
334 next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1 + move2 * -0.5);
335 next.jaw.orientation = Quaternion::rotation_x(move2 * -0.15);
336
337 next.upper_torso.orientation =
338 Quaternion::rotation_x(move1 * 0.2 + move2 * -0.2)
339 * Quaternion::rotation_z(move1 * -1.0 + move2 * 1.0);
340
341 next.shoulder_l.position = Vec3::new(
342 -s_a.shoulder.0,
343 s_a.shoulder.1,
344 s_a.shoulder.2 - foothorir * 1.0,
345 );
346 next.shoulder_l.orientation =
347 Quaternion::rotation_x(-0.4 + move1 * 1.0 + move2 * -1.0)
348 * Quaternion::rotation_y(move1 * -0.2);
349 next.shoulder_r.orientation =
350 Quaternion::rotation_y(0.4 + move1 * -0.8 + move2 * 0.8)
351 * Quaternion::rotation_x(0.4 + move1 * -0.4 + move2 * 0.8);
352
353 if speed == 0.0 {
354 next.leg_l.orientation = Quaternion::rotation_x(move1 * 0.4 + move2 * -0.4);
355
356 next.foot_l.position = Vec3::new(
357 -s_a.foot.0,
358 s_a.foot.1,
359 s_a.foot.2 + move1 * 2.0 + move2 * -2.0,
360 );
361 next.foot_l.orientation =
362 Quaternion::rotation_x(move1 * -0.6 + move2 * 0.6);
363 }
364
365 next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
366 next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
367
368 next.control.position = Vec3::new(
369 -7.0 + move1 * 26.0 - move2 * 32.0,
370 0.0 + s_a.grip.0 / 1.0 - move1 * 4.0,
371 -s_a.grip.0 / 0.8,
372 );
373
374 next.control_l.orientation = Quaternion::rotation_x(PI / 2.0)
375 * Quaternion::rotation_y(-0.0)
376 * Quaternion::rotation_z(PI);
377 next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2)
378 * Quaternion::rotation_y(-1.0 + move1 * 1.0)
379 * Quaternion::rotation_z(0.0);
380
381 next.control.orientation = Quaternion::rotation_x(-1.4 + move1 * -0.4)
382 * Quaternion::rotation_y(-2.8 + move1 * 3.0 + move2 * -3.0)
383 * Quaternion::rotation_z(move1 * -1.5);
384 },
385 Some(
386 "common.abilities.custom.husk_brute.singlestrike"
387 | "common.abilities.vampire.strigoi.singlestrike",
388 ) => {
389 next.shoulder_l.position =
390 Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
391 next.shoulder_r.position =
392 Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
393 next.hand_l.position = Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2);
394 next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2);
395
396 if mirror > 0.0 {
397 next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 1.0)
398 * Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
399
400 next.shoulder_r.orientation = Quaternion::rotation_x(move1 * -0.6);
401
402 next.upper_torso.orientation =
403 Quaternion::rotation_z(move1 * 0.4 + move2 * -1.1);
404 next.lower_torso.orientation =
405 Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
406
407 next.hand_l.orientation = Quaternion::rotation_x(move1 * 1.2)
408 * Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
409
410 next.hand_r.orientation = Quaternion::rotation_z(move1 * 1.0)
411 * Quaternion::rotation_y(move1 * 0.8 + move2 * -1.2);
412 } else {
413 next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 1.0)
414 * Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
415
416 next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.6);
417
418 next.upper_torso.orientation =
419 Quaternion::rotation_z(move1 * -0.4 + move2 * 1.1);
420 next.lower_torso.orientation =
421 Quaternion::rotation_z(move1 * 0.2 + move2 * -0.6);
422
423 next.hand_r.orientation = Quaternion::rotation_x(move1 * 1.2)
424 * Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
425
426 next.hand_l.orientation = Quaternion::rotation_z(move1 * 1.0)
427 * Quaternion::rotation_y(move1 * -0.8 + move2 * 1.2);
428 }
429 },
430 Some("common.abilities.custom.beastclaws.basic") => {
431 next.shoulder_l.position =
432 Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
433 next.shoulder_r.position =
434 Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
435 next.hand_l.position =
436 Vec3::new(-s_a.hand.0 - 3.0, s_a.hand.1 + 4.5, s_a.hand.2 + 0.0);
437 next.hand_r.position =
438 Vec3::new(s_a.hand.0 + 3.0, s_a.hand.1 + 4.5, s_a.hand.2 + 0.0);
439
440 if mirror > 0.0 {
441 next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 1.0)
442 * Quaternion::rotation_y(move1 * 0.5 + move2 * -1.0);
443
444 next.shoulder_r.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_l.orientation = Quaternion::rotation_x(move1 * 1.2)
452 * Quaternion::rotation_y(move1 * 0.2 + move2 * -0.5)
453 * Quaternion::rotation_z(move1 * 2.0);
454
455 next.hand_r.orientation = Quaternion::rotation_z(move1 * -2.0)
456 * Quaternion::rotation_y(move1 * 0.8 + move2 * -0.6);
457 } else {
458 next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 1.0)
459 * Quaternion::rotation_y(move1 * -0.5 + move2 * 1.0);
460
461 next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.6);
462
463 next.upper_torso.orientation =
464 Quaternion::rotation_z(move1 * -0.4 + move2 * 1.1);
465 next.lower_torso.orientation =
466 Quaternion::rotation_z(move1 * 0.2 + move2 * -0.6);
467
468 next.hand_r.orientation = Quaternion::rotation_x(move1 * 1.2)
469 * Quaternion::rotation_y(move1 * -0.3 + move2 * 0.5)
470 * Quaternion::rotation_z(move1 * -2.0);
471
472 next.hand_l.orientation = Quaternion::rotation_z(move1 * 1.0)
473 * Quaternion::rotation_y(move1 * -0.8 + move2 * 0.6);
474 }
475 },
476 Some("common.abilities.custom.tursus.tursus_claws") => {
477 next.shoulder_l.position =
478 Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
479 next.shoulder_r.position =
480 Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
481 next.hand_l.position = Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2 + 4.0);
482 next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2 + 4.0);
483
484 if mirror > 0.0 {
485 next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 1.0)
486 * Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
487
488 next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 0.6);
489
490 next.upper_torso.orientation =
491 Quaternion::rotation_z(move1 * 0.4 + move2 * -1.1);
492 next.lower_torso.orientation =
493 Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
494
495 next.hand_l.orientation = Quaternion::rotation_x(move1 * 1.2)
496 * Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
497
498 next.hand_r.orientation = Quaternion::rotation_z(move1 * -1.0)
499 * Quaternion::rotation_y(move1 * 0.8 + move2 * -1.2);
500 } else {
501 next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 1.0)
502 * Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
503
504 next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.6);
505
506 next.upper_torso.orientation =
507 Quaternion::rotation_z(move1 * -0.4 + move2 * 1.1);
508 next.lower_torso.orientation =
509 Quaternion::rotation_z(move1 * 0.2 + move2 * -0.6);
510
511 next.hand_r.orientation = Quaternion::rotation_x(move1 * 1.2)
512 * Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
513
514 next.hand_l.orientation = Quaternion::rotation_z(move1 * 1.0)
515 * Quaternion::rotation_y(move1 * -0.8 + move2 * 1.2);
516 }
517 },
518 _ => {},
519 },
520 _ => {},
521 }
522
523 next
524 }
525}