Package mindustry.maps
Class SectorDamage
java.lang.Object
mindustry.maps.SectorDamage
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
apply
(float fraction) static void
Applies wave damage based on sector parameters.static float
getDamage
(SectorInfo info) static float
getDamage
(SectorInfo info, int wavesPassed) static float
getDamage
(SectorInfo info, int wavesPassed, boolean retWave) static int
getWavesSurvived
(SectorInfo info) static void
writeParameters
(SectorInfo info) Calculates damage simulation parameters before a game is saved.
-
Field Details
-
maxRetWave
public static final int maxRetWave- See Also:
-
maxWavesSimulated
public static final int maxWavesSimulated- See Also:
-
-
Constructor Details
-
SectorDamage
public SectorDamage()
-
-
Method Details
-
getDamage
- Returns:
- calculated capture progress of the enemy
-
getDamage
- Returns:
- calculated capture progress of the enemy
-
getWavesSurvived
- Returns:
- maximum waves survived, up to maxRetWave.
-
getDamage
- Returns:
- calculated capture progress of the enemy if retWave if false, otherwise return the maximum waves survived as int. if it survives all the waves, returns maxRetWave.
-
applyCalculatedDamage
public static void applyCalculatedDamage()Applies wave damage based on sector parameters. -
writeParameters
Calculates damage simulation parameters before a game is saved. -
apply
public static void apply(float fraction)
-