Class AttributeEvaluator
java.lang.Object
net.chen.legacyLand.item.attribute.AttributeEvaluator
属性动态修正工具类
根据玩家所属国家的科技等级计算物品实际效能
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildTechWarningLore(org.bukkit.entity.Player player, ItemAttributes attrs) 生成 Lore 警告行(科技不足时显示红色提示)static doublegetEffectiveAttackDamage(org.bukkit.entity.Player player, ItemAttributes attrs) 计算物品在当前玩家国家科技下的实际攻击力static doublegetEfficiencyRatio(org.bukkit.entity.Player player, ItemAttributes attrs) 获取效能比例(0.0 ~ 1.0) 满足科技需求返回 1.0,不足则按比例降低static intgetNationTierForLine(org.bukkit.entity.Player player, String lineId) 获取玩家所属国家在指定科技线上已达到的最高 tierstatic booleanmeetsTechRequirement(org.bukkit.entity.Player player, ItemAttributes attrs) 是否满足科技需求
-
Method Details
-
getEffectiveAttackDamage
public static double getEffectiveAttackDamage(org.bukkit.entity.Player player, ItemAttributes attrs) 计算物品在当前玩家国家科技下的实际攻击力 -
getEfficiencyRatio
获取效能比例(0.0 ~ 1.0) 满足科技需求返回 1.0,不足则按比例降低 -
meetsTechRequirement
是否满足科技需求 -
getNationTierForLine
获取玩家所属国家在指定科技线上已达到的最高 tier -
buildTechWarningLore
生成 Lore 警告行(科技不足时显示红色提示)
-