Skip to content

Commit

Permalink
Updated game balance
Browse files Browse the repository at this point in the history
  • Loading branch information
neki-dev committed Nov 5, 2023
1 parent a9b06b1 commit 632ca74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/const/world/difficulty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const DIFFICULTY = {
WAVE_ENEMIES_SPAWN_PAUSE_GROWTH: -0.05, // Enemies spawn pause growth by wave number (Linear)
WAVE_ENEMIES_SPAWN_PAUSE_GROWTH_MAX_LEVEL: 11, // Level for limit spawn pause growth
WAVE_EXPERIENCE: 50, // Gained experience per complete wave
WAVE_EXPERIENCE_GROWTH: 0.2, // Experience amount growth by wave number (Quadratic)
WAVE_EXPERIENCE_GROWTH: 0.25, // Experience amount growth by wave number (Quadratic)

/**
* Crystals
Expand All @@ -73,6 +73,7 @@ export const DIFFICULTY = {
CRYSTAL_COUNT_GROWTH_MAX_LEVEL: 10, // Level for limit count growth
CRYSTAL_RESOURCES: 4, // Resources in crystal
CRYSTAL_RESOURCES_GROWTH: 0.8, // Resources amount growth by wave number (Linear)
CRYSTAL_RESOURCES_GROWTH_MAX_LEVEL: 12, // Level for limit resources growth

/**
* Enemies
Expand All @@ -90,7 +91,7 @@ export const DIFFICULTY = {
ENEMY_DAMAGE: 90, // Attack damage
ENEMY_DAMAGE_GROWTH: 0.32, // Damage growth by wave number (Linear)
ENEMY_KILL_EXPERIENCE: 10, // Gained experience per kill enemy
ENEMY_KILL_EXPERIENCE_GROWTH: 0.15, // Experience growth by wave number (Quadratic)
ENEMY_KILL_EXPERIENCE_GROWTH: 0.28, // Experience growth by wave number (Linear)

/**
* Builder
Expand Down
1 change: 1 addition & 0 deletions src/game/scenes/world/entities/crystal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export class Crystal extends Phaser.GameObjects.Image implements ICrystal, ITile
defaultValue: DIFFICULTY.CRYSTAL_RESOURCES,
scale: DIFFICULTY.CRYSTAL_RESOURCES_GROWTH,
level: this.scene.wave.number,
maxLevel: DIFFICULTY.CRYSTAL_RESOURCES_GROWTH_MAX_LEVEL,
});

return Phaser.Math.Between(
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/world/entities/npc/variants/enemy/enemy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export class Enemy extends NPC implements IEnemy {
}

public onDead() {
const experience = progressionQuadratic({
const experience = progressionLinear({
defaultValue: DIFFICULTY.ENEMY_KILL_EXPERIENCE * this.might,
scale: DIFFICULTY.ENEMY_KILL_EXPERIENCE_GROWTH,
level: this.scene.wave.number,
Expand Down

0 comments on commit 632ca74

Please sign in to comment.