Package com.prineside.tdi2.gameplayMods
Class BonusStagesConfig
java.lang.Object
com.prineside.tdi2.gameplayMods.BonusStagesConfig
- All Implemented Interfaces:
KryoSerializable
-
Field Summary
Modifier and TypeFieldDescriptionint
boolean
static final ProbableBonusesProvider[]
static final String
int
int
boolean
static final String
boolean
float
boolean
int
int
float
boolean
boolean
float
float
float
float
int
static final int
static final int
static final int
boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncpy()
void
static BonusStagesConfig
static BonusStagesConfig
fromJsonString
(String jsonStr) getBonusConfig
(String key) int
int
int
getProbableBonuses
(int stageNumber, GameSystemProvider S) int
getReRollPrice
(int stage, GameSystemProvider S) Get a price of re-roll of bonuses based on a fixed value or BonusSystem.getCurrentStageGameStatistics()int
getStageRequirement
(int stageNumber) void
void
setBonusesConfig
(JsonValue json) Will overwrite existing parametersvoid
void
-
Field Details
-
SEED_RANDOM
public static final int SEED_RANDOM- See Also:
-
SEED_TAKE_FROM_LEVEL
public static final int SEED_TAKE_FROM_LEVEL- See Also:
-
SEED_TAKE_FROM_DAILY_QUEST
public static final int SEED_TAKE_FROM_DAILY_QUEST- See Also:
-
DEFAULT_CONFIG_FILE_PATH
- See Also:
-
GENERIC_PROVIDER_CLASS_PATH
- See Also:
-
DEFAULT_BONUS_PROVIDERS
-
reRollEnabled
public boolean reRollEnabled -
forceImmediateSelection
public boolean forceImmediateSelection -
replaceBonusesWithNotSatisfiedPreconditions
public boolean replaceBonusesWithNotSatisfiedPreconditions -
maxReRollsPerStage
public int maxReRollsPerStage -
maxReRollsAllTime
public int maxReRollsAllTime -
reRollPrice
public float reRollPrice -
reRollMinPrice
public float reRollMinPrice -
reRollMaxPrice
public float reRollMaxPrice -
reRollPricePerStage
public float reRollPricePerStage -
immediateBonusesChance
public float immediateBonusesChance -
persistentBonusesChance
public float persistentBonusesChance -
activeBonusesSlotLimit
public int activeBonusesSlotLimit -
chainReRoll
public boolean chainReRoll -
ignoreImpossiblePreconditions
public boolean ignoreImpossiblePreconditions -
selectedBonusAffectsRandom
public boolean selectedBonusAffectsRandom -
stageRequirements
-
endlessStageRequirement
public int endlessStageRequirement -
endlessStageRequirementPerStage
public int endlessStageRequirementPerStage -
seed
public int seed -
isFillWithDefaultBonusProviders
public boolean isFillWithDefaultBonusProviders -
bonusProviderListClassNames
-
probableBonusesProviders
-
bonusesConfig
-
-
Constructor Details
-
BonusStagesConfig
public BonusStagesConfig()
-
-
Method Details
-
write
- Specified by:
write
in interfaceKryoSerializable
-
read
- Specified by:
read
in interfaceKryoSerializable
-
cpy
-
fromJsonString
-
fromJson
-
toJson
-
fillWithDefaultBonusProviders
public void fillWithDefaultBonusProviders() -
setBonusesConfig
Will overwrite existing parameters -
getProbableBonuses
- Returns:
- array of preconfigured game mods. Will be used later by BonusSystem with its random generator
-
getBonusConfig
- Returns:
- root object of bonus's config or empty JSON object if not exists
-
getStageRequirement
public int getStageRequirement(int stageNumber) - Parameters:
stageNumber
- 1+- Returns:
- requirement for the specific stage (for example, number of enemies to kill)
-
getMaxStages
public int getMaxStages()- Returns:
- max number of bonus stages or <= 0 if infinite
-
getReRollPrice
Get a price of re-roll of bonuses based on a fixed value or BonusSystem.getCurrentStageGameStatistics()- Parameters:
stage
- bonus stage- Returns:
- amount of coins or 0 if re-roll is free (reRollMaxPrice <= 0)
-
getMaxReRollsPerStage
public int getMaxReRollsPerStage()- Returns:
- <= 0 for unlimited
-
getMaxReRollsAllTime
public int getMaxReRollsAllTime()- Returns:
- <= 0 for unlimited
-