diff --git a/data/shapes/enemy_square.shp b/data/shapes/enemy_square.shp index 3c17405..36d48f1 100644 --- a/data/shapes/enemy_square.shp +++ b/data/shapes/enemy_square.shp @@ -1,7 +1,14 @@ -# enemy_square.shp - ORNI enemic (quadrat regular, radi=20) +# enemy_square.shp - ORNI enemic (rombe, radi=20) + ull amb pupil·la al centre name: enemy_square scale: 1.0 center: 0, 0 +# Rombe exterior polyline: 0,-20 20,0 0,20 -20,0 0,-20 + +# Ull (dos arcs units, forma d'almetlla). Amplada 20px, altura 8px. +polyline: -10,0 -5,-3 0,-4 5,-3 10,0 5,3 0,4 -5,3 -10,0 + +# Pupil·la (octàgon, radi 2) al centre +polyline: 0,-2 1.41,-1.41 2,0 1.41,1.41 0,2 -1.41,1.41 -2,0 -1.41,-1.41 0,-2 diff --git a/data/stages/stages.yaml b/data/stages/stages.yaml index 4b0b610..7c3acfb 100644 --- a/data/stages/stages.yaml +++ b/data/stages/stages.yaml @@ -7,7 +7,7 @@ metadata: description: "Progressive difficulty curve from novice to expert" stages: - # STAGE 1: Tutorial - Only pentagons, slow speed + # STAGE 1: Tutorial - Mix de tots els tipus, velocitat lenta - stage_id: 1 total_enemies: 50 spawn_config: @@ -15,9 +15,9 @@ stages: initial_delay: 0.3 spawn_interval: 0.4 enemy_distribution: - pentagon: 100 - cuadrado: 0 - molinillo: 0 + pentagon: 34 + cuadrado: 33 + molinillo: 33 difficulty_multipliers: speed_multiplier: 0.7 rotation_multiplier: 0.8 diff --git a/source/game/entities/enemy.hpp b/source/game/entities/enemy.hpp index dcfa89b..0fd600f 100644 --- a/source/game/entities/enemy.hpp +++ b/source/game/entities/enemy.hpp @@ -52,8 +52,11 @@ class Enemy : public Entities::Entity { [[nodiscard]] auto getCollisionRadius() const -> float override { return Defaults::Entities::ENEMY_RADIUS; } + // Mentre fa spawn (invulnerable) segueix col·lisionant: les bales el + // poden abatre i el cos físic rebota amb la nau. El damage a la nau + // segueix filtrat per `isInvulnerable()` al detectShipEnemy. [[nodiscard]] auto isCollidable() const -> bool override { - return esta_ && timer_invulnerabilitat_ <= 0.0F; + return esta_; } // Marcar destruido (desactiva el cuerpo físicamente: radius=0)