diff --git a/CHANGELOG.md b/CHANGELOG.md index 00e2a7d..24f9a6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ This changelog covers all recorded changes after `1.0.0`, grouped by release version from the git history. +## 3.1.0 + +- Added a public passive Agility event API so integrations such as skill-tree mods can contribute additional Agility points per player. +- Applied passive Agility to both movement speed and Agility-based weapon scaling, with all contributions continuing through Ascend's configured diminishing-return curve beyond the normal investment cap. +- Added a public refresh hook so integrations can immediately update a player's movement speed after their passive Agility changes. +- Added automated coverage for passive contribution handling and attribute scaling beyond 100 combined Agility. + ## 3.0.8 - Increased Agility's default maximum movement-speed bonus from 15% to 25% so the stat retains a stronger mobility identity alongside its weapon-grade damage scaling. diff --git a/gradle.properties b/gradle.properties index eb07f83..57053a7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -56,7 +56,7 @@ mod_name=Ascend: SbA # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=All Rights Reserved # The mod version. See https://semver.org/ -mod_version=3.0.8 +mod_version=3.1.0 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/net/fretux/ascend/player/StatEffects.java b/src/main/java/net/fretux/ascend/player/StatEffects.java index 777dca9..888c3a9 100644 --- a/src/main/java/net/fretux/ascend/player/StatEffects.java +++ b/src/main/java/net/fretux/ascend/player/StatEffects.java @@ -1,5 +1,6 @@ package net.fretux.ascend.player; +import net.fretux.ascend.api.PassiveAgilityApi; import net.fretux.ascend.compat.IronsSpellbooksCompat; import net.fretux.ascend.config.AscendConfig; import net.minecraft.world.entity.LivingEntity; @@ -57,7 +58,7 @@ public final class StatEffects { AttributeInstance movement = player.getAttribute(Attributes.MOVEMENT_SPEED); if (movement == null) return; movement.removeModifier(AGILITY_SPEED_UUID); - double bonus = getAgilityMovementSpeedBonus(level); + double bonus = getAgilityMovementSpeedBonus(player, level); if (bonus > 0) movement.addTransientModifier(new AttributeModifier(AGILITY_SPEED_UUID, "Ascend Agility movement bonus", bonus, AttributeModifier.Operation.MULTIPLY_BASE)); } @@ -66,6 +67,9 @@ public final class StatEffects { public static double getStrengthKnockbackBonus(int level) { return normalized(level) * configured(AscendConfig.COMMON.strengthKnockbackBonus); } public static double getStrengthArmorPenetration(int level) { return normalized(level) * configured(AscendConfig.COMMON.strengthArmorPenetration); } public static double getAgilityMovementSpeedBonus(int level) { return normalized(level) * configured(AscendConfig.COMMON.agilityMovementSpeedBonus); } + public static double getAgilityMovementSpeedBonus(Player player, int level) { + return PassiveAgilityApi.getNormalizedAgility(player, level) * configured(AscendConfig.COMMON.agilityMovementSpeedBonus); + } public static int getMindManaBonus(int level) { return (int) Math.floor(normalized(level) * configured(AscendConfig.COMMON.mindMaxManaBonus)); } public static double getMindManaRegenBonus(int level) { return normalized(level) * configured(AscendConfig.COMMON.mindManaRegenBonus); } public static double getIntelligenceSpellPowerBonus(int level) { return normalized(level) * configured(AscendConfig.COMMON.intelligenceSpellPowerBonus); }