npc armour

This commit is contained in:
Pfauenauge90 2020-03-18 23:09:58 +01:00
parent 1a484410ca
commit 509615c15b
11 changed files with 105 additions and 24 deletions

View File

@ -0,0 +1,8 @@
Item(
name: "Leather Pauldrons",
description: "",
kind: Armor(
kind: Shoulder(Leather0),
stats: 20,
),
)

View File

@ -0,0 +1,11 @@
Item(
name: "Vicious Gladius",
description: "
Power: 15",
kind: Tool(
ToolData (
kind: Sword(Short0),
equip_time_millis: 800,
)
),
)

View File

@ -1,5 +1,5 @@
Item(
name: "Wooden Training Sword",
name: "Sturdy Bihander",
description: "
Power: 15",
kind: Tool(

View File

@ -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
)
),
})

View File

@ -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

Binary file not shown.

View File

@ -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)]

View File

@ -18,6 +18,7 @@ pub enum SwordKind {
Rapier,
Zweihander0,
WoodTraining,
Short0,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum AxeKind {

View File

@ -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));