Package com.prineside.tdi2.gameplayMods
Interface ProbableBonusesProvider
- All Known Implementing Classes:
AddAllAbilityCharges.BonusProvider
,AddRandomCoreTile.BonusProvider
,AddRandomPlatform.BonusProvider
,AllAbilitiesForRandomTower.BonusProvider
,BaseExplodesOnEnemyPass.BonusProvider
,BoostExistingEnemiesWithLoot.BonusProvider
,BuildRandomMiner.BonusProvider
,CriticalDamage.BonusProvider
,DebuffsLastLonger.BonusProvider
,DepositCoinsGeneration.BonusProvider
,DoubleMiningSpeed.BonusProvider
,EnemiesDropResources.BonusProvider
,ExtraDamagePerBuff.BonusProvider
,FirstEnemiesInWaveExplode.BonusProvider
,GameValueMod.BonusProvider_AbilitiesEnergy
,GameValueMod.BonusProvider_AbilitiesMaxEnergy
,GameValueMod.BonusProvider_BountiesNearby
,GameValueMod.BonusProvider_DisableBountyModifierHarm
,GameValueMod.BonusProvider_MinersMaxUpgradeLevel
,GameValueMod.BonusProvider_TowersMaxExpLevel
,IncreasedTowerToEnemyEfficiency.BonusProvider
,IncreaseSelectedBonusesPower.BonusProvider
,LastEnemiesInWaveDealNoDamage.BonusProvider
,LightningStrikeOnTowerLevelUp.BonusProvider
,LJ_TDI.ProbableBonusesProvider_ES.LIP
,LowHpEnemiesDealNoDamage.BonusProvider
,MinedItemsTurnIntoDust.BonusProvider
,MineLegendaryItems.BonusProvider
,MinersSpawnEnemies.BonusProvider
,MoreBonusVariantsNextTime.BonusProvider
,MultiplyLootedItems.BonusProvider
,MultiplyMdps.BonusProvider
,NukeOnBonusStage.BonusProvider
,ReceiveCoins.BonusProvider
,ReceiveGreenPapers.BonusProvider
,SellAllTowers.BonusProvider
,SpawnZombiesFromBase.BonusProvider
,SummonLootBoss.BonusProvider
,TowersAttackSpeed.BonusProvider
,TowersDamage.BonusProvider
,TriggerRandomAbility.BonusProvider
public interface ProbableBonusesProvider
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends GenericGameplayMod>
voidaddOrModify
(T proto, int stage, GameplayModSystem gmSystem, com.badlogic.gdx.utils.Array<BonusProbability> out, ProbableBonusesProvider.BonusProviderConfig providerCfg, ObjectRetriever<T> existingConfigurator, ObjectRetriever<T> newConfigurator) Can be applied to both singleton and variant bonuses.void
provide
(int stageNumber, GameSystemProvider S, com.badlogic.gdx.utils.Array<BonusProbability> out)
-
Field Details
-
_TAG
- See Also:
-
-
Method Details
-
provide
void provide(int stageNumber, GameSystemProvider S, com.badlogic.gdx.utils.Array<BonusProbability> out) -
addOrModify
static <T extends GenericGameplayMod> void addOrModify(T proto, int stage, GameplayModSystem gmSystem, com.badlogic.gdx.utils.Array<BonusProbability> out, ProbableBonusesProvider.BonusProviderConfig providerCfg, @Null ObjectRetriever<T> existingConfigurator, @Null ObjectRetriever<T> newConfigurator) Can be applied to both singleton and variant bonuses. Applies common bonus provider logic: - Calculates probability based on stage and power up level, using probability from BonusProviderConfig - Searches existing mod of the same variant as proto to decide whether it is an upgrade or a new entry - If mod variant already exists (provided by BonusSystem.GAMEPLAY_MOD_SOURCE_NAME), increases its power by 1 and optionally allows to configure it with existingConfigurator (accounts for powerUpProbabilityMultiplier) - If mod variant not exists, copies proto, optionally allowing it to be configured further with newConfigurator - Adds mod to out if it allowsMultipleInstancesFromDifferentSources()- Type Parameters:
T
-- Parameters:
proto
- prototype mod for new bonus, also provides mod class. Must be pre-configured (call mod.readConfig() beforehand). cpy() of proto will be used as a new mod and will be configured by newConfigurator if providedstage
- stage number of bonuses, used to calculate probability based on minStage / maxStage / probabilityMultiplierPerStagegmSystem
- used to search for active mods of the same typeout
- output array to put configured mods with final probabilities intoproviderCfg
- bonus (variant) provider configuration, will be used to calculate probabilitiesexistingConfigurator
- (optional) called on upgraded mod if that's the case, can be used to set fields manually. Mods are already modified before this configurator is called, any field can be overwrittennewConfigurator
- (optional) same as existingConfigurator for new mods that will be added, if that's the case
-