mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added swiftness and regeneration potions
This commit is contained in:
parent
e9ae0a4c9e
commit
0bb74f9efe
19
assets/common/items/consumable/potion_regeneration.ron
Normal file
19
assets/common/items/consumable/potion_regeneration.ron
Normal file
@ -0,0 +1,19 @@
|
||||
ItemDef(
|
||||
name: "Regeneration Potion",
|
||||
description: "You must have lost an arm and a leg to need this.",
|
||||
kind: Consumable(
|
||||
kind: Drink,
|
||||
effects: All([
|
||||
Buff((
|
||||
kind: Regeneration,
|
||||
data: (
|
||||
strength: 2.0,
|
||||
duration: Some(60),
|
||||
),
|
||||
cat_ids: [Natural],
|
||||
)),
|
||||
])
|
||||
),
|
||||
quality: Moderate,
|
||||
tags: [Potion],
|
||||
)
|
19
assets/common/items/consumable/potion_swiftness.ron
Normal file
19
assets/common/items/consumable/potion_swiftness.ron
Normal file
@ -0,0 +1,19 @@
|
||||
ItemDef(
|
||||
name: "Swiftness Potion",
|
||||
description: "Makes you go faster.",
|
||||
kind: Consumable(
|
||||
kind: Drink,
|
||||
effects: All([
|
||||
Buff((
|
||||
kind: Swiftness,
|
||||
data: (
|
||||
strength: 0.25,
|
||||
duration: Some(300),
|
||||
),
|
||||
cat_ids: [Natural],
|
||||
)),
|
||||
])
|
||||
),
|
||||
quality: Moderate,
|
||||
tags: [Potion],
|
||||
)
|
@ -40,6 +40,25 @@
|
||||
],
|
||||
craft_sprite: Some(Cauldron),
|
||||
),
|
||||
"potion_swiftness": (
|
||||
output: ("common.items.consumable.potion_swiftness", 1),
|
||||
inputs: [
|
||||
(Item("common.items.crafting_ing.empty_vial"), 1, false),
|
||||
(Item("common.items.crafting_ing.honey"), 3, false),
|
||||
(Item("common.items.crafting_ing.animal_misc.viscous_ooze"), 1, false),
|
||||
],
|
||||
craft_sprite: Some(Cauldron),
|
||||
),
|
||||
"potion_regeneration": (
|
||||
output: ("common.items.consumable.potion_regeneration", 1),
|
||||
inputs: [
|
||||
(Item("common.items.crafting_ing.empty_vial"), 1, false),
|
||||
(Item("common.items.consumable.potion_minor"), 1, false),
|
||||
(Item("common.items.crafting_ing.sentient_seed"), 1, false),
|
||||
(Item("common.items.crafting_ing.animal_misc.viscous_ooze"), 1, false),
|
||||
],
|
||||
craft_sprite: Some(Cauldron),
|
||||
),
|
||||
"potion_s": (
|
||||
output: ("common.items.consumable.potion_minor", 1),
|
||||
inputs: [
|
||||
|
@ -5,6 +5,14 @@ buff-stat-health = Restores { $str_total } Health
|
||||
## Potion
|
||||
buff-title-potion = Potion
|
||||
buff-desc-potion = Drinking...
|
||||
## Swiftness
|
||||
buff-title-swift = Swiftness
|
||||
buff-desc-swift = Your movement is faster, but you're more vulnerable to damage and can't get critical hits.
|
||||
buff-stat-swift =
|
||||
Removes chance of getting critical hits.
|
||||
Increases movement speed,
|
||||
and increases damage taken,
|
||||
by { $strength }%
|
||||
## Saturation
|
||||
buff-title-saturation = Saturation
|
||||
buff-desc-saturation = Gain health over time from consumables.
|
||||
|
@ -3203,6 +3203,14 @@
|
||||
"voxel.object.potion_burning",
|
||||
(0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.7,
|
||||
),
|
||||
Simple("common.items.consumable.potion_swiftness"): VoxTrans(
|
||||
"voxel.object.potion_swiftness",
|
||||
(0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.7,
|
||||
),
|
||||
Simple("common.items.consumable.potion_regeneration"): VoxTrans(
|
||||
"voxel.object.potion_regeneration",
|
||||
(0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.7,
|
||||
),
|
||||
Simple("common.items.charms.burning_charm"): VoxTrans(
|
||||
"voxel.object.burning_charm",
|
||||
(0.0, 0.0, 0.0), (-80.0, 15.0, 15.0), 1.0,
|
||||
|
@ -810,6 +810,8 @@
|
||||
Simple("common.items.consumable.potion_big"): "voxel.object.potion_red",
|
||||
Simple("common.items.consumable.curious_potion"): "voxel.object.curious_potion",
|
||||
Simple("common.items.consumable.potion_burning"): "voxel.object.potion_burning",
|
||||
Simple("common.items.consumable.potion_swiftness"): "voxel.object.potion_swiftness",
|
||||
Simple("common.items.consumable.potion_regeneration"): "voxel.object.potion_regeneration",
|
||||
Simple("common.items.charms.burning_charm"): "voxel.object.burning_charm",
|
||||
Simple("common.items.charms.frozen_charm"): "voxel.object.frozen_charm",
|
||||
Simple("common.items.charms.lifesteal_charm"): "voxel.object.lifesteal_charm",
|
||||
|
BIN
assets/voxygen/voxel/object/potion_regeneration.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/object/potion_regeneration.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/object/potion_swiftness.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/object/potion_swiftness.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -155,6 +155,7 @@ lazy_static! {
|
||||
BuffKind::Bleeding => "bleeding",
|
||||
BuffKind::Cursed => "cursed",
|
||||
BuffKind::Potion => "potion",
|
||||
BuffKind::Swiftness => "swiftness",
|
||||
BuffKind::CampfireHeal => "campfire_heal",
|
||||
BuffKind::EnergyRegen => "energy_regen",
|
||||
BuffKind::IncreaseMaxEnergy => "increase_max_energy",
|
||||
|
@ -37,6 +37,10 @@ pub enum BuffKind {
|
||||
/// Applied when drinking a potion.
|
||||
/// Strength should be the healing per second.
|
||||
Potion,
|
||||
/// Increases movement speed and vulnerability to damage and removes chance to get critical hits.
|
||||
/// Movement speed and vulnerability to damage increase linearly with strength,
|
||||
/// 1.0 is an 100% increase for both.
|
||||
Swiftness,
|
||||
/// Applied when sitting at a campfire.
|
||||
/// Strength is fraction of health restored per second.
|
||||
CampfireHeal,
|
||||
@ -171,6 +175,7 @@ impl BuffKind {
|
||||
BuffKind::Regeneration
|
||||
| BuffKind::Saturation
|
||||
| BuffKind::Potion
|
||||
| BuffKind::Swiftness
|
||||
| BuffKind::CampfireHeal
|
||||
| BuffKind::Frenzied
|
||||
| BuffKind::EnergyRegen
|
||||
@ -257,6 +262,11 @@ impl BuffKind {
|
||||
tick_dur: Secs(0.1),
|
||||
}]
|
||||
},
|
||||
BuffKind::Swiftness => vec![
|
||||
BuffEffect::MovementSpeed(1.0 + data.strength),
|
||||
BuffEffect::DamageReduction(-data.strength),
|
||||
BuffEffect::PrecisionOverride(0.0),
|
||||
],
|
||||
BuffKind::CampfireHeal => vec![BuffEffect::HealthChangeOverTime {
|
||||
rate: data.strength,
|
||||
kind: ModifierKind::Multiplicative,
|
||||
|
@ -109,6 +109,7 @@ pub fn localize_chat_message(
|
||||
BuffKind::Regeneration
|
||||
| BuffKind::Saturation
|
||||
| BuffKind::Potion
|
||||
| BuffKind::Swiftness
|
||||
| BuffKind::CampfireHeal
|
||||
| BuffKind::EnergyRegen
|
||||
| BuffKind::IncreaseMaxEnergy
|
||||
|
@ -5160,6 +5160,7 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id {
|
||||
BuffKind::Regeneration => imgs.buff_plus_0,
|
||||
BuffKind::Saturation => imgs.buff_saturation_0,
|
||||
BuffKind::Potion => imgs.buff_potion_0,
|
||||
BuffKind::Swiftness => imgs.buff_plus_0,
|
||||
BuffKind::CampfireHeal => imgs.buff_campfire_heal_0,
|
||||
BuffKind::EnergyRegen => imgs.buff_energyplus_0,
|
||||
BuffKind::IncreaseMaxEnergy => imgs.buff_energyplus_0,
|
||||
@ -5202,6 +5203,7 @@ pub fn get_buff_title(buff: BuffKind, localized_strings: &Localization) -> Cow<s
|
||||
BuffKind::Regeneration => localized_strings.get_msg("buff-title-heal"),
|
||||
BuffKind::Saturation => localized_strings.get_msg("buff-title-saturation"),
|
||||
BuffKind::Potion => localized_strings.get_msg("buff-title-potion"),
|
||||
BuffKind::Swiftness => localized_strings.get_msg("buff-title-swift"),
|
||||
BuffKind::CampfireHeal => localized_strings.get_msg("buff-title-campfire_heal"),
|
||||
BuffKind::EnergyRegen => localized_strings.get_msg("buff-title-energy_regen"),
|
||||
BuffKind::IncreaseMaxHealth => localized_strings.get_msg("buff-title-increase_max_health"),
|
||||
@ -5243,6 +5245,7 @@ pub fn get_buff_desc(buff: BuffKind, data: BuffData, localized_strings: &Localiz
|
||||
BuffKind::Regeneration => localized_strings.get_msg("buff-desc-heal"),
|
||||
BuffKind::Saturation => localized_strings.get_msg("buff-desc-saturation"),
|
||||
BuffKind::Potion => localized_strings.get_msg("buff-desc-potion"),
|
||||
BuffKind::Swiftness => localized_strings.get_msg("buff-desc-swift"),
|
||||
BuffKind::CampfireHeal => {
|
||||
localized_strings.get_msg_ctx("buff-desc-campfire_heal", &i18n::fluent_args! {
|
||||
"rate" => data.strength * 100.0
|
||||
|
@ -189,6 +189,11 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec<String> {
|
||||
"strength" => format_float(strength * 100.0),
|
||||
})
|
||||
},
|
||||
BuffKind::Swiftness => {
|
||||
i18n.get_msg_ctx("buff-stat-swift", &i18n::fluent_args! {
|
||||
"strength" => format_float(strength * 100.0),
|
||||
})
|
||||
},
|
||||
BuffKind::Invulnerability => i18n.get_msg("buff-stat-invulnerability"),
|
||||
BuffKind::Bleeding
|
||||
| BuffKind::Burning
|
||||
@ -230,6 +235,7 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec<String> {
|
||||
})
|
||||
},
|
||||
BuffKind::IncreaseMaxEnergy
|
||||
| BuffKind::Swiftness
|
||||
| BuffKind::IncreaseMaxHealth
|
||||
| BuffKind::Invulnerability
|
||||
| BuffKind::PotionSickness
|
||||
|
Loading…
Reference in New Issue
Block a user