Important

The numbers and enemy types in the below information are subject to change during development as Design balances the game. Please don’t hardcode any of this, and make appropriate accomodations in your architechture.

The following parameters will change throughout the run, making it more difficult to win encounters and forcing the player to improve their build and stats.

Enemy Quantity

The quantity of enemies that spawn in each encounter will depend on the district the player is in, and how far they are into the district.

The number of enemies that spawn should increase linearly throughout the district until the player reaches the final boss. This should be limited by the maximum spawn capacity of the arena that was randomly chosen.

amount = max(floor(a + p(b - a)), m)

- a: the amount to spawn at the start of the district
- b: the amount to spawn at the end of the district
- p: the player's progress through the district, as a float percentage from 0 to 1
- m: the max spawn capacity of the arena

Use these values for now:

  • District 1: 2 - 4 enemies
  • District 2: 3 - 5 enemies
  • District 3: 3 - 6 enemies

Enemy Types

Once a quantity has been selected, the types and distribution of enemies that spawn should be defined using the following schema (please use more fitting variable names if you think of any):

spawnTypes = [
	{
		progress: 0.0 // progress through district, from 0 to 1
		types: [
			{
				type: 'goon', // enemy type
				proportion: 1.0 // percentage of the spawn pool, from 0 to 1
				max?: 999 // max number that we can spawn (optional)
			}
		]
	},
	{
		progress: 0.25
		types: [
			{
				type: 'goon',
				proportion: 0.6
			},
			{
				type: 'drill',
				proportion: 0.4
			},
		]
	},
	{
		progress: 0.75
		types: [
			{
				type: 'drill',
				proportion: 0.2
			},
			{
				type: 'supporter',
				proportion: 0.8,
				max: 1 // only one supporter will spawn
			},
		]
	},
	etc...
]
  • The battle should use whichever distribution is the lower of the two that it’s between. (If there’s one defined for 0.25 and 0.75, and we’re halfway though the district, it should use the 0.25 distribution.)
  • It should be possible to define multiple distributions for the same progress. If there are multiple with identical progress, the game should randomly pick one of them.
  • When the player loops (i.e. defeats the final boss) for the first time, disregard the enemy type selections, and randomly select from all enemy types. (This means enemies that only appear in District 3 will also appear in District 1 and 2).

Use these values for now:

District 1

  • 0%: 100% goons
  • 25%: 60% goons, 40% drills
  • 50%: 20% goons, 60% drills, 20% grenadiers
  • 50%: 20% goons, 20% drills, 60% grenadiers
  • 75%: 20% goons, 20% drills, 60% supporter (max 1)
  • 75%: 20% goons, 20% grenadiers, 60% supporter (max 1)

District 2

  • 0%: 80% grenadier, 20% riots
  • 25%: 50% grenadier, 25% riot, 25% server (max 1)
  • 50%: 20% supporters, 60% pyros, 20% riots
  • 50%: 20% server (max 1), 20% pyros, 60% riots
  • 75%: 20% drills, 20% pyros, 60% banshee (max 1)
  • 75%: 10% grenadiers, 10% sniper, 10% riot, 70% server (max 2)

District 3

  • 0%: 80% pyros, 20% summoner
  • 0%: 80% grenadiers, 20% summoner
  • 25%: 50% riots, 25% supporters, 25% runners
  • 25%: 50% snipers, 25% banshees, 25% technicians
  • 50%: 20% supporters, 60% banshees, 20% summoner
  • 50%: 20% server (max 1), 20% pyros, 60% riots
  • 75%: 20% technicians, 20% runners, 60% server (max 1)
  • 75%: 10% banshee, 10% runner, 10% summoner, 70% server (max 2)

Elite Enemies

When entering an elite room, the number of enemies out of the ones that spawn that should be elite is a random number between 1 and 2 (inclusive).

  • Each time the player clears a district, increase the max by 1.
  • Each time the player loops, increase the min by 2.

The amount of items they each spawn with should scale linearly throughout the run, as the player clears rooms and progresses through each district. At the very start of the run, elite enemies should spawn with 3 items, and by the end of the first district, they should spawn with 7. This value stacks up and persists between districts and between loops. For example:

  • Halfway through District 1, they’ll spawn with 5 items.
  • Halfway through District 2, they’ll spawn with 9 items.
  • Halfway through District 1 after looping once, they’ll spawn with 17.
num = 3 + (districts * 4)

// where 'districts' is how many districts they've completed,
// including their progress through the current one as a decimal

Enemy Strength

The following parameters will increase linearly throughout the run, as the player clears rooms and progresses through each district. By the time the player has reached the first boss:

  • All enemy max health will be increased by x1.2
  • All enemy damage will be increased by x1.2
  • Chance of encountering an elite room will be increased by x1.2 (max 100% chance)

These values stack up and persist between districts and between loops. For example:

  • At the beginning of District 2, enemies will spawn with 120% their base max health, deal 120% damage, and encounter 20% more elite rooms.
  • When the player is halfway through District 3, enemies will spawn with 150% their base max health, deal 150% damage, and encounter 50% more elite rooms.
  • When the player has looped once and is halfway through District 1, enemies will spawn with 170% their base max health, deal 170% damage, and encounter 70% more elite rooms.
num = base * (districts * 1.2)

// where 'base' is the base value or chance, and

// where 'districts' is how many districts they've completed,
// including their progress through the current one as a decimal