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, GV_AbilitiesEnergy.BonusProvider, GV_AbilitiesMaxEnergy.BonusProvider, GV_BountiesNearby.BonusProvider, GV_DisableBountyModifierHarm.BonusProvider, GV_MinersMaxUpgradeLevel.BonusProvider, GV_TowersMaxExpLevel.BonusProvider, IncreasedTowerToEnemyEfficiency.BonusProvider, IncreaseSelectedBonusesPower.BonusProvider, LastEnemiesInWaveDealNoDamage.BonusProvider, LightningStrikeOnTowerLevelUp.BonusProvider, 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
  • Field Details

  • Method Details

    • provide

      void provide(int stageNumber, BonusStagesConfig stagesCfg, Array<GameplayModSystem.ActiveMod> activeMods, Array<ProbableBonus> out)
    • addOrModify

      @Null static <T extends GenericGameplayMod> ProbableBonus addOrModify(T proto, int stage, Array<GameplayModSystem.ActiveMod> activeMods, ProbableBonusesProvider.BonusProviderConfig providerCfg)
      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 provided
      stage - stage number of bonuses, used to calculate probability based on minStage / maxStage / probabilityMultiplierPerStage
      activeMods - used to search for active mods of the same type
      providerCfg - bonus (variant) provider configuration, will be used to calculate probabilities