Bugfix/acrobatics roll chance (#5094)

* Fix acrobatics

* Move acrobatics damage reduction inside success check
This commit is contained in:
Ineusia 2024-09-28 16:21:44 -04:00 committed by GitHub
parent 8b81c9aafe
commit 3d7810c568
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -77,6 +77,8 @@ public class Roll extends AcrobaticsSubSkill {
return false;
}
// Roll happened, reduce damage, send messages and XP
if (rollResult.isRollSuccess()) {
// Clear out the damage from falling so that way our modified damage doesn't get re-reduced by protection/feather falling
entityDamageEvent.setDamage(0);
// Send the damage is MAGIC so that it cuts through all resistances
@ -87,8 +89,6 @@ public class Roll extends AcrobaticsSubSkill {
entityDamageEvent.setCancelled(true);
}
// Roll happened, send messages and XP
if (rollResult.isRollSuccess()) {
final String key
= rollResult.isGraceful() ? GRACEFUL_ROLL_ACTIVATED_LOCALE_STR_KEY : ROLL_ACTIVATED_LOCALE_KEY;
sendPlayerInformation(mmoPlayer.getPlayer(), NotificationType.SUBSKILL_MESSAGE, key);