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(
|
Item(
|
||||||
name: "Wooden Training Sword",
|
name: "Sturdy Bihander",
|
||||||
description: "
|
description: "
|
||||||
Power: 15",
|
Power: 15",
|
||||||
kind: Tool(
|
kind: Tool(
|
||||||
|
@ -60,4 +60,14 @@
|
|||||||
color: None
|
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)),
|
vox_spec: ("weapon.sword.zweihander_2h-0", (-1.5, -6.5, -4.0)),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
|
Sword(Short0): (
|
||||||
|
vox_spec: ("weapon.sword.short_2h-0", (-1.5, -6.5, -4.0)),
|
||||||
|
color: None
|
||||||
|
),
|
||||||
Axe(BasicAxe): (
|
Axe(BasicAxe): (
|
||||||
vox_spec: ("weapon.axe.rusty_2h", (-1.5, -5.0, -4.0)),
|
vox_spec: ("weapon.axe.rusty_2h", (-1.5, -5.0, -4.0)),
|
||||||
color: None
|
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,
|
Chain = 2,
|
||||||
Assassin = 3,
|
Assassin = 3,
|
||||||
Plate0 = 4,
|
Plate0 = 4,
|
||||||
|
Leather0 = 5,
|
||||||
}
|
}
|
||||||
pub const ALL_SHOULDERS: [Shoulder; 5] = [
|
pub const ALL_SHOULDERS: [Shoulder; 6] = [
|
||||||
Shoulder::None,
|
Shoulder::None,
|
||||||
Shoulder::Brown1,
|
Shoulder::Brown1,
|
||||||
Shoulder::Chain,
|
Shoulder::Chain,
|
||||||
Shoulder::Assassin,
|
Shoulder::Assassin,
|
||||||
Shoulder::Plate0,
|
Shoulder::Plate0,
|
||||||
|
Shoulder::Leather0,
|
||||||
];
|
];
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
|
@ -18,6 +18,7 @@ pub enum SwordKind {
|
|||||||
Rapier,
|
Rapier,
|
||||||
Zweihander0,
|
Zweihander0,
|
||||||
WoodTraining,
|
WoodTraining,
|
||||||
|
Short0,
|
||||||
}
|
}
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
pub enum AxeKind {
|
pub enum AxeKind {
|
||||||
|
@ -2,7 +2,7 @@ use super::SysTimer;
|
|||||||
use crate::{chunk_generator::ChunkGenerator, client::Client, Tick};
|
use crate::{chunk_generator::ChunkGenerator, client::Client, Tick};
|
||||||
use common::{
|
use common::{
|
||||||
assets,
|
assets,
|
||||||
comp::{self, item, CharacterAbility, Item, ItemConfig, Player, Pos},
|
comp::{self, humanoid, item, CharacterAbility, Item, ItemConfig, Player, Pos},
|
||||||
event::{EventBus, ServerEvent},
|
event::{EventBus, ServerEvent},
|
||||||
generation::EntityKind,
|
generation::EntityKind,
|
||||||
msg::ServerMsg,
|
msg::ServerMsg,
|
||||||
@ -126,7 +126,9 @@ impl<'a> System<'a> for Sys {
|
|||||||
get_npc_name(&NPC_NAMES.humanoid, body.race)
|
get_npc_name(&NPC_NAMES.humanoid, body.race)
|
||||||
),
|
),
|
||||||
comp::Body::Humanoid(body),
|
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,
|
comp::Alignment::Npc,
|
||||||
)
|
)
|
||||||
}) as _,
|
}) as _,
|
||||||
@ -135,7 +137,9 @@ impl<'a> System<'a> for Sys {
|
|||||||
(
|
(
|
||||||
format!("{} Bandit", get_npc_name(&NPC_NAMES.humanoid, body.race)),
|
format!("{} Bandit", get_npc_name(&NPC_NAMES.humanoid, body.race)),
|
||||||
comp::Body::Humanoid(body),
|
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,
|
comp::Alignment::Enemy,
|
||||||
)
|
)
|
||||||
}) as _,
|
}) as _,
|
||||||
@ -196,12 +200,24 @@ impl<'a> System<'a> for Sys {
|
|||||||
dodge_ability: Some(comp::CharacterAbility::Roll),
|
dodge_ability: Some(comp::CharacterAbility::Roll),
|
||||||
}),
|
}),
|
||||||
second_item: None,
|
second_item: None,
|
||||||
shoulder: None,
|
shoulder: Some(assets::load_expect_cloned(
|
||||||
chest: None,
|
"common.items.armor.shoulder_plate-0",
|
||||||
belt: None,
|
)),
|
||||||
hand: None,
|
chest: Some(assets::load_expect_cloned(
|
||||||
pants: None,
|
"common.items.armor.chest.chest_plate_green-0",
|
||||||
foot: None,
|
)),
|
||||||
|
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 {
|
} else {
|
||||||
comp::Loadout {
|
comp::Loadout {
|
||||||
@ -217,12 +233,24 @@ impl<'a> System<'a> for Sys {
|
|||||||
dodge_ability: None,
|
dodge_ability: None,
|
||||||
}),
|
}),
|
||||||
second_item: None,
|
second_item: None,
|
||||||
shoulder: None,
|
shoulder: Some(assets::load_expect_cloned(
|
||||||
chest: None,
|
"common.items.armor.shoulder_leather-0",
|
||||||
belt: None,
|
)),
|
||||||
hand: None,
|
chest: Some(assets::load_expect_cloned(
|
||||||
pants: None,
|
"common.items.armor.chest.chest_plate_green-0",
|
||||||
foot: None,
|
)),
|
||||||
|
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 {
|
loadout = comp::Loadout {
|
||||||
active_item: Some(comp::ItemConfig {
|
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 {
|
primary_ability: Some(CharacterAbility::BasicMelee {
|
||||||
buildup_duration: Duration::from_millis(800),
|
buildup_duration: Duration::from_millis(800),
|
||||||
recover_duration: Duration::from_millis(200),
|
recover_duration: Duration::from_millis(200),
|
||||||
@ -258,12 +288,24 @@ impl<'a> System<'a> for Sys {
|
|||||||
dodge_ability: None,
|
dodge_ability: None,
|
||||||
}),
|
}),
|
||||||
second_item: None,
|
second_item: None,
|
||||||
shoulder: None,
|
shoulder: Some(assets::load_expect_cloned(
|
||||||
chest: None,
|
"common.items.armor.shoulder_plate-0",
|
||||||
belt: None,
|
)),
|
||||||
hand: None,
|
chest: Some(assets::load_expect_cloned(
|
||||||
pants: None,
|
"common.items.armor.chest.chest_plate_green-0",
|
||||||
foot: None,
|
)),
|
||||||
|
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));
|
stats.level.set_level(rand::thread_rng().gen_range(8, 15));
|
||||||
|
Loading…
Reference in New Issue
Block a user