Add ori_modifier for DashMelee and nerf it

* 0.6 -> 0.3 ori modifier during charge in DashMelee
This commit is contained in:
juliancoffee 2021-08-15 23:57:22 +03:00
parent e24cd2598d
commit 130ae1f429
15 changed files with 23 additions and 3 deletions

View File

@ -14,6 +14,7 @@ DashMelee(
charge_duration: 3.0,
swing_duration: 0.35,
recover_duration: 1.2,
ori_modifier: 0.3,
charge_through: false,
is_interruptible: true,
damage_kind: Slashing,

View File

@ -14,6 +14,7 @@ DashMelee(
charge_duration: 1.0,
swing_duration: 0.1,
recover_duration: 1.0,
ori_modifier: 0.3,
charge_through: false,
is_interruptible: false,
damage_kind: Crushing,

View File

@ -14,6 +14,7 @@ DashMelee(
charge_duration: 3.0,
swing_duration: 0.1,
recover_duration: 0.7,
ori_modifier: 0.3,
charge_through: false,
is_interruptible: false,
damage_kind: Crushing,

View File

@ -14,6 +14,7 @@ DashMelee(
charge_duration: 4.0,
swing_duration: 0.1,
recover_duration: 0.5,
ori_modifier: 0.3,
charge_through: false,
is_interruptible: false,
damage_kind: Piercing,

View File

@ -14,6 +14,7 @@ DashMelee(
charge_duration: 1.0,
swing_duration: 0.1,
recover_duration: 1.0,
ori_modifier: 0.3,
charge_through: false,
is_interruptible: false,
damage_kind: Crushing,

View File

@ -14,6 +14,7 @@ DashMelee(
charge_duration: 0.8,
swing_duration: 0.1,
recover_duration: 1.0,
ori_modifier: 0.3,
charge_through: false,
is_interruptible: false,
damage_kind: Crushing,

View File

@ -14,6 +14,7 @@ DashMelee(
charge_duration: 1.2,
swing_duration: 0.1,
recover_duration: 1.1,
ori_modifier: 0.3,
charge_through: false,
is_interruptible: false,
damage_kind: Crushing,

View File

@ -14,6 +14,7 @@ DashMelee(
charge_duration: 1.0,
swing_duration: 0.1,
recover_duration: 1.0,
ori_modifier: 0.3,
charge_through: false,
is_interruptible: false,
damage_kind: Crushing,

View File

@ -14,6 +14,7 @@ DashMelee(
charge_duration: 1.2,
swing_duration: 0.1,
recover_duration: 1.1,
ori_modifier: 0.3,
charge_through: false,
is_interruptible: false,
damage_kind: Crushing,

View File

@ -14,6 +14,7 @@ DashMelee(
charge_duration: 2.0,
swing_duration: 0.1,
recover_duration: 0.5,
ori_modifier: 0.3,
charge_through: false,
is_interruptible: false,
damage_kind: Crushing,

View File

@ -14,6 +14,7 @@ DashMelee(
charge_duration: 1.0,
swing_duration: 0.1,
recover_duration: 0.8,
ori_modifier: 0.3,
charge_through: false,
is_interruptible: true,
damage_kind: Piercing,

View File

@ -14,6 +14,7 @@ DashMelee(
charge_duration: 1.2,
swing_duration: 0.1,
recover_duration: 0.5,
ori_modifier: 0.3,
charge_through: true,
is_interruptible: true,
damage_kind: Piercing,

View File

@ -14,6 +14,7 @@ DashMelee(
charge_duration: 1.2,
swing_duration: 0.1,
recover_duration: 0.9,
ori_modifier: 0.3,
charge_through: false,
is_interruptible: true,
damage_kind: Piercing,

View File

@ -119,6 +119,7 @@ pub enum CharacterAbility {
charge_duration: f32,
swing_duration: f32,
recover_duration: f32,
ori_modifier: f32,
charge_through: bool,
is_interruptible: bool,
damage_kind: DamageKind,
@ -497,6 +498,7 @@ impl CharacterAbility {
charge_duration: _,
ref mut swing_duration,
ref mut recover_duration,
ori_modifier: _,
charge_through: _,
is_interruptible: _,
damage_kind: _,
@ -1531,6 +1533,7 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState {
charge_duration,
swing_duration,
recover_duration,
ori_modifier,
charge_through,
is_interruptible,
damage_kind,
@ -1552,6 +1555,7 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState {
charge_duration: Duration::from_secs_f32(*charge_duration),
swing_duration: Duration::from_secs_f32(*swing_duration),
recover_duration: Duration::from_secs_f32(*recover_duration),
ori_modifier: *ori_modifier,
is_interruptible: *is_interruptible,
damage_effect: *damage_effect,
ability_info,

View File

@ -43,6 +43,8 @@ pub struct StaticData {
pub swing_duration: Duration,
/// How long the state has until exiting
pub recover_duration: Duration,
/// How fast can you turn during charge
pub ori_modifier: f32,
/// Whether the state can be interrupted by other abilities
pub is_interruptible: bool,
/// Adds an effect onto the main damage of the attack
@ -107,13 +109,14 @@ impl CharacterBehavior for Data {
/ self.static_data.charge_duration.as_secs_f32())
.min(1.0);
handle_orientation(data, &mut update, 0.6);
handle_orientation(data, &mut update, self.static_data.ori_modifier);
handle_forced_movement(data, &mut update, ForcedMovement::Forward {
strength: self.static_data.forward_speed * charge_frac.sqrt(),
});
// This logic basically just decides if a charge should end, and prevents the
// character state spamming attacks while checking if it has hit something
// This logic basically just decides if a charge should end,
// and prevents the character state spamming attacks
// while checking if it has hit something.
if !self.exhausted {
// Hit attempt
let poise = AttackEffect::new(