StatCalculator

interface StatCalculator

能力值计算器

采用第三世代及之后的常规能力值公式:

HP = floor((2 * base + IV + floor(EV / 4)) * level / 100) + level + 10

Other = floor((floor((2 * base + IV + floor(EV / 4)) * level / 100) + 5) * nature / 100)

其中 nature 以百分比传入,提升为 110,不修正为 100,下降为 90

Author

lishangbu

Since

2026/2/26

Inheritors

Functions

Link copied to clipboard
abstract fun calculateStat(base: Int, iv: Int, ev: Int, level: Int, nature: Int): Int

按第三世代及之后的常规公式计算给定等级的能力值

Link copied to clipboard
abstract fun support(stateInternalName: String): Boolean

判断是否支持计算指定属性