This commit is contained in:
Sam 2023-05-27 18:00:04 -04:00
parent 188be17b95
commit 98f33f0633
5 changed files with 137 additions and 22 deletions

View File

@ -5,5 +5,5 @@ SelfBuff(
buff_kind: Defiance, buff_kind: Defiance,
buff_strength: 0.4, buff_strength: 0.4,
buff_duration: Some(20.0), buff_duration: Some(20.0),
energy_cost: /*20*/0, energy_cost: 20,
) )

View File

@ -1,22 +1,27 @@
ComboMelee2( FinisherMelee(
strikes: [ energy_cost: 0,
( buildup_duration: 0.2,
swing_duration: 0.1,
recover_duration: 0.3,
melee_constructor: ( melee_constructor: (
kind: Slash( kind: Hook(
damage: 4, damage: 10,
poise: 5, poise: 10,
knockback: 0, pull: 5,
energy_regen: 5,
), ),
scaled: Some(Hook(
damage: 1,
poise: 1,
pull: 0.5,
)),
range: 3.0, range: 3.0,
angle: 45.0, angle: 30.0,
), ),
buildup_duration: 0.15, minimum_combo: 1,
swing_duration: 0.05, scaling: Some((
hit_timing: 0.5, target: Attack,
recover_duration: 0.1, kind: Linear,
ori_modifier: 0.6, max_factor: 20,
), )),
], combo_consumption: Half,
energy_cost_per_strike: 0,
) )

View File

@ -857,7 +857,7 @@ impl CombatEffect {
strength, strength,
}) => CombatEffect::Knockback(Knockback { }) => CombatEffect::Knockback(Knockback {
direction, direction,
strength: strength * stats.buff_strength, strength: strength * stats.effect_power,
}), }),
CombatEffect::EnergyReward(e) => CombatEffect::EnergyReward(e), CombatEffect::EnergyReward(e) => CombatEffect::EnergyReward(e),
CombatEffect::Lifesteal(l) => CombatEffect::Lifesteal(l * stats.effect_power), CombatEffect::Lifesteal(l) => CombatEffect::Lifesteal(l * stats.effect_power),

View File

@ -227,6 +227,53 @@ impl MeleeConstructor {
.with_effect(knockback) .with_effect(knockback)
.with_combo(self.combo_gain) .with_combo(self.combo_gain)
}, },
Hook {
damage,
poise,
pull,
} => {
let buff = CombatEffect::Buff(CombatBuff {
kind: BuffKind::Bleeding,
dur_secs: 5.0,
strength: CombatBuffStrength::DamageFraction(0.2),
chance: 0.1,
})
.adjusted_by_stats(tool_stats);
let mut damage = AttackDamage::new(
Damage {
source: DamageSource::Melee,
kind: DamageKind::Piercing,
value: damage,
},
Some(GroupTarget::OutOfGroup),
instance,
)
.with_effect(buff);
if let Some(damage_effect) = self.damage_effect {
damage = damage.with_effect(damage_effect);
}
let poise =
AttackEffect::new(Some(GroupTarget::OutOfGroup), CombatEffect::Poise(poise))
.with_requirement(CombatRequirement::AnyDamage);
let knockback = AttackEffect::new(
Some(GroupTarget::OutOfGroup),
CombatEffect::Knockback(Knockback {
strength: pull,
direction: KnockbackDir::Towards,
})
.adjusted_by_stats(tool_stats),
)
.with_requirement(CombatRequirement::AnyDamage);
Attack::default()
.with_damage(damage)
.with_crit(crit_chance, crit_mult)
.with_effect(poise)
.with_effect(knockback)
.with_combo(self.combo_gain)
},
NecroticVortex { NecroticVortex {
damage, damage,
pull, pull,
@ -398,6 +445,22 @@ impl MeleeConstructor {
pull: scale_values(a_pull, b_pull), pull: scale_values(a_pull, b_pull),
lifesteal: scale_values(a_lifesteal, b_lifesteal), lifesteal: scale_values(a_lifesteal, b_lifesteal),
}, },
(
Hook {
damage: a_damage,
poise: a_poise,
pull: a_pull,
},
Hook {
damage: b_damage,
poise: b_poise,
pull: b_pull,
},
) => Hook {
damage: scale_values(a_damage, b_damage),
poise: scale_values(a_poise, b_poise),
pull: scale_values(a_pull, b_pull),
},
( (
SonicWave { SonicWave {
damage: a_damage, damage: a_damage,
@ -469,6 +532,11 @@ pub enum MeleeConstructorKind {
knockback: f32, knockback: f32,
energy_regen: f32, energy_regen: f32,
}, },
Hook {
damage: f32,
poise: f32,
pull: f32,
},
NecroticVortex { NecroticVortex {
damage: f32, damage: f32,
pull: f32, pull: f32,
@ -513,6 +581,14 @@ impl MeleeConstructorKind {
*damage *= stats.power; *damage *= stats.power;
*poise *= stats.effect_power; *poise *= stats.effect_power;
}, },
Hook {
ref mut damage,
ref mut poise,
pull: _,
} => {
*damage *= stats.power;
*poise *= stats.effect_power;
},
NecroticVortex { NecroticVortex {
ref mut damage, ref mut damage,
pull: _, pull: _,

View File

@ -293,6 +293,40 @@ impl Animation for FinisherMeleeAnimation {
next.control.position += Vec3::new(move2 * 17.0, move2 * 3.0, 0.0); next.control.position += Vec3::new(move2 * 17.0, move2 * 3.0, 0.0);
next.torso.orientation.rotate_z(move2_raw * -TAU) next.torso.orientation.rotate_z(move2_raw * -TAU)
}, },
Some("common.abilities.axe.keelhaul") => {
let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time),
_ => (0.0, 0.0, 0.0),
};
let pullback = 1.0 - move3;
let move1 = move1 * pullback;
let move2 = move2 * pullback;
next.hand_l.position = Vec3::new(s_a.ahl.0, s_a.ahl.1, s_a.ahl.2);
next.hand_l.orientation =
Quaternion::rotation_x(s_a.ahl.3) * Quaternion::rotation_y(s_a.ahl.4);
next.hand_r.position = Vec3::new(s_a.ahr.0, s_a.ahr.1, s_a.ahr.2);
next.hand_r.orientation =
Quaternion::rotation_x(s_a.ahr.3) * Quaternion::rotation_z(s_a.ahr.5);
next.control.position = Vec3::new(s_a.ac.0, s_a.ac.1, s_a.ac.2);
next.control.orientation = Quaternion::rotation_x(s_a.ac.3)
* Quaternion::rotation_y(s_a.ac.4)
* Quaternion::rotation_z(s_a.ac.5);
next.control.orientation.rotate_z(move1 * -3.3);
next.control.orientation.rotate_x(move1 * 0.8);
next.control.position +=
Vec3::new(move1 * 4.0, move1 * 4.0 - move2 * 6.0, move1 * 10.0);
next.chest.orientation.rotate_z(move2 * 1.2);
next.head.orientation.rotate_z(move2 * -0.5);
next.belt.orientation.rotate_z(move2 * -0.3);
next.shorts.orientation.rotate_z(move2 * -0.9);
next.control.orientation.rotate_z(move2 * -1.2);
},
_ => {}, _ => {},
} }