mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
npc armour
This commit is contained in:
parent
1a484410ca
commit
509615c15b
8
assets/common/items/armor/shoulder_leather-0.ron
Normal file
8
assets/common/items/armor/shoulder_leather-0.ron
Normal file
@ -0,0 +1,8 @@
|
||||
Item(
|
||||
name: "Leather Pauldrons",
|
||||
description: "",
|
||||
kind: Armor(
|
||||
kind: Shoulder(Leather0),
|
||||
stats: 20,
|
||||
),
|
||||
)
|
11
assets/common/items/weapons/short_sword_0.ron
Normal file
11
assets/common/items/weapons/short_sword_0.ron
Normal file
@ -0,0 +1,11 @@
|
||||
Item(
|
||||
name: "Vicious Gladius",
|
||||
description: "
|
||||
Power: 15",
|
||||
kind: Tool(
|
||||
ToolData (
|
||||
kind: Sword(Short0),
|
||||
equip_time_millis: 800,
|
||||
)
|
||||
),
|
||||
)
|
@ -1,5 +1,5 @@
|
||||
Item(
|
||||
name: "Wooden Training Sword",
|
||||
name: "Sturdy Bihander",
|
||||
description: "
|
||||
Power: 15",
|
||||
kind: Tool(
|
||||
|
@ -60,4 +60,14 @@
|
||||
color: None
|
||||
)
|
||||
),
|
||||
Leather0: (
|
||||
left: (
|
||||
vox_spec: ("armor.shoulder.leather_left-0", (-3.6, -3.5, 1.0)),
|
||||
color: None
|
||||
),
|
||||
right: (
|
||||
vox_spec: ("armor.shoulder.leather_right-0", (-2.6, -3.5, 1.0)),
|
||||
color: None
|
||||
)
|
||||
),
|
||||
})
|
||||
|
@ -15,6 +15,10 @@
|
||||
vox_spec: ("weapon.sword.zweihander_2h-0", (-1.5, -6.5, -4.0)),
|
||||
color: None
|
||||
),
|
||||
Sword(Short0): (
|
||||
vox_spec: ("weapon.sword.short_2h-0", (-1.5, -6.5, -4.0)),
|
||||
color: None
|
||||
),
|
||||
Axe(BasicAxe): (
|
||||
vox_spec: ("weapon.axe.rusty_2h", (-1.5, -5.0, -4.0)),
|
||||
color: None
|
||||
|
BIN
assets/voxygen/voxel/weapon/sword/short_2h-0.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/weapon/sword/short_2h-0.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -581,13 +581,15 @@ pub enum Shoulder {
|
||||
Chain = 2,
|
||||
Assassin = 3,
|
||||
Plate0 = 4,
|
||||
Leather0 = 5,
|
||||
}
|
||||
pub const ALL_SHOULDERS: [Shoulder; 5] = [
|
||||
pub const ALL_SHOULDERS: [Shoulder; 6] = [
|
||||
Shoulder::None,
|
||||
Shoulder::Brown1,
|
||||
Shoulder::Chain,
|
||||
Shoulder::Assassin,
|
||||
Shoulder::Plate0,
|
||||
Shoulder::Leather0,
|
||||
];
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
|
@ -18,6 +18,7 @@ pub enum SwordKind {
|
||||
Rapier,
|
||||
Zweihander0,
|
||||
WoodTraining,
|
||||
Short0,
|
||||
}
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
pub enum AxeKind {
|
||||
|
@ -2,7 +2,7 @@ use super::SysTimer;
|
||||
use crate::{chunk_generator::ChunkGenerator, client::Client, Tick};
|
||||
use common::{
|
||||
assets,
|
||||
comp::{self, item, CharacterAbility, Item, ItemConfig, Player, Pos},
|
||||
comp::{self, humanoid, item, CharacterAbility, Item, ItemConfig, Player, Pos},
|
||||
event::{EventBus, ServerEvent},
|
||||
generation::EntityKind,
|
||||
msg::ServerMsg,
|
||||
@ -126,7 +126,9 @@ impl<'a> System<'a> for Sys {
|
||||
get_npc_name(&NPC_NAMES.humanoid, body.race)
|
||||
),
|
||||
comp::Body::Humanoid(body),
|
||||
Some(assets::load_expect_cloned("common.items.weapons.staff_1")),
|
||||
Some(assets::load_expect_cloned(
|
||||
"common.items.weapons.starter_axe",
|
||||
)),
|
||||
comp::Alignment::Npc,
|
||||
)
|
||||
}) as _,
|
||||
@ -135,7 +137,9 @@ impl<'a> System<'a> for Sys {
|
||||
(
|
||||
format!("{} Bandit", get_npc_name(&NPC_NAMES.humanoid, body.race)),
|
||||
comp::Body::Humanoid(body),
|
||||
Some(assets::load_expect_cloned("common.items.weapons.staff_1")),
|
||||
Some(assets::load_expect_cloned(
|
||||
"common.items.weapons.short_sword_0",
|
||||
)),
|
||||
comp::Alignment::Enemy,
|
||||
)
|
||||
}) as _,
|
||||
@ -196,12 +200,24 @@ impl<'a> System<'a> for Sys {
|
||||
dodge_ability: Some(comp::CharacterAbility::Roll),
|
||||
}),
|
||||
second_item: None,
|
||||
shoulder: None,
|
||||
chest: None,
|
||||
belt: None,
|
||||
hand: None,
|
||||
pants: None,
|
||||
foot: None,
|
||||
shoulder: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.shoulder_plate-0",
|
||||
)),
|
||||
chest: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.chest.chest_plate_green-0",
|
||||
)),
|
||||
belt: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.belt_plate-0",
|
||||
)),
|
||||
hand: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.hand_plate-0",
|
||||
)),
|
||||
pants: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.pants_plate_green-0",
|
||||
)),
|
||||
foot: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.foot_plate-0",
|
||||
)),
|
||||
}
|
||||
} else {
|
||||
comp::Loadout {
|
||||
@ -217,12 +233,24 @@ impl<'a> System<'a> for Sys {
|
||||
dodge_ability: None,
|
||||
}),
|
||||
second_item: None,
|
||||
shoulder: None,
|
||||
chest: None,
|
||||
belt: None,
|
||||
hand: None,
|
||||
pants: None,
|
||||
foot: None,
|
||||
shoulder: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.shoulder_leather-0",
|
||||
)),
|
||||
chest: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.chest.chest_plate_green-0",
|
||||
)),
|
||||
belt: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.belt_plate-0",
|
||||
)),
|
||||
hand: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.hand_plate-0",
|
||||
)),
|
||||
pants: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.pants_plate_green-0",
|
||||
)),
|
||||
foot: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.foot_plate-0",
|
||||
)),
|
||||
}
|
||||
};
|
||||
|
||||
@ -247,7 +275,9 @@ impl<'a> System<'a> for Sys {
|
||||
}
|
||||
loadout = comp::Loadout {
|
||||
active_item: Some(comp::ItemConfig {
|
||||
item: assets::load_expect_cloned("common.items.weapons.hammer_1"),
|
||||
item: assets::load_expect_cloned(
|
||||
"common.items.weapons.zweihander_sword_0",
|
||||
),
|
||||
primary_ability: Some(CharacterAbility::BasicMelee {
|
||||
buildup_duration: Duration::from_millis(800),
|
||||
recover_duration: Duration::from_millis(200),
|
||||
@ -258,12 +288,24 @@ impl<'a> System<'a> for Sys {
|
||||
dodge_ability: None,
|
||||
}),
|
||||
second_item: None,
|
||||
shoulder: None,
|
||||
chest: None,
|
||||
belt: None,
|
||||
hand: None,
|
||||
pants: None,
|
||||
foot: None,
|
||||
shoulder: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.shoulder_plate-0",
|
||||
)),
|
||||
chest: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.chest.chest_plate_green-0",
|
||||
)),
|
||||
belt: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.belt_plate-0",
|
||||
)),
|
||||
hand: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.hand_plate-0",
|
||||
)),
|
||||
pants: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.pants_plate_green-0",
|
||||
)),
|
||||
foot: Some(assets::load_expect_cloned(
|
||||
"common.items.armor.foot_plate-0",
|
||||
)),
|
||||
};
|
||||
|
||||
stats.level.set_level(rand::thread_rng().gen_range(8, 15));
|
||||
|
Loading…
Reference in New Issue
Block a user