mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fully separated sceptres from staves.
This commit is contained in:
parent
3e2e06f2f8
commit
3d6c26a3c7
@ -3,7 +3,7 @@ ItemDef(
|
||||
description: "Heals your allies with the mystical Velorite aura.",
|
||||
kind: Tool(
|
||||
(
|
||||
kind: Staff("SceptreVelorite"),
|
||||
kind: Sceptre("SceptreVelorite"),
|
||||
stats: (
|
||||
equip_time_millis: 400,
|
||||
power: 2.0,
|
||||
|
@ -3,7 +3,7 @@ ItemDef(
|
||||
description: "Heals your allies with the power of nature.",
|
||||
kind: Tool(
|
||||
(
|
||||
kind: Staff("Sceptre"),
|
||||
kind: Sceptre("Sceptre"),
|
||||
stats: (
|
||||
equip_time_millis: 400,
|
||||
power: 1.00,
|
||||
|
@ -3,7 +3,7 @@ ItemDef(
|
||||
description: "Heals your allies with the power of nature.",
|
||||
kind: Tool(
|
||||
(
|
||||
kind: Staff("StarterSceptre"),
|
||||
kind: Sceptre("StarterSceptre"),
|
||||
stats: (
|
||||
equip_time_millis: 400,
|
||||
power: 0.50,
|
||||
|
@ -506,15 +506,15 @@
|
||||
(1.0, 0.0, 0.0), (-310., 90.0, 0.0), 1.2,
|
||||
),
|
||||
// Healing staff
|
||||
Tool(Staff("Sceptre")): VoxTrans(
|
||||
Tool(Sceptre("Sceptre")): VoxTrans(
|
||||
"voxel.weapon.sceptre.wood-nature",
|
||||
(1.0, -1.0, 0.0), (-310., 90.0, 0.0), 1.2,
|
||||
),
|
||||
Tool(Staff("StarterSceptre")): VoxTrans(
|
||||
Tool(Sceptre("StarterSceptre")): VoxTrans(
|
||||
"voxel.weapon.sceptre.wood-simple",
|
||||
(0.0, -0.0, 0.0), (-310., 90.0, 0.0), 1.25,
|
||||
),
|
||||
Tool(Staff("SceptreVelorite")): VoxTrans(
|
||||
Tool(Sceptre("SceptreVelorite")): VoxTrans(
|
||||
"voxel.weapon.sceptre.ore-nature",
|
||||
(1.0, -1.0, 0.0), (-310., 90.0, 0.0), 1.15,
|
||||
),
|
||||
|
@ -547,15 +547,15 @@
|
||||
color: None
|
||||
),
|
||||
// Healing staff
|
||||
Staff("StarterSceptre"): (
|
||||
Sceptre("StarterSceptre"): (
|
||||
vox_spec: ("weapon.sceptre.wood-simple", (-1.0, -6.0, -6.0)),
|
||||
color: None
|
||||
),
|
||||
Staff("Sceptre"): (
|
||||
Sceptre("Sceptre"): (
|
||||
vox_spec: ("weapon.sceptre.wood-nature", (-1.0, -6.0, -5.0)),
|
||||
color: None
|
||||
),
|
||||
Staff("SceptreVelorite"): (
|
||||
Sceptre("SceptreVelorite"): (
|
||||
vox_spec: ("weapon.sceptre.ore-nature", (-2.0, -6.0, -5.0)),
|
||||
color: None
|
||||
),
|
||||
|
@ -16,6 +16,7 @@ pub enum ToolKind {
|
||||
Bow(String),
|
||||
Dagger(String),
|
||||
Staff(String),
|
||||
Sceptre(String),
|
||||
Shield(String),
|
||||
NpcWeapon(String),
|
||||
Debug(String),
|
||||
@ -33,6 +34,7 @@ impl ToolKind {
|
||||
ToolKind::Bow(_) => Hands::TwoHand,
|
||||
ToolKind::Dagger(_) => Hands::OneHand,
|
||||
ToolKind::Staff(_) => Hands::TwoHand,
|
||||
ToolKind::Sceptre(_) => Hands::TwoHand,
|
||||
ToolKind::Shield(_) => Hands::OneHand,
|
||||
ToolKind::NpcWeapon(_) => Hands::TwoHand,
|
||||
ToolKind::Debug(_) => Hands::TwoHand,
|
||||
@ -55,6 +57,7 @@ pub enum ToolCategory {
|
||||
Bow,
|
||||
Dagger,
|
||||
Staff,
|
||||
Sceptre,
|
||||
Shield,
|
||||
NpcWeapon,
|
||||
Debug,
|
||||
@ -71,6 +74,7 @@ impl From<&ToolKind> for ToolCategory {
|
||||
ToolKind::Bow(_) => ToolCategory::Bow,
|
||||
ToolKind::Dagger(_) => ToolCategory::Dagger,
|
||||
ToolKind::Staff(_) => ToolCategory::Staff,
|
||||
ToolKind::Sceptre(_) => ToolCategory::Sceptre,
|
||||
ToolKind::Shield(_) => ToolCategory::Shield,
|
||||
ToolKind::NpcWeapon(_) => ToolCategory::NpcWeapon,
|
||||
ToolKind::Debug(_) => ToolCategory::Debug,
|
||||
@ -299,9 +303,7 @@ impl Tool {
|
||||
range: 3.5,
|
||||
max_angle: 20.0,
|
||||
}],
|
||||
Staff(kind) => {
|
||||
if kind == "Sceptre" || kind == "SceptreVelorite" || kind == "StarterSceptre" {
|
||||
vec![
|
||||
Sceptre(_) => vec![
|
||||
BasicBeam {
|
||||
energy_cost: 0,
|
||||
buildup_duration: Duration::from_millis(250),
|
||||
@ -348,9 +350,8 @@ impl Tool {
|
||||
projectile_gravity: Some(Gravity(1.0)),
|
||||
projectile_speed: 25.0,
|
||||
},
|
||||
]
|
||||
} else {
|
||||
vec![
|
||||
],
|
||||
Staff(_) => vec![
|
||||
BasicMelee {
|
||||
energy_cost: 0,
|
||||
buildup_duration: Duration::from_millis(100),
|
||||
@ -381,7 +382,6 @@ impl Tool {
|
||||
col: (0.85, 0.5, 0.11).into(),
|
||||
..Default::default()
|
||||
}),
|
||||
|
||||
projectile_gravity: None,
|
||||
projectile_speed: 100.0,
|
||||
},
|
||||
@ -414,13 +414,10 @@ impl Tool {
|
||||
col: (1.0, 0.75, 0.11).into(),
|
||||
..Default::default()
|
||||
}),
|
||||
|
||||
projectile_gravity: None,
|
||||
projectile_speed: 100.0,
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
],
|
||||
Shield(_) => vec![
|
||||
BasicMelee {
|
||||
energy_cost: 0,
|
||||
|
@ -78,6 +78,7 @@ fn get_tool_kind(kind: &ToolKind) -> String {
|
||||
ToolKind::Bow(_) => "Bow".to_string(),
|
||||
ToolKind::Dagger(_) => "Dagger".to_string(),
|
||||
ToolKind::Staff(_) => "Staff".to_string(),
|
||||
ToolKind::Sceptre(_) => "Sceptre".to_string(),
|
||||
ToolKind::Shield(_) => "Shield".to_string(),
|
||||
ToolKind::Debug(_) => "Debug".to_string(),
|
||||
ToolKind::Farming(_) => "Farming".to_string(),
|
||||
@ -94,6 +95,7 @@ fn get_tool_kind_kind(kind: &ToolKind) -> String {
|
||||
ToolKind::Bow(x) => x.clone(),
|
||||
ToolKind::Dagger(x) => x.clone(),
|
||||
ToolKind::Staff(x) => x.clone(),
|
||||
ToolKind::Sceptre(x) => x.clone(),
|
||||
ToolKind::Shield(x) => x.clone(),
|
||||
ToolKind::Debug(x) => x.clone(),
|
||||
ToolKind::Farming(x) => x.clone(),
|
||||
|
@ -373,7 +373,7 @@ impl Animation for AlphaAnimation {
|
||||
next.torso.orientation = Quaternion::rotation_z(0.0);
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
},
|
||||
Some(ToolKind::Staff(_)) => {
|
||||
Some(ToolKind::Staff(_)) | Some(ToolKind::Sceptre(_)) => {
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x(staff * 0.2) * Quaternion::rotation_z(staff * 0.2);
|
||||
next.l_hand.position = Vec3::new(11.0, 5.0, -4.0);
|
||||
|
@ -127,7 +127,7 @@ impl Animation for BlockAnimation {
|
||||
* Quaternion::rotation_z(-0.85);
|
||||
next.main.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Staff(_)) => {
|
||||
Some(ToolKind::Staff(_)) | Some(ToolKind::Sceptre(_)) => {
|
||||
next.l_hand.position = Vec3::new(
|
||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||
3.5 + wave_ultra_slow_cos * 0.5,
|
||||
|
@ -97,7 +97,7 @@ impl Animation for ChargeAnimation {
|
||||
|
||||
match active_tool_kind {
|
||||
//TODO: Inventory
|
||||
Some(ToolKind::Staff(_)) => {
|
||||
Some(ToolKind::Staff(_)) | Some(ToolKind::Sceptre(_)) => {
|
||||
next.l_hand.position = Vec3::new(11.0, 5.0, -4.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.27);
|
||||
next.l_hand.scale = Vec3::one() * 1.05;
|
||||
|
@ -103,7 +103,7 @@ impl Animation for EquipAnimation {
|
||||
Quaternion::rotation_x(0.0) * Quaternion::rotation_y(1.35 + 2.5);
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Staff(_)) => {
|
||||
Some(ToolKind::Staff(_)) | Some(ToolKind::Sceptre(_)) => {
|
||||
next.l_hand.position = Vec3::new(1.0, -2.0, -5.0);
|
||||
next.l_hand.orientation =
|
||||
Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.3);
|
||||
|
@ -65,7 +65,7 @@ impl Animation for ShootAnimation {
|
||||
|
||||
match active_tool_kind {
|
||||
//TODO: Inventory
|
||||
Some(ToolKind::Staff(_)) => {
|
||||
Some(ToolKind::Staff(_)) | Some(ToolKind::Sceptre(_)) => {
|
||||
next.l_hand.position = Vec3::new(11.0, 5.0, -4.0);
|
||||
next.l_hand.orientation =
|
||||
Quaternion::rotation_x(1.27) * Quaternion::rotation_y(0.0);
|
||||
|
@ -277,7 +277,7 @@ impl Animation for SwimWieldAnimation {
|
||||
* Quaternion::rotation_z(u_slowalt * 0.08);
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Staff(_)) => {
|
||||
Some(ToolKind::Staff(_)) | Some(ToolKind::Sceptre(_)) => {
|
||||
next.l_hand.position = Vec3::new(1.5, 0.5, -4.0);
|
||||
next.l_hand.orientation =
|
||||
Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.3);
|
||||
|
@ -228,7 +228,7 @@ impl Animation for WieldAnimation {
|
||||
* Quaternion::rotation_z(u_slowalt * 0.08);
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Staff(_)) => {
|
||||
Some(ToolKind::Staff(_)) | Some(ToolKind::Sceptre(_)) => {
|
||||
next.l_hand.position = Vec3::new(11.0, 5.0, -4.0);
|
||||
next.l_hand.orientation =
|
||||
Quaternion::rotation_x(1.27) * Quaternion::rotation_y(0.0);
|
||||
|
@ -77,10 +77,8 @@ impl State {
|
||||
.filter(|kind| {
|
||||
use common::comp::item::{tool::ToolKind, ItemKind};
|
||||
if let ItemKind::Tool(kind) = kind {
|
||||
if let ToolKind::Staff(kind) = &kind.kind {
|
||||
kind != "Sceptre"
|
||||
&& kind != "SceptreVelorite"
|
||||
&& kind != "StarterSceptre"
|
||||
if let ToolKind::Staff(_) = &kind.kind {
|
||||
true
|
||||
} else if let ToolKind::Debug(kind) = &kind.kind {
|
||||
kind == "Boost"
|
||||
} else {
|
||||
|
@ -620,12 +620,8 @@ impl<'a> Widget for Skillbar<'a> {
|
||||
ToolKind::Hammer(_) => self.imgs.twohhammer_m1,
|
||||
ToolKind::Axe(_) => self.imgs.twohaxe_m1,
|
||||
ToolKind::Bow(_) => self.imgs.bow_m1,
|
||||
ToolKind::Staff(kind) => match kind.as_ref() {
|
||||
"Sceptre" => self.imgs.heal_0,
|
||||
"SceptreVelorite" => self.imgs.heal_0,
|
||||
"StarterSceptre" => self.imgs.heal_0,
|
||||
_ => self.imgs.staff_m1,
|
||||
},
|
||||
ToolKind::Sceptre(_) => self.imgs.heal_0,
|
||||
ToolKind::Staff(_) => self.imgs.staff_m1,
|
||||
ToolKind::Debug(kind) => match kind.as_ref() {
|
||||
"Boost" => self.imgs.flyingrod_m1,
|
||||
_ => self.imgs.nothing,
|
||||
@ -703,12 +699,8 @@ impl<'a> Widget for Skillbar<'a> {
|
||||
Some(ToolKind::Hammer(_)) => self.imgs.hammerleap,
|
||||
Some(ToolKind::Axe(_)) => self.imgs.axespin,
|
||||
Some(ToolKind::Bow(_)) => self.imgs.bow_m2,
|
||||
Some(ToolKind::Staff(kind)) => match kind.as_ref() {
|
||||
"Sceptre" => self.imgs.heal_bomb,
|
||||
"SceptreVelorite" => self.imgs.heal_bomb,
|
||||
"StarterSceptre" => self.imgs.heal_bomb,
|
||||
_ => self.imgs.staff_m2,
|
||||
},
|
||||
Some(ToolKind::Sceptre(_)) => self.imgs.heal_bomb,
|
||||
Some(ToolKind::Staff(_)) => self.imgs.staff_m2,
|
||||
Some(ToolKind::Debug(kind)) => match kind.as_ref() {
|
||||
"Boost" => self.imgs.flyingrod_m2,
|
||||
_ => self.imgs.nothing,
|
||||
@ -725,24 +717,16 @@ impl<'a> Widget for Skillbar<'a> {
|
||||
Color::Rgba(0.3, 0.3, 0.3, 0.8)
|
||||
}
|
||||
},
|
||||
Some(ToolKind::Staff(kind)) => match kind.as_ref() {
|
||||
"Sceptre" => {
|
||||
Some(ToolKind::Sceptre(_)) => {
|
||||
if self.energy.current() as f64 >= 400.0 {
|
||||
Color::Rgba(1.0, 1.0, 1.0, 1.0)
|
||||
} else {
|
||||
Color::Rgba(0.3, 0.3, 0.3, 0.8)
|
||||
}
|
||||
},
|
||||
"SceptreVelorite" => {
|
||||
if self.energy.current() as f64 >= 400.0 {
|
||||
_ => {
|
||||
Color::Rgba(1.0, 1.0, 1.0, 1.0)
|
||||
} else {
|
||||
Color::Rgba(0.3, 0.3, 0.3, 0.8)
|
||||
}
|
||||
},
|
||||
_ => Color::Rgba(1.0, 1.0, 1.0, 1.0),
|
||||
},
|
||||
_ => Color::Rgba(1.0, 1.0, 1.0, 1.0),
|
||||
})
|
||||
.set(state.ids.m2_content, ui);
|
||||
// Slots
|
||||
|
@ -75,6 +75,7 @@ fn tool_desc(tool: &Tool, desc: &str) -> String {
|
||||
ToolKind::Bow(_) => "Bow",
|
||||
ToolKind::Dagger(_) => "Dagger",
|
||||
ToolKind::Staff(_) => "Staff",
|
||||
ToolKind::Sceptre(_) => "Sceptre",
|
||||
ToolKind::Shield(_) => "Shield",
|
||||
ToolKind::NpcWeapon(_) => "Npc Weapon",
|
||||
ToolKind::Debug(_) => "Debug",
|
||||
|
Loading…
Reference in New Issue
Block a user