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 {