Interface SpellStatModifier

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SpellStatModifier
Callback for calculating a modified SpellStat value.
  • Field Details

  • Method Details

    • modify

      double modify(double base, double modified, SpellCastContext context)
      Calculates a modified value.
      Parameters:
      base - The base value being modified.
      modified - The modified value with all previous modifications.
      context - The SpellCastContext to use.
      Returns:
      A modified value.
    • add

      static SpellStatModifier add(double value)
      Parameters:
      value - The value to add.
      Returns:
      A spell stat modifier that adds the given value to the modified value.
    • multiply

      static SpellStatModifier multiply(double value)
      Parameters:
      value - The value to multiply with.
      Returns:
      A spell stat modifier that multiplies the given value with the modified value.
    • addMultipliedBase

      static SpellStatModifier addMultipliedBase(double value)
      Parameters:
      value - The value to multiply with.
      Returns:
      A spell stat modifier that adds the base value, multiplied with the given value, to the modified value.
    • addMultipliedTotal

      static SpellStatModifier addMultipliedTotal(double value)
      Parameters:
      value - The value to multiply with.
      Returns:
      A spell stat modifier that adds the modified value, multiplied with the given value, to the modified value.