add lizardman npcs

This commit is contained in:
Snowram 2020-08-20 23:35:50 +02:00 committed by Robin Gilh
parent f9884b8a56
commit 996e295be6
92 changed files with 481 additions and 4 deletions

View File

@ -577,6 +577,18 @@
"werewolf": {
"keyword": "werewolf",
"generic": "Werewolf"
},
"lizardman_occult": {
"keyword": "lizardman_occult",
"generic": "Occult Lizardman"
},
"lizardman_mighty": {
"keyword": "lizardman_mighty",
"generic": "Mighty Lizardman"
},
"lizardman_sly": {
"keyword": "lizardman_sly",
"generic": "Sly Lizardman"
}
}
},

View File

@ -359,4 +359,184 @@
center: ("armor.empty"),
)
),
(Occultlizardman, Male): (
head: (
offset: (-3.0, 0.0, -4.5),
center: ("npc.lizardman_occult.male.head"),
),
torso_upper: (
offset: (-5.0, -6.5, -7.0),
center: ("npc.lizardman_occult.male.torso_upper"),
),
torso_lower: (
offset: (-6.0, -5.5, -8.0),
center: ("npc.lizardman_occult.male.torso_lower"),
),
jaw: (
offset: (-2.0, 0.0, -2.0),
center: ("npc.lizardman_occult.male.jaw"),
),
tail: (
offset: (-2.0, -16.0, -1.0),
center: ("npc.lizardman_occult.male.tail"),
),
second: (
offset: (0.0, 0.0, 0.0),
center: ("armor.empty"),
),
main: (
offset: (-1.5, -9.0, -10.0),
center: ("npc.lizardman_occult.male.weapon"),
)
),
(Occultlizardman, Female): (
head: (
offset: (-3.0, 0.0, -4.5),
center: ("npc.lizardman_occult.female.head"),
),
torso_upper: (
offset: (-5.0, -6.5, -7.0),
center: ("npc.lizardman_occult.female.torso_upper"),
),
torso_lower: (
offset: (-6.0, -5.5, -8.0),
center: ("npc.lizardman_occult.female.torso_lower"),
),
jaw: (
offset: (-2.0, 0.0, -2.0),
center: ("npc.lizardman_occult.female.jaw"),
),
tail: (
offset: (-2.0, -16.0, -1.0),
center: ("npc.lizardman_occult.female.tail"),
),
second: (
offset: (0.0, 0.0, 0.0),
center: ("armor.empty"),
),
main: (
offset: (-1.5, -9.0, -10.0),
center: ("npc.lizardman_occult.female.weapon"),
)
),
(Mightylizardman, Male): (
head: (
offset: (-3.0, 0.0, -4.5),
center: ("npc.lizardman_mighty.male.head"),
),
torso_upper: (
offset: (-5.0, -6.5, -7.0),
center: ("npc.lizardman_mighty.male.torso_upper"),
),
torso_lower: (
offset: (-6.0, -5.5, -8.0),
center: ("npc.lizardman_mighty.male.torso_lower"),
),
jaw: (
offset: (-2.0, 0.0, -2.0),
center: ("npc.lizardman_mighty.male.jaw"),
),
tail: (
offset: (-2.0, -16.0, -1.0),
center: ("npc.lizardman_mighty.male.tail"),
),
second: (
offset: (0.0, 0.0, 0.0),
center: ("armor.empty"),
),
main: (
offset: (-1.5, -9.0, -10.0),
center: ("npc.lizardman_mighty.male.weapon"),
)
),
(Mightylizardman, Female): (
head: (
offset: (-3.0, 0.0, -4.5),
center: ("npc.lizardman_mighty.female.head"),
),
torso_upper: (
offset: (-5.0, -6.5, -7.0),
center: ("npc.lizardman_mighty.female.torso_upper"),
),
torso_lower: (
offset: (-6.0, -5.5, -8.0),
center: ("npc.lizardman_mighty.female.torso_lower"),
),
jaw: (
offset: (-2.0, 0.0, -2.0),
center: ("npc.lizardman_mighty.female.jaw"),
),
tail: (
offset: (-2.0, -16.0, -1.0),
center: ("npc.lizardman_mighty.female.tail"),
),
second: (
offset: (0.0, 0.0, 0.0),
center: ("armor.empty"),
),
main: (
offset: (-1.5, -9.0, -10.0),
center: ("npc.lizardman_mighty.female.weapon"),
)
),
(Slylizardman, Male): (
head: (
offset: (-3.0, 0.0, -4.5),
center: ("npc.lizardman_sly.male.head"),
),
torso_upper: (
offset: (-5.0, -6.5, -7.0),
center: ("npc.lizardman_sly.male.torso_upper"),
),
torso_lower: (
offset: (-6.0, -5.5, -8.0),
center: ("npc.lizardman_sly.male.torso_lower"),
),
jaw: (
offset: (-2.0, 0.0, -2.0),
center: ("npc.lizardman_sly.male.jaw"),
),
tail: (
offset: (-2.0, -16.0, -1.0),
center: ("npc.lizardman_sly.male.tail"),
),
second: (
offset: (0.0, 0.0, 0.0),
center: ("armor.empty"),
),
main: (
offset: (-1.5, -9.0, -10.0),
center: ("npc.lizardman_sly.male.weapon"),
)
),
(Slylizardman, Female): (
head: (
offset: (-3.0, 0.0, -4.5),
center: ("npc.lizardman_sly.female.head"),
),
torso_upper: (
offset: (-5.0, -6.5, -7.0),
center: ("npc.lizardman_sly.female.torso_upper"),
),
torso_lower: (
offset: (-6.0, -5.5, -8.0),
center: ("npc.lizardman_sly.female.torso_lower"),
),
jaw: (
offset: (-2.0, 0.0, -2.0),
center: ("npc.lizardman_sly.female.jaw"),
),
tail: (
offset: (-2.0, -16.0, -1.0),
center: ("npc.lizardman_sly.female.tail"),
),
second: (
offset: (0.0, 0.0, 0.0),
center: ("armor.empty"),
),
main: (
offset: (-1.5, -9.0, -10.0),
center: ("npc.lizardman_sly.female.weapon"),
)
),
})

View File

@ -407,4 +407,208 @@
lateral: ("npc.werewolf.male.foot_r"),
),
),
(Occultlizardman, Male): (
shoulder_l: (
offset: (-3.5, -3.5, -4.5),
lateral: ("npc.lizardman_occult.male.shoulder_l"),
),
shoulder_r: (
offset: (-3.5, -3.5, -4.5),
lateral: ("npc.lizardman_occult.male.shoulder_r"),
),
hand_l: (
offset: (-2.0, -2.0, -10.0),
lateral: ("npc.lizardman_occult.male.hand_l"),
),
hand_r: (
offset: (-2.0, -2.0, -10.0),
lateral: ("npc.lizardman_occult.male.hand_r"),
),
leg_l: (
offset: (-2.0, -3.0, -3.5),
lateral: ("npc.lizardman_occult.male.leg_l"),
),
leg_r: (
offset: (-2.0, -3.0, -3.5),
lateral: ("npc.lizardman_occult.male.leg_r"),
),
foot_l: (
offset: (-2.5, -4.5, -5.0),
lateral: ("npc.lizardman_occult.male.foot_l"),
),
foot_r: (
offset: (-2.5, -4.5, -5.0),
lateral: ("npc.lizardman_occult.male.foot_r"),
),
),
(Occultlizardman, Female): (
shoulder_l: (
offset: (-3.5, -3.5, -4.5),
lateral: ("npc.lizardman_occult.female.shoulder_l"),
),
shoulder_r: (
offset: (-3.5, -3.5, -4.5),
lateral: ("npc.lizardman_occult.female.shoulder_r"),
),
hand_l: (
offset: (-2.0, -2.0, -10.0),
lateral: ("npc.lizardman_occult.female.hand_l"),
),
hand_r: (
offset: (-2.0, -2.0, -10.0),
lateral: ("npc.lizardman_occult.female.hand_r"),
),
leg_l: (
offset: (-2.0, -3.0, -3.5),
lateral: ("npc.lizardman_occult.female.leg_l"),
),
leg_r: (
offset: (-2.0, -3.0, -3.5),
lateral: ("npc.lizardman_occult.female.leg_r"),
),
foot_l: (
offset: (-2.5, -4.5, -5.0),
lateral: ("npc.lizardman_occult.female.foot_l"),
),
foot_r: (
offset: (-2.5, -4.5, -5.0),
lateral: ("npc.lizardman_occult.female.foot_r"),
),
),
(Mightylizardman, Male): (
shoulder_l: (
offset: (-3.5, -3.5, -4.5),
lateral: ("npc.lizardman_mighty.male.shoulder_l"),
),
shoulder_r: (
offset: (-3.5, -3.5, -4.5),
lateral: ("npc.lizardman_mighty.male.shoulder_r"),
),
hand_l: (
offset: (-2.0, -2.0, -10.0),
lateral: ("npc.lizardman_mighty.male.hand_l"),
),
hand_r: (
offset: (-2.0, -2.0, -10.0),
lateral: ("npc.lizardman_mighty.male.hand_r"),
),
leg_l: (
offset: (-2.0, -3.0, -3.5),
lateral: ("npc.lizardman_mighty.male.leg_l"),
),
leg_r: (
offset: (-2.0, -3.0, -3.5),
lateral: ("npc.lizardman_mighty.male.leg_r"),
),
foot_l: (
offset: (-2.5, -4.5, -5.0),
lateral: ("npc.lizardman_mighty.male.foot_l"),
),
foot_r: (
offset: (-2.5, -4.5, -5.0),
lateral: ("npc.lizardman_mighty.male.foot_r"),
),
),
(Mightylizardman, Female): (
shoulder_l: (
offset: (-3.5, -3.5, -4.5),
lateral: ("npc.lizardman_mighty.female.shoulder_l"),
),
shoulder_r: (
offset: (-3.5, -3.5, -4.5),
lateral: ("npc.lizardman_mighty.female.shoulder_r"),
),
hand_l: (
offset: (-2.0, -2.0, -10.0),
lateral: ("npc.lizardman_mighty.female.hand_l"),
),
hand_r: (
offset: (-2.0, -2.0, -10.0),
lateral: ("npc.lizardman_mighty.female.hand_r"),
),
leg_l: (
offset: (-2.0, -3.0, -3.5),
lateral: ("npc.lizardman_mighty.female.leg_l"),
),
leg_r: (
offset: (-2.0, -3.0, -3.5),
lateral: ("npc.lizardman_mighty.female.leg_r"),
),
foot_l: (
offset: (-2.5, -4.5, -5.0),
lateral: ("npc.lizardman_mighty.female.foot_l"),
),
foot_r: (
offset: (-2.5, -4.5, -5.0),
lateral: ("npc.lizardman_mighty.female.foot_r"),
),
),
(Slylizardman, Male): (
shoulder_l: (
offset: (-3.5, -3.5, -4.5),
lateral: ("npc.lizardman_sly.male.shoulder_l"),
),
shoulder_r: (
offset: (-3.5, -3.5, -4.5),
lateral: ("npc.lizardman_sly.male.shoulder_r"),
),
hand_l: (
offset: (-2.0, -2.0, -10.0),
lateral: ("npc.lizardman_sly.male.hand_l"),
),
hand_r: (
offset: (-2.0, -2.0, -10.0),
lateral: ("npc.lizardman_sly.male.hand_r"),
),
leg_l: (
offset: (-2.0, -3.0, -3.5),
lateral: ("npc.lizardman_sly.male.leg_l"),
),
leg_r: (
offset: (-2.0, -3.0, -3.5),
lateral: ("npc.lizardman_sly.male.leg_r"),
),
foot_l: (
offset: (-2.5, -4.5, -5.0),
lateral: ("npc.lizardman_sly.male.foot_l"),
),
foot_r: (
offset: (-2.5, -4.5, -5.0),
lateral: ("npc.lizardman_sly.male.foot_r"),
),
),
(Slylizardman, Female): (
shoulder_l: (
offset: (-3.5, -3.5, -4.5),
lateral: ("npc.lizardman_sly.female.shoulder_l"),
),
shoulder_r: (
offset: (-3.5, -3.5, -4.5),
lateral: ("npc.lizardman_sly.female.shoulder_r"),
),
hand_l: (
offset: (-2.0, -2.0, -10.0),
lateral: ("npc.lizardman_sly.female.hand_l"),
),
hand_r: (
offset: (-2.0, -2.0, -10.0),
lateral: ("npc.lizardman_sly.female.hand_r"),
),
leg_l: (
offset: (-2.0, -3.0, -3.5),
lateral: ("npc.lizardman_sly.female.leg_l"),
),
leg_r: (
offset: (-2.0, -3.0, -3.5),
lateral: ("npc.lizardman_sly.female.leg_r"),
),
foot_l: (
offset: (-2.5, -4.5, -5.0),
lateral: ("npc.lizardman_sly.female.foot_l"),
),
foot_r: (
offset: (-2.5, -4.5, -5.0),
lateral: ("npc.lizardman_sly.female.foot_r"),
),
),
})

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -40,6 +40,9 @@ make_case_elim!(
Troll = 3,
Dullahan = 4,
Werewolf = 5,
Occultlizardman = 6,
Mightylizardman = 7,
Slylizardman = 8,
}
);
@ -54,6 +57,9 @@ pub struct AllSpecies<SpeciesMeta> {
pub troll: SpeciesMeta,
pub dullahan: SpeciesMeta,
pub werewolf: SpeciesMeta,
pub lizardman_occult: SpeciesMeta,
pub lizardman_mighty: SpeciesMeta,
pub lizardman_sly: SpeciesMeta,
}
impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta> {
@ -68,17 +74,23 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
Species::Troll => &self.troll,
Species::Dullahan => &self.dullahan,
Species::Werewolf => &self.werewolf,
Species::Occultlizardman => &self.lizardman_occult,
Species::Mightylizardman => &self.lizardman_mighty,
Species::Slylizardman => &self.lizardman_sly,
}
}
}
pub const ALL_SPECIES: [Species; 6] = [
pub const ALL_SPECIES: [Species; 9] = [
Species::Ogre,
Species::Cyclops,
Species::Wendigo,
Species::Troll,
Species::Dullahan,
Species::Werewolf,
Species::Occultlizardman,
Species::Mightylizardman,
Species::Slylizardman,
];
impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies<SpeciesMeta> {

View File

@ -105,7 +105,7 @@ impl Animation for IdleAnimation {
);
}
next.jaw.orientation = Quaternion::rotation_x(-0.1 + breathing * 2.0);
next.jaw.scale = Vec3::one() * 1.02;
next.jaw.scale = Vec3::one() * 0.98;
next.tail.position = Vec3::new(0.0, skeleton_attr.tail.0, skeleton_attr.tail.1);
next.tail.orientation =

View File

@ -140,6 +140,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Troll, _) => (6.0, 10.0),
(Dullahan, _) => (3.0, 6.0),
(Werewolf, _) => (19.0, 1.0),
(Occultlizardman, _) => (6.0, 3.5),
(Mightylizardman, _) => (6.0, 3.5),
(Slylizardman, _) => (6.0, 3.5),
},
jaw: match (body.species, body.body_type) {
(Ogre, _) => (0.0, 0.0),
@ -148,6 +151,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Troll, _) => (2.0, -4.0),
(Dullahan, _) => (0.0, 0.0),
(Werewolf, _) => (-2.5, -4.5),
(Occultlizardman, _) => (1.0, -2.5),
(Mightylizardman, _) => (1.0, -2.5),
(Slylizardman, _) => (1.0, -2.5),
},
upper_torso: match (body.species, body.body_type) {
(Ogre, Male) => (0.0, 28.0),
@ -157,6 +163,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Troll, _) => (-1.0, 27.5),
(Dullahan, _) => (0.0, 29.0),
(Werewolf, _) => (3.0, 26.5),
(Occultlizardman, _) => (3.0, 23.0),
(Mightylizardman, _) => (3.0, 23.0),
(Slylizardman, _) => (3.0, 23.0),
},
lower_torso: match (body.species, body.body_type) {
(Ogre, Male) => (1.0, -7.0),
@ -166,6 +175,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Troll, _) => (1.0, -10.5),
(Dullahan, _) => (0.0, -6.5),
(Werewolf, _) => (1.0, -10.0),
(Occultlizardman, _) => (0.0, -6.0),
(Mightylizardman, _) => (0.0, -6.0),
(Slylizardman, _) => (0.0, -6.0),
},
tail: match (body.species, body.body_type) {
(Ogre, _) => (0.0, 0.0),
@ -174,6 +186,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Troll, _) => (0.0, 0.0),
(Dullahan, _) => (0.0, 0.0),
(Werewolf, _) => (-5.5, -2.0),
(Occultlizardman, _) => (-5.5, -6.0),
(Mightylizardman, _) => (-5.5, -6.0),
(Slylizardman, _) => (-5.5, -6.0),
},
shoulder: match (body.species, body.body_type) {
(Ogre, Male) => (12.0, 0.5, 0.0),
@ -183,6 +198,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Troll, _) => (11.0, 0.5, -1.5),
(Dullahan, _) => (14.0, 0.5, 4.5),
(Werewolf, _) => (9.0, 4.0, -6.5),
(Occultlizardman, _) => (7.5, 1.0, -1.5),
(Mightylizardman, _) => (7.5, 1.0, -1.5),
(Slylizardman, _) => (7.5, 1.0, -1.5),
},
hand: match (body.species, body.body_type) {
(Ogre, Male) => (14.5, 0.0, -2.0),
@ -192,6 +210,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Troll, _) => (11.5, 0.0, -1.5),
(Dullahan, _) => (14.5, 0.0, -2.5),
(Werewolf, _) => (10.0, 2.5, -11.0),
(Occultlizardman, _) => (8.0, 1.5, -5.5),
(Mightylizardman, _) => (8.0, 1.5, -5.5),
(Slylizardman, _) => (8.0, 1.5, -5.5),
},
leg: match (body.species, body.body_type) {
(Ogre, Male) => (0.0, 0.0, -4.0),
@ -201,6 +222,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Troll, _) => (5.0, 0.0, -6.0),
(Dullahan, _) => (0.0, 0.0, -5.0),
(Werewolf, _) => (4.5, 0.5, -3.0),
(Occultlizardman, _) => (3.0, 0.5, -6.0),
(Mightylizardman, _) => (3.0, 0.5, -6.0),
(Slylizardman, _) => (3.0, 0.5, -6.0),
},
foot: match (body.species, body.body_type) {
(Ogre, Male) => (4.0, 2.5, 8.0),
@ -210,6 +234,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Troll, _) => (6.0, 0.5, 4.0),
(Dullahan, _) => (4.0, 2.5, 8.0),
(Werewolf, _) => (5.5, 6.5, 6.0),
(Occultlizardman, _) => (3.5, 4.0, 5.0),
(Mightylizardman, _) => (3.5, 4.0, 5.0),
(Slylizardman, _) => (3.5, 4.0, 5.0),
},
beast: match (body.species, body.body_type) {
(Werewolf, _) => (true),

View File

@ -2,7 +2,7 @@ use super::{
super::{vek::*, Animation},
BipedLargeSkeleton, SkeletonAttr,
};
use std::{f32::consts::PI, ops::Mul};
use std::f32::consts::PI;
pub struct RunAnimation;
@ -36,6 +36,7 @@ impl Animation for RunAnimation {
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()).powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin());
let footvertl = (anim_time as f32 * 16.0 * lab as f32).sin();
let footvertr = (anim_time as f32 * 16.0 * lab as f32 + PI).sin();
let handhoril = (anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin();
@ -67,6 +68,7 @@ impl Animation for RunAnimation {
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.5).sin()).powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.5).sin());
let footvertl2 = (anim_time as f32 * 16.0 * lab as f32 + 0.5 * PI).sin();
let footvertr2 = (anim_time as f32 * 16.0 * lab as f32 + 1.5 * PI).sin();
let handhoril2 = (anim_time as f32 * 16.0 * lab as f32 + 0.5 * PI).sin();

View File

@ -69,6 +69,9 @@ impl Animation for WieldAnimation {
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin());
let footvertl = (anim_time as f32 * 16.0 * lab as f32).sin();
let footvertr = (anim_time as f32 * 16.0 * lab as f32 + PI).sin();
let footrotl = (((5.0)
/ (2.5
+ (2.5)
@ -272,6 +275,43 @@ impl Animation for WieldAnimation {
next.torso.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(-0.25);
next.torso.scale = Vec3::one() / 8.0;
next.leg_l.position = Vec3::new(
-skeleton_attr.leg.0,
skeleton_attr.leg.1,
skeleton_attr.leg.2,
) * 0.98;
next.leg_l.orientation =
Quaternion::rotation_z(short * 0.18) * Quaternion::rotation_x(foothoril * 0.3);
next.leg_l.scale = Vec3::one() * 0.98;
next.leg_r.position = Vec3::new(
skeleton_attr.leg.0,
skeleton_attr.leg.1,
skeleton_attr.leg.2,
) * 0.98;
next.leg_r.orientation =
Quaternion::rotation_z(short * 0.18) * Quaternion::rotation_x(foothorir * 0.3);
next.leg_r.scale = Vec3::one() * 0.98;
next.foot_l.position = Vec3::new(
-skeleton_attr.foot.0,
4.0 + skeleton_attr.foot.1 + foothoril * 8.5,
skeleton_attr.foot.2 + ((footvertl * 6.5).max(0.0)),
) / 8.0;
next.foot_l.orientation =
Quaternion::rotation_x(-0.5 + footrotl * 0.85) * Quaternion::rotation_y(0.0);
next.foot_l.scale = Vec3::one() / 8.0;
next.foot_r.position = Vec3::new(
skeleton_attr.foot.0,
4.0 + skeleton_attr.foot.1 + foothorir * 8.5,
skeleton_attr.foot.2 + ((footvertr * 6.5).max(0.0)),
) / 8.0;
next.foot_r.orientation =
Quaternion::rotation_x(-0.5 + footrotr * 0.85) * Quaternion::rotation_y(0.0);
next.foot_r.scale = Vec3::one() / 8.0;
next.control.position = Vec3::new(7.0, 9.0, -10.0);
next.control.orientation = Quaternion::rotation_x(test * 0.02)
* Quaternion::rotation_y(test * 0.02)
@ -281,4 +321,4 @@ impl Animation for WieldAnimation {
next
}
}
}