mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Addressed UX feedback
This commit is contained in:
parent
acde417ca7
commit
868a42ba39
@ -538,40 +538,40 @@
|
||||
],
|
||||
),
|
||||
Custom("Flame Wyvern"): (
|
||||
primary: "common.abilities.custom.flamewyvern.firebomb",
|
||||
secondary: "common.abilities.custom.flamewyvern.fireshockwave",
|
||||
primary: Simple(None, "common.abilities.custom.flamewyvern.firebomb"),
|
||||
secondary: Simple(None, "common.abilities.custom.flamewyvern.fireshockwave"),
|
||||
abilities: [
|
||||
Simple(None, "common.abilities.custom.flamewyvern.triplestrike"),
|
||||
Simple(None, "common.abilities.custom.flamewyvern.flamethrower"),
|
||||
],
|
||||
),
|
||||
Custom("Frost Wyvern"): (
|
||||
primary: "common.abilities.custom.frostwyvern.frostbomb",
|
||||
secondary: "common.abilities.custom.frostwyvern.iceshockwave",
|
||||
primary: Simple(None, "common.abilities.custom.frostwyvern.frostbomb"),
|
||||
secondary: Simple(None, "common.abilities.custom.frostwyvern.iceshockwave"),
|
||||
abilities: [
|
||||
Simple(None, "common.abilities.custom.frostwyvern.triplestrike"),
|
||||
Simple(None, "common.abilities.custom.frostwyvern.frostthrower"),
|
||||
],
|
||||
),
|
||||
Custom("Cloud Wyvern"): (
|
||||
primary: "common.abilities.custom.cloudwyvern.windbomb",
|
||||
secondary: "common.abilities.custom.cloudwyvern.windshockwave",
|
||||
primary: Simple(None, "common.abilities.custom.cloudwyvern.windbomb"),
|
||||
secondary: Simple(None, "common.abilities.custom.cloudwyvern.windshockwave"),
|
||||
abilities: [
|
||||
Simple(None, "common.abilities.custom.cloudwyvern.triplestrike"),
|
||||
Simple(None, "common.abilities.custom.cloudwyvern.windthrower"),
|
||||
],
|
||||
),
|
||||
Custom("Sea Wyvern"): (
|
||||
primary: "common.abilities.custom.seawyvern.seabomb",
|
||||
secondary: "common.abilities.custom.seawyvern.seashockwave",
|
||||
primary: Simple(None, "common.abilities.custom.seawyvern.seabomb"),
|
||||
secondary: Simple(None, "common.abilities.custom.seawyvern.seashockwave"),
|
||||
abilities: [
|
||||
Simple(None, "common.abilities.custom.seawyvern.triplestrike"),
|
||||
Simple(None, "common.abilities.custom.seawyvern.bubblethrower"),
|
||||
],
|
||||
),
|
||||
Custom("Weald Wyvern"): (
|
||||
primary: "common.abilities.custom.wealdwyvern.firebomb",
|
||||
secondary: "common.abilities.custom.wealdwyvern.fireshockwave",
|
||||
primary: Simple(None, "common.abilities.custom.wealdwyvern.firebomb"),
|
||||
secondary: Simple(None, "common.abilities.custom.wealdwyvern.fireshockwave"),
|
||||
abilities: [
|
||||
Simple(None, "common.abilities.custom.wealdwyvern.triplestrike"),
|
||||
Simple(None, "common.abilities.custom.wealdwyvern.flamethrower"),
|
||||
|
@ -17,7 +17,7 @@ ComboMelee2(
|
||||
recover_duration: 0.15,
|
||||
movement: (
|
||||
buildup: Some(DirectedReverse(1.5)),
|
||||
swing: Some(AntiDirectedForward(3.0)),
|
||||
swing: Some(AntiDirectedForward(3.2)),
|
||||
recover: None,
|
||||
),
|
||||
ori_modifier: 0.6,
|
||||
|
@ -8,17 +8,17 @@ ComboMelee2(
|
||||
knockback: 0,
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 45.0,
|
||||
range: 5.0,
|
||||
angle: 20.0,
|
||||
),
|
||||
buildup_duration: 0.2,
|
||||
swing_duration: 0.05,
|
||||
hit_timing: 0.5,
|
||||
recover_duration: 0.05,
|
||||
movement: (
|
||||
buildup: Some(Forward(2.0)),
|
||||
swing: Some(Forward(2.0)),
|
||||
recover: None,
|
||||
buildup: Some(Forward(1.0)),
|
||||
swing: Some(Forward(1.5)),
|
||||
recover: Some(Forward(1.5)),
|
||||
),
|
||||
ori_modifier: 0.6,
|
||||
),
|
||||
|
@ -5,13 +5,14 @@ FinisherMelee(
|
||||
recover_duration: 0.6,
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 60,
|
||||
damage: 50,
|
||||
poise: 100,
|
||||
knockback: 0,
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 3.0,
|
||||
angle: 15.0,
|
||||
damage_effect: Some(StunnedVulnerable(1.0)),
|
||||
),
|
||||
minimum_combo: 10,
|
||||
)
|
@ -1,7 +1,7 @@
|
||||
DiveMelee(
|
||||
energy_cost: 25,
|
||||
vertical_speed: 5,
|
||||
buildup_duration: Some(0.2),
|
||||
buildup_duration: Some(0.1),
|
||||
movement_duration: 5,
|
||||
swing_duration: 0.1,
|
||||
recover_duration: 0.3,
|
||||
@ -21,6 +21,7 @@ DiveMelee(
|
||||
range: 2.0,
|
||||
angle: 45.0,
|
||||
multi_target: Some(Normal),
|
||||
damage_effect: Some(StunnedVulnerable(0.5)),
|
||||
),
|
||||
max_scaling: 6,
|
||||
meta: (
|
||||
|
@ -9,7 +9,7 @@ ComboMelee2(
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 4.0,
|
||||
angle: 15.0,
|
||||
angle: 30.0,
|
||||
),
|
||||
buildup_duration: 0.3,
|
||||
swing_duration: 0.15,
|
||||
@ -26,7 +26,7 @@ ComboMelee2(
|
||||
energy_regen: 0,
|
||||
),
|
||||
range: 4.0,
|
||||
angle: 15.0,
|
||||
angle: 30.0,
|
||||
),
|
||||
buildup_duration: 0.25,
|
||||
swing_duration: 0.1,
|
||||
|
@ -219,7 +219,11 @@ impl Attack {
|
||||
matches!(attack_effect.target, Some(GroupTarget::OutOfGroup))
|
||||
&& (target_dodging || !may_harm)
|
||||
};
|
||||
let is_crit = rng.gen::<f32>() < self.crit_chance;
|
||||
let is_crit = rng.gen::<f32>()
|
||||
< self.crit_chance
|
||||
* attacker
|
||||
.and_then(|a| a.stats)
|
||||
.map_or(1.0, |s| s.crit_chance_modifier);
|
||||
let mut is_applied = false;
|
||||
let mut accumulated_damage = 0.0;
|
||||
let damage_modifier = attacker
|
||||
@ -487,6 +491,19 @@ impl Attack {
|
||||
});
|
||||
}
|
||||
},
|
||||
CombatEffect::StunnedVulnerable(damage) => {
|
||||
if target.char_state.map_or(false, |cs| cs.is_stunned()) {
|
||||
let change = {
|
||||
let mut change = change;
|
||||
change.amount *= damage;
|
||||
change
|
||||
};
|
||||
emit(ServerEvent::HealthChange {
|
||||
entity: target.entity,
|
||||
change,
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -658,6 +675,7 @@ impl Attack {
|
||||
},
|
||||
// Only has an effect when attached to a damage
|
||||
CombatEffect::BuffsVulnerable(_, _) => {},
|
||||
CombatEffect::StunnedVulnerable(_) => {},
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -799,11 +817,19 @@ pub enum CombatEffect {
|
||||
/// Resets duration of all buffs of this buffkind, with some probability
|
||||
RefreshBuff(f32, BuffKind),
|
||||
/// If the target hit by an attack has this buff, they will take increased
|
||||
/// damage Only has an effect when attached to a damage, otherwise does
|
||||
/// nothing if only attached to the attack
|
||||
/// damage.
|
||||
/// Only has an effect when attached to a damage, otherwise does nothing if
|
||||
/// only attached to the attack
|
||||
// TODO: Maybe try to make it do something if tied to attack, not sure if it should double
|
||||
// count in that instance?
|
||||
BuffsVulnerable(f32, BuffKind),
|
||||
/// If the target hit by an attack is in a stunned state, they will take
|
||||
/// increased damage.
|
||||
/// Only has an effect when attached to a damage, otherwise does nothing if
|
||||
/// only attached to the attack
|
||||
// TODO: Maybe try to make it do something if tied to attack, not sure if it should double
|
||||
// count in that instance?
|
||||
StunnedVulnerable(f32),
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
|
@ -52,9 +52,9 @@ pub enum BuffKind {
|
||||
/// Strength scales the movement speed linearly. 0.5 is 150% speed, 1.0 is
|
||||
/// 200% speed. Provides regeneration at 10x the value of the strength
|
||||
Frenzied,
|
||||
/// Increases movement and attack speed.
|
||||
/// Strength scales strength of both effects linearly. 0.5 is a 50%
|
||||
/// increase, 1.0 is a 100% increase.
|
||||
/// Increases movement and attack speed, but removes chance to get critical
|
||||
/// hits. Strength scales strength of both effects linearly. 0.5 is a
|
||||
/// 50% increase, 1.0 is a 100% increase.
|
||||
Hastened,
|
||||
/// Increases resistance to incoming poise, and poise damage dealt as health
|
||||
/// is lost from the time the buff activated
|
||||
@ -227,6 +227,8 @@ pub enum BuffEffect {
|
||||
PoiseDamageFromLostHealth { initial_health: f32, strength: f32 },
|
||||
/// Modifier to the amount of damage dealt with attacks
|
||||
AttackDamage(f32),
|
||||
/// Multiplies crit chance of attacks
|
||||
CriticalChance(f32),
|
||||
}
|
||||
|
||||
/// Actual de/buff.
|
||||
@ -380,6 +382,7 @@ impl Buff {
|
||||
BuffKind::Hastened => vec![
|
||||
BuffEffect::MovementSpeed(1.0 + data.strength),
|
||||
BuffEffect::AttackSpeed(1.0 + data.strength),
|
||||
BuffEffect::CriticalChance(0.0),
|
||||
],
|
||||
BuffKind::Fortitude => vec![
|
||||
BuffEffect::PoiseReduction(nn_scaling(data.strength)),
|
||||
|
@ -58,6 +58,7 @@ pub struct Stats {
|
||||
pub max_energy_modifiers: StatsModifier,
|
||||
pub poise_damage_modifier: f32,
|
||||
pub attack_damage_modifier: f32,
|
||||
pub crit_chance_modifier: f32,
|
||||
}
|
||||
|
||||
impl Stats {
|
||||
@ -74,6 +75,7 @@ impl Stats {
|
||||
max_energy_modifiers: StatsModifier::default(),
|
||||
poise_damage_modifier: 1.0,
|
||||
attack_damage_modifier: 1.0,
|
||||
crit_chance_modifier: 1.0,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -589,5 +589,8 @@ fn execute_effect(
|
||||
BuffEffect::AttackDamage(dam) => {
|
||||
stat.attack_damage_modifier *= *dam;
|
||||
},
|
||||
BuffEffect::CriticalChance(cc) => {
|
||||
stat.crit_chance_modifier *= *cc;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -71,42 +71,27 @@ impl Animation for FinisherMeleeAnimation {
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
|
||||
let move1_fast = move1.powf(0.5);
|
||||
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1 * pullback;
|
||||
let move1_fast = move1_fast * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4);
|
||||
next.hand_r.position = Vec3::new(
|
||||
-s_a.sc.0 + 6.0 + move1_fast * -12.0,
|
||||
-4.0 + move1_fast * 3.0,
|
||||
-2.0,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.9 + move1 * 0.5);
|
||||
next.hand_r.position =
|
||||
Vec3::new(-s_a.sc.0 + 6.0 + move1 * -12.0, -4.0 + move1 * 3.0, -2.0);
|
||||
next.control.position = Vec3::new(s_a.sc.0, s_a.sc.1, s_a.sc.2);
|
||||
next.control.orientation = Quaternion::rotation_x(s_a.sc.3);
|
||||
next.control.orientation = Quaternion::rotation_x(s_a.sc.3)
|
||||
* Quaternion::rotation_z(move1 * 0.3 + move2 * -0.7);
|
||||
|
||||
next.chest.orientation = Quaternion::rotation_z(move1 * 0.6);
|
||||
next.head.orientation = Quaternion::rotation_z(move1 * -0.3);
|
||||
next.shorts.orientation = Quaternion::rotation_z(move1 * -0.4);
|
||||
next.belt.orientation = Quaternion::rotation_z(move1 * -0.2);
|
||||
next.control.orientation.rotate_x(move1 * 1.5);
|
||||
next.control.position += Vec3::new(move1 * 1.0, move1 * 1.0, move1 * 10.0);
|
||||
next.hand_l.position += Vec3::new(0.0, 0.0, move1.powi(2) * 12.0);
|
||||
next.hand_r.position += Vec3::new(0.0, 0.0, move1 * 2.0);
|
||||
next.control.orientation.rotate_x(move1 * 1.4);
|
||||
next.control.position += Vec3::new(move1 * -1.0, move1 * 2.0, move1 * 8.0);
|
||||
next.chest.orientation = Quaternion::rotation_z(move1 * 0.4);
|
||||
|
||||
next.chest.orientation.rotate_z(move2 * -0.9);
|
||||
next.head.orientation.rotate_z(move2 * 0.5);
|
||||
next.shorts.orientation.rotate_z(move2 * 0.6);
|
||||
next.belt.orientation.rotate_z(move2 * 0.3);
|
||||
next.control.orientation.rotate_x(move2 * 0.5);
|
||||
next.control.position += Vec3::new(0.0, move2 * 12.0, 0.0);
|
||||
next.control.orientation.rotate_z(move2 * -0.1);
|
||||
next.control.orientation.rotate_x(move2 * -3.0);
|
||||
next.control.orientation.rotate_z(move2 * -0.4);
|
||||
next.control.position += Vec3::new(move2 * 10.0, 0.0, move2 * -10.0);
|
||||
next.chest.orientation.rotate_z(move2 * -0.6);
|
||||
},
|
||||
Some("common.abilities.sword.defensive_counter") => {
|
||||
let (move1, move2, move3) = match stage_section {
|
||||
|
Loading…
Reference in New Issue
Block a user