mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'More-potions' into 'master'
Potion of Agility See merge request veloren/veloren!4197
This commit is contained in:
commit
dbf3ed49a9
@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- A tavern building where npcs go to relax.
|
||||
- Toggle for walking instead of running (Default: `I`).
|
||||
- Added day duration slider configuration on map creation UI.
|
||||
- Potion of Agility
|
||||
|
||||
### Changed
|
||||
|
||||
@ -74,6 +75,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Fixed offset of items carried on backs when wearing cloaks and backpacks
|
||||
- Linearize light colors on the CPU rather than in shaders on the GPU
|
||||
- You can no longer stack self buffs
|
||||
- Renamed "Burning Potion" to "Potion of Combustion"
|
||||
|
||||
### Removed
|
||||
- Medium and large potions from all loot tables
|
||||
|
27
assets/common/items/consumable/potion_agility.ron
Normal file
27
assets/common/items/consumable/potion_agility.ron
Normal file
@ -0,0 +1,27 @@
|
||||
ItemDef(
|
||||
name: "Potion of Agility",
|
||||
description: "Fly, you fools!",
|
||||
kind: Consumable(
|
||||
kind: Drink,
|
||||
effects: All([
|
||||
Buff((
|
||||
kind: Agility,
|
||||
data: (
|
||||
strength: 0.55,
|
||||
duration: Some(25),
|
||||
),
|
||||
cat_ids: [Natural],
|
||||
)),
|
||||
Buff((
|
||||
kind: PotionSickness,
|
||||
data: (
|
||||
strength: 0.5,
|
||||
duration: Some(60),
|
||||
),
|
||||
cat_ids: [Natural],
|
||||
)),
|
||||
])
|
||||
),
|
||||
quality: Moderate,
|
||||
tags: [Potion],
|
||||
)
|
@ -1,5 +1,5 @@
|
||||
ItemDef(
|
||||
name: "Burning Potion",
|
||||
name: "Potion of Combustion",
|
||||
description: "Sets the user ablaze",
|
||||
kind: Consumable(
|
||||
kind: Drink,
|
@ -31,8 +31,8 @@
|
||||
],
|
||||
craft_sprite: Some(Anvil),
|
||||
),
|
||||
"potion_burning": (
|
||||
output: ("common.items.consumable.potion_burning", 1),
|
||||
"potion_combustion": (
|
||||
output: ("common.items.consumable.potion_combustion", 1),
|
||||
inputs: [
|
||||
(Item("common.items.crafting_ing.empty_vial"), 1, false),
|
||||
(Item("common.items.crafting_ing.living_embers"), 3, false),
|
||||
@ -40,6 +40,16 @@
|
||||
],
|
||||
craft_sprite: Some(Cauldron),
|
||||
),
|
||||
"potion_agility": (
|
||||
output: ("common.items.consumable.potion_agility", 1),
|
||||
inputs: [
|
||||
(Item("common.items.crafting_ing.empty_vial"), 1, false),
|
||||
(Item("common.items.mineral.ore.veloritefrag"), 2, false),
|
||||
(Item("common.items.crafting_ing.animal_misc.raptor_feather"), 2, false),
|
||||
(Item("common.items.crafting_ing.animal_misc.viscous_ooze"), 3, 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...
|
||||
## Agility
|
||||
buff-title-agility = Agility
|
||||
buff-desc-agility = Your movement is faster, but you deal less damage, and take more damage.
|
||||
buff-stat-agility =
|
||||
Increases movement speed by { $strength }%.
|
||||
but decreases your damage by 100%,
|
||||
and increases your damage vulnerability
|
||||
by 100%.
|
||||
## Saturation
|
||||
buff-title-saturation = Saturation
|
||||
buff-desc-saturation = Gain health over time from consumables.
|
||||
@ -69,9 +77,9 @@ buff-title-parried = Parried
|
||||
buff-desc-parried = You were parried and now are slow to recover.
|
||||
## Potion sickness
|
||||
buff-title-potionsickness = Potion sickness
|
||||
buff-desc-potionsickness = Potions heal you less after recently consuming a potion.
|
||||
buff-desc-potionsickness = Potions have less positive effect on you after recently consuming a potion.
|
||||
buff-stat-potionsickness =
|
||||
Decreases the amount you heal from
|
||||
Decreases the positive effects of
|
||||
subsequent potions by { $strength }%.
|
||||
## Reckless
|
||||
buff-title-reckless = Reckless
|
||||
|
@ -3199,8 +3199,12 @@
|
||||
"voxel.object.curious_potion",
|
||||
(0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.7,
|
||||
),
|
||||
Simple("common.items.consumable.potion_burning"): VoxTrans(
|
||||
"voxel.object.potion_burning",
|
||||
Simple("common.items.consumable.potion_combustion"): VoxTrans(
|
||||
"voxel.object.potion_combustion",
|
||||
(0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.7,
|
||||
),
|
||||
Simple("common.items.consumable.potion_agility"): VoxTrans(
|
||||
"voxel.object.potion_agility",
|
||||
(0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.7,
|
||||
),
|
||||
Simple("common.items.charms.burning_charm"): VoxTrans(
|
||||
|
@ -809,7 +809,8 @@
|
||||
Simple("common.items.consumable.potion_minor"): "voxel.object.potion_red",
|
||||
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_combustion"): "voxel.object.potion_combustion",
|
||||
Simple("common.items.consumable.potion_agility"): "voxel.object.potion_agility",
|
||||
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_agility.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/object/potion_agility.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::Agility => "agility",
|
||||
BuffKind::CampfireHeal => "campfire_heal",
|
||||
BuffKind::EnergyRegen => "energy_regen",
|
||||
BuffKind::IncreaseMaxEnergy => "increase_max_energy",
|
||||
|
@ -37,6 +37,11 @@ pub enum BuffKind {
|
||||
/// Applied when drinking a potion.
|
||||
/// Strength should be the healing per second.
|
||||
Potion,
|
||||
/// Increases movement speed and vulnerability to damage as well as
|
||||
/// decreases the amount of damage dealt.
|
||||
/// Movement speed increases linearly with strength 1.0 is an 100% increase
|
||||
/// Damage vulnerability and damage reduction are both hard set to 100%
|
||||
Agility,
|
||||
/// Applied when sitting at a campfire.
|
||||
/// Strength is fraction of health restored per second.
|
||||
CampfireHeal,
|
||||
@ -177,6 +182,7 @@ impl BuffKind {
|
||||
BuffKind::Regeneration
|
||||
| BuffKind::Saturation
|
||||
| BuffKind::Potion
|
||||
| BuffKind::Agility
|
||||
| BuffKind::CampfireHeal
|
||||
| BuffKind::Frenzied
|
||||
| BuffKind::EnergyRegen
|
||||
@ -264,6 +270,13 @@ impl BuffKind {
|
||||
tick_dur: Secs(0.1),
|
||||
}]
|
||||
},
|
||||
BuffKind::Agility => vec![
|
||||
BuffEffect::MovementSpeed(
|
||||
1.0 + data.strength * stats.map_or(1.0, |s| s.move_speed_multiplier),
|
||||
),
|
||||
BuffEffect::DamageReduction(-1.0),
|
||||
BuffEffect::AttackDamage(0.0),
|
||||
],
|
||||
BuffKind::CampfireHeal => vec![BuffEffect::HealthChangeOverTime {
|
||||
rate: data.strength,
|
||||
kind: ModifierKind::Multiplicative,
|
||||
@ -351,7 +364,11 @@ impl BuffKind {
|
||||
},
|
||||
],
|
||||
BuffKind::Parried => vec![BuffEffect::AttackSpeed(0.5)],
|
||||
BuffKind::PotionSickness => vec![BuffEffect::HealReduction(data.strength)],
|
||||
//TODO: Handle potion sickness in a more general way.
|
||||
BuffKind::PotionSickness => vec![
|
||||
BuffEffect::HealReduction(data.strength),
|
||||
BuffEffect::MoveSpeedReduction(data.strength),
|
||||
],
|
||||
BuffKind::Reckless => vec![
|
||||
BuffEffect::DamageReduction(-data.strength),
|
||||
BuffEffect::AttackDamage(1.0 + data.strength),
|
||||
@ -557,6 +574,8 @@ pub enum BuffEffect {
|
||||
PoiseReduction(f32),
|
||||
/// Reduces amount healed by consumables
|
||||
HealReduction(f32),
|
||||
/// Reduces amount of speed increase by consumables
|
||||
MoveSpeedReduction(f32),
|
||||
/// Increases poise damage dealt when health is lost
|
||||
PoiseDamageFromLostHealth {
|
||||
initial_health: f32,
|
||||
|
@ -56,8 +56,10 @@ pub struct Stats {
|
||||
pub damage_reduction: f32,
|
||||
pub poise_reduction: f32,
|
||||
pub heal_multiplier: f32,
|
||||
pub move_speed_multiplier: f32,
|
||||
pub max_health_modifiers: StatsModifier,
|
||||
pub move_speed_modifier: f32,
|
||||
pub jump_modifier: f32,
|
||||
pub attack_speed_modifier: f32,
|
||||
pub friction_modifier: f32,
|
||||
pub max_energy_modifiers: StatsModifier,
|
||||
@ -83,8 +85,10 @@ impl Stats {
|
||||
damage_reduction: 0.0,
|
||||
poise_reduction: 0.0,
|
||||
heal_multiplier: 1.0,
|
||||
move_speed_multiplier: 1.0,
|
||||
max_health_modifiers: StatsModifier::default(),
|
||||
move_speed_modifier: 1.0,
|
||||
jump_modifier: 1.0,
|
||||
attack_speed_modifier: 1.0,
|
||||
friction_modifier: 1.0,
|
||||
max_energy_modifiers: StatsModifier::default(),
|
||||
|
@ -1193,7 +1193,7 @@ pub fn handle_jump(
|
||||
data.entity,
|
||||
strength * impulse / data.mass.0
|
||||
* data.scale.map_or(1.0, |s| s.0.powf(13.0).powf(0.25))
|
||||
* data.stats.move_speed_modifier,
|
||||
* data.stats.jump_modifier,
|
||||
));
|
||||
})
|
||||
.is_some()
|
||||
|
@ -664,6 +664,9 @@ fn execute_effect(
|
||||
BuffEffect::HealReduction(red) => {
|
||||
stat.heal_multiplier *= 1.0 - *red;
|
||||
},
|
||||
BuffEffect::MoveSpeedReduction(red) => {
|
||||
stat.move_speed_multiplier *= 1.0 - *red;
|
||||
},
|
||||
BuffEffect::PoiseDamageFromLostHealth {
|
||||
initial_health,
|
||||
strength,
|
||||
|
2
server/src/migrations/V53__potion_combustion.sql
Normal file
2
server/src/migrations/V53__potion_combustion.sql
Normal file
@ -0,0 +1,2 @@
|
||||
UPDATE item
|
||||
SET item_definition_id = 'common.items.consumable.potion_combustion' WHERE item_definition_id = 'common.items.consumable.potion_burning';
|
@ -109,6 +109,7 @@ pub fn localize_chat_message(
|
||||
BuffKind::Regeneration
|
||||
| BuffKind::Saturation
|
||||
| BuffKind::Potion
|
||||
| BuffKind::Agility
|
||||
| BuffKind::CampfireHeal
|
||||
| BuffKind::EnergyRegen
|
||||
| BuffKind::IncreaseMaxEnergy
|
||||
|
@ -5165,6 +5165,8 @@ 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,
|
||||
// TODO: Need unique image for Agility (uses same as Hastened atm)
|
||||
BuffKind::Agility => imgs.buff_haste_0,
|
||||
BuffKind::CampfireHeal => imgs.buff_campfire_heal_0,
|
||||
BuffKind::EnergyRegen => imgs.buff_energyplus_0,
|
||||
BuffKind::IncreaseMaxEnergy => imgs.buff_energyplus_0,
|
||||
@ -5208,6 +5210,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::Agility => localized_strings.get_msg("buff-title-agility"),
|
||||
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"),
|
||||
@ -5250,6 +5253,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::Agility => localized_strings.get_msg("buff-desc-agility"),
|
||||
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::Agility => {
|
||||
i18n.get_msg_ctx("buff-stat-agility", &i18n::fluent_args! {
|
||||
"strength" => format_float(strength * 100.0),
|
||||
})
|
||||
},
|
||||
BuffKind::Invulnerability => i18n.get_msg("buff-stat-invulnerability"),
|
||||
BuffKind::Bleeding
|
||||
| BuffKind::Burning
|
||||
@ -231,6 +236,7 @@ pub fn consumable_desc(effects: &Effects, i18n: &Localization) -> Vec<String> {
|
||||
})
|
||||
},
|
||||
BuffKind::IncreaseMaxEnergy
|
||||
| BuffKind::Agility
|
||||
| BuffKind::IncreaseMaxHealth
|
||||
| BuffKind::Invulnerability
|
||||
| BuffKind::PotionSickness
|
||||
|
Loading…
Reference in New Issue
Block a user