This commit is contained in:
jshipsey 2021-02-01 21:56:17 -05:00
parent 0dc8b2e482
commit e4e25e20c9
35 changed files with 242 additions and 301 deletions

View File

@ -4,6 +4,8 @@ ComboMelee(
stage: 1,
base_damage: 90,
damage_increase: 10,
base_poise_damage: 0,
poise_damage_increase: 0,
knockback: 8.0,
range: 3.5,
angle: 50.0,
@ -16,6 +18,8 @@ ComboMelee(
stage: 2,
base_damage: 130,
damage_increase: 15,
base_poise_damage: 0,
poise_damage_increase: 0,
knockback: 12.0,
range: 3.5,
angle: 30.0,
@ -28,8 +32,8 @@ ComboMelee(
initial_energy_gain: 25,
max_energy_gain: 175,
energy_increase: 30,
speed_increase: 0.075,
max_speed_increase: 1.6,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 2,
is_interruptible: false,
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Adlet",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Chest("Adlet"),
stats: (
protection: Normal(2.0)),
)
),
kind: Armor((
kind: Chest("Adlet"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Gnarling",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Chest("Gnarling"),
stats: (
protection: Normal(2.0)),
)
),
kind: Armor((
kind: Chest("Gnarling"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Haniwa",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Chest("Haniwa"),
stats: (
protection: Normal(2.0)),
)
),
kind: Armor((
kind: Chest("Haniwa"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Kappa",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Chest("Kappa"),
stats: (
protection: Normal(2.0)),
)
),
kind: Armor((
kind: Chest("Kappa"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Myrmidon",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Chest("Myrmidon"),
stats: (
protection: Normal(2.0)),
)
),
kind: Armor((
kind: Chest("Myrmidon"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Sahagin",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Chest("Sahagin"),
stats: (
protection: Normal(2.0)),
)
),
kind: Armor((
kind: Chest("Sahagin"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Adlet",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Foot("Adlet"),
stats: (
protection: Normal(2.0)),
)
),
kind: Armor((
kind: Foot("Adlet"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Gnarling",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Foot("Gnarling"),
stats: (
protection: Normal(2.0)),
)
),
kind: Armor((
kind: Foot("Gnarling"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Haniwa",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Foot("Haniwa"),
stats: (
protection: Normal(2.0)),
)
),
description: "Ceremonial attire used by members..",
kind: Armor((
kind: Foot("Haniwa"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Kappa",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Foot("Kappa"),
stats: (
protection: Normal(2.0)),
)
),
kind: Armor((
kind: Foot("Kappa"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Myrmidon",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Foot("Myrmidon"),
stats: (
protection: Normal(2.0)),
)
),
description: "Ceremonial attire used by members..",
kind: Armor((
kind: Foot("Myrmidon"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -5,7 +5,8 @@ ItemDef(
(
kind: Foot("Sahagin"),
stats: (
protection: Normal(2.0)),
protection: Normal(2.0)),
poise_resilience: Normal(0.3),
)
),
quality: Low,

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Adlet",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Hand("Adlet"),
stats: (
protection: Normal(2.0)),
)
),
description: "Ceremonial attire used by members..",
kind: Armor((
kind: Hand("Adlet"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Gnarling",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Hand("Gnarling"),
stats: (
protection: Normal(2.0)),
)
),
description: "Ceremonial attire used by members..",
kind: Armor((
kind: Hand("Gnarling"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Haniwa",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Hand("Haniwa"),
stats: (
protection: Normal(2.0)),
)
),
description: "Ceremonial attire used by members..",
kind: Armor((
kind: Hand("Haniwa"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Kappa",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Hand("Kappa"),
stats: (
protection: Normal(2.0)),
)
),
description: "Ceremonial attire used by members..",
kind: Armor((
kind: Hand("Kappa"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Myrmidon",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Hand("Myrmidon"),
stats: (
protection: Normal(2.0)),
)
),
description: "Ceremonial attire used by members..",
kind: Armor((
kind: Hand("Myrmidon"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Sahagin",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Hand("Sahagin"),
stats: (
protection: Normal(2.0)),
)
),
description: "Ceremonial attire used by members..",
kind: Armor((
kind: Hand("Sahagin"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Adlet",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Pants("Adlet"),
stats: (
protection: Normal(2.0)),
)
),
name: "Haniwa",
description: "Ceremonial attire used by members..",
kind: Armor((
kind: Pants("Adlet"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Gnarling",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Pants("Gnarling"),
stats: (
protection: Normal(2.0)),
)
),
description: "Ceremonial attire used by members..",
kind: Armor((
kind: Pants("Gnarling"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Haniwa",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Pants("Haniwa"),
stats: (
protection: Normal(2.0)),
)
),
description: "Ceremonial attire used by members..",
kind: Armor((
kind: Pants("Haniwa"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Kappa",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Pants("Kappa"),
stats: (
protection: Normal(2.0)),
)
),
description: "Ceremonial attire used by members..",
kind: Armor((
kind: Pants("Kappa"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -1,12 +1,12 @@
ItemDef(
name: "Myrmidon",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Pants("Myrmidon"),
stats: (
protection: Normal(2.0)),
)
),
description: "Ceremonial attire used by members..",
kind: Armor((
kind: Pants("Myrmidon"),
stats: (
protection: Normal(2.0),
poise_resilience: Normal(1.0),
),
)),
quality: Low,
)
)

View File

@ -5,7 +5,8 @@ ItemDef(
(
kind: Pants("Sahagin"),
stats: (
protection: Normal(2.0)),
protection: Normal(2.0)),
poise_resilience: Normal(3.0),
)
),
quality: Low,

View File

@ -7,6 +7,7 @@ ItemDef(
stats: (
equip_time_millis: 200,
power: 0.8,
poise_strength: 0.8,
speed: 1.0
),
)

View File

@ -7,6 +7,7 @@ ItemDef(
stats: (
equip_time_millis: 250,
power: 1.0,
poise_strength: 0.8,
speed: 1.0
),
)

View File

@ -7,6 +7,7 @@ ItemDef(
stats: (
equip_time_millis: 200,
power: 0.8,
poise_strength: 0.8,
speed: 1.0
),
)

View File

@ -94,7 +94,7 @@ impl<BodyMeta, SpeciesMeta> core::ops::Index<NpcKind> for AllBodies<BodyMeta, Sp
NpcKind::Marlin => &self.fish_medium.body,
NpcKind::Clownfish => &self.fish_small.body,
NpcKind::Ogre => &self.biped_large.body,
NpcKind::Gremlin => &self.biped_small.body,
NpcKind::Gnome => &self.biped_small.body,
NpcKind::StoneGolem => &self.golem.body,
NpcKind::Archaeos => &self.theropod.body,
NpcKind::Reddragon => &self.dragon.body,

View File

@ -49,11 +49,11 @@ impl SkillSetBuilder {
// Bow
Self::default()
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
.with_skill(Skill::Bow(BowSkill::BDamage))
.with_skill(Skill::Bow(BowSkill::CDamage))
.with_skill(Skill::Bow(BowSkill::CKnockback))
.with_skill(Skill::Bow(BowSkill::CSpeed))
.with_skill(Skill::Bow(BowSkill::CMove))
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
.with_skill(Skill::Bow(BowSkill::CSpeed), Some(1))
.with_skill(Skill::Bow(BowSkill::CMove), Some(1))
},
_ => Self::default(),
}
@ -64,11 +64,11 @@ impl SkillSetBuilder {
// Bow
Self::default()
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
.with_skill(Skill::Bow(BowSkill::BDamage))
.with_skill(Skill::Bow(BowSkill::CDamage))
.with_skill(Skill::Bow(BowSkill::CKnockback))
.with_skill(Skill::Bow(BowSkill::CSpeed))
.with_skill(Skill::Bow(BowSkill::CMove))
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
.with_skill(Skill::Bow(BowSkill::CSpeed), Some(1))
.with_skill(Skill::Bow(BowSkill::CMove), Some(1))
},
_ => Self::default(),
}
@ -79,11 +79,11 @@ impl SkillSetBuilder {
// Bow
Self::default()
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
.with_skill(Skill::Bow(BowSkill::BDamage))
.with_skill(Skill::Bow(BowSkill::CDamage))
.with_skill(Skill::Bow(BowSkill::CKnockback))
.with_skill(Skill::Bow(BowSkill::CSpeed))
.with_skill(Skill::Bow(BowSkill::CMove))
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
.with_skill(Skill::Bow(BowSkill::CSpeed), Some(1))
.with_skill(Skill::Bow(BowSkill::CMove), Some(1))
},
_ => Self::default(),
}
@ -94,11 +94,11 @@ impl SkillSetBuilder {
// Bow
Self::default()
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
.with_skill(Skill::Bow(BowSkill::BDamage))
.with_skill(Skill::Bow(BowSkill::CDamage))
.with_skill(Skill::Bow(BowSkill::CKnockback))
.with_skill(Skill::Bow(BowSkill::CSpeed))
.with_skill(Skill::Bow(BowSkill::CMove))
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
.with_skill(Skill::Bow(BowSkill::CSpeed), Some(1))
.with_skill(Skill::Bow(BowSkill::CMove), Some(1))
},
_ => Self::default(),
}
@ -109,11 +109,11 @@ impl SkillSetBuilder {
// Bow
Self::default()
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
.with_skill(Skill::Bow(BowSkill::BDamage))
.with_skill(Skill::Bow(BowSkill::CDamage))
.with_skill(Skill::Bow(BowSkill::CKnockback))
.with_skill(Skill::Bow(BowSkill::CSpeed))
.with_skill(Skill::Bow(BowSkill::CMove))
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
.with_skill(Skill::Bow(BowSkill::CSpeed), Some(1))
.with_skill(Skill::Bow(BowSkill::CMove), Some(1))
},
_ => Self::default(),
}

View File

@ -2,7 +2,7 @@ use super::{
super::{vek::*, Animation},
BipedSmallSkeleton, SkeletonAttr,
};
use common::{comp::item::ToolKind, states::utils::StageSection};
use common::states::utils::StageSection;
use std::f32::consts::PI;
pub struct AlphaAnimation;
@ -29,7 +29,7 @@ impl Animation for AlphaAnimation {
fn update_skeleton_inner(
skeleton: &Self::Skeleton,
(velocity, _orientation, _last_ori, global_time, _avg_vel, acc_vel, stage_section, timer): Self::Dependency,
(velocity, _orientation, _last_ori, _global_time, _avg_vel, _acc_vel, stage_section, _timer): Self::Dependency,
anim_time: f64,
_rate: &mut f32,
s_a: &SkeletonAttr,
@ -37,10 +37,9 @@ impl Animation for AlphaAnimation {
let mut next = (*skeleton).clone();
let speed = Vec2::<f32>::from(velocity).magnitude();
let fastacc = (acc_vel * 2.0).sin();
//let fastacc = (acc_vel * 2.0).sin();
let fast = (anim_time as f32 * 10.0).sin();
let fastalt = (anim_time as f32 * 10.0 + PI / 2.0).sin();
let slow = (anim_time as f32 * 2.0).sin();
let speednorm = speed / 9.4;
let speednormcancel = 1.0 - speednorm;
@ -52,11 +51,6 @@ impl Animation for AlphaAnimation {
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
let subtract = global_time - timer;
let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum() as f32;
let movement1 = mirror * movement1base * pullback;
let movement2 = mirror * movement2base * pullback;
let movement1abs = movement1base * pullback;
let movement2abs = movement2base * pullback;

View File

@ -35,11 +35,11 @@ impl Animation for ShootAnimation {
velocity,
_orientation,
_last_ori,
global_time,
_global_time,
_avg_vel,
acc_vel,
_acc_vel,
stage_section,
timer,
_timer,
): Self::Dependency,
anim_time: f64,
_rate: &mut f32,
@ -91,9 +91,6 @@ impl Animation for ShootAnimation {
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - movement3;
let subtract = global_time - timer;
let check = subtract - subtract.trunc();
let mirror = (check - 0.5).signum() as f32;
let movement1abs = movement1base * pullback;
let movement2abs = movement2base * pullback;
next.control_l.position = Vec3::new(

View File

@ -2430,65 +2430,6 @@ impl FigureMgr {
skeleton_attr,
)
},
CharacterState::ComboMelee(s) => {
let stage_index = (s.stage - 1) as usize;
let stage_time = s.timer.as_secs_f64();
let stage_progress = match s.stage_section {
StageSection::Buildup => {
stage_time
/ s.static_data.stage_data[stage_index]
.base_buildup_duration
.as_secs_f64()
},
StageSection::Swing => {
stage_time
/ s.static_data.stage_data[stage_index]
.base_swing_duration
.as_secs_f64()
},
StageSection::Recover => {
stage_time
/ s.static_data.stage_data[stage_index]
.base_recover_duration
.as_secs_f64()
},
_ => 0.0,
};
match s.stage {
1 => anim::biped_small::AlphaAnimation::update_skeleton(
&target_base,
(
vel.0,
ori,
state.last_ori,
time,
state.avg_vel,
state.acc_vel,
Some(s.stage_section),
state.state_time,
),
state.state_time,
&mut state_animation_rate,
skeleton_attr,
),
_ => anim::biped_small::AlphaAnimation::update_skeleton(
&target_base,
(
vel.0,
ori,
state.last_ori,
time,
state.avg_vel,
state.acc_vel,
Some(s.stage_section),
state.state_time,
),
state.state_time,
&mut state_animation_rate,
skeleton_attr,
),
}
},
// TODO!
_ => target_base,
};

View File

@ -133,7 +133,7 @@ pub fn apply_wildlife_supplement<'a, R: Rng>(
Entry {
make_entity: |pos, rng| {
EntityInfo::at(pos)
.with_body(match rng.gen_range(0, 4) {
.with_body(match rng.gen_range(0..3) {
0 => quadruped_medium::Body::random_with(
rng,
&quadruped_medium::Species::Mouflon,
@ -234,7 +234,7 @@ pub fn apply_wildlife_supplement<'a, R: Rng>(
Entry {
make_entity: |pos, rng| {
EntityInfo::at(pos)
.with_body(match rng.gen_range(0, 12) {
.with_body(match rng.gen_range(0..12) {
0 => quadruped_medium::Body::random_with(
rng,
&quadruped_medium::Species::Deer,

View File

@ -619,7 +619,7 @@ impl Floor {
)
.with_loot_drop(comp::Item::new_from_asset_expect(chosen))
.with_main_tool(comp::Item::new_from_asset_expect(
match dynamic_rng.gen_range(0, 3) {
match dynamic_rng.gen_range(0..3) {
0 => "common.items.npc_weapons.spear.wooden_spear",
1 => "common.items.npc_weapons.staff.gnoll",
_ => "common.items.npc_weapons.bow.adlet",
@ -639,7 +639,7 @@ impl Floor {
)
.with_loot_drop(comp::Item::new_from_asset_expect(chosen))
.with_main_tool(comp::Item::new_from_asset_expect(
match dynamic_rng.gen_range(0, 3) {
match dynamic_rng.gen_range(0..3) {
0 => "common.items.npc_weapons.spear.wooden_spear",
1 => "common.items.npc_weapons.staff.gnoll",
_ => "common.items.npc_weapons.bow.adlet",
@ -659,7 +659,7 @@ impl Floor {
)
.with_loot_drop(comp::Item::new_from_asset_expect(chosen))
.with_main_tool(comp::Item::new_from_asset_expect(
match dynamic_rng.gen_range(0, 3) {
match dynamic_rng.gen_range(0..3) {
0 => "common.items.npc_weapons.spear.wooden_spear",
1 => "common.items.npc_weapons.staff.gnoll",
_ => "common.items.npc_weapons.bow.adlet",
@ -679,7 +679,7 @@ impl Floor {
)
.with_loot_drop(comp::Item::new_from_asset_expect(chosen))
.with_main_tool(comp::Item::new_from_asset_expect(
match dynamic_rng.gen_range(0, 3) {
match dynamic_rng.gen_range(0..3) {
0 => "common.items.npc_weapons.spear.wooden_spear",
1 => "common.items.npc_weapons.staff.gnoll",
_ => "common.items.npc_weapons.bow.adlet",
@ -699,7 +699,7 @@ impl Floor {
)
.with_loot_drop(comp::Item::new_from_asset_expect(chosen))
.with_main_tool(comp::Item::new_from_asset_expect(
match dynamic_rng.gen_range(0, 3) {
match dynamic_rng.gen_range(0..3) {
0 => "common.items.npc_weapons.spear.wooden_spear",
1 => "common.items.npc_weapons.staff.gnoll",
_ => "common.items.npc_weapons.bow.adlet",