some new moves, combine biped weapons into one file

This commit is contained in:
jshipsey 2021-02-14 02:04:29 -05:00
parent 57d5e90ddd
commit 5792faa992
28 changed files with 1187 additions and 223 deletions

View File

@ -0,0 +1,19 @@
DashMelee(
energy_cost: 100,
base_damage: 80,
scaled_damage: 160,
base_poise_damage: 0,
scaled_poise_damage: 0,
base_knockback: 8.0,
scaled_knockback: 7.0,
range: 5.0,
angle: 45.0,
energy_drain: 600,
forward_speed: 4.0,
buildup_duration: 0.25,
charge_duration: 0.6,
swing_duration: 0.1,
recover_duration: 0.5,
infinite_charge: true,
is_interruptible: true,
)

View File

@ -0,0 +1,19 @@
DashMelee(
energy_cost: 100,
base_damage: 80,
scaled_damage: 160,
base_poise_damage: 0,
scaled_poise_damage: 0,
base_knockback: 8.0,
scaled_knockback: 7.0,
range: 5.0,
angle: 45.0,
energy_drain: 0,
forward_speed: 4.0,
buildup_duration: 0.25,
charge_duration: 0.6,
swing_duration: 0.1,
recover_duration: 0.5,
infinite_charge: true,
is_interruptible: true,
)

View File

@ -10,7 +10,7 @@ ComboMelee(
range: 3.5,
angle: 50.0,
base_buildup_duration: 0.4,
base_swing_duration: 0.1,
base_swing_duration: 0.08,
base_recover_duration: 0.5,
forward_movement: 2.5,
),

View File

@ -0,0 +1,18 @@
BasicRanged(
energy_cost: 0,
buildup_duration: 0.5,
recover_duration: 0.35,
projectile: Fireball(
damage: 100.0,
radius: 5.0,
energy_regen: 50,
),
projectile_body: Object(BoltFire),
/*projectile_light: Some(LightEmitter {
col: (1.0, 0.75, 0.11).into(),
..Default::default()
}),*/
projectile_gravity: Some(Gravity(0.3)),
projectile_speed: 60.0,
can_continue: true,
)

View File

@ -0,0 +1,25 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 100,
damage_increase: 0,
base_poise_damage: 0,
poise_damage_increase: 0,
knockback: 5.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 0.5,
base_swing_duration: 0.2,
base_recover_duration: 0.4,
forward_movement: 5.0,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
is_interruptible: false,
)

View File

@ -31,7 +31,7 @@
),
Spear: (
primary: "common.abilities.spear.doublestrike",
secondary: "common.abilities.spear.doublestrike",
secondary: "common.abilities.spear.dash",
skills: [],
),
@ -43,7 +43,7 @@
),
SwordSimple: (
primary: "common.abilities.swordsimple.doublestrike",
secondary: "common.abilities.swordsimple.doublestrike",
secondary: "common.abilities.swordsimple.dash",
skills: [
],
),
@ -92,6 +92,11 @@
secondary: "common.abilities.unique.beastclaws.basic",
abilities: [],
),
Unique(WendigoMagic): (
primary: "common.abilities.unique.wendigomagic.firebomb",
secondary: "common.abilities.unique.wendigomagic.singlestrike",
skills: [],
),
Unique(QuadMedQuick): (
primary: "common.abilities.unique.quadmedquick.triplestrike",
secondary: "common.abilities.unique.quadmedquick.dash",

View File

@ -0,0 +1,16 @@
ItemDef(
name: "Wendigo Magic",
description: "spook.",
kind: Tool(
(
kind: Unique(WendigoMagic),
stats: (
equip_time_millis: 500,
power: 1.00,
poise_strength: 1.00,
speed: 1.0,
),
)
),
quality: Low,
)

View File

@ -347,7 +347,7 @@ void main() {
} else if (inst_mode == EXPLOSION) {
f_reflect = 0.0; // Fire doesn't reflect light, it emits it
attr = Attr(
inst_dir * ((rand0+1.0)/2 + 0.5) * slow_end(0.2) + 0.1 * grav_vel(earth_gravity),
inst_dir * ((rand0+1.0)/2 + 0.4) * slow_end(2.0) + 0.3 * grav_vel(earth_gravity),
vec3((3 * (1 - slow_start(0.1)))),
vec4(3, 1.6 + rand5 * 0.3 - 0.4 * percent(), 0.2, start_end(1.0, 0.0)),
spin_in_axis(vec3(rand6, rand7, rand8), percent() * 10 + 3 * rand9)

View File

@ -106,7 +106,7 @@
),
(Wendigo, Male): (
head: (
offset: (-15.0, -4.5, -9.5),
offset: (-15.0, -4.5, -3.5),
central: ("npc.wendigo.male.head"),
),
torso_upper: (
@ -132,7 +132,7 @@
),
(Wendigo, Female): (
head: (
offset: (-15.0, -4.5, -9.5),
offset: (-15.0, -4.5, -3.5),
central: ("npc.wendigo.male.head"),
),
torso_upper: (

View File

@ -39,4 +39,24 @@
vox_spec: ("armor.empty", (0.0, 0.0, 0.0)),
color: None
),
"common.items.npc_weapons.unique.wendigo_magic": (
vox_spec: ("armor.empty", (0.0, 0.0, 0.0)),
color: None
),
"common.items.npc_weapons.spear.wooden_spear": (
vox_spec: ("weapon.spear.sahagin", (-1.5, -3.0, -5.0)),
color: None
),
"common.items.weapon.spear.adlet": (
vox_spec: ("weapon.spear.adlet", (-0.5, -3.0, -5.0)),
color: None
),
"common.items.npc_weapons.bow.adlet": (
vox_spec: ("weapon.bow.adlet", (-0.5, -5.5, -9.5)),
color: None
),
"common.items.npc_weapons.staff.gnoll": (
vox_spec: ("weapon.staff.gnoll", (-2.5, -3.0, -4.0)),
color: None
),
})

View File

@ -0,0 +1,768 @@
({ //Swords
"common.items.weapons.sword.starter_sword": (
vox_spec: ("weapon.sword.rusty_2h", (-1.5, -6.5, -4.0)),
color: None
),
"common.items.npc_weapons.sword.starter_sword": (
vox_spec: ("weapon.sword.rusty_2h", (-1.5, -6.5, -4.0)),
color: None
),
"common.items.weapons.sword.wood_sword": (
vox_spec: ("weapon.sword.wood_ore_2h", (-1.5, -6.5, -4.0)),
color: None
),
"common.items.weapons.sword.zweihander_sword_0": (
vox_spec: ("weapon.sword.zweihander_2h-0", (-1.5, -6.5, -4.0)),
color: None
),
"common.items.npc_weapons.sword.zweihander_sword_0": (
vox_spec: ("weapon.sword.zweihander_2h-0", (-1.5, -6.5, -4.0)),
color: None
),
"common.items.weapons.sword.short_sword_0": (
vox_spec: ("weapon.sword.short_2h-0", (-1.5, -6.5, -1.0)),
color: None
),
"common.items.weapons.sword.greatsword_2h_dam-0": (
vox_spec: ("weapon.sword.greatsword_2h_dam-0", (-1.0, -4.5, -6.5)),
color: None
),
"common.items.weapons.sword.greatsword_2h_dam-1": (
vox_spec: ("weapon.sword.greatsword_2h_dam-1", (-1.0, -4.5, -6.5)),
color: None
),
"common.items.weapons.sword.greatsword_2h_dam-2": (
vox_spec: ("weapon.sword.greatsword_2h_dam-2", (-1.0, -4.5, -6.5)),
color: None
),
"common.items.weapons.sword.greatsword_2h_simple-0": (
vox_spec: ("weapon.sword.greatsword_2h_simple-0", (-1.0, -4.5, -6.5)),
color: None
),
"common.items.weapons.sword.greatsword_2h_simple-1": (
vox_spec: ("weapon.sword.greatsword_2h_simple-1", (-1.0, -4.5, -6.5)),
color: None
),
"common.items.weapons.sword.greatsword_2h_simple-2": (
vox_spec: ("weapon.sword.greatsword_2h_simple-2", (-1.0, -4.5, -6.5)),
color: None
),
"common.items.weapons.sword.greatsword_2h_orn-0": (
vox_spec: ("weapon.sword.greatsword_2h_orn-0", (-1.0, -4.5, -7.5)),
color: None
),
"common.items.weapons.sword.greatsword_2h_orn-1": (
vox_spec: ("weapon.sword.greatsword_2h_orn-1", (-1.0, -4.5, -7.5)),
color: None
),
"common.items.weapons.sword.greatsword_2h_orn-2": (
vox_spec: ("weapon.sword.greatsword_2h_orn-2", (-1.0, -4.5, -7.5)),
color: None
),
"common.items.weapons.sword.greatsword_2h_fine-0": (
vox_spec: ("weapon.sword.greatsword_2h_fine-0", (-2.0, -6.5, -8.0)),
color: None
),
"common.items.weapons.sword.greatsword_2h_fine-1": (
vox_spec: ("weapon.sword.greatsword_2h_fine-1", (-2.0, -6.5, -8.0)),
color: None
),
"common.items.weapons.sword.greatsword_2h_fine-2": (
vox_spec: ("weapon.sword.greatsword_2h_fine-2", (-2.0, -6.5, -8.0)),
color: None
),
"common.items.weapons.sword.long_2h_dam-0": (
vox_spec: ("weapon.sword.long_2h_dam-0", (-1.0, -3.5, -5.0)),
color: None
),
"common.items.weapons.sword.long_2h_dam-1": (
vox_spec: ("weapon.sword.long_2h_dam-1", (-1.0, -3.5, -5.0)),
color: None
),
"common.items.weapons.sword.long_2h_dam-2": (
vox_spec: ("weapon.sword.long_2h_dam-2", (-1.0, -3.5, -5.0)),
color: None
),
"common.items.weapons.sword.long_2h_dam-3": (
vox_spec: ("weapon.sword.long_2h_dam-3", (-1.0, -3.5, -5.0)),
color: None
),
"common.items.weapons.sword.long_2h_dam-4": (
vox_spec: ("weapon.sword.long_2h_dam-4", (-1.0, -3.5, -5.0)),
color: None
),
"common.items.weapons.sword.long_2h_dam-5": (
vox_spec: ("weapon.sword.long_2h_dam-5", (-1.0, -3.5, -5.0)),
color: None
),
"common.items.weapons.sword.long_2h_simple-0": (
vox_spec: ("weapon.sword.long_2h_simple-0", (-1.0, -3.5, -5.0)),
color: None
),
"common.items.weapons.sword.long_2h_simple-1": (
vox_spec: ("weapon.sword.long_2h_simple-1", (-1.0, -3.5, -5.0)),
color: None
),
"common.items.weapons.sword.long_2h_simple-2": (
vox_spec: ("weapon.sword.long_2h_simple-2", (-1.0, -3.5, -5.0)),
color: None
),
"common.items.weapons.sword.long_2h_simple-3": (
vox_spec: ("weapon.sword.long_2h_simple-3", (-1.0, -3.5, -5.0)),
color: None
),
"common.items.weapons.sword.long_2h_simple-4": (
vox_spec: ("weapon.sword.long_2h_simple-4", (-1.0, -3.5, -5.0)),
color: None
),
"common.items.weapons.sword.long_2h_simple-5": (
vox_spec: ("weapon.sword.long_2h_simple-5", (-1.0, -3.5, -5.0)),
color: None
),
"common.items.weapons.sword.long_2h_orn-0": (
vox_spec: ("weapon.sword.long_2h_orn-0", (-1.0, -3.5, -6.0)),
color: None
),
"common.items.weapons.sword.long_2h_orn-1": (
vox_spec: ("weapon.sword.long_2h_orn-1", (-1.0, -3.5, -6.0)),
color: None
),
"common.items.weapons.sword.long_2h_orn-2": (
vox_spec: ("weapon.sword.long_2h_orn-2", (-1.0, -3.5, -6.0)),
color: None
),
"common.items.weapons.sword.long_2h_orn-3": (
vox_spec: ("weapon.sword.long_2h_orn-3", (-1.0, -3.5, -6.0)),
color: None
),
"common.items.weapons.sword.long_2h_orn-4": (
vox_spec: ("weapon.sword.long_2h_orn-4", (-1.0, -3.5, -6.0)),
color: None
),
"common.items.weapons.sword.long_2h_orn-5": (
vox_spec: ("weapon.sword.long_2h_orn-5", (-1.0, -3.5, -6.0)),
color: None
),
"common.items.weapons.sword.long_2h_fine-0": (
vox_spec: ("weapon.sword.long_2h_fine-0", (-2.0, -4.5, -6.0)),
color: None
),
"common.items.weapons.sword.long_2h_fine-1": (
vox_spec: ("weapon.sword.long_2h_fine-1", (-2.0, -4.5, -6.0)),
color: None
),
"common.items.weapons.sword.long_2h_fine-2": (
vox_spec: ("weapon.sword.long_2h_fine-2", (-2.0, -4.5, -6.0)),
color: None
),
"common.items.weapons.sword.long_2h_fine-3": (
vox_spec: ("weapon.sword.long_2h_fine-3", (-2.0, -4.5, -6.0)),
color: None
),
"common.items.weapons.sword.long_2h_fine-4": (
vox_spec: ("weapon.sword.long_2h_fine-4", (-2.0, -4.5, -6.0)),
color: None
),
"common.items.weapons.sword.long_2h_fine-5": (
vox_spec: ("weapon.sword.long_2h_fine-5", (-2.0, -4.5, -6.0)),
color: None
),
"common.items.weapons.sword.cultist_purp_2h-0": (
vox_spec: ("weapon.sword.cultist_purp_2h-0", (-2.0, -4.5, -7.5)),
color: None
),
"common.items.npc_weapons.sword.cultist_purp_2h-0": (
vox_spec: ("weapon.sword.cultist_purp_2h-0", (-2.0, -4.5, -7.5)),
color: None
),
"common.items.debug.cultist_purp_2h_boss-0": (
vox_spec: ("weapon.sword.cultist_purp_2h-0", (-2.0, -4.5, -7.5)),
color: None
),
"common.items.npc_weapons.sword.cultist_purp_2h_boss-0": (
vox_spec: ("weapon.sword.cultist_purp_2h-0", (-2.0, -4.5, -7.5)),
color: None
),
"common.items.weapons.sword.frost_cleaver_2h-0": (
vox_spec: ("weapon.sword.frost_cleaver-0", (-2.0, -4.5, -7.5)),
color: None
),
"common.items.weapons.sword.frost_cleaver_2h-1": (
vox_spec: ("weapon.sword.frost_cleaver-1", (-2.0, -4.5, -7.5)),
color: None
),
// Axes
"common.items.npc_weapons.axe.starter_axe": (
vox_spec: ("weapon.axe.2haxe_rusty", (-1.5, -5.0, -4.0)),
color: None
),
"common.items.weapons.axe.starter_axe": (
vox_spec: ("weapon.axe.2haxe_rusty", (-1.5, -5.0, -4.0)),
color: None
),
"common.items.weapons.axe.orc_axe-0": (
vox_spec: ("weapon.axe.2haxe_orc-0", (-1.5, -6.0, -4.5)),
color: None
),
"common.items.weapons.axe.worn_iron_axe-0": (
vox_spec: ("weapon.axe.2haxe_worn_iron-0", (-1.5, -3.0, -4.0)),
color: None
),
"common.items.weapons.axe.worn_iron_axe-1": (
vox_spec: ("weapon.axe.2haxe_worn_iron-1", (-1.5, -4.0, -4.0)),
color: None
),
"common.items.weapons.axe.worn_iron_axe-2": (
vox_spec: ("weapon.axe.2haxe_worn_iron-2", (-1.5, -4.0, -4.0)),
color: None
),
"common.items.weapons.axe.worn_iron_axe-3": (
vox_spec: ("weapon.axe.2haxe_worn_iron-3", (-1.5, -8.0, -4.0)),//offcenterY
color: None
),
"common.items.weapons.axe.worn_iron_axe-4": (
vox_spec: ("weapon.axe.2haxe_worn_iron-4", (-1.5, -4.0, -5.5)),
color: None
),
"common.items.weapons.axe.bronze_axe-0": (
vox_spec: ("weapon.axe.2haxe_bronze-0", (-1.5, -4.0, -4.5)),
color: None
),
"common.items.weapons.axe.bronze_axe-1": (
vox_spec: ("weapon.axe.2haxe_bronze-1", (-1.5, -3.0, -5.5)),
color: None
),
"common.items.weapons.axe.iron_axe-0": (
vox_spec: ("weapon.axe.2haxe_iron-0", (-1.5, -5.0, -5.5)),
color: None
),
"common.items.weapons.axe.iron_axe-1": (
vox_spec: ("weapon.axe.2haxe_iron-1", (-1.5, -5.0, -5.5)),
color: None
),
"common.items.weapons.axe.iron_axe-2": (
vox_spec: ("weapon.axe.2haxe_iron-2", (-1.5, -5.0, -5.5)),
color: None
),
"common.items.weapons.axe.iron_axe-3": (
vox_spec: ("weapon.axe.2haxe_iron-3", (-1.5, -6.0, -6.5)),
color: None
),
"common.items.weapons.axe.iron_axe-4": (
vox_spec: ("weapon.axe.2haxe_iron-4", (-1.5, -6.0, -5.5)),
color: None
),
"common.items.weapons.axe.iron_axe-5": (
vox_spec: ("weapon.axe.2haxe_iron-5", (-1.5, -6.0, -5.0)),
color: None
),
"common.items.weapons.axe.iron_axe-6": (
vox_spec: ("weapon.axe.2haxe_iron-6", (-1.5, -5.0, -6.0)),
color: None
),
"common.items.weapons.axe.iron_axe-7": (
vox_spec: ("weapon.axe.2haxe_iron-7", (-1.5, -5.0, -5.0)),
color: None
),
"common.items.weapons.axe.iron_axe-8": (
vox_spec: ("weapon.axe.2haxe_iron-8", (-1.5, -5.0, -5.0)),
color: None
),
"common.items.weapons.axe.iron_axe-9": (
vox_spec: ("weapon.axe.2haxe_iron-9", (-1.5, -4.0, -5.0)),
color: None
),
"common.items.weapons.axe.steel_axe-0": (
vox_spec: ("weapon.axe.2haxe_steel-0", (-1.5, -6.0, -4.5)),
color: None
),
"common.items.weapons.axe.steel_axe-1": (
vox_spec: ("weapon.axe.2haxe_steel-1", (-1.5, -7.0, -5.5)),
color: None
),
"common.items.weapons.axe.steel_axe-2": (
vox_spec: ("weapon.axe.2haxe_steel-2", (-1.5, -3.5, -3.5)),
color: None
),
"common.items.weapons.axe.steel_axe-3": (
vox_spec: ("weapon.axe.2haxe_steel-3", (-1.5, -4.0, -6.0)),
color: None
),
"common.items.weapons.axe.steel_axe-4": (
vox_spec: ("weapon.axe.2haxe_steel-4", (-1.5, -4.0, -5.5)),
color: None
),
"common.items.weapons.axe.steel_axe-5": (
vox_spec: ("weapon.axe.2haxe_steel-5", (-1.5, -5.5, -5.5)),
color: None
),
"common.items.weapons.axe.steel_axe-6": (
vox_spec: ("weapon.axe.2haxe_steel-6", (-1.5, -4.0, -4.0)),
color: None
),
"common.items.weapons.axe.bloodsteel_axe-0": (
vox_spec: ("weapon.axe.2haxe_bloodsteel-0", (-1.5, -7.0, -4.0)),
color: None
),
"common.items.weapons.axe.bloodsteel_axe-1": (
vox_spec: ("weapon.axe.2haxe_bloodsteel-1", (-1.5, -5.5, -5.0)),
color: None
),
"common.items.weapons.axe.bloodsteel_axe-2": (
vox_spec: ("weapon.axe.2haxe_bloodsteel-2", (-1.5, -5.0, -4.0)),
color: None
),
"common.items.weapons.axe.cobalt_axe-0": (
vox_spec: ("weapon.axe.2haxe_cobalt-0", (-1.5, -5.0, -5.5)),
color: None
),
"common.items.npc_weapons.axe.malachite_axe-0": (
vox_spec: ("weapon.axe.2haxe_malachite-0", (-1.5, -5.0, -6.0)),
color: None
),
"common.items.weapons.axe.malachite_axe-0": (
vox_spec: ("weapon.axe.2haxe_malachite-0", (-1.5, -5.0, -6.0)),
color: None
),
// Hammers
"common.items.weapons.hammer.hammer_1": (
vox_spec: ("weapon.hammer.2hhammer_rusty", (-2.5, -5.5, -4.5)),
color: None
),
"common.items.weapons.hammer.starter_hammer": (
vox_spec: ("weapon.hammer.2hhammer_rusty", (-2.5, -5.5, -4.5)),
color: None
),
"common.items.npc_weapons.hammer.starter_hammer": (
vox_spec: ("weapon.hammer.2hhammer_rusty", (-2.5, -5.5, -4.5)),
color: None
),
"common.items.weapons.hammer.wood_hammer-0": (
vox_spec: ("weapon.hammer.2hhammer_wood-0", (-3.5, -5.5, -4.5)),
color: None
),
"common.items.weapons.hammer.flimsy_hammer": (
vox_spec: ("weapon.hammer.2hhammer_flimsy", (-2.5, -5.5, -4.0)),
color: None
),
"common.items.weapons.hammer.stone_hammer-0": (
vox_spec: ("weapon.hammer.2hhammer_stone-0", (-3.5, -6.5, -5.0)),
color: None
),
"common.items.weapons.hammer.stone_hammer-1": (
vox_spec: ("weapon.hammer.2hhammer_stone-1", (-3.5, -6.5, -5.0)),
color: None
),
"common.items.weapons.hammer.stone_hammer-2": (
vox_spec: ("weapon.hammer.2hhammer_stone-2", (-3.5, -6.5, -5.0)),
color: None
),
"common.items.weapons.hammer.stone_hammer-3": (
vox_spec: ("weapon.hammer.2hhammer_stone-3", (-2.5, -6.5, -5.0)),
color: None
),
"common.items.weapons.hammer.worn_iron_hammer-0": (
vox_spec: ("weapon.hammer.2hhammer_worn_iron-0", (-2.5, -4.5, -4.0)),
color: None
),
"common.items.weapons.hammer.worn_iron_hammer-1": (
vox_spec: ("weapon.hammer.2hhammer_worn_iron-1", (-2.5, -4.5, -3.0)),
color: None
),
"common.items.weapons.hammer.worn_iron_hammer-2": (
vox_spec: ("weapon.hammer.2hhammer_worn_iron-2", (-2.5, -3.5, -3.0)),
color: None
),
"common.items.weapons.hammer.worn_iron_hammer-3": (
vox_spec: ("weapon.hammer.2hhammer_worn_iron-3", (-2.5, -4.5, -3.0)),
color: None
),
"common.items.weapons.hammer.bronze_hammer-0": (
vox_spec: ("weapon.hammer.2hhammer_bronze-0", (-2.5, -6.5, -5.0)),
color: None
),
"common.items.weapons.hammer.bronze_hammer-1": (
vox_spec: ("weapon.hammer.2hhammer_bronze-1", (-3.5, -3.5, -4.0)),
color: None
),
"common.items.weapons.hammer.iron_hammer-0": (
vox_spec: ("weapon.hammer.2hhammer_iron-0", (-2.5, -6.5, -4.0)),
color: None
),
"common.items.weapons.hammer.iron_hammer-1": (
vox_spec: ("weapon.hammer.2hhammer_iron-1", (-3.5, -7.5, -5.0)),
color: None
),
"common.items.weapons.hammer.iron_hammer-2": (
vox_spec: ("weapon.hammer.2hhammer_iron-2", (-3.5, -3.5, -5.0)),
color: None
),
"common.items.weapons.hammer.iron_hammer-3": (
vox_spec: ("weapon.hammer.2hhammer_iron-3", (-3.5, -3.5, -5.0)),
color: None
),
"common.items.weapons.hammer.iron_hammer-4": (
vox_spec: ("weapon.hammer.2hhammer_iron-4", (-3.5, -7.5, -4.0)),
color: None
),
"common.items.weapons.hammer.iron_hammer-5": (
vox_spec: ("weapon.hammer.2hhammer_iron-5", (-1.5, -7.0, -5.0)),
color: None
),
"common.items.weapons.hammer.iron_hammer-6": (
vox_spec: ("weapon.hammer.2hhammer_iron-6", (-2.5, -7.0, -5.0)),
color: None
),
"common.items.weapons.hammer.iron_hammer-7": (
vox_spec: ("weapon.hammer.2hhammer_iron-7", (-3.5, -7.5, -5.0)),
color: None
),
"common.items.weapons.hammer.iron_hammer-8": (
vox_spec: ("weapon.hammer.2hhammer_iron-8", (-1.5, -5.5, -7.0)),
color: None
),
"common.items.weapons.hammer.steel_hammer-0": (
vox_spec: ("weapon.hammer.2hhammer_steel-0", (-2.5, -5.5, -5.0)),
color: None
),
"common.items.weapons.hammer.steel_hammer-1": (
vox_spec: ("weapon.hammer.2hhammer_steel-1", (-3.5, -7.5, -5.0)),
color: None
),
"common.items.weapons.hammer.steel_hammer-2": (
vox_spec: ("weapon.hammer.2hhammer_steel-2", (-3.5, -3.5, -3.0)),
color: None
),
"common.items.weapons.hammer.steel_hammer-3": (
vox_spec: ("weapon.hammer.2hhammer_steel-3", (-5.5, -5.5, -4.5)),
color: None
),
"common.items.weapons.hammer.steel_hammer-4": (
vox_spec: ("weapon.hammer.2hhammer_steel-4", (-3.5, -7.5, -4.0)),
color: None
),
"common.items.weapons.hammer.steel_hammer-5": (
vox_spec: ("weapon.hammer.2hhammer_steel-5", (-5.5, -5.5, -5.0)),
color: None
),
"common.items.weapons.hammer.cobalt_hammer-0": (
vox_spec: ("weapon.hammer.2hhammer_cobalt-0", (-2.5, -7.5, -6.0)),
color: None
),
"common.items.weapons.hammer.cobalt_hammer-1": (
vox_spec: ("weapon.hammer.2hhammer_cobalt-1", (-4.5, -4.5, -4.0)),
color: None
),
"common.items.weapons.hammer.runic_hammer": (
vox_spec: ("weapon.hammer.2hhammer_runic", (-2.5, -7.5, -5.0)),
color: None
),
"common.items.weapons.hammer.ramshead_hammer": (
vox_spec: ("weapon.hammer.2hhammer_ramshead", (-4.5, -5.5, -5.0)),
color: None
),
"common.items.weapons.hammer.mjolnir": (
vox_spec: ("weapon.hammer.2hhammer_mjolnir", (-2.5, -8.5, -4.0)),
color: None
),
"common.items.weapons.hammer.cultist_purp_2h-0": (
vox_spec: ("weapon.hammer.cult_purp-0", (-3.5, -4.5, -5.0)),
color: None
),
"common.items.npc_weapons.hammer.cultist_purp_2h-0": (
vox_spec: ("weapon.hammer.cult_purp-0", (-3.5, -4.5, -5.0)),
color: None
),
/*"Craftsman": ( //TODO This should be a 1h hammer!
vox_spec: ("weapon.hammer.craftsman", (-2.0, -5.0, -5.5)),
color: None
),*/
// Daggers
"common.items.weapons.dagger.starter_dagger": (
vox_spec: ("weapon.dagger.dagger_rusty", (-1.5, -3.0, -3.0)),
color: None
),
"common.items.npc_weapons.dagger.starter_dagger": (
vox_spec: ("weapon.dagger.dagger_rusty", (-1.5, -3.0, -3.0)),
color: None
),
"common.items.weapons.dagger.basic_0": (
vox_spec: ("weapon.dagger.dagger_basic-0", (-1.5, -3.0, -3.0)),
color: None
),
"common.items.weapons.dagger.cultist_0": (
vox_spec: ("weapon.dagger.dagger_cult-0", (-1.5, -3.0, -3.0)),
color: None
),
// Shields
"common.items.weapons.shield.shield_1": (
vox_spec: ("weapon.shield.wood-0", (-2.5, -5.5, -5.5)),
color: None
),
"common.items.npc_weapons.shield.shield_1": (
vox_spec: ("weapon.shield.wood-0", (-2.5, -5.5, -5.5)),
color: None
),
// Bows
"common.items.weapons.bow.starter_bow": (
vox_spec: ("weapon.bow.shortbow_starter", (-0.5, -3.0, -8.5)),
color: None
),
"common.items.weapons.bow.wood_shortbow-0": (
vox_spec: ("weapon.bow.shortbow_wood-0", (-0.5, -3.0, -9.5)),
color: None
),
"common.items.weapons.bow.wood_shortbow-1": (
vox_spec: ("weapon.bow.shortbow_wood-1", (-0.5, -3.5, -9.5)),
color: None
),
"common.items.weapons.bow.leafy_shortbow-0": (
vox_spec: ("weapon.bow.shortbow_leafy-0", (-0.5, -4.5, -9.0)),
color: None
),
"common.items.weapons.bow.wood_longbow-0": (
vox_spec: ("weapon.bow.longbow_wood-0", (-0.5, -3.5, -12.5)),
color: None
),
"common.items.weapons.bow.wood_longbow-1": (
vox_spec: ("weapon.bow.longbow_wood-1", (-1.5, -3.5, -12.5)),
color: None
),
"common.items.weapons.bow.leafy_longbow-0": (
vox_spec: ("weapon.bow.longbow_leafy-0", (-1.5, -4.5, -12.5)),
color: None
),
"common.items.weapons.bow.horn_longbow-0": (
vox_spec: ("weapon.bow.longbow_horn-0", (-1.5, -4.5, -17.5)),
color: None
),
"common.items.npc_weapons.bow.horn_longbow-0": (
vox_spec: ("weapon.bow.longbow_horn-0", (-1.5, -4.5, -17.5)),
color: None
),
"common.items.weapons.bow.iron_longbow-0": (
vox_spec: ("weapon.bow.longbow_iron-0", (-1.5, -4.0, -16.0)),
color: None
),
"common.items.weapons.bow.rare_longbow": (
vox_spec: ("weapon.bow.longbow_rare", (-1.5, -5.0, -13.5)),
color: None
),
"common.items.weapons.bow.nature_ore_longbow-0": (
vox_spec: ("weapon.bow.longbow_ore_nature-0", (-1.5, -4.0, -15.0)),
color: None
),
// Farming Equipment
"common.items.weapons.tool.broom": (
vox_spec: ("weapon.tool.broom-0", (-1.5, -4.0, -4.0)),
color: None
),
"common.items.weapons.tool.hoe": (
vox_spec: ("weapon.tool.hoe_green", (-2.5, -4.5, -4.0)),
color: None
),
"common.items.weapons.tool.pitchfork": (
vox_spec: ("weapon.tool.pitchfork-0", (-1.0, -3.5, -4.0)),
color: None
),
"common.items.weapons.tool.fishing_rod": (
vox_spec: ("weapon.tool.fishing_rod_blue-0", (-2.5, -4.5, -4.0)),
color: None
),
"common.items.weapons.tool.rake": (
vox_spec: ("weapon.tool.rake-0", (-1.0, -5.5, -4.0)),
color: None
),
"common.items.weapons.tool.pickaxe": (
vox_spec: ("weapon.tool.pickaxe_green-0", (-1.5, -7.5, -4.0)),
color: None
),
"common.items.weapons.tool.shovel-0": (
vox_spec: ("weapon.tool.shovel_green", (-1.0, -2.5, -4.0)),
color: None
),
"common.items.weapons.tool.shovel-1": (
vox_spec: ("weapon.tool.shovel_gold", (-1.0, -2.5, -4.0)),
color: None
),
"common.items.npc_weapons.tool.broom": (
vox_spec: ("weapon.tool.broom-0", (-1.5, -4.0, -4.0)),
color: None
),
"common.items.npc_weapons.tool.hoe": (
vox_spec: ("weapon.tool.hoe_green", (-2.5, -4.5, -4.0)),
color: None
),
"common.items.npc_weapons.tool.pitchfork": (
vox_spec: ("weapon.tool.pitchfork-0", (-1.0, -3.5, -4.0)),
color: None
),
"common.items.npc_weapons.tool.fishing_rod": (
vox_spec: ("weapon.tool.fishing_rod_blue-0", (-2.5, -4.5, -4.0)),
color: None
),
"common.items.npc_weapons.tool.rake": (
vox_spec: ("weapon.tool.rake-0", (-1.0, -5.5, -4.0)),
color: None
),
"common.items.npc_weapons.tool.pickaxe": (
vox_spec: ("weapon.tool.pickaxe_green-0", (-1.5, -7.5, -4.0)),
color: None
),
"common.items.npc_weapons.tool.shovel-0": (
vox_spec: ("weapon.tool.shovel_green", (-1.0, -2.5, -4.0)),
color: None
),
"common.items.npc_weapons.tool.shovel-1": (
vox_spec: ("weapon.tool.shovel_gold", (-1.0, -2.5, -4.0)),
color: None
),
// Staves
"common.items.weapons.staff.staff_1": (
vox_spec: ("weapon.staff.firestaff_starter", (-1.5, -3.0, -3.0)),
color: None
),
"common.items.weapons.staff.starter_staff": (
vox_spec: ("weapon.staff.firestaff_starter", (-1.5, -3.0, -3.0)),
color: None
),
"common.items.weapons.staff.bone_staff": (
vox_spec: ("weapon.staff.firestaff_bone", (-1.5, -2.5, -3.0)),
color: None
),
"common.items.npc_weapons.staff.bone_staff": (
vox_spec: ("weapon.staff.firestaff_bone", (-1.5, -2.5, -3.0)),
color: None
),
"common.items.weapons.staff.amethyst_staff": (
vox_spec: ("weapon.staff.firestaff_amethyst", (-1.5, -4.0, -4.0)),
color: None
),
"common.items.weapons.staff.cultist_staff": (
vox_spec: ("weapon.staff.firestaff_cultist", (-2.5, -2.5, -4.0)),
color: None
),
"common.items.npc_weapons.staff.cultist_staff": (
vox_spec: ("weapon.staff.firestaff_cultist", (-2.5, -2.5, -4.0)),
color: None
),
// Healing sceptre
"common.items.weapons.sceptre.starter_sceptre": (
vox_spec: ("weapon.sceptre.wood-simple", (-1.5, -2.5, -6.0)),
color: None
),
"common.items.weapons.sceptre.moon0": (
vox_spec: ("weapon.sceptre.moon", (-1.5, -2.5, -6.0)),
color: None
),
"common.items.weapons.sceptre.staff_nature": (
vox_spec: ("weapon.sceptre.wood-nature", (-1.0, -6.0, -5.0)),
color: None
),
"common.items.weapons.sceptre.totem_green": (
vox_spec: ("weapon.sceptre.totem_green", (-1.5, -2.5, -6.0)),
color: None
),
"common.items.weapons.sceptre.root_green0": (
vox_spec: ("weapon.sceptre.root_green", (-1.5, -2.5, -6.0)),
color: None
),
"common.items.weapons.sceptre.fork0": (
vox_spec: ("weapon.sceptre.fork", (-1.5, -2.5, -6.0)),
color: None
),
"common.items.weapons.sceptre.loops0": (
vox_spec: ("weapon.sceptre.loops", (-1.5, -2.5, -6.0)),
color: None
),
"common.items.weapons.sceptre.root_evil": (
vox_spec: ("weapon.sceptre.root_evil", (-1.5, -2.5, -6.0)),
color: None
),
"common.items.weapons.sceptre.sceptre_velorite_0": (
vox_spec: ("weapon.sceptre.ore-nature", (-2.0, -6.0, -5.0)),
color: None
),
// Misc
"common.items.debug.boost": (
vox_spec: ("weapon.tool.broom_belzeshrub_purple", (-3.0, -4.0, -4.0)),
color: None
),
"common.items.debug.possess": (
vox_spec: ("weapon.tool.broom_belzeshrub_purple", (-3.0, -4.0, -4.0)),
color: None
),
"common.items.debug.cultist_purp_2h_boss-0": (
vox_spec: ("weapon.sword.frost_cleaver-1", (-2.0, -4.5, -7.5)),
color: None
),
// Misc
"common.items.weapons.empty.empty": (
vox_spec: ("armor.empty", (-3.0, -3.5, 1.0)),
color: None
),
"common.items.npc_weapons.empty.empty": (
vox_spec: ("armor.empty", (-3.0, -3.5, 1.0)),
color: None
),
"common.items.npc_weapons.hammer.ogre_hammer": (
vox_spec: ("weapon.hammer.2hhammer_ogre", (-5.0, -5.5, -7.0)),
color: None
),
"common.items.npc_weapons.staff.ogre_staff": (
vox_spec: ("weapon.staff.firestaff_ogre", (-2.5, -5.5, -6.0)),
color: None
),
"common.items.npc_weapons.hammer.cyclops_hammer": (
vox_spec: ("weapon.hammer.2hhammer_cyclops-0", (-5.0, -6.5, -7.0)),
color: None
),
"common.items.npc_weapons.hammer.troll_hammer": (
vox_spec: ("weapon.hammer.2hhammer_troll", (-4.0, -6.0, -7.0)),
color: None
),
"common.items.npc_weapons.sword.dullahan_sword": (
vox_spec: ("weapon.sword.greatsword_2h_dullahan", (-1.5, -9.0, -10.0)),
color: None
),
"common.items.npc_weapons.staff.saurok_staff": (
vox_spec: ("weapon.staff.firestaff_saurok", (-3.0, -3.0, -6.0)),
color: None
),
"common.items.npc_weapons.sword.saurok_sword": (
vox_spec: ("weapon.sword.long_2h_saurok", (-1.5, -4.0, -5.0)),
color: None
),
"common.items.npc_weapons.bow.saurok_bow": (
vox_spec: ("weapon.bow.longbow_saurok", (-1.5, -4.0, -16.5)),
color: None
),
"common.items.npc_weapons.staff.mindflayer_staff": (
vox_spec: ("weapon.staff.firestaff_mindflayer", (-5.5, -3.5, -8.0)),
color: None
),
"common.items.npc_weapons.unique.beast_claws": (
vox_spec: ("armor.empty", (0.0, 0.0, 0.0)),
color: None
),
"common.items.npc_weapons.unique.wendigo_magic": (
vox_spec: ("armor.empty", (0.0, 0.0, 0.0)),
color: None
),
"common.items.npc_weapons.spear.wooden_spear": (
vox_spec: ("weapon.spear.sahagin", (-1.5, -3.0, -5.0)),
color: None
),
"common.items.weapon.spear.adlet": (
vox_spec: ("weapon.spear.adlet", (-0.5, -3.0, -5.0)),
color: None
),
"common.items.npc_weapons.bow.adlet": (
vox_spec: ("weapon.bow.adlet", (-0.5, -5.5, -9.5)),
color: None
),
"common.items.npc_weapons.staff.gnoll": (
vox_spec: ("weapon.staff.gnoll", (-2.5, -3.0, -4.0)),
color: None
),
})

View File

@ -924,4 +924,70 @@
vox_spec: ("armor.empty", (-3.0, -3.5, 1.0)),
color: None
),
"common.items.npc_weapons.empty.empty": (
vox_spec: ("armor.empty", (-3.0, -3.5, 1.0)),
color: None
),
//BIPEDLARGE
"common.items.npc_weapons.hammer.ogre_hammer": (
vox_spec: ("weapon.hammer.2hhammer_ogre", (-5.0, -5.5, -7.0)),
color: None
),
"common.items.npc_weapons.staff.ogre_staff": (
vox_spec: ("weapon.staff.firestaff_ogre", (-2.5, -5.5, -6.0)),
color: None
),
"common.items.npc_weapons.hammer.cyclops_hammer": (
vox_spec: ("weapon.hammer.2hhammer_cyclops-0", (-5.0, -6.5, -7.0)),
color: None
),
"common.items.npc_weapons.hammer.troll_hammer": (
vox_spec: ("weapon.hammer.2hhammer_troll", (-4.0, -6.0, -7.0)),
color: None
),
"common.items.npc_weapons.sword.dullahan_sword": (
vox_spec: ("weapon.sword.greatsword_2h_dullahan", (-1.5, -9.0, -10.0)),
color: None
),
"common.items.npc_weapons.staff.saurok_staff": (
vox_spec: ("weapon.staff.firestaff_saurok", (-3.0, -3.0, -6.0)),
color: None
),
"common.items.npc_weapons.sword.saurok_sword": (
vox_spec: ("weapon.sword.long_2h_saurok", (-1.5, -4.0, -5.0)),
color: None
),
"common.items.npc_weapons.bow.saurok_bow": (
vox_spec: ("weapon.bow.longbow_saurok", (-1.5, -4.0, -16.5)),
color: None
),
"common.items.npc_weapons.staff.mindflayer_staff": (
vox_spec: ("weapon.staff.firestaff_mindflayer", (-5.5, -3.5, -8.0)),
color: None
),
"common.items.npc_weapons.unique.beast_claws": (
vox_spec: ("armor.empty", (0.0, 0.0, 0.0)),
color: None
),
"common.items.npc_weapons.unique.wendigo_magic": (
vox_spec: ("armor.empty", (0.0, 0.0, 0.0)),
color: None
),
//BIPEDSMALL
"common.items.npc_weapons.spear.wooden_spear": (
vox_spec: ("weapon.spear.sahagin", (-1.5, -3.0, -5.0)),
color: None
),
"common.items.weapon.spear.adlet": (
vox_spec: ("weapon.spear.adlet", (-0.5, -3.0, -5.0)),
color: None
),
"common.items.npc_weapons.bow.adlet": (
vox_spec: ("weapon.bow.adlet", (-0.5, -5.5, -9.5)),
color: None
),
"common.items.npc_weapons.staff.gnoll": (
vox_spec: ("weapon.staff.gnoll", (-2.5, -3.0, -4.0)),
color: None
),
})

View File

@ -204,11 +204,13 @@ impl Body {
Body::BirdSmall(_) => 0.6,
Body::FishSmall(_) => 0.6,
Body::BipedLarge(body) => match body.species {
biped_large::Species::Slysaurok => 2.3,
biped_large::Species::Occultsaurok => 2.8,
biped_large::Species::Mightysaurok => 2.3,
biped_large::Species::Mindflayer => 1.8,
_ => 4.6,
biped_large::Species::Slysaurok => 2.0,
biped_large::Species::Occultsaurok => 2.0,
biped_large::Species::Mightysaurok => 2.0,
biped_large::Species::Mindflayer => 2.2,
biped_large::Species::Minotaur => 3.0,
_ => 2.3,
},
Body::Golem(_) => 2.5,
Body::BipedSmall(_) => 0.75,
@ -269,11 +271,16 @@ impl Body {
Body::BirdSmall(_) => 1.1,
Body::FishSmall(_) => 0.6,
Body::BipedLarge(body) => match body.species {
biped_large::Species::Slysaurok => 2.3,
biped_large::Species::Occultsaurok => 2.8,
biped_large::Species::Mightysaurok => 2.3,
biped_large::Species::Mindflayer => 4.8,
_ => 4.6,
biped_large::Species::Slysaurok => 3.4,
biped_large::Species::Occultsaurok => 3.4,
biped_large::Species::Mightysaurok => 3.4,
biped_large::Species::Mindflayer => 6.3,
biped_large::Species::Minotaur => 8.0,
biped_large::Species::Dullahan => 5.5,
biped_large::Species::Cyclops => 6.5,
biped_large::Species::Werewolf => 3.5,
_ => 6.0,
},
Body::Golem(_) => 5.0,
Body::BipedSmall(_) => 1.4,

View File

@ -374,6 +374,7 @@ impl assets::Compound for AbilityMap {
pub enum UniqueKind {
StoneGolemFist,
BeastClaws,
WendigoMagic,
QuadMedQuick,
QuadMedJump,
QuadMedHoof,

View File

@ -213,7 +213,7 @@ impl LoadoutBuilder {
},
(biped_large::Species::Wendigo, _) => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.beast_claws",
"common.items.npc_weapons.unique.wendigo_magic",
));
},
(biped_large::Species::Werewolf, _) => {

View File

@ -2,7 +2,10 @@ use super::{
super::{vek::*, Animation},
BipedLargeSkeleton, SkeletonAttr,
};
use common::{comp::item::ToolKind, states::utils::StageSection};
use common::{
comp::item::{ToolKind, UniqueKind},
states::utils::StageSection,
};
use std::f32::consts::PI;
pub struct AlphaAnimation;
@ -131,11 +134,23 @@ impl Animation for AlphaAnimation {
* Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
* Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
},
Some(ToolKind::Debug) => {
next.hand_l.position = Vec3::new(-7.0, 4.0, 3.0);
next.hand_l.orientation = Quaternion::rotation_x(1.27);
next.main.position = Vec3::new(-5.0, 5.0, 23.0);
next.main.orientation = Quaternion::rotation_x(PI);
Some(ToolKind::Unique(UniqueKind::WendigoMagic)) => {
next.torso.position = Vec3::new(0.0, 0.0, move1 * -0.3);
next.upper_torso.orientation = Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4);
next.lower_torso.orientation = Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4);
next.control_l.position =
Vec3::new(-9.0 + move2 * 6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 10.5);
next.control_r.position =
Vec3::new(9.0 + move2 * -6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 14.5);
next.control_l.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
* Quaternion::rotation_y(-0.15)
* Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6);
next.control_r.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
* Quaternion::rotation_y(0.15)
* Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6);
next.head.orientation = Quaternion::rotation_x(move1 * 0.3);
},
_ => {},
}

View File

@ -11,8 +11,10 @@ impl Animation for DashAnimation {
type Dependency = (
Option<ToolKind>,
Option<ToolKind>,
Vec3<f32>,
f64,
Option<StageSection>,
f32,
);
type Skeleton = BipedLargeSkeleton;
@ -23,100 +25,87 @@ 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, _global_time, stage_section): Self::Dependency,
(active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency,
anim_time: f64,
rate: &mut f32,
s_a: &SkeletonAttr,
) -> Self::Skeleton {
*rate = 1.0;
let mut next = (*skeleton).clone();
let lab = 0.65 * s_a.tempo;
let speed = Vec2::<f32>::from(velocity).magnitude();
let (movement1, movement2, movement3, _movement4) = match stage_section {
Some(StageSection::Buildup) => (anim_time as f32, 0.0, 0.0, 0.0),
Some(StageSection::Charge) => (1.0, anim_time as f32, 0.0, 0.0),
let speednorm = (speed / 12.0).powf(0.4);
let foothoril = (acc_vel * lab as f32 + PI * 1.45).sin() * speednorm;
let foothorir = (acc_vel * lab as f32 + PI * (0.45)).sin() * speednorm;
let footrotl =
(((1.0) / (0.5 + (0.5) * ((acc_vel * lab as f32 + PI * 1.4).sin()).powi(2))).sqrt())
* ((acc_vel * lab as f32 + PI * 1.4).sin());
let footrotr =
(((1.0) / (0.5 + (0.5) * ((acc_vel * lab as f32 + PI * 0.4).sin()).powi(2))).sqrt())
* ((acc_vel * lab as f32 + PI * 0.4).sin());
next.main.position = Vec3::new(0.0, 0.0, 0.0);
next.main.orientation = Quaternion::rotation_x(0.0);
next.hand_l.position = Vec3::new(0.0, 0.0, s_a.grip);
next.hand_r.position = Vec3::new(0.0, 0.0, s_a.grip);
next.hand_l.orientation = Quaternion::rotation_x(0.0);
next.hand_r.orientation = Quaternion::rotation_x(0.0);
let (move1base, move2base, move3base, move4) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0, 0.0),
Some(StageSection::Charge) => (1.0, ((anim_time as f32).powf(4.0)).min(1.0), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, 1.0, anim_time as f32, 0.0),
Some(StageSection::Recover) => (1.1, 1.0, 1.0, anim_time as f32),
Some(StageSection::Recover) => (1.1, 1.0, 1.0, (anim_time as f32).powf(4.0)),
_ => (0.0, 0.0, 0.0, 0.0),
};
let pullback = 1.0 - move4;
let move1 = move1base * pullback;
let move2 = move2base * pullback;
let move3 = move3base * pullback;
fn short(x: f32) -> f32 {
(((5.0) / (1.5 + 3.5 * ((x * 5.0).sin()).powi(2))).sqrt()) * ((x * 5.0).sin())
}
fn foothoril(x: f32) -> f32 { (x * 5.0 + PI * 1.45).sin() }
fn foothorir(x: f32) -> f32 { (x * 5.0 + PI * (0.45)).sin() }
next.shoulder_l.position = Vec3::new(
-s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothorir * 1.0,
);
next.shoulder_l.orientation =
Quaternion::rotation_x(0.6 * speednorm + (footrotr * -0.2) * speednorm);
fn footvertl(x: f32) -> f32 { (x * 5.0).sin() }
fn footvertr(x: f32) -> f32 { (x * 5.0 + PI).sin() }
next.shoulder_r.position = Vec3::new(
s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothoril * 1.0,
);
next.shoulder_r.orientation =
Quaternion::rotation_x(0.6 * speednorm + (footrotl * -0.2) * speednorm);
next.torso.orientation = Quaternion::rotation_z(0.0);
fn footrotl(x: f32) -> f32 {
(((1.0) / (0.05 + (0.95) * ((x * 5.0 + PI * 1.4).sin()).powi(2))).sqrt())
* ((x * 5.0 + PI * 1.4).sin())
}
next.control_l.position = Vec3::new(-1.0, 1.0, 1.0);
next.control_r.position = Vec3::new(0.0, 2.0, -3.0);
next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
* Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
next.control.position = Vec3::new(
-3.0 + move1 * -2.0 + move2 * 2.0,
5.0 + s_a.grip / 1.2 + move1 * -4.0 + move2 * 2.0 + move3 * 8.0,
-4.0 + -s_a.grip / 2.0 + move2 * -5.0 + move3 * 5.0,
);
next.upper_torso.orientation = Quaternion::rotation_x(move2 * -0.2 + move3 * 0.2)
* Quaternion::rotation_z(move1 * 0.8 + move3 * -0.7);
next.lower_torso.orientation = Quaternion::rotation_x(move2 * 0.2 + move3 * -0.2)
* Quaternion::rotation_z(move1 * -0.8 + move3 * 0.7);
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move1 * -0.5 + move2 * 1.5)
* Quaternion::rotation_y(-0.2);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.2 + move1 * -0.5 + move2 * 1.5)
* Quaternion::rotation_y(0.2)
* Quaternion::rotation_z(0.0);
fn footrotr(x: f32) -> f32 {
(((1.0) / (0.05 + (0.95) * ((x * 5.0 + PI * 0.4).sin()).powi(2))).sqrt())
* ((x * 5.0 + PI * 0.4).sin())
}
fn shortalt(x: f32) -> f32 { (x * 5.0 + PI / 2.0).sin() }
next.hand_l.position = Vec3::new(-0.75, -1.0, 2.5);
next.hand_l.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.2);
next.hand_r.position = Vec3::new(0.75, -1.5, -0.5);
next.hand_r.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(0.3);
next.main.position = Vec3::new(0.0, 0.0, 2.0);
next.main.orientation = Quaternion::rotation_x(-0.1);
match active_tool_kind {
//TODO: Inventory
Some(ToolKind::Sword) => {
next.head.position =
Vec3::new(0.0, 0.0 + s_a.head.0, s_a.head.1 + movement2.min(1.0) * 1.0);
next.head.orientation = Quaternion::rotation_x(0.0)
* Quaternion::rotation_y(movement2.min(1.0) * -0.3 + movement3 * 0.3)
* Quaternion::rotation_z(movement1 * -0.9 + movement3 * 1.6);
next.upper_torso.position = Vec3::new(
0.0,
s_a.upper_torso.0,
s_a.upper_torso.1 + 2.0 + shortalt(movement2) * -2.5,
);
next.upper_torso.orientation =
//Quaternion::rotation_x(movement2.min(1.0) * -0.4 + movement3 * 0.4)
//* Quaternion::rotation_y(movement2.min(1.0) * -0.2 + movement3 * 0.3)
Quaternion::rotation_z(movement1 * 1.1 + movement3 * -2.2);
next.control.position = Vec3::new(
-7.0 + movement1 * -5.0 + movement3 * -2.0,
7.0 + movement2.min(1.0) * -2.0,
2.0 + movement2.min(1.0) * 2.0,
);
next.control.orientation =
Quaternion::rotation_x(movement1 * -1.0 + movement3 * -0.5)
* Quaternion::rotation_y(movement1 * 1.5 + movement3 * -2.5)
* Quaternion::rotation_z(0.0);
next.lower_torso.orientation =
Quaternion::rotation_z(short(movement2).min(1.0) * 0.25);
next.foot_l.position = Vec3::new(
-s_a.foot.0,
s_a.foot.1 + movement1 * -12.0 + foothoril(movement2) * -7.5,
s_a.foot.2 + ((footvertl(movement2) * -4.0).max(-1.0)),
);
next.foot_l.orientation =
Quaternion::rotation_x(movement1 * -1.0 + footrotl(movement2) * -0.6);
next.foot_r.position = Vec3::new(
s_a.foot.0,
s_a.foot.1 + foothorir(movement2) * -7.5,
s_a.foot.2 + ((footvertr(movement2) * -4.0).max(-1.0)),
);
next.foot_r.orientation = Quaternion::rotation_x(-0.6 + footrotr(movement2) * -0.6)
* Quaternion::rotation_z(-0.2);
},
_ => {},
}
next.control.orientation =
Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -1.5 + move3 * -0.2)
* Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.5 + move3 * -1.0)
* Quaternion::rotation_z(-move3 * -1.5);
next
}

View File

@ -91,15 +91,15 @@ impl Animation for IdleAnimation {
Quaternion::rotation_z(0.0 + slow * 0.2) * Quaternion::rotation_x(0.0);
match active_tool_kind {
Some(ToolKind::Bow) => {
Some(ToolKind::BowSimple) => {
next.main.position = Vec3::new(-2.0, -5.0, -6.0);
next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57);
},
Some(ToolKind::Staff) | Some(ToolKind::Sceptre) => {
Some(ToolKind::StaffSimple) | Some(ToolKind::Sceptre) => {
next.main.position = Vec3::new(-6.0, -5.0, -12.0);
next.main.orientation = Quaternion::rotation_y(0.6) * Quaternion::rotation_z(1.57);
},
Some(ToolKind::Sword) => {
Some(ToolKind::SwordSimple) => {
next.main.position = Vec3::new(-10.0, -8.0, 12.0);
next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57);
},

View File

@ -196,7 +196,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Ogre, Male) => (3.0, 9.0),
(Ogre, Female) => (1.0, 7.5),
(Cyclops, _) => (4.5, 7.5),
(Wendigo, _) => (3.0, 13.5),
(Wendigo, _) => (3.0, 7.5),
(Troll, _) => (6.0, 10.0),
(Dullahan, _) => (3.0, 6.0),
(Werewolf, _) => (11.5, 1.0),

View File

@ -2,7 +2,10 @@ use super::{
super::{vek::*, Animation},
BipedLargeSkeleton, SkeletonAttr,
};
use common::{comp::item::ToolKind, states::utils::StageSection};
use common::{
comp::item::{ToolKind, UniqueKind},
states::utils::StageSection,
};
use std::f32::consts::PI;
pub struct ShootAnimation;
@ -86,8 +89,7 @@ impl Animation for ShootAnimation {
next.hand_r.orientation = Quaternion::rotation_x(0.0);
match active_tool_kind {
Some(ToolKind::StaffSimple) | Some(ToolKind::Sceptre) => {
let (movement1base, movement1shake, movement2base, movement3) = match stage_section
{
let (move1base, move1shake, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => (
anim_time as f32,
(anim_time as f32 * 10.0 + PI).sin(),
@ -98,42 +100,38 @@ impl Animation for ShootAnimation {
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time as f32),
_ => (0.0, 0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
let movement1 = movement1base * pullback;
let movement2 = movement2base * pullback;
let pullback = 1.0 - move3;
let move1 = move1base * pullback;
let move2 = move2base * pullback;
next.control_l.position = Vec3::new(-1.0, 3.0, 12.0);
next.control_r.position = Vec3::new(1.0, 2.0, 2.0);
next.control.position = Vec3::new(
-3.0,
3.0 + s_a.grip / 1.2
+ movement1 * 4.0
+ movement2
+ movement1shake * 2.0
+ movement2 * -2.0,
-11.0 + -s_a.grip / 2.0 + movement1 * 3.0,
3.0 + s_a.grip / 1.2 + move1 * 4.0 + move2 + move1shake * 2.0 + move2 * -2.0,
-11.0 + -s_a.grip / 2.0 + move1 * 3.0,
);
next.head.orientation = Quaternion::rotation_x(movement1 * -0.15)
* Quaternion::rotation_y(movement1 * 0.25)
* Quaternion::rotation_z(movement1 * 0.25);
next.jaw.orientation = Quaternion::rotation_x(movement1 * -0.5);
next.head.orientation = Quaternion::rotation_x(move1 * -0.15)
* Quaternion::rotation_y(move1 * 0.25)
* Quaternion::rotation_z(move1 * 0.25);
next.jaw.orientation = Quaternion::rotation_x(move1 * -0.5);
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + movement1 * 0.5)
* Quaternion::rotation_y(movement1 * -0.4);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.5 + movement1 * 0.5)
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move1 * 0.5)
* Quaternion::rotation_y(move1 * -0.4);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.5 + move1 * 0.5)
* Quaternion::rotation_y(0.5)
* Quaternion::rotation_z(0.0);
next.control.orientation =
Quaternion::rotation_x(-0.2 + movement1 * -0.2 + movement1shake * 0.1)
* Quaternion::rotation_y(-0.1 + movement1 * 0.8 + movement2 * -0.3);
Quaternion::rotation_x(-0.2 + move1 * -0.2 + move1shake * 0.1)
* Quaternion::rotation_y(-0.1 + move1 * 0.8 + move2 * -0.3);
next.shoulder_l.position = Vec3::new(
-s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothorir * 1.0,
);
next.shoulder_l.orientation = Quaternion::rotation_x(
movement1 * 0.8 + 0.8 * speednorm + (footrotr * -0.2) * speednorm,
move1 * 0.8 + 0.8 * speednorm + (footrotr * -0.2) * speednorm,
);
next.shoulder_r.position = Vec3::new(
@ -142,45 +140,45 @@ impl Animation for ShootAnimation {
s_a.shoulder.2 - foothoril * 1.0,
);
next.shoulder_r.orientation = Quaternion::rotation_x(
movement1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2) * speednorm,
move1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2) * speednorm,
);
},
Some(ToolKind::BowSimple) => {
let (movement1base, movement2base, movement3) = match stage_section {
let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
let movement1 = movement1base * pullback;
let movement2 = movement2base * pullback;
next.control_l.position = Vec3::new(-1.0, -2.0 + movement2 * -7.0, -3.0);
let pullback = 1.0 - move3;
let move1 = move1base * pullback;
let move2 = move2base * pullback;
next.control_l.position = Vec3::new(-1.0, -2.0 + move2 * -7.0, -3.0);
next.control_r.position = Vec3::new(0.0, 4.0, 1.0);
next.control.position = Vec3::new(
-1.0 + movement1 * 2.0,
6.0 + s_a.grip / 1.2 + movement1 * 7.0,
-5.0 + -s_a.grip / 2.0 + movement1 * 8.0,
-1.0 + move1 * 2.0,
6.0 + s_a.grip / 1.2 + move1 * 7.0,
-5.0 + -s_a.grip / 2.0 + move1 * 8.0,
);
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + movement2 * 0.4)
* Quaternion::rotation_y(-0.2);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.2 + movement1 * 0.4)
next.control_l.orientation =
Quaternion::rotation_x(PI / 2.0 + move2 * 0.4) * Quaternion::rotation_y(-0.2);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.2 + move1 * 0.4)
* Quaternion::rotation_y(0.2)
* Quaternion::rotation_z(0.0);
next.control.orientation = Quaternion::rotation_x(-0.2)
* Quaternion::rotation_y(1.0 + movement1 * -0.4)
* Quaternion::rotation_y(1.0 + move1 * -0.4)
* Quaternion::rotation_z(-0.3);
next.head.orientation = Quaternion::rotation_z(movement1 * 0.25);
next.head.orientation = Quaternion::rotation_z(move1 * 0.25);
next.shoulder_l.position = Vec3::new(
-s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothorir * 1.0,
);
next.shoulder_l.orientation = Quaternion::rotation_x(
movement1 * 0.8 + 1.2 * speednorm + (footrotr * -0.2) * speednorm,
move1 * 0.8 + 1.2 * speednorm + (footrotr * -0.2) * speednorm,
);
next.shoulder_r.position = Vec3::new(
@ -189,9 +187,31 @@ impl Animation for ShootAnimation {
s_a.shoulder.2 - foothoril * 1.0,
);
next.shoulder_r.orientation = Quaternion::rotation_x(
movement1 * 0.8 + 1.2 * speednorm + (footrotl * -0.2) * speednorm,
move1 * 0.8 + 1.2 * speednorm + (footrotl * -0.2) * speednorm,
);
},
Some(ToolKind::Unique(UniqueKind::WendigoMagic)) => {
let (move1base, move2base, move3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4)),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - move3;
let move1 = move1base * pullback;
next.control_l.position =
Vec3::new(-9.0 + move1 * 6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 10.5);
next.control_r.position =
Vec3::new(9.0 + move1 * -6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 14.5);
next.control_l.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
* Quaternion::rotation_y(-0.15)
* Quaternion::rotation_z(move1 * 0.5);
next.control_r.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
* Quaternion::rotation_y(0.15)
* Quaternion::rotation_z(move1 * -0.5);
next.head.orientation = Quaternion::rotation_x(move1 * -0.3);
},
_ => {},
}

View File

@ -176,7 +176,7 @@ impl Animation for WieldAnimation {
next.control.orientation =
Quaternion::rotation_x(-0.2 + short * 0.2) * Quaternion::rotation_y(-0.1);
},
Some(ToolKind::BowSimple) => {
Some(ToolKind::BowSimple) | Some(ToolKind::Bow) => {
next.control_l.position = Vec3::new(-1.0, -2.0, -3.0);
next.control_r.position = Vec3::new(0.0, 4.0, 1.0);
@ -231,6 +231,15 @@ impl Animation for WieldAnimation {
next.control.orientation =
Quaternion::rotation_x(-0.2 + short * 0.2) * Quaternion::rotation_y(-0.1);
},
Some(ToolKind::Unique(UniqueKind::WendigoMagic)) => {
next.control_l.position = Vec3::new(-9.0, 19.0, -13.0);
next.control_r.position = Vec3::new(9.0, 19.0, -13.0);
next.control_l.orientation =
Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_y(-0.15);
next.control_r.orientation =
Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_y(0.15);
},
Some(ToolKind::Unique(UniqueKind::BeastClaws)) => {
next.shoulder_l.position =
Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);

View File

@ -115,7 +115,7 @@ impl Animation for ShootAnimation {
* Quaternion::rotation_y(0.5 * speednorm);
},
Some(ToolKind::Staff) => {
let (move1base, move2base, move3) = match stage_section {
let (move1base, _move2base, move3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, (anim_time as f32).powf(0.25), 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time as f32),
@ -123,7 +123,6 @@ impl Animation for ShootAnimation {
};
let pullback = 1.0 - move3;
let move1abs = move1base * pullback;
let move2abs = move2base * pullback;
next.control_l.position = Vec3::new(2.0 - s_a.grip.0 * 2.0, 1.0, 3.0);
next.control_r.position = Vec3::new(
7.0 + s_a.grip.0 * 2.0 + move1abs * -8.0,

View File

@ -100,7 +100,7 @@ impl Animation for WieldAnimation {
next.control.orientation = Quaternion::rotation_x(-1.35 + 0.5 * speednorm);
},
Some(ToolKind::Bow) => {
Some(ToolKind::Bow) | Some(ToolKind::BowSimple) => {
next.control_l.position = Vec3::new(1.0 - s_a.grip.0 * 2.0, 0.0, 0.0);
next.control_r.position = Vec3::new(-1.0 + s_a.grip.0 * 2.0, 6.0, -2.0);
@ -123,7 +123,7 @@ impl Animation for WieldAnimation {
next.control.orientation = Quaternion::rotation_x(-0.3 + 0.5 * speednorm)
* Quaternion::rotation_y(0.5 * speednorm);
},
Some(ToolKind::Staff) => {
Some(ToolKind::Staff) | Some(ToolKind::StaffSimple) => {
next.control_l.position = Vec3::new(2.0 - s_a.grip.0 * 2.0, 1.0, 3.0);
next.control_r.position =
Vec3::new(7.0 + s_a.grip.0 * 2.0, -4.0, 3.0 + speednorm * -3.0);

View File

@ -24,7 +24,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, velocity, _global_time, stage_section): Self::Dependency,
(active_tool_kind, _second_tool_kind, _velocity, _global_time, stage_section): Self::Dependency,
anim_time: f64,
rate: &mut f32,
s_a: &SkeletonAttr,
@ -32,8 +32,6 @@ impl Animation for AlphaAnimation {
*rate = 1.0;
let mut next = (*skeleton).clone();
let lab = 1.0;
let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0),
@ -41,19 +39,6 @@ impl Animation for AlphaAnimation {
_ => (0.0, 0.0, 0.0),
};
let foot = (((1.0)
/ (0.2 + 0.8 * ((anim_time as f32 * lab as f32 * 2.0 * velocity).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 2.0 * velocity).sin());
let push = anim_time as f32 * lab as f32 * 4.0;
let slow = (((5.0) / (0.4 + 4.6 * ((anim_time as f32 * lab as f32 * 9.0).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 9.0).sin());
let slower = (((1.0)
/ (0.0001 + 0.999 * ((anim_time as f32 * lab as f32 * 4.0).sin()).powi(2)))
.sqrt())
* ((anim_time as f32 * lab as f32 * 4.0).sin());
next.torso.position = Vec3::new(0.0, 0.0, 0.1) * s_a.scaler;
next.torso.orientation = Quaternion::rotation_z(0.0);
match active_tool_kind {
@ -86,10 +71,9 @@ impl Animation for AlphaAnimation {
);
},
Some(ToolKind::Dagger) => {
next.control_l.position = Vec3::new(-10.0 + push * 5.0, 6.0 + push * 5.0, 2.0);
next.control_l.orientation = Quaternion::rotation_x(-1.4 + slow * 0.4)
* Quaternion::rotation_y(slow * -1.3)
* Quaternion::rotation_z(1.4 + slow * -0.5);
next.control_l.position = Vec3::new(-10.0, 6.0, 2.0);
next.control_l.orientation =
Quaternion::rotation_x(-1.4) * Quaternion::rotation_z(1.4);
},
Some(ToolKind::Axe) => {
next.main.position = Vec3::new(0.0, 0.0, 0.0);
@ -169,29 +153,6 @@ impl Animation for AlphaAnimation {
Quaternion::rotation_x((move1 * 0.4 + move2 * -0.7) * (1.0 - move3))
* Quaternion::rotation_y((move1 * 0.3 + move2 * -0.4) * (1.0 - move3))
* Quaternion::rotation_z((move1 * 0.5 + move2 * -0.5) * (1.0 - move3));
if velocity > 0.5 {
next.foot_l.position = Vec3::new(-s_a.foot.0, foot * -6.0, s_a.foot.2);
next.foot_l.orientation = Quaternion::rotation_x(foot * -0.4)
* Quaternion::rotation_z((slower * 0.3).max(0.0));
next.foot_r.position = Vec3::new(s_a.foot.0, foot * 6.0, s_a.foot.2);
next.foot_r.orientation = Quaternion::rotation_x(foot * 0.4)
* Quaternion::rotation_z((slower * 0.3).max(0.0));
next.torso.orientation = Quaternion::rotation_x(-0.15);
} else {
next.foot_l.position =
Vec3::new(-s_a.foot.0, -2.5, s_a.foot.2 + (slower * 2.5).max(0.0));
next.foot_l.orientation = Quaternion::rotation_x(slower * -0.2 - 0.2)
* Quaternion::rotation_z((slower * 1.0).max(0.0));
next.foot_r.position = Vec3::new(s_a.foot.0, 3.5 - slower * 2.0, s_a.foot.2);
next.foot_r.orientation = Quaternion::rotation_x(slower * 0.1)
* Quaternion::rotation_z((slower * 0.5).max(0.0));
next.belt.orientation = Quaternion::rotation_x(move1 * -0.2 + move2 * 0.2);
next.shorts.orientation = Quaternion::rotation_x(move1 * -0.3 + move2 * 0.3);
}
},
Some(ToolKind::Debug) => {
next.hand_l.position = Vec3::new(-7.0, 4.0, 3.0);

View File

@ -37,25 +37,32 @@ impl Animation for ChargeswingAnimation {
* ((anim_time as f32 * lab as f32 * 8.0).sin());
// end spin stuff
let (move1, move2, move3, tension) = match stage_section {
let (move1base, move2base, move3, tension, test) = match stage_section {
Some(StageSection::Charge) => (
(anim_time as f32).min(1.0),
0.0,
0.0,
(anim_time as f32 * 18.0 * lab as f32).sin(),
0.0,
),
Some(StageSection::Swing) => (1.0, anim_time as f32, 0.0, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4), 0.0),
_ => (0.0, 0.0, 0.0, 0.0),
Some(StageSection::Swing) => (
1.0,
(anim_time as f32).powf(0.25),
0.0,
0.0,
(anim_time as f32).powi(4),
),
Some(StageSection::Recover) => (1.0, 1.0, (anim_time as f32).powi(4), 0.0, 1.0),
_ => (0.0, 0.0, 0.0, 0.0, 0.0),
};
let move1 = move1base * (1.0 - move3);
let slowrise = test * (1.0 - move3);
let move2 = move2base * (1.0 - move3);
if let Some(ToolKind::Hammer) = active_tool_kind {
next.main.position = Vec3::new(0.0, 0.0, 0.0);
next.main.orientation = Quaternion::rotation_x(0.0);
next.hand_l.position = Vec3::new(
s_a.hhl.0,
s_a.hhl.1,
s_a.hhl.2 + (move2 * -8.0) * (1.0 - move3),
);
next.hand_l.position = Vec3::new(s_a.hhl.0, s_a.hhl.1, s_a.hhl.2 + (move2 * -8.0));
next.hand_l.orientation =
Quaternion::rotation_x(s_a.hhl.3) * Quaternion::rotation_y(s_a.hhl.4);
next.hand_r.position = Vec3::new(s_a.hhr.0, s_a.hhr.1, s_a.hhr.2);
@ -63,26 +70,25 @@ impl Animation for ChargeswingAnimation {
Quaternion::rotation_x(s_a.hhr.3) * Quaternion::rotation_y(s_a.hhr.4);
next.control.position = Vec3::new(
s_a.hc.0 + (move1 * -2.0 + move2 * -3.0) * (1.0 - move3),
s_a.hc.1 + (move1 * 2.0 + move2 * 3.0) * (1.0 - move3),
s_a.hc.2 + (move1 * 2.0 + move2 * 4.0) * (1.0 - move3),
s_a.hc.0 + (move1 * -2.0 + move2 * -8.0),
s_a.hc.1 + (move1 * 2.0 + move2 * 6.0),
s_a.hc.2 + (move1 * -2.0 + slowrise * 8.0),
);
next.control.orientation = Quaternion::rotation_x(s_a.hc.3+(move2*4.0)*(1.0-move3))
* Quaternion::rotation_y(s_a.hc.4+(tension*0.08+move1 * 0.7+move2*-3.5)*(1.0-move3))//+fire * 0.1
* Quaternion::rotation_z(s_a.hc.5+(move1 * 0.2+move2*-0.5)*(1.0-move3));
next.control.orientation = Quaternion::rotation_x(s_a.hc.3 + (move2 * 0.0))
* Quaternion::rotation_y(
s_a.hc.4 + (tension * 0.08 + move1 * 0.7 + move2 * -1.0 + slowrise * 2.0),
)
* Quaternion::rotation_z(s_a.hc.5 + (move1 * 0.2 + move2 * -1.0));
next.chest.orientation =
Quaternion::rotation_z(short * 0.04 + (move1 * 2.0 + move2 * -2.5) * (1.0 - move3));
next.belt.orientation =
Quaternion::rotation_z(short * 0.08 + (move1 * -1.0) * (1.0 - move3));
next.shorts.orientation =
Quaternion::rotation_z(short * 0.15 + (move1 * -1.0) * (1.0 - move3));
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.0));
next.head.position = Vec3::new(
0.0 + (move1 * -1.0 + move2 * 2.0) * (1.0 - move3),
s_a.head.0 + (move1 * 1.0) * (1.0 - move3),
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 * 2.2) * (1.0 - move3));
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

View File

@ -3,7 +3,6 @@ use super::{
GolemSkeleton, SkeletonAttr,
};
use common::states::utils::StageSection;
use std::f32::consts::PI;
pub struct AlphaAnimation;
@ -21,7 +20,7 @@ impl Animation for AlphaAnimation {
(stage_section, global_time, timer): Self::Dependency,
anim_time: f64,
_rate: &mut f32,
s_a: &SkeletonAttr,
_s_a: &SkeletonAttr,
) -> Self::Skeleton {
let mut next = (*skeleton).clone();

View File

@ -3,7 +3,7 @@ use common::{
assets::{self, AssetExt, AssetHandle, DotVoxAsset, Ron},
comp::{
biped_large::{self, BodyType as BLBodyType, Species as BLSpecies},
biped_small::{self, BodyType as BSBodyType, Species as BSSpecies},
biped_small,
bird_medium::{self, BodyType as BMBodyType, Species as BMSpecies},
bird_small,
dragon::{self, BodyType as DBodyType, Species as DSpecies},
@ -356,7 +356,7 @@ make_vox_spec!(
armor_back: HumArmorBackSpec = "voxygen.voxel.humanoid_armor_back_manifest",
armor_pants: HumArmorPantsSpec = "voxygen.voxel.humanoid_armor_pants_manifest",
armor_foot: HumArmorFootSpec = "voxygen.voxel.humanoid_armor_foot_manifest",
main_weapon: HumMainWeaponSpec = "voxygen.voxel.humanoid_main_weapon_manifest",
main_weapon: HumMainWeaponSpec = "voxygen.voxel.biped_weapon_manifest",
modular_components: HumModularComponentSpec = "voxygen.voxel.humanoid_modular_component_manifest",
armor_lantern: HumArmorLanternSpec = "voxygen.voxel.humanoid_lantern_manifest",
armor_glider: HumArmorGliderSpec = "voxygen.voxel.humanoid_glider_manifest",
@ -2487,7 +2487,7 @@ make_vox_spec!(
biped_small::Body,
struct BipedSmallSpec {
armor_foot: BipedSmallArmorFootSpec = "voxygen.voxel.biped_small_armor_foot_manifest",
weapon: BipedSmallWeaponSpec = "voxygen.voxel.biped_small_weapon_manifest",
weapon: BipedSmallWeaponSpec = "voxygen.voxel.biped_weapon_manifest",
armor_hand: BipedSmallArmorHandSpec = "voxygen.voxel.biped_small_armor_hand_manifest",
armor_chest: BipedSmallArmorChestSpec = "voxygen.voxel.biped_small_armor_chest_manifest",
armor_pants: BipedSmallArmorPantsSpec = "voxygen.voxel.biped_small_armor_pants_manifest",
@ -3205,7 +3205,7 @@ make_vox_spec!(
struct BipedLargeSpec {
central: BipedLargeCentralSpec = "voxygen.voxel.biped_large_central_manifest",
lateral: BipedLargeLateralSpec = "voxygen.voxel.biped_large_lateral_manifest",
weapon: BipedLargeWeaponSpec = "voxygen.voxel.biped_large_weapon_manifest",
weapon: BipedLargeWeaponSpec = "voxygen.voxel.biped_weapon_manifest",
},
|FigureKey { body, extra }, spec| {
const DEFAULT_LOADOUT: super::cache::CharacterCacheKey = super::cache::CharacterCacheKey {

View File

@ -3377,8 +3377,10 @@ impl FigureMgr {
(
active_tool_kind,
second_tool_kind,
vel.0,
time,
Some(s.stage_section),
state.acc_vel,
),
stage_progress,
&mut state_animation_rate,