Package mindustry.type
Class StatusEffect
java.lang.Object
mindustry.ctype.Content
mindustry.ctype.MappableContent
mindustry.ctype.UnlockableContent
mindustry.type.StatusEffect
- All Implemented Interfaces:
Comparable<Content>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class mindustry.ctype.Content
Content.ModContentInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionarc.struct.ObjectSet<StatusEffect>Affinity & opposite values for stat displays.arc.graphics.ColorTint color of apply effect.Effect that is displayed once when applied to a unit.booleanWhether the apply effect should display even if effect is already on the unit.floatUnit build speed multiplier.arc.graphics.ColorTint color of effect.floatDamage per frame.floatDamage dealt by the unit with the effect.booleanUnit weapon(s) disabled.floatUnit drag multiplier.booleanSpecial flag for the dynamic effect type with custom stats - do not use.Effect that happens randomly on top of the affected unit.floatChance of effect appearing.floatUnit health multiplier.protected RunnableCalled on init.floatDamage dealt by interval damage.booleanIf true, interval damage is armor piercing.floatSpacing (in ticks) between interval damage.arc.struct.ObjectSet<StatusEffect>Affinity & opposite values for stat displays.booleanSet to false to disable outline generation.booleanShould the apply effect be given a parent.booleanShould the effect be given a parent.booleanIf true, the effect never disappears.booleanIf true, this effect will only react with other effects and cannot be applied.floatUnit reload multiplier.booleanWhether to show this effect in the database.floatUnit speed multiplier.floatDamage dealt upon transition to an affinity.protected arc.struct.ObjectMap<StatusEffect,StatusEffect.TransitionHandler> Transition handler map.Fields inherited from class mindustry.ctype.UnlockableContent
allDatabaseTabs, alwaysUnlocked, databaseTabs, description, details, fullIcon, fullOverride, generateIcons, hideDatabase, hideDetails, inlineDescription, localizedName, selectionSize, shownPlanets, stats, techNode, techNodes, uiIcon, unlockedFields inherited from class mindustry.ctype.MappableContent
name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaffinity(StatusEffect effect, StatusEffect.TransitionHandler handler) voidapplied(mindustry.gen.Unit unit, float time, boolean extend) booleanapplyTransition(mindustry.gen.Unit unit, StatusEffect to, StatusEntry entry, float time) Called when transitioning between two status effects.voidcreateIcons(MultiPacker packer) Generate any special icons for this content.voiddraw(mindustry.gen.Unit unit) voiddraw(mindustry.gen.Unit unit, float time) Returns the type name of this piece of content.protected voidhandleOpposite(StatusEffect other) voidinit()Called after all content and modules are created.voidbooleanisHidden()Whether this content is always hidden in the content database dialog.voidonRemoved(mindustry.gen.Unit unit) Called when status effect is removed.protected voidopposite(StatusEffect... effect) booleanreactsWith(StatusEffect effect) voidsetStats()Initializes stats on demand.booleantoString()protected voidtrans(StatusEffect effect, StatusEffect.TransitionHandler handler) voidupdate(mindustry.gen.Unit unit, StatusEntry entry) Runs every tick on the affected unit while time is greater than 0.Methods inherited from class mindustry.ctype.UnlockableContent
checkStats, clearUnlock, displayDescription, displayExtra, emoji, emojiChar, getDependencies, getLogicId, hasEmoji, isBanned, isOnPlanet, loadIcon, locked, logicVisible, makeOutline, makeOutline, makeOutline, onUnlock, postInit, quietUnlock, researchRequirements, unlock, unlocked, unlockedHost, unlockedNow, unlockedNowHost
-
Field Details
-
damageMultiplier
public float damageMultiplierDamage dealt by the unit with the effect. -
healthMultiplier
public float healthMultiplierUnit health multiplier. -
speedMultiplier
public float speedMultiplierUnit speed multiplier. -
reloadMultiplier
public float reloadMultiplierUnit reload multiplier. -
buildSpeedMultiplier
public float buildSpeedMultiplierUnit build speed multiplier. -
dragMultiplier
public float dragMultiplierUnit drag multiplier. -
transitionDamage
public float transitionDamageDamage dealt upon transition to an affinity. -
disarm
public boolean disarmUnit weapon(s) disabled. -
damage
public float damageDamage per frame. -
intervalDamageTime
public float intervalDamageTimeSpacing (in ticks) between interval damage. <=0 to disable. -
intervalDamage
public float intervalDamageDamage dealt by interval damage. -
intervalDamagePierce
public boolean intervalDamagePierceIf true, interval damage is armor piercing. -
effectChance
public float effectChanceChance of effect appearing. -
parentizeEffect
public boolean parentizeEffectShould the effect be given a parent. -
permanent
public boolean permanentIf true, the effect never disappears. -
reactive
public boolean reactiveIf true, this effect will only react with other effects and cannot be applied. -
dynamic
public boolean dynamicSpecial flag for the dynamic effect type with custom stats - do not use. -
show
public boolean showWhether to show this effect in the database. -
color
public arc.graphics.Color colorTint color of effect. -
effect
Effect that happens randomly on top of the affected unit. -
applyEffect
Effect that is displayed once when applied to a unit. -
applyExtend
public boolean applyExtendWhether the apply effect should display even if effect is already on the unit. -
applyColor
public arc.graphics.Color applyColorTint color of apply effect. -
parentizeApplyEffect
public boolean parentizeApplyEffectShould the apply effect be given a parent. -
affinities
Affinity & opposite values for stat displays. -
opposites
Affinity & opposite values for stat displays. -
outline
public boolean outlineSet to false to disable outline generation. -
transitions
Transition handler map. -
initblock
Called on init.
-
-
Constructor Details
-
StatusEffect
-
-
Method Details
-
init
public void init()Description copied from class:ContentCalled after all content and modules are created. Do not use to load regions or texture data! -
init
-
isHidden
public boolean isHidden()Description copied from class:UnlockableContentWhether this content is always hidden in the content database dialog.- Overrides:
isHiddenin classUnlockableContent
-
setStats
public void setStats()Description copied from class:UnlockableContentInitializes stats on demand. Should only be called once. Only called before something is displayed.- Overrides:
setStatsin classUnlockableContent
-
showUnlock
public boolean showUnlock()- Overrides:
showUnlockin classUnlockableContent- Returns:
- whether to show a notification toast when this is unlocked
-
update
Runs every tick on the affected unit while time is greater than 0. -
onRemoved
public void onRemoved(mindustry.gen.Unit unit) Called when status effect is removed. -
trans
-
affinity
-
opposite
-
handleOpposite
-
draw
public void draw(mindustry.gen.Unit unit, float time) -
draw
public void draw(mindustry.gen.Unit unit) -
reactsWith
-
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 totime- The applies status effect time- Returns:
- whether a reaction occurred
-
applied
public void applied(mindustry.gen.Unit unit, float time, boolean extend) -
createIcons
Description copied from class:UnlockableContentGenerate any special icons for this content. Called synchronously. No regions are loaded at this point; grab pixmaps from the packer.- Overrides:
createIconsin classUnlockableContent
-
toString
- Overrides:
toStringin classMappableContent
-
getContentType
Description copied from class:ContentReturns the type name of this piece of content. This should return the same value for all instances of this content type.- Specified by:
getContentTypein classContent
-