Class StatusEffect

All Implemented Interfaces:
Comparable<Content>

public class StatusEffect extends UnlockableContent
  • Field Details

    • damageMultiplier

      public float damageMultiplier
      Damage dealt by the unit with the effect.
    • healthMultiplier

      public float healthMultiplier
      Unit health multiplier.
    • speedMultiplier

      public float speedMultiplier
      Unit speed multiplier.
    • reloadMultiplier

      public float reloadMultiplier
      Unit reload multiplier.
    • buildSpeedMultiplier

      public float buildSpeedMultiplier
      Unit build speed multiplier.
    • dragMultiplier

      public float dragMultiplier
      Unit drag multiplier.
    • transitionDamage

      public float transitionDamage
      Damage dealt upon transition to an affinity.
    • disarm

      public boolean disarm
      Unit weapon(s) disabled.
    • damage

      public float damage
      Damage per frame.
    • effectChance

      public float effectChance
      Chance of effect appearing.
    • parentizeEffect

      public boolean parentizeEffect
      Should the effect be given a parent.
    • permanent

      public boolean permanent
      If true, the effect never disappears.
    • reactive

      public boolean reactive
      If true, this effect will only react with other effects and cannot be applied.
    • show

      public boolean show
      Whether to show this effect in the database.
    • color

      public Color color
      Tint color of effect.
    • effect

      public Effect effect
      Effect that happens randomly on top of the affected unit.
    • applyEffect

      public Effect applyEffect
      Effect that is displayed once when applied to a unit.
    • applyExtend

      public boolean applyExtend
      Whether the apply effect should display even if effect is already on the unit.
    • applyColor

      public Color applyColor
      Tint color of apply effect.
    • parentizeApplyEffect

      public boolean parentizeApplyEffect
      Should the apply effect be given a parent.
    • affinities

      public ObjectSet<StatusEffect> affinities
      Affinity & opposite values for stat displays.
    • opposites

      public ObjectSet<StatusEffect> opposites
      Affinity & opposite values for stat displays.
    • outline

      public boolean outline
      Set to false to disable outline generation.
    • transitions

      Transition handler map.
    • initblock

      protected Runnable initblock
      Called on init.
  • Constructor Details

    • StatusEffect

      public StatusEffect(String name)
  • Method Details

    • init

      public void init()
      Description copied from class: Content
      Called after all content and modules are created. Do not use to load regions or texture data!
      Overrides:
      init in class Content
    • init

      public void init(Runnable run)
    • isHidden

      public boolean isHidden()
      Description copied from class: UnlockableContent
      Whether this content is always hidden in the content database dialog.
      Overrides:
      isHidden in class UnlockableContent
    • setStats

      public void setStats()
      Description copied from class: UnlockableContent
      Initializes stats on demand. Should only be called once. Only called before something is displayed.
      Overrides:
      setStats in class UnlockableContent
    • showUnlock

      public boolean showUnlock()
      Overrides:
      showUnlock in class UnlockableContent
      Returns:
      whether to show a notification toast when this is unlocked
    • update

      public void update(mindustry.gen.Unit unit, float time)
      Runs every tick on the affected unit while time is greater than 0.
    • trans

      protected void trans(StatusEffect effect, StatusEffect.TransitionHandler handler)
    • affinity

      protected void affinity(StatusEffect effect, StatusEffect.TransitionHandler handler)
    • opposite

      protected void opposite(StatusEffect... effect)
    • handleOpposite

      protected void handleOpposite(StatusEffect other)
    • draw

      public void draw(mindustry.gen.Unit unit, float time)
    • draw

      public void draw(mindustry.gen.Unit unit)
    • reactsWith

      public boolean reactsWith(StatusEffect effect)
    • applyTransition

      public boolean applyTransition(mindustry.gen.Unit unit, StatusEffect to, StatusEntry entry, float time)
      Called when transitioning between two status effects.
      Parameters:
      to - The state to transition to
      time - The applies status effect time
      Returns:
      whether a reaction occurred
    • applied

      public void applied(mindustry.gen.Unit unit, float time, boolean extend)
    • createIcons

      public void createIcons(MultiPacker packer)
      Description copied from class: UnlockableContent
      Generate any special icons for this content. Called synchronously. No regions are loaded at this point; grab pixmaps from the packer.
      Overrides:
      createIcons in class UnlockableContent
    • toString

      public String toString()
      Overrides:
      toString in class MappableContent
    • getContentType

      public ContentType getContentType()
      Description copied from class: Content
      Returns the type name of this piece of content. This should return the same value for all instances of this content type.
      Specified by:
      getContentType in class Content