Class IncreasedTowerToEnemyEfficiency

java.lang.Object
com.prineside.tdi2.gameplayMods.GenericGameplayMod
com.prineside.tdi2.gameplayMods.mods.IncreasedTowerToEnemyEfficiency
All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable, GameplayMod

public final class IncreasedTowerToEnemyEfficiency extends GenericGameplayMod
  • Field Details

  • Constructor Details

    • IncreasedTowerToEnemyEfficiency

      public IncreasedTowerToEnemyEfficiency(TowerType towerType, EnemyType enemyType)
  • 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
    • getId

      public String getId()
      Description copied from interface: GameplayMod
      Used to identify and compare mods instead of comparing mod classes and variants (if mod allows multiple variants) For example, GameValueMod may have many variants and should generate a separate id for each one
      Specified by:
      getId in interface GameplayMod
      Overrides:
      getId in class GenericGameplayMod
    • getIcon

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

      public CharSequence getDescription()
    • 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()
    • cpy

      public GameplayMod cpy()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getNotSatisfiedPreconditions

      public CharSequence getNotSatisfiedPreconditions(GameSystemProvider S)
      Returns:
      description of a not satisfied preconditions or null if bonus can be enabled
    • register

      public boolean register(GameSystemProvider S, String by)
      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()
    • applyConfig

      public IncreasedTowerToEnemyEfficiency applyConfig(com.badlogic.gdx.utils.JsonValue cfg)
      For global config of the mod
      Overrides:
      applyConfig in class GenericGameplayMod