Class AbstractGameValueMod

java.lang.Object
com.prineside.tdi2.gameplayMods.GenericGameplayMod
com.prineside.tdi2.gameplayMods.mods.AbstractGameValueMod
All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable, GameplayMod
Direct Known Subclasses:
GV_AbilitiesEnergy, GV_AbilitiesMaxEnergy, GV_BountiesNearby, GV_DisableBountyModifierHarm, GV_MinersMaxUpgradeLevel, GV_TowersMaxExpLevel

public abstract class AbstractGameValueMod extends GenericGameplayMod
  • Field Details

    • gvType

      public GameValueType gvType
    • mainCategory

      public GameplayModCategory mainCategory
    • additionalCategory

      public GameplayModCategory additionalCategory
    • baseValue

      public float baseValue
    • deltaPerPower

      public float deltaPerPower
    • roundToInt

      public boolean roundToInt
    • isFinalMultiplier

      public boolean isFinalMultiplier
  • Constructor Details

  • Method Details

    • write

      public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output)
      Specified by:
      write in interface com.esotericsoftware.kryo.KryoSerializable
      Overrides:
      write in class GenericGameplayMod
    • read

      public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input)
      Specified by:
      read in interface com.esotericsoftware.kryo.KryoSerializable
      Overrides:
      read in class GenericGameplayMod
    • getIcon

      public com.badlogic.gdx.scenes.scene2d.utils.Drawable getIcon()
    • applyConfig

      public AbstractGameValueMod applyConfig(com.badlogic.gdx.utils.JsonValue cfg)
      Description copied from class: GenericGameplayMod
      Usually there's no need to override this method Used by mods that have specific combinations of parameters and read default parameters for each combo
      Overrides:
      applyConfig in class GenericGameplayMod
    • getDescription

      public CharSequence getDescription()
    • register

      public boolean register(GameSystemProvider S, String activatedBy)
      Description copied from interface: GameplayMod
      Note: if mod needs random number generator, it must use the one provided by GameplayModSystem
      Returns:
      true if bonus has to be registered. False means that existing active mod of the same type has been upgraded
    • getCategory

      public GameplayModCategory getCategory()
    • getAdditionalCategory

      public GameplayModCategory getAdditionalCategory()
    • setRegisteredPower

      public void setRegisteredPower(int power)
      Description copied from interface: GameplayMod
      If mod has adjustable power, this method can be called during the game to increase its power
      Specified by:
      setRegisteredPower in interface GameplayMod
      Overrides:
      setRegisteredPower in class GenericGameplayMod
      Parameters:
      power - new power to set for this mod when already registered. Will be in range 0..getMaxPower()