mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Changed scornful swipe to only give buff on successful hits. Nerfed knockback on most hammer abilities.
This commit is contained in:
parent
b6fbcbb204
commit
904623a003
@ -8,7 +8,7 @@ BasicMelee(
|
||||
kind: Bash(
|
||||
damage: 15,
|
||||
poise: 15,
|
||||
knockback: 10,
|
||||
knockback: 5,
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 3,
|
||||
|
@ -10,14 +10,14 @@ DashMelee(
|
||||
kind: Bash(
|
||||
damage: 6,
|
||||
poise: 10,
|
||||
knockback: 6,
|
||||
knockback: 0,
|
||||
energy_regen: 0,
|
||||
),
|
||||
scaled: Some((
|
||||
kind: Bash(
|
||||
damage: 9,
|
||||
poise: 15,
|
||||
knockback: 9,
|
||||
knockback: 5,
|
||||
energy_regen: 0,
|
||||
))),
|
||||
range: 4.0,
|
||||
|
@ -23,7 +23,7 @@ BasicMelee(
|
||||
attack_effect: Some((
|
||||
Knockback((
|
||||
direction: Up,
|
||||
strength: 20,
|
||||
strength: 10,
|
||||
)),
|
||||
AnyDamage,
|
||||
)),
|
||||
|
@ -10,14 +10,14 @@ DashMelee(
|
||||
kind: Bash(
|
||||
damage: 8,
|
||||
poise: 12,
|
||||
knockback: 8,
|
||||
knockback: 0,
|
||||
energy_regen: 0,
|
||||
),
|
||||
scaled: Some((
|
||||
kind: Bash(
|
||||
damage: 12,
|
||||
poise: 18,
|
||||
knockback: 12,
|
||||
knockback: 7.5,
|
||||
energy_regen: 0,
|
||||
))),
|
||||
range: 4.0,
|
||||
|
@ -7,7 +7,7 @@ FinisherMelee(
|
||||
kind: Bash(
|
||||
damage: 25,
|
||||
poise: 30,
|
||||
knockback: 10,
|
||||
knockback: 5,
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 4.0,
|
||||
|
@ -7,7 +7,7 @@ FinisherMelee(
|
||||
kind: Bash(
|
||||
damage: 20,
|
||||
poise: 20,
|
||||
knockback: 12,
|
||||
knockback: 6,
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 4.0,
|
||||
|
@ -8,7 +8,7 @@ RiposteMelee(
|
||||
kind: Bash(
|
||||
damage: 20,
|
||||
poise: 30,
|
||||
knockback: 10,
|
||||
knockback: 5,
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 4.0,
|
||||
|
@ -13,9 +13,12 @@ BasicMelee(
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 15.0,
|
||||
damage_effect: SelfBuff((
|
||||
kind: ScornfulTaunt,
|
||||
dur_secs: 20.0,
|
||||
strength: Value(0.5),
|
||||
chance: 1.0,
|
||||
)),
|
||||
),
|
||||
ori_modifier: 0.6,
|
||||
meta: (
|
||||
init_event: Some(GainBuff(kind: ScornfulTaunt, strength: 0.5, duration: Some(20.0))),
|
||||
),
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ Shockwave(
|
||||
recover_duration: 0.6,
|
||||
damage: 60,
|
||||
poise_damage: 80,
|
||||
knockback: (strength: 25.0, direction: Up),
|
||||
knockback: (strength: 10.0, direction: Up),
|
||||
shockwave_angle: 360.0,
|
||||
shockwave_vertical_angle: 45.0,
|
||||
shockwave_speed: 8.0,
|
||||
|
@ -5,7 +5,7 @@ Shockwave(
|
||||
recover_duration: 0.3,
|
||||
damage: 30,
|
||||
poise_damage: 40,
|
||||
knockback: (strength: 15.0, direction: Up),
|
||||
knockback: (strength: 5.0, direction: Up),
|
||||
shockwave_angle: 60.0,
|
||||
shockwave_vertical_angle: 45.0,
|
||||
shockwave_speed: 10.0,
|
||||
|
@ -22,7 +22,7 @@ BasicMelee(
|
||||
attack_effect: Some((
|
||||
Knockback((
|
||||
direction: Up,
|
||||
strength: 30,
|
||||
strength: 15,
|
||||
)),
|
||||
AnyDamage,
|
||||
)),
|
||||
|
@ -5,7 +5,7 @@ ComboMelee2(
|
||||
kind: Bash(
|
||||
damage: 15,
|
||||
poise: 15,
|
||||
knockback: 5,
|
||||
knockback: 3,
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 4.0,
|
||||
|
@ -12,7 +12,7 @@ ChargedMelee(
|
||||
kind: Bash(
|
||||
damage: 40,
|
||||
poise: 100,
|
||||
knockback: 20,
|
||||
knockback: 2,
|
||||
energy_regen: 30,
|
||||
))),
|
||||
range: 4.5,
|
||||
|
@ -594,6 +594,21 @@ impl Attack {
|
||||
});
|
||||
}
|
||||
},
|
||||
CombatEffect::SelfBuff(b) => {
|
||||
if let Some(attacker) = attacker {
|
||||
if rng.gen::<f32>() < b.chance {
|
||||
emitters.emit(BuffEvent {
|
||||
entity: attacker.entity,
|
||||
buff_change: BuffChange::Add(b.to_self_buff(
|
||||
time,
|
||||
attacker,
|
||||
applied_damage,
|
||||
strength_modifier,
|
||||
)),
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -788,7 +803,23 @@ impl Attack {
|
||||
},
|
||||
// Only has an effect when attached to a damage
|
||||
CombatEffect::BuffsVulnerable(_, _) => {},
|
||||
// Only has an effect when attached to a damage
|
||||
CombatEffect::StunnedVulnerable(_) => {},
|
||||
CombatEffect::SelfBuff(b) => {
|
||||
if let Some(attacker) = attacker {
|
||||
if rng.gen::<f32>() < b.chance {
|
||||
emitters.emit(BuffEvent {
|
||||
entity: target.entity,
|
||||
buff_change: BuffChange::Add(b.to_self_buff(
|
||||
time,
|
||||
attacker,
|
||||
accumulated_damage,
|
||||
strength_modifier,
|
||||
)),
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -978,6 +1009,8 @@ pub enum CombatEffect {
|
||||
// TODO: Maybe try to make it do something if tied to attack, not sure if it should double
|
||||
// count in that instance?
|
||||
StunnedVulnerable(f32),
|
||||
/// Applies buff to yourself after attack is applied
|
||||
SelfBuff(CombatBuff),
|
||||
}
|
||||
|
||||
impl CombatEffect {
|
||||
@ -1016,6 +1049,17 @@ impl CombatEffect {
|
||||
CombatEffect::StunnedVulnerable(v) => {
|
||||
CombatEffect::StunnedVulnerable(v * stats.effect_power)
|
||||
},
|
||||
CombatEffect::SelfBuff(CombatBuff {
|
||||
kind,
|
||||
dur_secs,
|
||||
strength,
|
||||
chance,
|
||||
}) => CombatEffect::SelfBuff(CombatBuff {
|
||||
kind,
|
||||
dur_secs,
|
||||
strength: strength * stats.buff_strength,
|
||||
chance,
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1358,6 +1402,35 @@ impl CombatBuff {
|
||||
attacker_info.and_then(|a| a.mass),
|
||||
)
|
||||
}
|
||||
|
||||
fn to_self_buff(
|
||||
self,
|
||||
time: Time,
|
||||
attacker_info: AttackerInfo,
|
||||
damage: f32,
|
||||
strength_modifier: f32,
|
||||
) -> Buff {
|
||||
// TODO: Generate BufCategoryId vec (probably requires damage overhaul?)
|
||||
let source = BuffSource::Character {
|
||||
by: attacker_info.uid,
|
||||
};
|
||||
let dest_info = DestInfo {
|
||||
stats: attacker_info.stats,
|
||||
mass: attacker_info.mass,
|
||||
};
|
||||
Buff::new(
|
||||
self.kind,
|
||||
BuffData::new(
|
||||
self.strength.to_strength(damage, strength_modifier),
|
||||
Some(Secs(self.dur_secs as f64)),
|
||||
),
|
||||
Vec::new(),
|
||||
source,
|
||||
time,
|
||||
dest_info,
|
||||
attacker_info.mass,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_weapon_kinds(inv: &Inventory) -> (Option<ToolKind>, Option<ToolKind>) {
|
||||
|
Loading…
Reference in New Issue
Block a user