mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'sam/expose-charms' into 'master'
Charms now have crafting recipes. See merge request veloren/veloren!4179
This commit is contained in:
commit
9998dbd587
@ -2,7 +2,7 @@ ItemDef(
|
||||
legacy_name: "Blazing Charm",
|
||||
legacy_description: "Flame is your ally, harness its power to burn your foes.",
|
||||
kind: Consumable(
|
||||
kind: Drink,
|
||||
kind: Charm,
|
||||
effects: All([
|
||||
Buff((
|
||||
kind: Flame,
|
||||
@ -18,4 +18,4 @@ ItemDef(
|
||||
),
|
||||
quality: Legendary,
|
||||
tags: [],
|
||||
)
|
||||
)
|
||||
|
@ -2,7 +2,7 @@ ItemDef(
|
||||
legacy_name: "Freezing Charm",
|
||||
legacy_description: "Let your enemies feel the sting of cold as you freeze them in their tracks.",
|
||||
kind: Consumable(
|
||||
kind: Drink,
|
||||
kind: Charm,
|
||||
effects: All([
|
||||
Buff((
|
||||
kind: Frigid,
|
||||
@ -18,4 +18,4 @@ ItemDef(
|
||||
),
|
||||
quality: Legendary,
|
||||
tags: [],
|
||||
)
|
||||
)
|
||||
|
@ -2,7 +2,7 @@ ItemDef(
|
||||
legacy_name: "Siphon Charm",
|
||||
legacy_description: "Siphon your target life and use it for your own.",
|
||||
kind: Consumable(
|
||||
kind: Drink,
|
||||
kind: Charm,
|
||||
effects: All([
|
||||
Buff((
|
||||
kind: Lifesteal,
|
||||
@ -17,4 +17,4 @@ ItemDef(
|
||||
),
|
||||
quality: Legendary,
|
||||
tags: [],
|
||||
)
|
||||
)
|
||||
|
@ -2330,4 +2330,31 @@
|
||||
],
|
||||
craft_sprite: Some(CraftingBench),
|
||||
),
|
||||
"burning_charm": (
|
||||
output: ("common.items.charms.burning_charm", 1),
|
||||
inputs: [
|
||||
(Item("common.items.crafting_ing.cloth.cloth_strips"), 5, false),
|
||||
(Item("common.items.mineral.ore.veloritefrag"), 3, false),
|
||||
(Item("common.items.crafting_ing.living_embers"), 1, false),
|
||||
],
|
||||
craft_sprite: Some(Cauldron),
|
||||
),
|
||||
"frozen_charm": (
|
||||
output: ("common.items.charms.frozen_charm", 1),
|
||||
inputs: [
|
||||
(Item("common.items.crafting_ing.cloth.cloth_strips"), 5, false),
|
||||
(Item("common.items.mineral.ore.veloritefrag"), 3, false),
|
||||
(Item("common.items.crafting_ing.animal_misc.icy_fang"), 1, false),
|
||||
],
|
||||
craft_sprite: Some(Cauldron),
|
||||
),
|
||||
"lifesteal_charm": (
|
||||
output: ("common.items.charms.lifesteal_charm", 1),
|
||||
inputs: [
|
||||
(Item("common.items.crafting_ing.cloth.cloth_strips"), 5, false),
|
||||
(Item("common.items.mineral.ore.veloritefrag"), 3, false),
|
||||
(Item("common.items.crafting_ing.sentient_seed"), 1, false),
|
||||
],
|
||||
craft_sprite: Some(Cauldron),
|
||||
),
|
||||
}
|
||||
|
BIN
assets/voxygen/element/de_buffs/buff_flame.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/de_buffs/buff_flame.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/de_buffs/buff_frigid.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/de_buffs/buff_frigid.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/de_buffs/buff_lifesteal.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/de_buffs/buff_lifesteal.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -370,6 +370,7 @@ pub enum ConsumableKind {
|
||||
Drink,
|
||||
Food,
|
||||
ComplexFood,
|
||||
Charm,
|
||||
}
|
||||
|
||||
impl ItemKind {
|
||||
|
@ -53,7 +53,7 @@ impl CharacterBehavior for Data {
|
||||
let mut update = StateUpdate::from(data);
|
||||
|
||||
match self.static_data.item_kind {
|
||||
ItemUseKind::Consumable(ConsumableKind::Drink) => {
|
||||
ItemUseKind::Consumable(ConsumableKind::Drink | ConsumableKind::Charm) => {
|
||||
handle_orientation(data, &mut update, 1.0, None);
|
||||
handle_move(data, &mut update, 1.0);
|
||||
},
|
||||
@ -67,7 +67,9 @@ impl CharacterBehavior for Data {
|
||||
ItemUseKind::Consumable(ConsumableKind::Drink | ConsumableKind::Food) => {
|
||||
UsePoint::BuildupUse
|
||||
},
|
||||
ItemUseKind::Consumable(ConsumableKind::ComplexFood) => UsePoint::UseRecover,
|
||||
ItemUseKind::Consumable(ConsumableKind::ComplexFood | ConsumableKind::Charm) => {
|
||||
UsePoint::UseRecover
|
||||
},
|
||||
};
|
||||
|
||||
match self.stage_section {
|
||||
@ -187,6 +189,11 @@ impl ItemUseKind {
|
||||
Duration::from_secs_f32(4.5),
|
||||
Duration::from_secs_f32(0.5),
|
||||
),
|
||||
Self::Consumable(ConsumableKind::Charm) => (
|
||||
Duration::from_secs_f32(0.1),
|
||||
Duration::from_secs_f32(0.8),
|
||||
Duration::from_secs_f32(0.1),
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -56,6 +56,40 @@ impl Animation for ConsumeAnimation {
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.8) * Quaternion::rotation_y(move1 * -0.5);
|
||||
},
|
||||
Some(ItemUseKind::Consumable(ConsumableKind::Charm)) => {
|
||||
let (move1, move2, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, (anim_time * 6.0).sin(), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powf(0.25)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1 * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.3) * Quaternion::rotation_z((move2) * 0.25);
|
||||
next.chest.orientation = Quaternion::rotation_x(move1 * -0.2);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 0.7);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.7);
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
s_a.hand.0 - move1 * 1.5 + move2 * 1.0,
|
||||
s_a.hand.1 + move1 * 8.0,
|
||||
s_a.hand.2 + move1 * 4.0,
|
||||
);
|
||||
next.hand_l.position = Vec3::new(
|
||||
-s_a.hand.0 + move1 * 1.5 + move2 * 1.0,
|
||||
s_a.hand.1 + move1 * 8.0,
|
||||
s_a.hand.2 + move1 * 4.0,
|
||||
);
|
||||
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_z(move1 * 0.4) * Quaternion::rotation_x(move1 * 2.3);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_z(move1 * -0.4) * Quaternion::rotation_x(move1 * 2.3);
|
||||
},
|
||||
Some(ItemUseKind::Consumable(ConsumableKind::Food | ConsumableKind::ComplexFood)) => {
|
||||
let (move1, move2, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
|
||||
|
@ -785,6 +785,9 @@ image_ids! {
|
||||
buff_fury: "voxygen.element.de_buffs.buff_fury",
|
||||
buff_sunderer: "voxygen.element.de_buffs.buff_sunderer",
|
||||
buff_defiance: "voxygen.element.de_buffs.buff_defiance",
|
||||
buff_lifesteal: "voxygen.element.de_buffs.buff_lifesteal",
|
||||
buff_flame: "voxygen.element.de_buffs.buff_flame",
|
||||
buff_frigid: "voxygen.element.de_buffs.buff_frigid",
|
||||
|
||||
// Debuffs
|
||||
debuff_skull_0: "voxygen.element.de_buffs.debuff_skull_0",
|
||||
|
@ -5181,9 +5181,9 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id {
|
||||
BuffKind::Hastened => imgs.buff_haste_0,
|
||||
BuffKind::Fortitude => imgs.buff_fortitude_0,
|
||||
BuffKind::Reckless => imgs.buff_reckless,
|
||||
BuffKind::Flame => imgs.debuff_burning_0,
|
||||
BuffKind::Frigid => imgs.debuff_frozen_0,
|
||||
BuffKind::Lifesteal => imgs.buff_plus_0,
|
||||
BuffKind::Flame => imgs.buff_flame,
|
||||
BuffKind::Frigid => imgs.buff_frigid,
|
||||
BuffKind::Lifesteal => imgs.buff_lifesteal,
|
||||
// TODO: Get image
|
||||
// BuffKind::SalamanderAspect => imgs.debuff_burning_0,
|
||||
BuffKind::ImminentCritical => imgs.buff_imminentcritical,
|
||||
|
Loading…
Reference in New Issue
Block a user