Package com.prineside.tdi2.gameplayMods
Interface GameplayMod
- All Known Implementing Classes:
AbstractGameValueMod
,AddAllAbilityCharges
,AddRandomCoreTile
,AddRandomPlatform
,AllAbilitiesForRandomTower
,BaseExplodesOnEnemyPass
,BoostExistingEnemiesWithLoot
,BuildRandomMiner
,CriticalDamage
,DebuffsLastLonger
,DepositCoinsGeneration
,DoubleMiningSpeed
,EnemiesDropResources
,ExtraDamagePerBuff
,FirstEnemiesInWaveExplode
,GenericGameplayMod
,GV_AbilitiesEnergy
,GV_AbilitiesMaxEnergy
,GV_BountiesNearby
,GV_DisableBountyModifierHarm
,GV_MinersMaxUpgradeLevel
,GV_TowersMaxExpLevel
,IncreasedTowerToEnemyEfficiency
,IncreaseSelectedBonusesPower
,LastEnemiesInWaveDealNoDamage
,LightningStrikeOnTowerLevelUp
,LowHpEnemiesDealNoDamage
,MinedItemsTurnIntoDust
,MineLegendaryItems
,MinersSpawnEnemies
,MoreBonusVariantsNextTime
,MultiplyLootedItems
,MultiplyMdps
,NukeOnBonusStage
,ReceiveCoins
,ReceiveGreenPapers
,SellAllTowers
,SpawnZombiesFromBase
,SummonLootBoss
,TowersAttackSpeed
,TowersDamage
,TriggerRandomAbility
public interface GameplayMod
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
default void
cpy()
default GameplayModCategory
getIcon()
getId()
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 onedefault int
default ObjectSupplier<CharSequence>
default int
getPower()
default boolean
default boolean
boolean
isPowerLevelUpgradedByOtherMod
(int level) void
markPowerLevelUpgradedByOtherMod
(int level) Called when some specific mods upgrade other mods To make it clear for the player which bonuses were affected, these levels are marked with a different colorboolean
register
(GameSystemProvider S, String activatedBy) Note: if mod needs random number generator, it must use the one provided by GameplayModSystemdefault void
setRegisteredPower
(int newPower) If mod has adjustable power, this method can be called during the game to increase its powervoid
setReplacesUnsatisfiedMod
(GameplayMod replacedMod) Mark this mod as a replacement for some other mod whose preconditions were not satisfied
-
Method Details
-
getId
String getId()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 -
getIcon
Drawable getIcon() -
getDescription
CharSequence getDescription() -
cpy
GameplayMod cpy() -
getNotSatisfiedPreconditions
- Returns:
- description of a not satisfied preconditions or null if bonus can be enabled
-
isImmediateAndNotListed
default boolean isImmediateAndNotListed() -
isAlwaysUseless
-
allowsMultipleInstancesFromDifferentSources
default boolean allowsMultipleInstancesFromDifferentSources()- Returns:
- true if multiple mods of the same type can be enabled at the same time (from different sources)
-
getPower
default int getPower()- Returns:
- current power of the mod. Higher power makes mod more effective
-
getMaxPower
default int getMaxPower()- Returns:
- max possible power of the mod. If set to <=1f, it is assumed that mod has a single fixed power
-
setRegisteredPower
default void setRegisteredPower(int newPower) If mod has adjustable power, this method can be called during the game to increase its power- Parameters:
newPower
- new power to set for this mod when already registered. Will be in range 0..getMaxPower()
-
markPowerLevelUpgradedByOtherMod
void markPowerLevelUpgradedByOtherMod(int level) Called when some specific mods upgrade other mods To make it clear for the player which bonuses were affected, these levels are marked with a different color -
isPowerLevelUpgradedByOtherMod
boolean isPowerLevelUpgradedByOtherMod(int level) -
setReplacesUnsatisfiedMod
Mark this mod as a replacement for some other mod whose preconditions were not satisfied -
getReplacesUnsatisfiedMod
- Returns:
- mod previously set by setReplacesUnsatisfiedMod()
-
configure
-
register
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
GameplayModCategory getCategory() -
getAdditionalCategory
-