Skip to content

Commit

Permalink
Reintroduced charge skill gauge limit
Browse files Browse the repository at this point in the history
This fixes broken charge skill behavior when using test weapons with >70% cast speed, like missing gauges and animations (introduced by 671f855)
  • Loading branch information
neon-dev committed Nov 11, 2024
1 parent 3639646 commit 1f9adbe
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ protected void updateCastDurationAndSpeed() {
if (skillTemplate.getType() == SkillType.MAGICAL || skillMethod == SkillMethod.CHARGE) {
if (isPhysicalCharge) {
castDuration = (int) effector.getGameStats().getPositiveStat(StatEnum.ATTACK_SPEED, baseCastDuration);
castSpeedForAnimationBoostAndChargeSkills = (float) castDuration / baseCastDuration;
} else {
castDuration = effector.getGameStats().getPositiveReverseStat(StatEnum.BOOST_CASTING_TIME, baseCastDuration);
boostValue = effector.getGameStats().getPositiveReverseStat(StatEnum.BOOST_CASTING_TIME_SKILL, baseCastDuration);
Expand Down Expand Up @@ -388,6 +387,9 @@ protected void updateCastDurationAndSpeed() {

if (castDuration < 0)
castDuration = 0;

if (skillTemplate.isCharge())
castSpeedForAnimationBoostAndChargeSkills = Math.max(0.3f, (float) castDuration / baseCastDuration);
}

protected void updateHitTime(boolean checkAnimation) {
Expand Down

1 comment on commit 1f9adbe

@neon-dev
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.