Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Ilya246/crawler_arena
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.0
Choose a base ref
...
head repository: Ilya246/crawler_arena
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on May 11, 2024

  1. upgrades paging - untested

    Ilya246 committed May 11, 2024
    Copy the full SHA
    41778d0 View commit details
  2. fix paging

    Ilya246 committed May 11, 2024
    Copy the full SHA
    6a33e1c View commit details
  3. version

    Ilya246 committed May 11, 2024
    Copy the full SHA
    93ce4ac View commit details
  4. Copy the full SHA
    ec28abe View commit details
  5. fix

    Ilya246 committed May 11, 2024
    Copy the full SHA
    55281bb View commit details
  6. all-direction mega

    Ilya246 committed May 11, 2024
    Copy the full SHA
    96f996b View commit details
  7. Copy the full SHA
    eb1db96 View commit details
  8. fixes, changes

    Ilya246 committed May 11, 2024
    Copy the full SHA
    e0f7d46 View commit details
  9. bugfixes

    Ilya246 committed May 11, 2024
    Copy the full SHA
    1dd9ccb View commit details
  10. fix?

    Ilya246 committed May 11, 2024
    Copy the full SHA
    50f7b8c View commit details
  11. ok

    Ilya246 committed May 11, 2024
    Copy the full SHA
    36983f5 View commit details

Commits on May 12, 2024

  1. Copy the full SHA
    3343ddd View commit details
  2. add psource to guaranteed

    Ilya246 committed May 12, 2024
    Copy the full SHA
    15373b7 View commit details
  3. fir reinforcement ramp

    Ilya246 committed May 12, 2024
    Copy the full SHA
    8d99324 View commit details
  4. adjust sublimate chances

    Ilya246 committed May 12, 2024
    Copy the full SHA
    ca2e298 View commit details
  5. fix drops

    Ilya246 committed May 12, 2024
    Copy the full SHA
    4a2bc90 View commit details
  6. add segment to drop table

    Ilya246 committed May 12, 2024
    Copy the full SHA
    943ddda View commit details
  7. more drop changes

    Ilya246 committed May 12, 2024
    Copy the full SHA
    fb61049 View commit details
  8. fix money

    Ilya246 committed May 12, 2024
    Copy the full SHA
    a47d992 View commit details
  9. remove debug print

    Ilya246 committed May 12, 2024
    Copy the full SHA
    f01e63e View commit details
  10. finally fix drops

    Ilya246 committed May 12, 2024
    Copy the full SHA
    7798047 View commit details
  11. unbreak waves

    Ilya246 committed May 12, 2024
    Copy the full SHA
    82df3e1 View commit details
  12. fix weight

    Ilya246 committed May 12, 2024
    Copy the full SHA
    19a078e View commit details
  13. fix 0,0 spawning possibly?

    Ilya246 committed May 12, 2024
    Copy the full SHA
    1c902f2 View commit details

Commits on May 21, 2024

  1. fix

    Ilya246 committed May 21, 2024
    Copy the full SHA
    093072a View commit details
152 changes: 107 additions & 45 deletions src/crawler_arena/CVars.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package crawler_arena;

import arc.struct.*;
import arc.math.*;
import arc.util.*;
import mindustry.content.*;
import mindustry.game.Team;
import mindustry.type.UnitType;
@@ -10,18 +12,21 @@ public class CVars{
public static int unitCap = 96;
public static float tipChance = 1f / 30000f;

public static int unitsRows = 10;

public static int bossWave = 25;
public static int maxWave = 27;
public static int crawlersCeiling = 10000000;
public static int maxUnits = 4000;
public static int keepCrawlers = 1500;
public static float crawlersExpBase = 2.2f;
public static float crawlersRamp = 1f / 1.5f;
public static float extraCrawlersRamp = 1f / 150f;
public static float crawlersMultiplier = 1f / 7f;
public static float extraCrawlersRamp = 1f / 40f;
public static float crawlersMultiplier = 1f / 5f;

public static float moneyExpBase = 2.2f;
public static float moneyRamp = 1f / 1.5f;
public static float extraMoneyRamp = 1f / 4000f;
public static float extraMoneyRamp = 1f / 26f / 26f;
public static float moneyMultiplier = 4f;

public static float enemySpeedBoost = 0.00002f;
@@ -38,21 +43,66 @@ public class CVars{
public static float reinforcementWaveDelayRamp = 4f;
public static float reinforcementWaveDelayMax = 80f;

public static Team reinforcementTeam = Team.blue;
public static Team reinforcementTeam = Team.derelict;
public static int reinforcementMinWave = 2;
public static int reinforcementSpacing = 2;
public static int reinforcementFactor = 3; // amount of reinforcements is integer-divided by this number
public static int reinforcementScaling = 2;
public static int reinforcementMax = 60 * reinforcementFactor;
public static int reinforcementSpacing = 1;
public static float reinforcementScaling = 1f / 4f;
public static float reinforcementRamp = 1f / 20f;
public static int maxAirdropSearches = 100;
public static float rareAidChance = 1f / 5f;
public static float blockDropChance = 1f / 25f;

public static ObjectIntMap<Block> aidBlockAmounts = new ObjectIntMap<>();
public static ObjectIntMap<Block> rareAidBlockAmounts = new ObjectIntMap<>();
public static Seq<Block> guaranteedAirdrops = Seq.with(Blocks.coreNucleus, Blocks.boulder);
public static float retargetChance = 30f;
public static float retargetDelay = 180f;

public static class WeightedEntry<T> {
public T value;
public float weight;

public WeightedEntry(float w, T val){
value = val;
weight = w;
}
}

public static class DropSpecifier {
public Seq<Block> blocks = new Seq<>();
public IntSeq amounts = new IntSeq();

public DropSpecifier(Block block, int amount){
blocks.add(block);
amounts.add(amount);
}

public DropSpecifier(Block[] blocks, int[] amounts){
this.blocks.addAll(blocks);
this.amounts.addAll(amounts);
}

public int size(){
return blocks.size;
}
}

public static Seq<WeightedEntry<DropSpecifier>> aidDrops = new Seq<>();
public static float aidBlocksTotal = 0f;
public static IntMap<DropSpecifier> guaranteedDrops = new IntMap<>();
public static Seq<Block> guaranteedAirdrops = Seq.with(Blocks.coreNucleus, Blocks.coreAcropolis, Blocks.boulder);
public static ObjectIntMap<UnitType> unitCosts = new ObjectIntMap<>();

public static DropSpecifier randomDrop(){
float at = Mathf.random(aidBlocksTotal);
int ind = 0;
int moveBy = Integer.highestOneBit(aidDrops.size);
while(moveBy > 0){
int nextInd = ind + moveBy;
if(nextInd < aidDrops.size && aidDrops.get(nextInd).weight < at){
ind += moveBy;
}
moveBy = moveBy >> 1;
}
return aidDrops.get(ind).value;
}

public static float playerCrawlerHealth = 400f;
public static float playerCrawlerArmor = 10f;
public static float playerCrawlerCooldown = 60f;
@@ -147,8 +197,8 @@ public class CVars{
UnitTypes.retusa, 400,
UnitTypes.oxynoe, 850,
UnitTypes.cyerce, 5000,
UnitTypes.aegires, 30000,
UnitTypes.navanax, 350000,
UnitTypes.aegires, 50000,
UnitTypes.navanax, 400000,

UnitTypes.risso, 500,
UnitTypes.minke, 750,
@@ -162,37 +212,49 @@ public class CVars{
UnitTypes.quad, 25000,
UnitTypes.oct, 250000);

aidBlockAmounts.putAll(Blocks.liquidSource, 4,
Blocks.powerSource, 4,
Blocks.itemSource, 6,
Blocks.constructor, 1,

Blocks.thoriumWallLarge, 8,
Blocks.surgeWallLarge, 4,

Blocks.mendProjector, 3,
Blocks.forceProjector, 2,
Blocks.repairPoint, 4,
Blocks.repairTurret, 2,

Blocks.overdriveProjector, 1,

Blocks.arc, 6,
Blocks.lancer, 4,
Blocks.ripple, 2,
Blocks.cyclone, 1,
Blocks.swarmer, 2,
Blocks.tsunami, 1,
Blocks.spectre, 1,
Blocks.foreshadow, 1);

rareAidBlockAmounts.putAll(Blocks.largeConstructor, 1,
Blocks.coreNucleus, 1,
Blocks.groundFactory, 1,
Blocks.airFactory, 1,
Blocks.navalFactory, 1,
Blocks.overdriveDome, 4,
Blocks.boulder, 100);
FloatSeq weights = new FloatSeq();
Seq<Block> drops = new Seq<>();
IntSeq dropAmounts = new IntSeq();
weights.addAll( 7f, 7f, 5f, 10f,
5f, 5f, 1f, 5f,
5f, 10f, 10f, 5f,
5f, 5f, 5f, 5f,
2f, 3f, 3f, 3f,
4f, 3f, 4f, 3f,
4f, 4f, 4f, 3f,
3f, 3f, 3f, 3f,
3f, 1f, 1f, 1f,
1f, 1f, 1f, 4f);
drops.addAll( Blocks.liquidSource, Blocks.powerSource, Blocks.powerNodeLarge, Blocks.itemSource,
Blocks.heatSource, Blocks.constructor, Blocks.largeConstructor, Blocks.unloader,
Blocks.container, Blocks.thoriumWallLarge, Blocks.surgeWallLarge, Blocks.mendProjector,
Blocks.forceProjector, Blocks.repairPoint, Blocks.repairTurret, Blocks.overdriveProjector,
Blocks.overdriveDome, Blocks.hyperProcessor, Blocks.arc, Blocks.scorch,
Blocks.lancer, Blocks.sublimate, Blocks.ripple, Blocks.titan,
Blocks.cyclone, Blocks.fuse, Blocks.lustre, Blocks.swarmer,
Blocks.tsunami, Blocks.spectre, Blocks.foreshadow, Blocks.scathe,
Blocks.malign, Blocks.coreNucleus, Blocks.coreAcropolis, Blocks.groundFactory,
Blocks.airFactory, Blocks.navalFactory, Blocks.boulder, Blocks.segment);
dropAmounts.addAll(4, 4, 4, 6,
4, 1, 1, 4,
2, 8, 4, 3,
2, 4, 2, 1,
1, 2, 6, 6,
4, 2, 2, 2,
2, 2, 2, 2,
1, 1, 1, 2,
1, 1, 1, 1,
1, 1, 100, 3);
for(int i = 0; i < drops.size; i++){
float weight = weights.get(i);
aidDrops.add(new WeightedEntry<>(aidBlocksTotal, new DropSpecifier(drops.get(i), dropAmounts.get(i))));
aidBlocksTotal += weight;
}

guaranteedDrops.put(16, new DropSpecifier(Blocks.largeConstructor, 1));
guaranteedDrops.put(8, new DropSpecifier(Blocks.constructor, 1));
guaranteedDrops.put(2, new DropSpecifier(new Block[]{Blocks.itemSource, Blocks.liquidSource, Blocks.heatSource, Blocks.powerSource},
new int[] {4, 4, 4, 4}));
}
public static float crawlerHealthRamp = 1f;
public static float crawlerSpeedRamp = 0.003f;
Loading