mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
loot tables, clippy, animation tweaks
This commit is contained in:
parent
42460f7e65
commit
ea9b871374
@ -1,5 +1,5 @@
|
||||
LeapMelee(
|
||||
energy_cost: 0,
|
||||
energy_cost: 450,
|
||||
buildup_duration: 0.2,
|
||||
movement_duration: 0.2,
|
||||
swing_duration: 0.2,
|
||||
|
@ -7,7 +7,7 @@ SpinMelee(
|
||||
knockback: ( strength: 0.0, direction: Away),
|
||||
range: 3.5,
|
||||
damage_effect: None,
|
||||
energy_cost: 0,
|
||||
energy_cost: 100,
|
||||
is_infinite: true,
|
||||
movement_behavior: AxeHover,
|
||||
is_interruptible: false,
|
||||
|
@ -1,6 +1,6 @@
|
||||
ChargedMelee(
|
||||
energy_cost: 1,
|
||||
energy_drain: 0,
|
||||
energy_drain: 300,
|
||||
initial_damage: 10,
|
||||
scaled_damage: 160,
|
||||
initial_poise_damage: 60,
|
||||
|
@ -1,5 +1,5 @@
|
||||
LeapMelee(
|
||||
energy_cost: 0,
|
||||
energy_cost: 700,
|
||||
buildup_duration: 0.1,
|
||||
movement_duration: 0.8,
|
||||
swing_duration: 0.15,
|
||||
|
@ -1,5 +1,5 @@
|
||||
DashMelee(
|
||||
energy_cost: 0,
|
||||
energy_cost: 100,
|
||||
base_damage: 80,
|
||||
scaled_damage: 160,
|
||||
base_poise_damage: 60,
|
||||
@ -8,8 +8,8 @@ DashMelee(
|
||||
scaled_knockback: 7.0,
|
||||
range: 5.0,
|
||||
angle: 45.0,
|
||||
energy_drain: 0,
|
||||
forward_speed: 4.0,
|
||||
energy_drain: 600,
|
||||
forward_speed: 3.0,
|
||||
buildup_duration: 0.25,
|
||||
charge_duration: 0.6,
|
||||
swing_duration: 0.1,
|
||||
|
@ -1,5 +1,9 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.axe.bloodsteel_axe-0")),
|
||||
(1.0, Item("common.items.weapons.axe.bloodsteel_axe-1")),
|
||||
(1.0, Item("common.items.weapons.axe.bloodsteel_axe-2")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.axe_1h.bloodsteel-0")),
|
||||
(1.0, Item("common.items.weapons.axe_1h.bloodsteel-1")),
|
||||
]
|
@ -1,5 +1,9 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.axe.bronze_axe-0")),
|
||||
(1.0, Item("common.items.weapons.axe.bronze_axe-1")),
|
||||
(1.0, Item("common.items.weapons.axe.bronze_axe-2")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.axe_1h.bronze-0")),
|
||||
(1.0, Item("common.items.weapons.axe_1h.bronze-1")),
|
||||
]
|
@ -1,4 +1,8 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.axe.cobalt_axe-0")),
|
||||
(1.0, Item("common.items.weapons.axe.cobalt_axe-1")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.axe_1h.cobalt-0")),
|
||||
(1.0, Item("common.items.weapons.axe_1h.cobalt-1")),
|
||||
]
|
@ -1,4 +1,5 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.axe.iron_axe-0")),
|
||||
(1.0, Item("common.items.weapons.axe.iron_axe-1")),
|
||||
(1.0, Item("common.items.weapons.axe.iron_axe-2")),
|
||||
@ -9,4 +10,9 @@
|
||||
(1.0, Item("common.items.weapons.axe.iron_axe-7")),
|
||||
(1.0, Item("common.items.weapons.axe.iron_axe-8")),
|
||||
(1.0, Item("common.items.weapons.axe.iron_axe-9")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.axe_1h.iron-0")),
|
||||
(1.0, Item("common.items.weapons.axe_1h.iron-1")),
|
||||
(1.0, Item("common.items.weapons.axe_1h.iron-2")),
|
||||
(1.0, Item("common.items.weapons.axe_1h.iron-3")),
|
||||
]
|
@ -1,4 +1,5 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.axe.steel_axe-0")),
|
||||
(1.0, Item("common.items.weapons.axe.steel_axe-1")),
|
||||
(1.0, Item("common.items.weapons.axe.steel_axe-2")),
|
||||
@ -6,4 +7,8 @@
|
||||
(1.0, Item("common.items.weapons.axe.steel_axe-4")),
|
||||
(1.0, Item("common.items.weapons.axe.steel_axe-5")),
|
||||
(1.0, Item("common.items.weapons.axe.steel_axe-6")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.axe_1h.steel-0")),
|
||||
(1.0, Item("common.items.weapons.axe_1h.steel-1")),
|
||||
(1.0, Item("common.items.weapons.axe_1h.steel-2")),
|
||||
]
|
@ -1,4 +1,8 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.hammer.runic_hammer")),
|
||||
(1.0, Item("common.items.weapons.hammer.ramshead_hammer")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.hammer_1h.bloodsteel-0")),
|
||||
(1.0, Item("common.items.weapons.hammer_1h.bloodsteel-1")),
|
||||
]
|
@ -1,4 +1,8 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.hammer.bronze_hammer-0")),
|
||||
(1.0, Item("common.items.weapons.hammer.bronze_hammer-1")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.hammer_1h.bronze-0")),
|
||||
(1.0, Item("common.items.weapons.hammer_1h.bronze-1")),
|
||||
]
|
@ -1,4 +1,8 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.hammer.cobalt_hammer-0")),
|
||||
(1.0, Item("common.items.weapons.hammer.cobalt_hammer-1")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.hammer_1h.cobalt-0")),
|
||||
(1.0, Item("common.items.weapons.hammer_1h.cobalt-1")),
|
||||
]
|
@ -1,4 +1,5 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.hammer.iron_hammer-0")),
|
||||
(1.0, Item("common.items.weapons.hammer.iron_hammer-1")),
|
||||
(1.0, Item("common.items.weapons.hammer.iron_hammer-2")),
|
||||
@ -8,4 +9,8 @@
|
||||
(1.0, Item("common.items.weapons.hammer.iron_hammer-6")),
|
||||
(1.0, Item("common.items.weapons.hammer.iron_hammer-7")),
|
||||
(1.0, Item("common.items.weapons.hammer.iron_hammer-8")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.hammer_1h.iron-0")),
|
||||
(1.0, Item("common.items.weapons.hammer_1h.iron-1")),
|
||||
(1.0, Item("common.items.weapons.hammer_1h.iron-2")),
|
||||
]
|
@ -1,8 +1,13 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.hammer.steel_hammer-0")),
|
||||
(1.0, Item("common.items.weapons.hammer.steel_hammer-1")),
|
||||
(1.0, Item("common.items.weapons.hammer.steel_hammer-2")),
|
||||
(1.0, Item("common.items.weapons.hammer.steel_hammer-3")),
|
||||
(1.0, Item("common.items.weapons.hammer.steel_hammer-4")),
|
||||
(1.0, Item("common.items.weapons.hammer.steel_hammer-5")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.hammer_1h.steel-0")),
|
||||
(1.0, Item("common.items.weapons.hammer_1h.steel-1")),
|
||||
(1.0, Item("common.items.weapons.hammer_1h.steel-2")),
|
||||
]
|
@ -1,6 +1,10 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.hammer.stone_hammer-0")),
|
||||
(1.0, Item("common.items.weapons.hammer.stone_hammer-1")),
|
||||
(1.0, Item("common.items.weapons.hammer.stone_hammer-2")),
|
||||
(1.0, Item("common.items.weapons.hammer.stone_hammer-3")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.hammer_1h.stone-0")),
|
||||
(1.0, Item("common.items.weapons.hammer_1h.stone-1")),
|
||||
]
|
@ -1,5 +1,10 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.sword.bloodsteel-0")),
|
||||
(1.0, Item("common.items.weapons.sword.bloodsteel-1")),
|
||||
(1.0, Item("common.items.weapons.sword.bloodsteel-2")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.sword_1h.bloodsteel-0")),
|
||||
(1.0, Item("common.items.weapons.sword_1h.bloodsteel-1")),
|
||||
(1.0, Item("common.items.weapons.sword_1h.bloodsteel-2")),
|
||||
]
|
@ -1,5 +1,10 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.sword.bronze-0")),
|
||||
(1.0, Item("common.items.weapons.sword.bronze-1")),
|
||||
(1.0, Item("common.items.weapons.sword.bronze-2")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.sword_1h.bronze-0")),
|
||||
(1.0, Item("common.items.weapons.sword_1h.bronze-1")),
|
||||
(1.0, Item("common.items.weapons.sword_1h.bronze-2")),
|
||||
]
|
@ -1,6 +1,12 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.sword.cobalt-0")),
|
||||
(1.0, Item("common.items.weapons.sword.cobalt-1")),
|
||||
(1.0, Item("common.items.weapons.sword.cobalt-2")),
|
||||
(1.0, Item("common.items.weapons.sword.cobalt-3")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.sword_1h.cobalt-0")),
|
||||
(1.0, Item("common.items.weapons.sword_1h.cobalt-1")),
|
||||
(1.0, Item("common.items.weapons.sword_1h.cobalt-2")),
|
||||
(1.0, Item("common.items.weapons.sword_1h.cobalt-3")),
|
||||
]
|
@ -1,4 +1,5 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.sword.iron-0")),
|
||||
(1.0, Item("common.items.weapons.sword.iron-1")),
|
||||
(1.0, Item("common.items.weapons.sword.iron-2")),
|
||||
@ -10,4 +11,10 @@
|
||||
(1.0, Item("common.items.weapons.sword.iron-8")),
|
||||
(1.0, Item("common.items.weapons.sword.iron-9")),
|
||||
(1.0, Item("common.items.weapons.sword.iron-10")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.sword_1h.iron-0")),
|
||||
(1.0, Item("common.items.weapons.sword_1h.iron-1")),
|
||||
(1.0, Item("common.items.weapons.sword_1h.iron-2")),
|
||||
(1.0, Item("common.items.weapons.sword_1h.iron-3")),
|
||||
(1.0, Item("common.items.weapons.sword_1h.iron-4")),
|
||||
]
|
@ -1,4 +1,5 @@
|
||||
[
|
||||
//2h
|
||||
(1.0, Item("common.items.weapons.sword.steel-0")),
|
||||
(1.0, Item("common.items.weapons.sword.steel-1")),
|
||||
(1.0, Item("common.items.weapons.sword.steel-2")),
|
||||
@ -8,4 +9,9 @@
|
||||
(1.0, Item("common.items.weapons.sword.steel-6")),
|
||||
(1.0, Item("common.items.weapons.sword.steel-7")),
|
||||
(1.0, Item("common.items.weapons.sword.steel-8")),
|
||||
//1h
|
||||
(1.0, Item("common.items.weapons.sword_1h.steel-0")),
|
||||
(1.0, Item("common.items.weapons.sword_1h.steel-1")),
|
||||
(1.0, Item("common.items.weapons.sword_1h.steel-2")),
|
||||
(1.0, Item("common.items.weapons.sword_1h.steel-3")),
|
||||
]
|
@ -190,7 +190,7 @@
|
||||
"hud.skill.sw_dash_cost_title": "Coste de Atravesar",
|
||||
"hud.skill.sw_dash_cost": "Disminuye el coste inicial de Atravesar en un 25%{SP}",
|
||||
"hud.skill.sw_dash_speed_title": "Velocidad de Atravesar",
|
||||
"hud.skill.sw_dash_speed": "Aumenta la velocidad al atravesar en un 30%{SP}",
|
||||
"hud.skill.sw_dash_speed": "Aumenta la velocidad al atravesar en un 15%{SP}",
|
||||
"hud.skill.sw_dash_inf_title": "Atravesar Infinito",
|
||||
"hud.skill.sw_dash_inf": "Te permite hacer atravesar durante todo el tiempo que tengas energía{SP}",
|
||||
"hud.skill.sw_dash_scale_title": "Intensidad de daño de Atravesar",
|
||||
|
@ -190,7 +190,7 @@
|
||||
"hud.skill.sw_dash_cost_title": "Coût d'Endurance de la Ruée",
|
||||
"hud.skill.sw_dash_cost": "Diminue de 25% le coût en endurance initial de la ruée{SP}",
|
||||
"hud.skill.sw_dash_speed_title": "Vitesse de la Ruée",
|
||||
"hud.skill.sw_dash_speed": "Augmente de 30% la vitesse de course durant la ruée{SP}",
|
||||
"hud.skill.sw_dash_speed": "Augmente de 15% la vitesse de course durant la ruée{SP}",
|
||||
"hud.skill.sw_dash_inf_title": "Ruée Infinie",
|
||||
"hud.skill.sw_dash_inf": "Vous permet de vous élancer en ruée tant que vous avez de l'endurance{SP}",
|
||||
"hud.skill.sw_dash_scale_title": "Progression des Dégâts de la Ruée",
|
||||
|
@ -190,7 +190,7 @@
|
||||
"hud.skill.sw_dash_cost_title": "ダッシュ コスト",
|
||||
"hud.skill.sw_dash_cost": "ダッシュ攻撃の初期スタミナ消費を25%減少 {SP}",
|
||||
"hud.skill.sw_dash_speed_title": "ダッシュ 速度",
|
||||
"hud.skill.sw_dash_speed": "ダッシュ攻撃の速度を30%増加 {SP}",
|
||||
"hud.skill.sw_dash_speed": "ダッシュ攻撃の速度を15%増加 {SP}",
|
||||
"hud.skill.sw_dash_inf_title": "無限ダッシュ攻撃",
|
||||
"hud.skill.sw_dash_inf": "エネルギーの続く限りダッシュ攻撃する {SP}",
|
||||
"hud.skill.sw_dash_scale_title": "ダッシュ ダメージ増量",
|
||||
|
@ -186,7 +186,7 @@
|
||||
"hud.skill.sw_dash_cost_title": "Custo da Investida",
|
||||
"hud.skill.sw_dash_cost": "Reduz custo inicial da investida em 25%{SP}",
|
||||
"hud.skill.sw_dash_speed_title": "Velocidade de Investida",
|
||||
"hud.skill.sw_dash_speed": "Aumenta a velocidade durante a investida em 30%{SP}",
|
||||
"hud.skill.sw_dash_speed": "Aumenta a velocidade durante a investida em 15%{SP}",
|
||||
"hud.skill.sw_dash_inf_title": "Investida do Infinito",
|
||||
"hud.skill.sw_dash_inf": "Você consegue investir contanto que possua energia para tal{SP}",
|
||||
"hud.skill.sw_dash_scale_title": "Investida Acumulada",
|
||||
|
@ -195,7 +195,7 @@
|
||||
"hud.skill.sw_dash_cost_title": "Енергозатрати на випад",
|
||||
"hud.skill.sw_dash_cost": "Зменшує початкову енергетичну ціну випаду на 25%{SP}",
|
||||
"hud.skill.sw_dash_speed_title": "Швидкість випаду",
|
||||
"hud.skill.sw_dash_speed": "Збільшує швидкість руху під час випаду 30%{SP}",
|
||||
"hud.skill.sw_dash_speed": "Збільшує швидкість руху під час випаду 15%{SP}",
|
||||
"hud.skill.sw_dash_inf_title": "Необмежений випад",
|
||||
"hud.skill.sw_dash_inf": "Дозволяє нестись в випаді доки не закінчиться енергія{SP}",
|
||||
"hud.skill.sw_dash_scale_title": "Приріст ушкодження випадом",
|
||||
|
@ -613,67 +613,67 @@
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.bloodsteel-1": (
|
||||
vox_spec: ("weapon.hammer_1h.bloodsteel-1", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.bloodsteel-1", (-2.5, -5.0, -3.0)),
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.bronze-0": (
|
||||
vox_spec: ("weapon.hammer_1h.bronze-0", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.bronze-0", (-3.5, -4.0, -3.0)),
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.bronze-1": (
|
||||
vox_spec: ("weapon.hammer_1h.bronze-1", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.bronze-1", (-2.5, -3.0, -3.0)),
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.cobalt-0": (
|
||||
vox_spec: ("weapon.hammer_1h.cobalt-0", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.cobalt-0", (-2.5, -4.0, -3.0)),
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.cobalt-1": (
|
||||
vox_spec: ("weapon.hammer_1h.cobalt-1", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.cobalt-1", (-2.5, -4.0, -3.0)),
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.iron-0": (
|
||||
vox_spec: ("weapon.hammer_1h.iron-0", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.iron-0", (-2.5, -4.5, -3.0)),
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.iron-1": (
|
||||
vox_spec: ("weapon.hammer_1h.iron-1", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.iron-1", (-2.5, -3.0, -3.0)),
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.iron-2": (
|
||||
vox_spec: ("weapon.hammer_1h.iron-2", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.iron-2", (-2.5, -3.0, -3.0)),
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.orichalcum-0": (
|
||||
vox_spec: ("weapon.hammer_1h.orichalcum-0", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.orichalcum-0", (-1.5, -4.0, -3.0)),
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.steel-0": (
|
||||
vox_spec: ("weapon.hammer_1h.steel-0", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.steel-0", (-2.5, -4.0, -3.0)),
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.steel-1": (
|
||||
vox_spec: ("weapon.hammer_1h.steel-1", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.steel-1", (-2.5, -3.0, -3.0)),
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.steel-2": (
|
||||
vox_spec: ("weapon.hammer_1h.steel-2", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.steel-2", (-2.5, -3.0, -3.0)),
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.stone-0": (
|
||||
vox_spec: ("weapon.hammer_1h.stone-0", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.stone-0", (-2.5, -3.5, -3.0)),
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.stone-1": (
|
||||
vox_spec: ("weapon.hammer_1h.stone-1", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.stone-1", (-2.5, -4.5, -3.0)),
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.wood-0": (
|
||||
vox_spec: ("weapon.hammer_1h.wood-0", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.wood-0", (-3.0, -3.0, -3.0)),
|
||||
color: None
|
||||
),
|
||||
"common.items.weapons.hammer_1h.wood-1": (
|
||||
vox_spec: ("weapon.hammer_1h.wood-1", (-1.5, -5.0, -6.0)),
|
||||
vox_spec: ("weapon.hammer_1h.wood-1", (-2.5, -3.0, -3.0)),
|
||||
color: None
|
||||
),
|
||||
// Daggers
|
||||
|
@ -667,7 +667,7 @@ impl CharacterAbility {
|
||||
*scaled_damage *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
if skillset.has_skill(Sword(DSpeed)) {
|
||||
*forward_speed *= 1.3;
|
||||
*forward_speed *= 1.15;
|
||||
}
|
||||
*infinite_charge = skillset.has_skill(Sword(DInfinite));
|
||||
},
|
||||
|
@ -10,16 +10,15 @@ use std::f32::consts::PI;
|
||||
|
||||
pub struct AlphaAnimation;
|
||||
|
||||
type AlphaAnimationDependency = (
|
||||
(Option<Hands>, Option<Hands>),
|
||||
f32,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
impl Animation for AlphaAnimation {
|
||||
type Dependency = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
(Option<Hands>, Option<Hands>),
|
||||
f32,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
type Dependency = AlphaAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -29,15 +28,7 @@ impl Animation for AlphaAnimation {
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
_second_tool_kind,
|
||||
hands,
|
||||
_velocity,
|
||||
_global_time,
|
||||
stage_section,
|
||||
ability_info,
|
||||
): Self::Dependency,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
@ -98,17 +89,17 @@ impl Animation for AlphaAnimation {
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = (1.0 - move3);
|
||||
let pullback = 1.0 - move3;
|
||||
let moveret1 = move1 * pullback;
|
||||
let moveret2 = move2 * pullback;
|
||||
|
||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
||||
next.head.orientation = Quaternion::rotation_x((moveret1 * 0.1 + moveret2 * 0.3))
|
||||
* Quaternion::rotation_z((move1 * -0.2 + moveret2 * 0.2));
|
||||
next.head.orientation = Quaternion::rotation_x(moveret1 * 0.1 + moveret2 * 0.3)
|
||||
* Quaternion::rotation_z(move1 * -0.2 + moveret2 * 0.2);
|
||||
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + moveret2 * -2.0);
|
||||
next.chest.orientation = Quaternion::rotation_x((moveret1 * 0.4 + moveret2 * -0.7))
|
||||
* Quaternion::rotation_y((moveret1 * 0.3 + moveret2 * -0.4))
|
||||
* Quaternion::rotation_z((moveret1 * 0.5 + moveret2 * -0.5));
|
||||
next.chest.orientation = Quaternion::rotation_x(moveret1 * 0.4 + moveret2 * -0.7)
|
||||
* Quaternion::rotation_y(moveret1 * 0.3 + moveret2 * -0.4)
|
||||
* Quaternion::rotation_z(moveret1 * 0.5 + moveret2 * -0.5);
|
||||
},
|
||||
Some(ToolKind::Debug) => {
|
||||
next.hand_l.position = Vec3::new(-7.0, 4.0, 3.0);
|
||||
@ -173,7 +164,7 @@ impl Animation for AlphaAnimation {
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = (1.0 - move3);
|
||||
let pullback = 1.0 - move3;
|
||||
let moveret1 = move1 * pullback;
|
||||
let moveret2 = move2 * pullback;
|
||||
next.hand_l.position =
|
||||
|
@ -6,20 +6,18 @@ use common::{
|
||||
comp::item::{Hands, ToolKind},
|
||||
states::utils::{AbilityInfo, StageSection},
|
||||
};
|
||||
use std::f32::consts::PI;
|
||||
|
||||
pub struct BetaAnimation;
|
||||
|
||||
type BetaAnimationDependency = (
|
||||
(Option<Hands>, Option<Hands>),
|
||||
f32,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
impl Animation for BetaAnimation {
|
||||
type Dependency = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
(Option<Hands>, Option<Hands>),
|
||||
f32,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
type Dependency = BetaAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -28,15 +26,7 @@ impl Animation for BetaAnimation {
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_beta")]
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
_active_tool_kind,
|
||||
_second_tool_kind,
|
||||
hands,
|
||||
_velocity,
|
||||
_global_time,
|
||||
stage_section,
|
||||
ability_info,
|
||||
): Self::Dependency,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
@ -55,14 +45,11 @@ impl Animation for BetaAnimation {
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0);
|
||||
|
||||
match ability_info.and_then(|a| a.tool) {
|
||||
Some(ToolKind::Sword) => {
|
||||
next.chest.orientation = Quaternion::rotation_x(0.15)
|
||||
* Quaternion::rotation_y((-0.1) * (1.0 - move3))
|
||||
* Quaternion::rotation_z((0.4 + move1 * 1.5 + move2 * -2.5) * (1.0 - move3));
|
||||
next.head.orientation = Quaternion::rotation_z(-0.4 + move1 * -1.0 + move2 * 1.5);
|
||||
},
|
||||
_ => {},
|
||||
if let Some(ToolKind::Sword) = ability_info.and_then(|a| a.tool) {
|
||||
next.chest.orientation = Quaternion::rotation_x(0.15)
|
||||
* Quaternion::rotation_y((-0.1) * (1.0 - move3))
|
||||
* Quaternion::rotation_z((0.4 + move1 * 1.5 + move2 * -2.5) * (1.0 - move3));
|
||||
next.head.orientation = Quaternion::rotation_z(-0.4 + move1 * -1.0 + move2 * 1.5);
|
||||
}
|
||||
match hands {
|
||||
(Some(Hands::Two), _) => match ability_info.and_then(|a| a.tool) {
|
||||
|
@ -8,16 +8,16 @@ use common::{
|
||||
};
|
||||
pub struct ChargeswingAnimation;
|
||||
|
||||
type ChargeswingAnimationDependency = (
|
||||
(Option<Hands>, Option<Hands>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
|
||||
impl Animation for ChargeswingAnimation {
|
||||
type Dependency = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
(Option<Hands>, Option<Hands>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
type Dependency = ChargeswingAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -27,15 +27,7 @@ impl Animation for ChargeswingAnimation {
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
_second_tool_kind,
|
||||
hands,
|
||||
_velocity,
|
||||
_global_time,
|
||||
stage_section,
|
||||
ability_info,
|
||||
): Self::Dependency,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
@ -62,35 +54,30 @@ impl Animation for ChargeswingAnimation {
|
||||
_ => (0.0, 0.0, 0.0, 0.0, 0.0),
|
||||
};
|
||||
|
||||
let pullback = (1.0 - movement3);
|
||||
let pullback = 1.0 - movement3;
|
||||
let move1 = move1base * pullback;
|
||||
let move2 = move2base * pullback;
|
||||
let slowrise = test * pullback;
|
||||
next.second.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.second.orientation = Quaternion::rotation_z(0.0);
|
||||
|
||||
if let Some(ToolKind::Hammer) = active_tool_kind {}
|
||||
|
||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
||||
|
||||
match ability_info.and_then(|a| a.tool) {
|
||||
Some(ToolKind::Hammer) => {
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0);
|
||||
if let Some(ToolKind::Hammer) = ability_info.and_then(|a| a.tool) {
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0);
|
||||
|
||||
next.chest.orientation =
|
||||
Quaternion::rotation_z(short * 0.04 + (move1 * 2.0 + move2 * -3.5));
|
||||
next.belt.orientation = Quaternion::rotation_z(short * 0.08 + (move1 * -1.0));
|
||||
next.shorts.orientation = Quaternion::rotation_z(short * 0.15 + (move1 * -1.5));
|
||||
next.head.position = Vec3::new(
|
||||
0.0 + (move1 * -1.0 + move2 * 2.0),
|
||||
s_a.head.0 + (move1 * 1.0),
|
||||
s_a.head.1,
|
||||
);
|
||||
next.head.orientation = Quaternion::rotation_z(move1 * -1.5 + move2 * 3.2);
|
||||
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1);
|
||||
},
|
||||
_ => {},
|
||||
next.chest.orientation =
|
||||
Quaternion::rotation_z(short * 0.04 + (move1 * 2.0 + move2 * -3.5));
|
||||
next.belt.orientation = Quaternion::rotation_z(short * 0.08 + (move1 * -1.0));
|
||||
next.shorts.orientation = Quaternion::rotation_z(short * 0.15 + (move1 * -1.5));
|
||||
next.head.position = Vec3::new(
|
||||
0.0 + (move1 * -1.0 + move2 * 2.0),
|
||||
s_a.head.0 + (move1 * 1.0),
|
||||
s_a.head.1,
|
||||
);
|
||||
next.head.orientation = Quaternion::rotation_z(move1 * -1.5 + move2 * 3.2);
|
||||
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1);
|
||||
}
|
||||
|
||||
match hands {
|
||||
|
@ -10,15 +10,14 @@ use std::f32::consts::PI;
|
||||
|
||||
pub struct DashAnimation;
|
||||
|
||||
type DashAnimationDependency = (
|
||||
(Option<Hands>, Option<Hands>),
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
impl Animation for DashAnimation {
|
||||
type Dependency = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
(Option<Hands>, Option<Hands>),
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
type Dependency = DashAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -28,7 +27,7 @@ impl Animation for DashAnimation {
|
||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, hands, _global_time, stage_section, ability_info): Self::Dependency,
|
||||
(hands, _global_time, stage_section, ability_info): Self::Dependency,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
@ -43,7 +42,7 @@ impl Animation for DashAnimation {
|
||||
Some(StageSection::Recover) => (1.1, 1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = (1.0 - move4);
|
||||
let pullback = 1.0 - move4;
|
||||
let move1 = movement1 * pullback;
|
||||
let move2 = movement2 * pullback;
|
||||
let move3 = movement3 * pullback;
|
||||
@ -77,13 +76,13 @@ impl Animation for DashAnimation {
|
||||
s_a.chest.1 + (2.0 + shortalt(move2) * -2.5) + move3 * -3.0,
|
||||
);
|
||||
next.chest.orientation =
|
||||
Quaternion::rotation_x((move2.min(1.0) * -0.4 + move3 * 0.4))
|
||||
* Quaternion::rotation_y((move2.min(1.0) * -0.2 + move3 * 0.3))
|
||||
* Quaternion::rotation_z((move1 * 1.1 + move3 * -2.2));
|
||||
Quaternion::rotation_x(move2.min(1.0) * -0.4 + move3 * 0.4)
|
||||
* Quaternion::rotation_y(move2.min(1.0) * -0.2 + move3 * 0.3)
|
||||
* Quaternion::rotation_z(move1 * 1.1 + move3 * -2.2);
|
||||
|
||||
next.shorts.orientation = Quaternion::rotation_z((short(move2).min(1.0) * 0.25));
|
||||
next.shorts.orientation = Quaternion::rotation_z(short(move2).min(1.0) * 0.25);
|
||||
|
||||
next.belt.orientation = Quaternion::rotation_z((short(move2).min(1.0) * 0.1));
|
||||
next.belt.orientation = Quaternion::rotation_z(short(move2).min(1.0) * 0.1);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
@ -145,7 +144,9 @@ impl Animation for DashAnimation {
|
||||
);
|
||||
next.control_r.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1 * -3.0 + move3 * -0.5)
|
||||
* Quaternion::rotation_y(move1 * 1.5 + move2 * 1.0 + move3 * 1.5)
|
||||
* Quaternion::rotation_y(
|
||||
move1 * 1.5 + (move2 * 1.0).min(0.8) + move3 * 1.5,
|
||||
)
|
||||
* Quaternion::rotation_z(move3 * 1.5);
|
||||
next.hand_r.position = Vec3::new(0.0, -0.5, 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.57)
|
||||
|
@ -3,7 +3,7 @@ use super::{
|
||||
CharacterSkeleton, SkeletonAttr,
|
||||
};
|
||||
use common::comp::item::{Hands, ToolKind};
|
||||
use std::{f32::consts::PI, ops::Mul};
|
||||
use std::ops::Mul;
|
||||
|
||||
pub struct IdleAnimation;
|
||||
|
||||
@ -87,48 +87,50 @@ impl Animation for IdleAnimation {
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
next.hold.position = Vec3::new(0.4, -0.3, -5.8);
|
||||
match active_tool_kind {
|
||||
Some(ToolKind::Dagger) => {
|
||||
next.main.position = Vec3::new(-4.0, -5.0, 7.0);
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_y(0.25 * PI) * Quaternion::rotation_z(1.5 * PI);
|
||||
match hands {
|
||||
(Some(Hands::Two), _) => match active_tool_kind {
|
||||
Some(ToolKind::Bow) => {
|
||||
next.main.position = Vec3::new(0.0, -5.0, 6.0);
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
Some(ToolKind::Staff) | Some(ToolKind::Sceptre) => {
|
||||
next.main.position = Vec3::new(2.0, -5.0, -1.0);
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_y(-0.5) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
_ => {
|
||||
next.main.position = Vec3::new(-7.0, -5.0, 15.0);
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
},
|
||||
Some(ToolKind::Shield) => {
|
||||
next.main.position = Vec3::new(-0.0, -5.0, 3.0);
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_y(0.25 * PI) * Quaternion::rotation_z(-1.5 * PI);
|
||||
},
|
||||
Some(ToolKind::Bow) => {
|
||||
next.main.position = Vec3::new(0.0, -5.0, 6.0);
|
||||
next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
Some(ToolKind::Staff) | Some(ToolKind::Sceptre) => {
|
||||
next.main.position = Vec3::new(2.0, -5.0, -1.0);
|
||||
next.main.orientation = Quaternion::rotation_y(-0.5) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
_ => {
|
||||
next.main.position = Vec3::new(-7.0, -5.0, 15.0);
|
||||
next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
}
|
||||
(_, _) => {},
|
||||
};
|
||||
|
||||
match second_tool_kind {
|
||||
Some(ToolKind::Dagger) => {
|
||||
next.second.position = Vec3::new(4.0, -6.0, 7.0);
|
||||
next.second.orientation =
|
||||
Quaternion::rotation_y(-0.25 * PI) * Quaternion::rotation_z(-1.5 * PI);
|
||||
match hands {
|
||||
(Some(Hands::One), _) => match active_tool_kind {
|
||||
Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => {
|
||||
next.main.position = Vec3::new(-4.0, -5.0, 10.0);
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_y(2.35) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
|
||||
_ => {},
|
||||
},
|
||||
Some(ToolKind::Shield) => {
|
||||
next.second.position = Vec3::new(0.0, -4.0, 3.0);
|
||||
next.second.orientation =
|
||||
Quaternion::rotation_y(-0.25 * PI) * Quaternion::rotation_z(1.5 * PI);
|
||||
(_, _) => {},
|
||||
};
|
||||
match hands {
|
||||
(None | Some(Hands::One), Some(Hands::One)) => match second_tool_kind {
|
||||
Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => {
|
||||
next.second.position = Vec3::new(4.0, -5.5, 10.0);
|
||||
next.second.orientation =
|
||||
Quaternion::rotation_y(-2.35) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
_ => {
|
||||
next.second.position = Vec3::new(-7.0, -5.0, 15.0);
|
||||
next.second.orientation =
|
||||
Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
}
|
||||
(_, _) => {},
|
||||
};
|
||||
|
||||
next.lantern.position = Vec3::new(s_a.lantern.0, s_a.lantern.1, s_a.lantern.2);
|
||||
next.lantern.orientation = Quaternion::rotation_x(0.1) * Quaternion::rotation_y(0.1);
|
||||
|
@ -195,7 +195,7 @@ impl Animation for JumpAnimation {
|
||||
Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => {
|
||||
next.main.position = Vec3::new(-4.0, -5.0, 10.0);
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57);
|
||||
Quaternion::rotation_y(2.35) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
|
||||
_ => {},
|
||||
@ -207,7 +207,7 @@ impl Animation for JumpAnimation {
|
||||
Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => {
|
||||
next.second.position = Vec3::new(4.0, -5.5, 10.0);
|
||||
next.second.orientation =
|
||||
Quaternion::rotation_y(-2.5) * Quaternion::rotation_z(1.57);
|
||||
Quaternion::rotation_y(-2.35) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
|
@ -6,19 +6,17 @@ use common::{
|
||||
comp::item::{Hands, ToolKind},
|
||||
states::utils::{AbilityInfo, StageSection},
|
||||
};
|
||||
use std::f32::consts::PI;
|
||||
pub struct LeapAnimation;
|
||||
|
||||
type LeapAnimationDependency = (
|
||||
(Option<Hands>, Option<Hands>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
impl Animation for LeapAnimation {
|
||||
type Dependency = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
(Option<Hands>, Option<Hands>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
type Dependency = LeapAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -28,15 +26,7 @@ impl Animation for LeapAnimation {
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
_second_tool_kind,
|
||||
hands,
|
||||
_velocity,
|
||||
_global_time,
|
||||
stage_section,
|
||||
ability_info,
|
||||
): Self::Dependency,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
@ -51,7 +41,7 @@ impl Animation for LeapAnimation {
|
||||
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time.powf(0.75)),
|
||||
_ => (0.0, 0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = (1.0 - move4);
|
||||
let pullback = 1.0 - move4;
|
||||
let move1 = movement1 * pullback;
|
||||
let move2 = movement2 * pullback;
|
||||
let move3 = movement3 * pullback;
|
||||
|
@ -258,7 +258,7 @@ impl Animation for RunAnimation {
|
||||
Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => {
|
||||
next.main.position = Vec3::new(-4.0, -5.0, 10.0);
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57);
|
||||
Quaternion::rotation_y(2.35) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
|
||||
_ => {},
|
||||
@ -270,7 +270,7 @@ impl Animation for RunAnimation {
|
||||
Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => {
|
||||
next.second.position = Vec3::new(4.0, -5.5, 10.0);
|
||||
next.second.orientation =
|
||||
Quaternion::rotation_y(-2.5) * Quaternion::rotation_z(1.57);
|
||||
Quaternion::rotation_y(-2.35) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
|
@ -27,48 +27,49 @@ impl Animation for SitAnimation {
|
||||
let slow = (anim_time * 1.0).sin();
|
||||
let slowa = (anim_time * 1.0 + PI / 2.0).sin();
|
||||
let stop = (anim_time * 3.0).min(PI / 2.0).sin();
|
||||
let pet = (anim_time * 6.0).sin();
|
||||
|
||||
let head_look = Vec2::new(
|
||||
(global_time + anim_time / 18.0).floor().mul(7331.0).sin() * 0.25,
|
||||
(global_time + anim_time / 18.0).floor().mul(1337.0).sin() * 0.125,
|
||||
);
|
||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1 + slow * 0.1 + stop * -0.8);
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_z(stop * 0.4) * Quaternion::rotation_x(slow * 0.1 + pet * 0.01);
|
||||
next.head.orientation = Quaternion::rotation_z(head_look.x + slow * 0.2 - slow * 0.1)
|
||||
* Quaternion::rotation_x((slowa * -0.1 + slow * 0.1 + head_look.y).abs());
|
||||
|
||||
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + slow * 0.1 + stop * -0.8);
|
||||
next.chest.orientation =
|
||||
Quaternion::rotation_z(stop * -0.4 + pet * 0.04) * Quaternion::rotation_x(stop * -0.2);
|
||||
next.chest.position = Vec3::new(
|
||||
0.0,
|
||||
s_a.chest.0 + stop * -0.4,
|
||||
s_a.chest.1 + slow * 0.1 + stop * -0.8,
|
||||
);
|
||||
next.chest.orientation = Quaternion::rotation_x(stop * 0.15);
|
||||
|
||||
next.belt.position = Vec3::new(0.0, s_a.belt.0 + stop * 1.2, s_a.belt.1);
|
||||
next.belt.orientation =
|
||||
Quaternion::rotation_x(stop * 0.2) * Quaternion::rotation_z(pet * -0.02);
|
||||
next.belt.orientation = Quaternion::rotation_x(stop * 0.3);
|
||||
|
||||
next.back.position = Vec3::new(0.0, s_a.back.0, s_a.back.1);
|
||||
|
||||
next.shorts.position = Vec3::new(0.0, s_a.shorts.0 + stop * 2.5, s_a.shorts.1 + stop * 0.6);
|
||||
next.shorts.orientation =
|
||||
Quaternion::rotation_x(stop * 0.4) * Quaternion::rotation_z(pet * -0.03);
|
||||
next.shorts.orientation = Quaternion::rotation_x(stop * 0.6);
|
||||
|
||||
next.hand_l.position = Vec3::new(
|
||||
-s_a.hand.0 + stop * 3.0 + pet * 2.0,
|
||||
s_a.hand.1 + stop * 10.0 + pet * -1.0,
|
||||
s_a.hand.2 + slow * 0.7 + stop * 6.0,
|
||||
-s_a.hand.0,
|
||||
s_a.hand.1 + slowa * 0.15,
|
||||
s_a.hand.2 + slow * 0.7 + stop * -2.0,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(stop * 2.0)
|
||||
* Quaternion::rotation_y(stop * -0.2 + pet * -0.2)
|
||||
* Quaternion::rotation_z(stop * -1.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(slowa * -0.1 + slow * 0.1);
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
s_a.hand.0 + stop * -1.0,
|
||||
s_a.hand.1 + stop * 4.0,
|
||||
s_a.hand.2 + slow * 0.7 + stop * 0.0,
|
||||
s_a.hand.0,
|
||||
s_a.hand.1 + slowa * 0.15,
|
||||
s_a.hand.2 + slow * 0.7 + stop * -2.0,
|
||||
);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(stop * 1.5) * Quaternion::rotation_z(stop * 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(slow * -0.1 + slowa * 0.1);
|
||||
|
||||
next.foot_l.position = Vec3::new(-s_a.foot.0, 4.0 + s_a.foot.1, 1.0 + s_a.foot.2);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.foot_l.position = Vec3::new(-s_a.foot.0, 4.0 + s_a.foot.1, 3.0 + s_a.foot.2);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(slow * 0.1 + stop * 1.2 + slow * 0.1);
|
||||
|
||||
next.foot_r.position = Vec3::new(s_a.foot.0, stop * -3.0 + s_a.foot.1, 1.0 + s_a.foot.2);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(stop * -0.5);
|
||||
next.foot_r.position = Vec3::new(s_a.foot.0, 4.0 + s_a.foot.1, 3.0 + s_a.foot.2);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(slowa * 0.1 + stop * 1.2 + slowa * 0.1);
|
||||
|
||||
next.shoulder_l.position = Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(0.0);
|
||||
@ -76,7 +77,7 @@ impl Animation for SitAnimation {
|
||||
next.shoulder_r.position = Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(0.0);
|
||||
|
||||
next.torso.position = Vec3::new(0.0, 0.0, stop * -0.10) * s_a.scaler;
|
||||
next.torso.position = Vec3::new(0.0, -0.2, stop * -0.16) * s_a.scaler;
|
||||
|
||||
next
|
||||
}
|
||||
|
@ -10,16 +10,15 @@ use std::f32::consts::PI;
|
||||
|
||||
pub struct SpinAnimation;
|
||||
|
||||
type SpinAnimationDependency = (
|
||||
(Option<Hands>, Option<Hands>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
impl Animation for SpinAnimation {
|
||||
type Dependency = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
(Option<Hands>, Option<Hands>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
type Dependency = SpinAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -28,15 +27,7 @@ impl Animation for SpinAnimation {
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_spin")]
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
_active_tool_kind,
|
||||
_second_tool_kind,
|
||||
hands,
|
||||
_velocity,
|
||||
_global_time,
|
||||
stage_section,
|
||||
ability_info,
|
||||
): Self::Dependency,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -10,16 +10,15 @@ use std::f32::consts::PI;
|
||||
|
||||
pub struct SpinMeleeAnimation;
|
||||
|
||||
type SpinMeleeAnimationDependency = (
|
||||
(Option<Hands>, Option<Hands>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
impl Animation for SpinMeleeAnimation {
|
||||
type Dependency = (
|
||||
Option<ToolKind>,
|
||||
Option<ToolKind>,
|
||||
(Option<Hands>, Option<Hands>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<AbilityInfo>,
|
||||
);
|
||||
type Dependency = SpinMeleeAnimationDependency;
|
||||
type Skeleton = CharacterSkeleton;
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
@ -29,15 +28,7 @@ impl Animation for SpinMeleeAnimation {
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
_active_tool_kind,
|
||||
_second_tool_kind,
|
||||
hands,
|
||||
_velocity,
|
||||
_global_time,
|
||||
stage_section,
|
||||
ability_info,
|
||||
): Self::Dependency,
|
||||
(hands, _velocity, _global_time, stage_section, ability_info): Self::Dependency,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
@ -49,7 +40,7 @@ impl Animation for SpinMeleeAnimation {
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(2.0)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = (1.0 - movement3);
|
||||
let pullback = 1.0 - movement3;
|
||||
let move1 = movement1 * pullback;
|
||||
let move2 = movement2 * pullback;
|
||||
let mut next = (*skeleton).clone();
|
||||
|
@ -3,7 +3,7 @@ use super::{
|
||||
CharacterSkeleton, SkeletonAttr,
|
||||
};
|
||||
use common::comp::item::{Hands, ToolKind};
|
||||
use std::{f32::consts::PI, ops::Mul};
|
||||
use std::ops::Mul;
|
||||
|
||||
pub struct StandAnimation;
|
||||
|
||||
@ -111,7 +111,6 @@ impl Animation for StandAnimation {
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
(_, _) => {},
|
||||
};
|
||||
|
@ -230,7 +230,29 @@ impl Animation for SwimAnimation {
|
||||
) * Quaternion::rotation_y(tilt * 8.0)
|
||||
* Quaternion::rotation_z(tilt * 8.0);
|
||||
next.torso.scale = Vec3::one() / 11.0 * s_a.scaler;
|
||||
match hands {
|
||||
(Some(Hands::One), _) => match active_tool_kind {
|
||||
Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => {
|
||||
next.main.position = Vec3::new(-4.0, -5.0, 10.0);
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_y(2.35) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
|
||||
_ => {},
|
||||
},
|
||||
(_, _) => {},
|
||||
};
|
||||
match hands {
|
||||
(None | Some(Hands::One), Some(Hands::One)) => match second_tool_kind {
|
||||
Some(ToolKind::Axe) | Some(ToolKind::Hammer) | Some(ToolKind::Sword) => {
|
||||
next.second.position = Vec3::new(4.0, -5.5, 10.0);
|
||||
next.second.orientation =
|
||||
Quaternion::rotation_y(-2.35) * Quaternion::rotation_z(1.57);
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
(_, _) => {},
|
||||
};
|
||||
next.second.scale = match hands {
|
||||
(Some(Hands::One), Some(Hands::One)) => Vec3::one(),
|
||||
(_, _) => Vec3::zero(),
|
||||
|
@ -897,8 +897,6 @@ impl FigureMgr {
|
||||
anim::character::AlphaAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
active_tool_kind,
|
||||
second_tool_kind,
|
||||
hands,
|
||||
rel_vel.magnitude(),
|
||||
time,
|
||||
@ -993,8 +991,6 @@ impl FigureMgr {
|
||||
anim::character::ChargeswingAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
active_tool_kind,
|
||||
second_tool_kind,
|
||||
hands,
|
||||
rel_vel,
|
||||
time,
|
||||
@ -1058,15 +1054,7 @@ impl FigureMgr {
|
||||
CharacterState::Boost(_) => {
|
||||
anim::character::AlphaAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
active_tool_kind,
|
||||
second_tool_kind,
|
||||
hands,
|
||||
rel_vel.magnitude(),
|
||||
time,
|
||||
None,
|
||||
None,
|
||||
),
|
||||
(hands, rel_vel.magnitude(), time, None, None),
|
||||
state.state_time,
|
||||
&mut state_animation_rate,
|
||||
skeleton_attr,
|
||||
@ -1092,8 +1080,6 @@ impl FigureMgr {
|
||||
anim::character::DashAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
active_tool_kind,
|
||||
second_tool_kind,
|
||||
hands,
|
||||
time,
|
||||
Some(s.stage_section),
|
||||
@ -1181,8 +1167,6 @@ impl FigureMgr {
|
||||
anim::character::LeapAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
active_tool_kind,
|
||||
second_tool_kind,
|
||||
hands,
|
||||
rel_vel,
|
||||
time,
|
||||
@ -1212,8 +1196,6 @@ impl FigureMgr {
|
||||
anim::character::SpinMeleeAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
active_tool_kind,
|
||||
second_tool_kind,
|
||||
hands,
|
||||
rel_vel,
|
||||
time,
|
||||
@ -1356,8 +1338,6 @@ impl FigureMgr {
|
||||
1 => anim::character::AlphaAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
active_tool_kind,
|
||||
second_tool_kind,
|
||||
hands,
|
||||
rel_vel.magnitude(),
|
||||
time,
|
||||
@ -1371,8 +1351,6 @@ impl FigureMgr {
|
||||
2 => anim::character::SpinAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
active_tool_kind,
|
||||
second_tool_kind,
|
||||
hands,
|
||||
rel_vel,
|
||||
time,
|
||||
@ -1386,8 +1364,6 @@ impl FigureMgr {
|
||||
_ => anim::character::BetaAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
active_tool_kind,
|
||||
second_tool_kind,
|
||||
hands,
|
||||
rel_vel.magnitude(),
|
||||
time,
|
||||
|
Loading…
Reference in New Issue
Block a user