mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Adds haniwa sentry object
This commit is contained in:
parent
c67c56d194
commit
47a2bf7de8
@ -199,6 +199,11 @@
|
||||
secondary: "common.abilities.custom.turret.arrows",
|
||||
abilities: [],
|
||||
),
|
||||
Custom("Haniwa Sentry"): (
|
||||
primary: "common.abilities.custom.turret.flamethrower",
|
||||
secondary: "common.abilities.custom.turret.flamethrower",
|
||||
abilities: [],
|
||||
),
|
||||
Custom("Mindflayer"): (
|
||||
primary: "common.abilities.custom.mindflayer.cursedflames",
|
||||
secondary: "common.abilities.custom.mindflayer.necroticvortex",
|
||||
|
@ -9,5 +9,5 @@ BasicRanged(
|
||||
),
|
||||
projectile_body: Object(ArrowTurret),
|
||||
projectile_light: None,
|
||||
projectile_speed: 90.0,
|
||||
projectile_speed: 130.0,
|
||||
)
|
||||
|
@ -1,14 +1,19 @@
|
||||
BasicBeam(
|
||||
buildup_duration: 0.25,
|
||||
recover_duration: 0.25,
|
||||
beam_duration: 0.5,
|
||||
damage: 3000,
|
||||
beam_duration: 1.0,
|
||||
damage: 35,
|
||||
tick_rate: 3.0,
|
||||
range: 30.0,
|
||||
range: 20.0,
|
||||
max_angle: 15.0,
|
||||
damage_effect: None,
|
||||
damage_effect: Some(Buff((
|
||||
kind: Burning,
|
||||
dur_secs: 10.0,
|
||||
strength: DamageFraction(0.5),
|
||||
chance: 0.25,
|
||||
))),
|
||||
energy_regen: 0,
|
||||
energy_drain: 0,
|
||||
orientation_behavior: Turret,
|
||||
orientation_behavior: Normal,
|
||||
specifier: Flamethrower,
|
||||
)
|
19
assets/common/items/npc_weapons/unique/haniwa_sentry.ron
Normal file
19
assets/common/items/npc_weapons/unique/haniwa_sentry.ron
Normal file
@ -0,0 +1,19 @@
|
||||
ItemDef(
|
||||
name: "Haniwa Sentry",
|
||||
description: "Rotating turret weapon",
|
||||
kind: Tool((
|
||||
kind: Natural,
|
||||
hands: Two,
|
||||
stats: Direct((
|
||||
equip_time_secs: 0.01,
|
||||
power: 1.0,
|
||||
poise_strength: 1.0,
|
||||
speed: 1.0,
|
||||
crit_chance: 0.0625,
|
||||
crit_mult: 1.9142857,
|
||||
)),
|
||||
)),
|
||||
quality: Low,
|
||||
tags: [],
|
||||
ability_spec: Some(Custom("Haniwa Sentry")),
|
||||
)
|
BIN
assets/voxygen/voxel/object/haniwa_sentry/bone0.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/object/haniwa_sentry/bone0.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/object/haniwa_sentry/bone1.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/object/haniwa_sentry/bone1.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -655,7 +655,7 @@
|
||||
central: ("object.crossbow.bone0"),
|
||||
),
|
||||
bone1: (
|
||||
offset: (-9.0, -7.0, -5.0 ),
|
||||
offset: (-9.0, -7.0, -5.0),
|
||||
central: ("object.crossbow.bone1"),
|
||||
)
|
||||
),
|
||||
@ -699,4 +699,14 @@
|
||||
central: ("armor.empty"),
|
||||
)
|
||||
),
|
||||
HaniwaSentry: (
|
||||
bone0: (
|
||||
offset: (-5.5, -4.5, -5.5),
|
||||
central: ("object.haniwa_sentry.bone0"),
|
||||
),
|
||||
bone1: (
|
||||
offset: (-5.5, -5.5, -3.0),
|
||||
central: ("object.haniwa_sentry.bone1"),
|
||||
)
|
||||
),
|
||||
})
|
||||
|
@ -464,6 +464,7 @@ impl Body {
|
||||
Body::Object(object) => match object {
|
||||
object::Body::TrainingDummy => 10000,
|
||||
object::Body::Crossbow => 800,
|
||||
object::Body::HaniwaSentry => 600,
|
||||
_ => 10000,
|
||||
},
|
||||
Body::Golem(golem) => match golem.species {
|
||||
|
@ -82,6 +82,7 @@ make_case_elim!(
|
||||
GoldOre = 67,
|
||||
SilverOre = 68,
|
||||
ClayRocket = 69,
|
||||
HaniwaSentry = 70,
|
||||
}
|
||||
);
|
||||
|
||||
@ -92,7 +93,7 @@ impl Body {
|
||||
}
|
||||
}
|
||||
|
||||
pub const ALL_OBJECTS: [Body; 70] = [
|
||||
pub const ALL_OBJECTS: [Body; 71] = [
|
||||
Body::Arrow,
|
||||
Body::Bomb,
|
||||
Body::Scarecrow,
|
||||
@ -163,6 +164,7 @@ pub const ALL_OBJECTS: [Body; 70] = [
|
||||
Body::SilverOre,
|
||||
Body::GoldOre,
|
||||
Body::ClayRocket,
|
||||
Body::HaniwaSentry,
|
||||
];
|
||||
|
||||
impl From<Body> for super::Body {
|
||||
@ -242,6 +244,7 @@ impl Body {
|
||||
Body::SilverOre => "silver_ore",
|
||||
Body::GoldOre => "gold_ore",
|
||||
Body::ClayRocket => "clay_rocket",
|
||||
Body::HaniwaSentry => "haniwa_sentry",
|
||||
}
|
||||
}
|
||||
|
||||
@ -332,6 +335,7 @@ impl Body {
|
||||
Body::SilverOre => 1000.0,
|
||||
Body::GoldOre => 1000.0,
|
||||
Body::ClayRocket => 50.0,
|
||||
Body::HaniwaSentry => 300.0,
|
||||
};
|
||||
|
||||
Mass(m)
|
||||
@ -339,8 +343,12 @@ impl Body {
|
||||
|
||||
pub fn dimensions(&self) -> Vec3<f32> {
|
||||
match self {
|
||||
Body::Arrow | Body::ArrowSnake | Body::MultiArrow => Vec3::new(0.01, 0.8, 0.01),
|
||||
Body::Arrow | Body::ArrowSnake | Body::MultiArrow | Body::ArrowTurret => {
|
||||
Vec3::new(0.01, 0.8, 0.01)
|
||||
},
|
||||
Body::BoltFire => Vec3::new(0.1, 0.1, 0.1),
|
||||
Body::Crossbow => Vec3::new(3.0, 3.0, 1.5),
|
||||
Body::HaniwaSentry => Vec3::new(0.8, 0.8, 1.4),
|
||||
_ => Vec3::broadcast(0.2),
|
||||
}
|
||||
}
|
||||
|
@ -310,10 +310,18 @@ impl LoadoutBuilder {
|
||||
));
|
||||
},
|
||||
},
|
||||
Body::Object(object::Body::Crossbow) => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.turret",
|
||||
));
|
||||
Body::Object(body) => match body {
|
||||
object::Body::Crossbow => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.turret",
|
||||
));
|
||||
},
|
||||
object::Body::HaniwaSentry => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.haniwa_sentry",
|
||||
));
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
Body::BipedSmall(biped_small) => match (biped_small.species, biped_small.body_type)
|
||||
{
|
||||
|
@ -1578,6 +1578,7 @@ impl<'a> AgentData<'a> {
|
||||
circle_time: 1,
|
||||
},
|
||||
"Turret" => Tactic::Turret,
|
||||
"Haniwa Sentry" => Tactic::RotatingTurret,
|
||||
"Bird Large Breathe" => Tactic::BirdLargeBreathe,
|
||||
"Bird Large Fire" => Tactic::BirdLargeFire,
|
||||
"Mindflayer" => Tactic::Mindflayer,
|
||||
@ -2997,8 +2998,7 @@ impl<'a> AgentData<'a> {
|
||||
self.pos,
|
||||
tgt_data.pos,
|
||||
attack_data.dist_sqrd,
|
||||
) && attack_data.angle < 15.0
|
||||
{
|
||||
) {
|
||||
controller
|
||||
.actions
|
||||
.push(ControlAction::basic_input(InputKind::Primary));
|
||||
|
@ -70,11 +70,13 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
||||
use comp::object::Body::*;
|
||||
Self {
|
||||
bone0: match body {
|
||||
Crossbow => (0.0, 0.0, 14.0),
|
||||
Crossbow => (0.0, 0.0, 11.0),
|
||||
HaniwaSentry => (0.0, 0.0, 10.5),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
},
|
||||
bone1: match body {
|
||||
Crossbow => (0.0, 0.0, 8.0),
|
||||
HaniwaSentry => (0.0, 0.0, 3.0),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
},
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ impl<'a> System<'a> for Sys {
|
||||
fn base_ori_interp(body: &Body) -> f32 {
|
||||
match body {
|
||||
Body::Object(object) => match object {
|
||||
object::Body::Crossbow => 100.0,
|
||||
object::Body::Crossbow | object::Body::HaniwaSentry => 100.0,
|
||||
_ => 10.0,
|
||||
},
|
||||
_ => 10.0,
|
||||
|
Loading…
Reference in New Issue
Block a user