Interface EquipmentTransform

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 EquipmentTransform
Pure conversion hook. The engine owns input consumption, output identity and persistence.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Selected equipment and its conversion rule, validated by the host before invoking a handler.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Chooses whether the configured single output is produced; failure still destroys the input.
  • Method Details

    • producesOutput

      boolean producesOutput(EquipmentTransform.Input input, IntSupplier percentile)
      Chooses whether the configured single output is produced; failure still destroys the input. The hook must be deterministic and must not mutate game state or use another random source.
      Parameters:
      input - immutable selected equipment and authored rule
      percentile - deterministic draws in the inclusive range 0 to 99
      Returns:
      whether to produce exactly one configured output resource