パッケージ mechanics.energy

クラス EnergyManager

java.lang.Object
mechanics.energy.EnergyManager

public class EnergyManager extends Object
Handles particle/orb energy distribution and scheduled enemy particle drops for the combat simulation.

Energy calculation follows the standard Genshin Impact particle mechanic:

   Energy gained = count * baseValue * rangeMult * (1 + ER%)
 
where:
  • baseValue is determined by the particle's element and ParticleType (same-element vs. different-element values).
  • rangeMult is 1.0 for the active character and 0.6 for off-field characters in a 4-member party.
  • コンストラクタの詳細

    • EnergyManager

      public EnergyManager()
  • メソッドの詳細

    • distributeParticles

      public static void distributeParticles(Element particleElement, double count, ParticleType type, CombatSimulator sim)
      Distributes elemental particles or orbs to every party member.

      For neutral (Physical / null element) particles the base value is 2.0 for particles and 6.0 for orbs, irrespective of element matching. For elemental particles the base value is read from ParticleType.getValue(boolean): 3.0 same-element / 1.0 different-element for a PARTICLE, and 9.0 / 3.0 for an ORB.

      After distributing energy the simulator's CombatSimulator.notifyParticle(model.type.Element, double) hook is called so passive listeners (e.g. Raiden passive) can react.

      パラメータ:
      particleElement - element of the particle; null or Element.PHYSICAL is treated as neutral
      count - number of particles/orbs generated
      type - ParticleType.PARTICLE or ParticleType.ORB
      sim - the running combat simulator
    • distributeFlatEnergy

      public static void distributeFlatEnergy(double amount, CombatSimulator sim)
      Distributes flat energy to all party members.

      Flat energy bypasses the ER multiplier and the active/off-field range penalty; every character receives exactly amount energy.

      パラメータ:
      amount - flat energy to give each character
      sim - the running combat simulator
    • scheduleKQMSEnemyParticles

      public static void scheduleKQMSEnemyParticles(CombatSimulator sim)
      Schedules the standard KQM enemy particle drops as a TimerEvent on the simulator.

      KQM Standard: 3 Neutral Orbs per 90 s rotation (~1 Orb every 30 s). Scaled to a ~21 s window this equates to roughly 4.2 energy, approximated here as 2 Neutral Particles (2 × 2 energy = 4 energy) delivered at T=10 s.

      パラメータ:
      sim - the simulator on which the event is registered