Class AbstractAttributeSource

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Map<String, DoubleArray> getValues() 基础数值型属性加成映射。键:属性名称 值:该属性的数值范围 [min, max],用于支持随机化(如 “造成 10~15 点额外伤害”)。这些值通常以 加法方式 叠加到基础属性上。
      Unit setValues(Map<String, DoubleArray> values) 基础数值型属性加成映射。键:属性名称 值:该属性的数值范围 [min, max],用于支持随机化(如 “造成 10~15 点额外伤害”)。这些值通常以 加法方式 叠加到基础属性上。
      Map<String, DoubleArray> getPercents() 百分比型属性加成映射。键:属性名称 值:百分比范围 [min, max]。这些值通常在基础值计算完成后,以 乘法或加成比例 方式应用。
      Unit setPercents(Map<String, DoubleArray> percents) 百分比型属性加成映射。键:属性名称 值:百分比范围 [min, max]。这些值通常在基础值计算完成后,以 乘法或加成比例 方式应用。
      <Error class: unknown class><SourceRemoveTrigger> getSourceRemoveTriggers() 定义该属性来源在何种事件触发时应被自动移除。
      Unit )>setSourceRemoveTriggers(<Error class: unknown class><SourceRemoveTrigger> sourceRemoveTriggers) 定义该属性来源在何种事件触发时应被自动移除。
      Map<String, Object> getMetadata()
      String getName() 属性来源的唯一标识名称。用于注册、查询和移除该来源(例如:"armor_set_bonus"、"potion_strength_ii"、"skill_inferno")。 同名来源会被覆盖。
      Unit setName(String name) 属性来源的唯一标识名称。用于注册、查询和移除该来源(例如:"armor_set_bonus"、"potion_strength_ii"、"skill_inferno")。 同名来源会被覆盖。
      Long getTime() 过期时间戳(毫秒),由 System.currentTimeMillis() 计算得出。
      • 若值为 -1L,表示永久有效(不会自动过期);

      • 否则,当当前时间 ≥ time 时,该来源应被视为失效并从实体中移除。

      Unit setTime(Long time) 过期时间戳(毫秒),由 System.currentTimeMillis() 计算得出。
      • 若值为 -1L,表示永久有效(不会自动过期);

      • 否则,当当前时间 ≥ time 时,该来源应被视为失效并从实体中移除。

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractAttributeSource

        AbstractAttributeSource(String name, Long time)
    • Method Detail

      • getValues

         Map<String, DoubleArray> getValues()

        基础数值型属性加成映射。

        键:属性名称 值:该属性的数值范围 [min, max],用于支持随机化(如 “造成 10~15 点额外伤害”)。

        这些值通常以 加法方式 叠加到基础属性上。

      • setValues

         Unit setValues(Map<String, DoubleArray> values)

        基础数值型属性加成映射。

        键:属性名称 值:该属性的数值范围 [min, max],用于支持随机化(如 “造成 10~15 点额外伤害”)。

        这些值通常以 加法方式 叠加到基础属性上。

      • getPercents

         Map<String, DoubleArray> getPercents()

        百分比型属性加成映射。

        键:属性名称 值:百分比范围 [min, max]

        这些值通常在基础值计算完成后,以 乘法或加成比例 方式应用。

      • setPercents

         Unit setPercents(Map<String, DoubleArray> percents)

        百分比型属性加成映射。

        键:属性名称 值:百分比范围 [min, max]

        这些值通常在基础值计算完成后,以 乘法或加成比例 方式应用。

      • getName

         String getName()

        属性来源的唯一标识名称。

        用于注册、查询和移除该来源(例如:"armor_set_bonus"、"potion_strength_ii"、"skill_inferno")。 同名来源会被覆盖。

      • setName

         Unit setName(String name)

        属性来源的唯一标识名称。

        用于注册、查询和移除该来源(例如:"armor_set_bonus"、"potion_strength_ii"、"skill_inferno")。 同名来源会被覆盖。

      • getTime

         Long getTime()

        过期时间戳(毫秒),由 System.currentTimeMillis() 计算得出。

        • 若值为 -1L,表示永久有效(不会自动过期);

        • 否则,当当前时间 ≥ time 时,该来源应被视为失效并从实体中移除。

      • setTime

         Unit setTime(Long time)

        过期时间戳(毫秒),由 System.currentTimeMillis() 计算得出。

        • 若值为 -1L,表示永久有效(不会自动过期);

        • 否则,当当前时间 ≥ time 时,该来源应被视为失效并从实体中移除。