mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added swiftness debuffs
This commit is contained in:
parent
db71625226
commit
5001c4a262
@ -1,6 +1,6 @@
|
||||
ItemDef(
|
||||
name: "Swiftness Potion",
|
||||
description: "Drinking gives a sudden, short burst of speed.",
|
||||
description: "Watch the walls!",
|
||||
kind: Consumable(
|
||||
kind: Drink,
|
||||
effects: All([
|
||||
@ -8,7 +8,7 @@ ItemDef(
|
||||
kind: Swiftness,
|
||||
data: (
|
||||
strength: 1.2,
|
||||
duration: Some(10),
|
||||
duration: Some(15),
|
||||
),
|
||||
cat_ids: [Natural],
|
||||
)),
|
||||
|
@ -7,10 +7,12 @@ buff-title-potion = Potion
|
||||
buff-desc-potion = Drinking...
|
||||
## Swiftness
|
||||
buff-title-swift = Swiftness
|
||||
buff-desc-swift = Your movement is faster, but you can't get critical hits.
|
||||
buff-desc-swift = Your movement is faster, but you deal less damage, and take more damage.
|
||||
buff-stat-swift =
|
||||
Removes chance of getting critical hits.
|
||||
Increases movement speed by { $strength }%
|
||||
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.
|
||||
@ -75,7 +77,7 @@ 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 have less effect on you 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 positive effects of
|
||||
subsequent potions by { $strength }%.
|
||||
|
@ -37,9 +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.
|
||||
/// 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%
|
||||
Swiftness,
|
||||
/// Applied when sitting at a campfire.
|
||||
/// Strength is fraction of health restored per second.
|
||||
@ -271,7 +272,8 @@ impl BuffKind {
|
||||
},
|
||||
BuffKind::Swiftness => vec![
|
||||
BuffEffect::MovementSpeed(1.0 + data.strength * stats.map_or(1.0, |s| s.move_speed_multiplier)),
|
||||
BuffEffect::PrecisionOverride(0.0),
|
||||
BuffEffect::DamageReduction(-1.0),
|
||||
BuffEffect::AttackDamage(0.0),
|
||||
],
|
||||
BuffKind::CampfireHeal => vec![BuffEffect::HealthChangeOverTime {
|
||||
rate: data.strength,
|
||||
|
@ -663,11 +663,9 @@ fn execute_effect(
|
||||
},
|
||||
BuffEffect::HealReduction(red) => {
|
||||
stat.heal_multiplier *= 1.0 - *red;
|
||||
print!("heal_multiplier: {}\n", stat.heal_multiplier);
|
||||
},
|
||||
BuffEffect::MoveSpeedReduction(red) => {
|
||||
stat.move_speed_multiplier *= 1.0 - *red;
|
||||
print!("move_speed_multiplier: {}\n", stat.move_speed_multiplier);
|
||||
},
|
||||
BuffEffect::PoiseDamageFromLostHealth {
|
||||
initial_health,
|
||||
|
Loading…
Reference in New Issue
Block a user