From b9cdfb923df1f415dbf121e9680a179671960bc2 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Wed, 29 May 2024 09:06:13 -0500 Subject: [PATCH] Fix accidental removal of knockback reduction for Warriors while blocking. Also add in knockup reduction for Warrior block. Release Build 9484. --- Adventures in Lestoria/Player.cpp | 2 ++ Adventures in Lestoria/assets/config/classes/Warrior.txt | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Adventures in Lestoria/Player.cpp b/Adventures in Lestoria/Player.cpp index c82e9485..d010c43b 100644 --- a/Adventures in Lestoria/Player.cpp +++ b/Adventures in Lestoria/Player.cpp @@ -309,6 +309,7 @@ void Player::Knockback(vf2d vel){ //A new angle will be applied, but will be constrained by whichever applied velocity is strongest (either the current velocity, or the new one). This prevents continuous uncapped velocities to knockbacks applied. if(vel==vf2d{})return; float maxVelThreshold; + if(GetState()==State::BLOCK)vel*=1-("Warrior.Right Click Ability.Knockback Reduction"_I/100.f); if(this->vel==vf2d{})maxVelThreshold=vel.mag(); else maxVelThreshold=std::max(vel.mag(),this->vel.mag()); this->vel+=vel; @@ -1446,6 +1447,7 @@ geom2d::circlePlayer::Hitbox(){ } void Player::Knockup(float duration){ + if(GetState()==State::BLOCK)duration*=1-("Warrior.Right Click Ability.Knockup Reduction"_I/100.f); knockUpTimer+=duration; totalKnockupTime+=duration; knockUpZAmt+=32*pow(duration,2); diff --git a/Adventures in Lestoria/assets/config/classes/Warrior.txt b/Adventures in Lestoria/assets/config/classes/Warrior.txt index 7b374f9c..ceb292ae 100644 --- a/Adventures in Lestoria/assets/config/classes/Warrior.txt +++ b/Adventures in Lestoria/assets/config/classes/Warrior.txt @@ -49,6 +49,10 @@ Warrior # Percentage of player's normal movement speed while block is active. SlowAmt = 0.3 + + # Percentage of knockback that gets reduced while blocking. + Knockback Reduction = 60% + Knockup Reduction = 60% } Ability 1 {