Class AbstractSwirlElementalReaction

java.lang.Object
io.github.xrickastley.sevenelements.element.reaction.ElementalReaction
io.github.xrickastley.sevenelements.element.reaction.AbstractSwirlElementalReaction
Direct Known Subclasses:
CryoSwirlElementalReaction, ElectroSwirlElementalReaction, FrozenSwirlElementalReaction, HydroSwirlElementalReaction, PyroSwirlElementalReaction

  • Field Details

    • swirlElement

      private final Element swirlElement
    • elementalAbsorptionOnly

      private final boolean elementalAbsorptionOnly
  • Constructor Details

    • AbstractSwirlElementalReaction

      AbstractSwirlElementalReaction(ElementalReaction.Settings settings)
      Creates a Swirl reaction with the specified settings.

      The specified aura element will serve as the "swirlable" element.

      For example, if the Aura Element is Element.PYRO, then the Pyro element is swirled and spread to nearby targets (r=3m).

      For the Gauge Units applied by the Swirl reaction, as well as its duration, you may refer here: <a href=https://genshin-impact.fandom.com/wiki/Elemental_Gauge_Theory/Advanced_Mechanics#Swirl_Elemental_Application"> Swirl Elemental Application
      Parameters:
      settings - The Settings for this ElementalReaction.
    • AbstractSwirlElementalReaction

      AbstractSwirlElementalReaction(ElementalReaction.Settings settings, boolean elementalAbsorptionOnly)
      Creates a Swirl reaction with the specified settings.

      The "swirlable" element is the spread element upon triggering the swirl reaction.

      For example, if the swirlable Element is Element.PYRO, then the Pyro element is swirled and spread to nearby targets (r=3m).

      For the Gauge Units applied by the Swirl reaction, as well as its duration, you may refer here: <a href=https://genshin-impact.fandom.com/wiki/Elemental_Gauge_Theory/Advanced_Mechanics#Swirl_Elemental_Application"> Swirl Elemental Application
      Parameters:
      settings - The Settings for this ElementalReaction.
      elementalAbsorptionOnly - Whether Swirl will only deal its Elemental Absorption damage to the Swirl target instead, i.e. the entity the Swirl reaction was triggered on.
    • AbstractSwirlElementalReaction

      AbstractSwirlElementalReaction(ElementalReaction.Settings settings, Element swirlElement)
      Creates a Swirl reaction with the specified settings.

      The "swirlable" element is the spread element upon triggering the swirl reaction.

      For example, if the swirlable Element is Element.PYRO, then the Pyro element is swirled and spread to nearby targets (r=3m).

      For the Gauge Units applied by the Swirl reaction, as well as its duration, you may refer here: <a href=https://genshin-impact.fandom.com/wiki/Elemental_Gauge_Theory/Advanced_Mechanics#Swirl_Elemental_Application"> Swirl Elemental Application
      Parameters:
      settings - The Settings for this ElementalReaction.
      swirlElement - The element to Swirl.
  • Method Details

    • onReaction

      protected void onReaction(LivingEntity entity, ElementalApplication auraElement, ElementalApplication triggeringElement, double reducedGauge, @Nullable @Nullable LivingEntity origin)
      Description copied from class: ElementalReaction
      The function to execute after the Elemental Reaction has been triggered. This function is executed after both elements have reacted and have been reduced.
      Specified by:
      onReaction in class ElementalReaction
      Parameters:
      entity - The LivingEntity this Elemental Reaction was triggered on.
      auraElement - The aura element that triggered this reaction.
      triggeringElement - The triggering element that reacted with the aura element.
      reducedGauge - The gauge units reduced from both Elements. This will always be Math.min(auraElementGU, triggeringElementGU * reactionCoefficient)
      origin - The LivingEntity that triggered this Elemental Reaction.