game: add enemy mods

This commit is contained in:
2025-08-22 07:49:02 +02:00
parent 40d6162b95
commit 950d177936
14 changed files with 173 additions and 35 deletions

View File

@@ -37,6 +37,10 @@ func _on_timer_timeout() -> void:
var new_enemy = next_enemy.instantiate()
new_enemy.position = _get_spawn_pos()
new_enemy.target = target
if randf() < 0.1:
new_enemy.enemy_rarity = GlobalConst.Rarity.RARE
if randf() < 0.1:
new_enemy.enemy_rarity = GlobalConst.Rarity.EPIC
if is_instance_of(new_enemy, EnemySlimeSmall):
var slime_color: Color = SLIME_COLOR_VARIATIONS.pick_random()
new_enemy.color = slime_color

View File

@@ -13,13 +13,13 @@ signal lvlup_picked(mod: PlayerStatsModifier)
func _ready() -> void:
match mod.rarity:
GlobalConst.ModRarity.NORMAL:
GlobalConst.Rarity.NORMAL:
upgrade_name.add_theme_color_override("font_color", Color.WHITE)
GlobalConst.ModRarity.RARE:
GlobalConst.Rarity.RARE:
upgrade_name.add_theme_color_override("font_color", Color.DODGER_BLUE)
GlobalConst.ModRarity.EPIC:
GlobalConst.Rarity.EPIC:
upgrade_name.add_theme_color_override("font_color", Color.DARK_ORCHID)
GlobalConst.ModRarity.LEGENDARY:
GlobalConst.Rarity.LEGENDARY:
upgrade_name.add_theme_color_override("font_color", Color.DARK_ORANGE)
upgrade_name.text = mod.title