mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Arthropods spawns and loots
This commit is contained in:
parent
82df5f23c3
commit
f6d7ba33ef
@ -2,12 +2,13 @@ BasicRanged(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 0.8,
|
||||
recover_duration: 0.35,
|
||||
projectile: PoisonBall(
|
||||
projectile: Poisonball(
|
||||
damage: 26.0,
|
||||
radius: 5.0,
|
||||
energy_regen: 0,
|
||||
min_falloff: 0.5,
|
||||
),
|
||||
projectile_body: Object(FireworkPurple),
|
||||
projectile_body: Object(SpitPoison),
|
||||
/*projectile_light: Some(LightEmitter {
|
||||
col: (1.0, 0.75, 0.11).into(),
|
||||
..Default::default()
|
||||
|
@ -7,7 +7,7 @@ BasicRanged(
|
||||
radius: 5.0,
|
||||
min_falloff: 0.5,
|
||||
),
|
||||
projectile_body: Object(BoltFire), // TODO: Get ice projectile model
|
||||
projectile_body: Object(BoltIcicle),
|
||||
/*projectile_light: Some(LightEmitter {
|
||||
col: (1.0, 0.75, 0.11).into(),
|
||||
..Default::default()
|
||||
|
11
assets/common/entity/wild/aggressive/antlion.ron
Normal file
11
assets/common/entity/wild/aggressive/antlion.ron
Normal file
@ -0,0 +1,11 @@
|
||||
EntityConfig (
|
||||
name: Automatic,
|
||||
body: RandomWith("antlion"),
|
||||
alignment: Alignment(Enemy),
|
||||
|
||||
loot: LootTable("common.loot_tables.creature.arthropod.web"),
|
||||
|
||||
hands: Uninit,
|
||||
|
||||
meta: [],
|
||||
)
|
11
assets/common/entity/wild/aggressive/black_widow.ron
Normal file
11
assets/common/entity/wild/aggressive/black_widow.ron
Normal file
@ -0,0 +1,11 @@
|
||||
EntityConfig (
|
||||
name: Automatic,
|
||||
body: RandomWith("black_window"),
|
||||
alignment: Alignment(Enemy),
|
||||
|
||||
loot: LootTable("common.loot_tables.creature.arthropod.web"),
|
||||
|
||||
hands: Uninit,
|
||||
|
||||
meta: [],
|
||||
)
|
11
assets/common/entity/wild/aggressive/horn_beetle.ron
Normal file
11
assets/common/entity/wild/aggressive/horn_beetle.ron
Normal file
@ -0,0 +1,11 @@
|
||||
EntityConfig (
|
||||
name: Automatic,
|
||||
body: RandomWith("horn_beetle"),
|
||||
alignment: Alignment(Enemy),
|
||||
|
||||
loot: LootTable("common.loot_tables.creature.arthropod.carapace"),
|
||||
|
||||
hands: Uninit,
|
||||
|
||||
meta: [],
|
||||
)
|
11
assets/common/entity/wild/aggressive/stag_beetle.ron
Normal file
11
assets/common/entity/wild/aggressive/stag_beetle.ron
Normal file
@ -0,0 +1,11 @@
|
||||
EntityConfig (
|
||||
name: Automatic,
|
||||
body: RandomWith("stag_beetle"),
|
||||
alignment: Alignment(Enemy),
|
||||
|
||||
loot: LootTable("common.loot_tables.creature.arthropod.carapace"),
|
||||
|
||||
hands: Uninit,
|
||||
|
||||
meta: [],
|
||||
)
|
11
assets/common/entity/wild/aggressive/tarantula.ron
Normal file
11
assets/common/entity/wild/aggressive/tarantula.ron
Normal file
@ -0,0 +1,11 @@
|
||||
EntityConfig (
|
||||
name: Automatic,
|
||||
body: RandomWith("tarantula"),
|
||||
alignment: Alignment(Enemy),
|
||||
|
||||
loot: LootTable("common.loot_tables.creature.arthropod.web"),
|
||||
|
||||
hands: Uninit,
|
||||
|
||||
meta: [],
|
||||
)
|
11
assets/common/entity/wild/peaceful/leaf_beetle.ron
Normal file
11
assets/common/entity/wild/peaceful/leaf_beetle.ron
Normal file
@ -0,0 +1,11 @@
|
||||
EntityConfig (
|
||||
name: Automatic,
|
||||
body: RandomWith("leaf_beetle"),
|
||||
alignment: Alignment(Wild),
|
||||
|
||||
loot: LootTable("common.loot_tables.creature.arthropod.leaf"),
|
||||
|
||||
hands: Uninit,
|
||||
|
||||
meta: [],
|
||||
)
|
@ -4,12 +4,8 @@ ItemDef(
|
||||
kind: Armor((
|
||||
kind: Chest("Arthropod"),
|
||||
stats: (
|
||||
protection: Normal(100.0),
|
||||
poise_resilience: Normal(1.0),
|
||||
energy_max: 0,
|
||||
energy_reward: 0.0,
|
||||
crit_power: 0.0,
|
||||
stealth: 0.0,
|
||||
protection: Some(Normal(100.0)),
|
||||
poise_resilience: Some(Normal(1.0)),
|
||||
),
|
||||
)),
|
||||
quality: Legendary,
|
||||
|
@ -0,0 +1,3 @@
|
||||
[
|
||||
(1.0, ItemQuantity("common.items.crafting_ing.hide.carapace", 1, 3)),
|
||||
]
|
4
assets/common/loot_tables/creature/arthropod/leaf.ron
Normal file
4
assets/common/loot_tables/creature/arthropod/leaf.ron
Normal file
@ -0,0 +1,4 @@
|
||||
[
|
||||
(1.0, ItemQuantity("common.items.crafting_ing.twigs", 1, 3)),
|
||||
(1.0, ItemQuantity("common.items.flowers.plant_fiber", 1, 3)),
|
||||
]
|
@ -799,4 +799,24 @@
|
||||
central: ("armor.empty"),
|
||||
)
|
||||
),
|
||||
BoltIcicle: (
|
||||
bone0: (
|
||||
offset: (-2.5, -6.0, -2.5),
|
||||
central: ("weapon.projectile.icicle-bolt"),
|
||||
),
|
||||
bone1: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
)
|
||||
),
|
||||
SpitPoison: (
|
||||
bone0: (
|
||||
offset: (-3.0, -5.0, -3.0),
|
||||
central: ("weapon.projectile.poison-spit"),
|
||||
),
|
||||
bone1: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
)
|
||||
),
|
||||
})
|
||||
|
BIN
assets/voxygen/voxel/weapon/projectile/icicle-bolt.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/weapon/projectile/icicle-bolt.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/weapon/projectile/poison-spit.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/weapon/projectile/poison-spit.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -5,9 +5,10 @@ SpawnEntry (
|
||||
Pack(
|
||||
groups: [
|
||||
// Casual
|
||||
(100, (1, 1, "common.entity.wild.aggressive.bonerattler")),
|
||||
(110, (1, 1, "common.entity.wild.aggressive.bonerattler")),
|
||||
(100, (1, 1, "common.entity.wild.aggressive.sand_raptor")),
|
||||
(100, (1, 1, "common.entity.wild.aggressive.sandshark")),
|
||||
(100, (1, 1, "common.entity.wild.aggressive.stag_beetle")),
|
||||
// Rare
|
||||
(20, (1, 1, "common.entity.wild.aggressive.lavadrake")),
|
||||
(20, (1, 1, "common.entity.wild.aggressive.ntouka")),
|
||||
|
@ -6,6 +6,7 @@ SpawnEntry (
|
||||
groups: [
|
||||
(1, (1, 1, "common.entity.wild.aggressive.wendigo")),
|
||||
(1, (1, 1, "common.entity.wild.aggressive.dreadhorn")),
|
||||
(1, (1, 1, "common.entity.wild.aggressive.horn_beetle")),
|
||||
],
|
||||
is_underwater: false,
|
||||
day_period: [Night, Morning, Noon, Evening],
|
||||
|
@ -30,6 +30,7 @@ SpawnEntry (
|
||||
(2, (1, 1, "common.entity.wild.peaceful.turtle")),
|
||||
(2, (1, 1, "common.entity.wild.peaceful.hirdrasil")),
|
||||
(2, (1, 1, "common.entity.wild.peaceful.truffler")),
|
||||
(2, (1, 1, "common.entity.wild.peaceful.leaf_beetle")),
|
||||
],
|
||||
is_underwater: false,
|
||||
day_period: [Morning, Noon, Evening],
|
||||
|
@ -659,7 +659,7 @@ impl Body {
|
||||
quadruped_low::Species::Deadwood => 120,
|
||||
_ => 70,
|
||||
},
|
||||
Body::Arthropod(_) => 100,
|
||||
Body::Arthropod(_) => 10000,
|
||||
Body::Ship(_) => 1000,
|
||||
}
|
||||
}
|
||||
|
@ -92,6 +92,8 @@ make_case_elim!(
|
||||
Apple = 77,
|
||||
Hive = 78,
|
||||
Coconut = 79,
|
||||
SpitPoison = 80,
|
||||
BoltIcicle = 81,
|
||||
}
|
||||
);
|
||||
|
||||
@ -272,6 +274,8 @@ impl Body {
|
||||
Body::Apple => "apple",
|
||||
Body::Hive => "hive",
|
||||
Body::Coconut => "coconut",
|
||||
Body::SpitPoison => "spit_poison",
|
||||
Body::BoltIcicle => "bolt_icicle",
|
||||
}
|
||||
}
|
||||
|
||||
@ -310,7 +314,7 @@ impl Body {
|
||||
Body::BedBlue => 50.0,
|
||||
Body::Bedroll => 3.0,
|
||||
Body::Bench => 100.0,
|
||||
Body::BoltFire | Body::BoltFireBig | Body::BoltNature => 1.0,
|
||||
Body::BoltFire | Body::BoltFireBig | Body::BoltNature | Body::BoltIcicle | Body::SpitPoison => 1.0,
|
||||
Body::Bomb => {
|
||||
0.5 * IRON_DENSITY * std::f32::consts::PI / 6.0 * self.dimensions().x.powi(3)
|
||||
},
|
||||
|
@ -61,7 +61,7 @@ pub enum ProjectileConstructor {
|
||||
radius: f32,
|
||||
min_falloff: f32,
|
||||
},
|
||||
PoisonBall {
|
||||
Poisonball {
|
||||
damage: f32,
|
||||
radius: f32,
|
||||
min_falloff: f32,
|
||||
@ -228,7 +228,7 @@ impl ProjectileConstructor {
|
||||
is_point: true,
|
||||
}
|
||||
},
|
||||
PoisonBall {
|
||||
Poisonball {
|
||||
damage,
|
||||
radius,
|
||||
min_falloff,
|
||||
@ -483,7 +483,7 @@ impl ProjectileConstructor {
|
||||
*damage *= power;
|
||||
*radius *= range;
|
||||
},
|
||||
PoisonBall {
|
||||
Poisonball {
|
||||
ref mut damage,
|
||||
ref mut radius,
|
||||
..
|
||||
|
@ -18,7 +18,7 @@ impl Animation for LeapMeleeAnimation {
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "arthropod_leapmelee")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, _global_time, stage_section, _timer): Self::Dependency<'a>,
|
||||
(_velocity, global_time, stage_section, _timer): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
@ -34,6 +34,7 @@ impl Animation for LeapMeleeAnimation {
|
||||
_ => (0.0, 0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = 1.0 - movement4;
|
||||
let early_pullback = 1.0 - movement3base;
|
||||
//let subtract = global_time - timer;
|
||||
//let check = subtract - subtract.trunc();
|
||||
//let mirror = (check - 0.5).signum();
|
||||
@ -44,6 +45,8 @@ impl Animation for LeapMeleeAnimation {
|
||||
//let twitch1 = (movement1base * 10.0).sin() * (1.0 - movement2base);
|
||||
//let twitch3 = (movement3base * 5.0).sin() * mirror;
|
||||
//let twitch1abs = twitch1 * mirror;
|
||||
let shortalt = (global_time * 80.0).sin() * movement2base * early_pullback;
|
||||
dbg!(anim_time);
|
||||
|
||||
next.chest.scale = Vec3::one() / s_a.scaler;
|
||||
|
||||
@ -74,10 +77,10 @@ impl Animation for LeapMeleeAnimation {
|
||||
next.leg_fl.position = Vec3::new(-s_a.leg_f.0, s_a.leg_f.1, s_a.leg_f.2);
|
||||
next.leg_fr.position = Vec3::new(s_a.leg_f.0, s_a.leg_f.1, s_a.leg_f.2);
|
||||
next.leg_fl.orientation =
|
||||
Quaternion::rotation_x(movement1abs * 0.2 + movement2abs * -1.0 + movement3abs * 0.8)
|
||||
Quaternion::rotation_x(movement1abs * 0.2 + movement2abs * 0.8 + movement3abs * -1.5)
|
||||
* Quaternion::rotation_z(s_a.leg_ori.0);
|
||||
next.leg_fr.orientation =
|
||||
Quaternion::rotation_x(movement1abs * 0.2 + movement2abs * -1.0 + movement3abs * 0.8)
|
||||
Quaternion::rotation_x(movement1abs * 0.2 + movement2abs * 0.8 + movement3abs * -1.5)
|
||||
* Quaternion::rotation_z(-s_a.leg_ori.0);
|
||||
|
||||
next.leg_fcl.position = Vec3::new(-s_a.leg_fc.0, s_a.leg_fc.1, s_a.leg_fc.2);
|
||||
@ -104,6 +107,28 @@ impl Animation for LeapMeleeAnimation {
|
||||
next.leg_br.orientation = Quaternion::rotation_y(movement1abs * -0.2 + movement2abs * 1.0)
|
||||
* Quaternion::rotation_z(-s_a.leg_ori.3);
|
||||
|
||||
next.wing_fl.position = Vec3::new(-s_a.wing_f.0, s_a.wing_f.1, s_a.wing_f.2);
|
||||
next.wing_fr.position = Vec3::new(s_a.wing_f.0, s_a.wing_f.1, s_a.wing_f.2);
|
||||
next.wing_fl.orientation =
|
||||
Quaternion::rotation_x(movement1abs * -0.4 + movement2abs * -0.2)
|
||||
* Quaternion::rotation_y(movement1abs * 0.5 + movement2abs * 0.1)
|
||||
* Quaternion::rotation_z(movement1abs * -0.2);
|
||||
next.wing_fr.orientation =
|
||||
Quaternion::rotation_x(movement1abs * -0.4 + movement2abs * -0.2)
|
||||
* Quaternion::rotation_y(movement1abs * -0.5 + movement2abs * -0.1)
|
||||
* Quaternion::rotation_z(movement1abs * 0.2);
|
||||
|
||||
next.wing_bl.position = Vec3::new(-s_a.wing_b.0, s_a.wing_b.1, s_a.wing_b.2);
|
||||
next.wing_br.position = Vec3::new(s_a.wing_b.0, s_a.wing_b.1, s_a.wing_b.2);
|
||||
next.wing_bl.orientation =
|
||||
Quaternion::rotation_x((movement1abs * -0.2 + movement2abs * -0.6) * early_pullback)
|
||||
* Quaternion::rotation_y(movement1abs * 0.4 + shortalt * 2.0 + movement2abs * 0.1)
|
||||
* Quaternion::rotation_z(movement1abs * -1.4);
|
||||
next.wing_br.orientation =
|
||||
Quaternion::rotation_x((movement1abs * -0.2 + movement2abs * -0.6) * early_pullback)
|
||||
* Quaternion::rotation_y(movement1abs * -0.4 + shortalt * 2.0 + movement2abs * -0.1)
|
||||
* Quaternion::rotation_z(movement1abs * 1.4);
|
||||
|
||||
next
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
use std::f32::consts::PI;
|
||||
|
||||
use super::{
|
||||
super::{vek::*, Animation},
|
||||
ArthropodSkeleton, SkeletonAttr,
|
||||
@ -18,7 +16,7 @@ impl Animation for ShootAnimation {
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "arthropod_shoot")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
(_velocity, _global_time, stage_section, _timer): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
@ -31,11 +29,6 @@ impl Animation for ShootAnimation {
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = 1.0 - movement2;
|
||||
let subtract = global_time - timer;
|
||||
let check = subtract - subtract.trunc();
|
||||
let mirror = (check - 0.5).signum();
|
||||
//let movement1 = mirror * movement1base * pullback;
|
||||
//let movement2 = mirror * movement2base * pullback;
|
||||
let movement1abs = movement1 * pullback;
|
||||
|
||||
next.chest.scale = Vec3::one() / s_a.scaler;
|
||||
|
@ -17,27 +17,33 @@ impl Animation for StunnedAnimation {
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "arthropod_stunned")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, _global_time, stage_section, _timer): Self::Dependency<'a>,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
) -> Self::Skeleton {
|
||||
let mut next = (*skeleton).clone();
|
||||
|
||||
let (_movement1base, _movement2, _twitch) = match stage_section {
|
||||
let (_movement1base, movement2, twitch) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Recover) => {
|
||||
(1.0, anim_time.powf(3.0), ((1.0 - anim_time) * 10.0).sin())
|
||||
},
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
//let pullback = 1.0 - movement2;
|
||||
|
||||
let pullback = 1.0 - movement2;
|
||||
//let subtract = global_time - timer;
|
||||
//let check = subtract - subtract.trunc();
|
||||
//let mirror = (check - 0.5).signum();
|
||||
//let movement1 = mirror * movement1base * pullback;
|
||||
//let movement1abs = movement1base * pullback;
|
||||
|
||||
let subtract = global_time - timer;
|
||||
let check = subtract - subtract.trunc();
|
||||
let mirror = (check - 0.5).signum();
|
||||
let twitch2 = mirror * (twitch * 20.0).sin() * pullback;
|
||||
|
||||
next.chest.scale = Vec3::one() / s_a.scaler;
|
||||
|
||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
||||
|
@ -466,9 +466,12 @@ pub fn apply_caves_supplement<'a>(
|
||||
_ => "common.entity.wild.aggressive.batfox",
|
||||
}
|
||||
} else if cave_depth < 120.0 {
|
||||
match dynamic_rng.gen_range(0..3) {
|
||||
match dynamic_rng.gen_range(0..6) {
|
||||
0 => "common.entity.wild.aggressive.rocksnapper",
|
||||
1 => "common.entity.wild.aggressive.cave_salamander",
|
||||
2 => "common.entity.wild.aggressive.tarantula",
|
||||
3 => "common.entity.wild.aggressive.antlion",
|
||||
4 => "common.entity.wild.aggressive.black_widow",
|
||||
_ => "common.entity.wild.aggressive.asp",
|
||||
}
|
||||
} else if cave_depth < 190.0 {
|
||||
|
Loading…
Reference in New Issue
Block a user