diff --git a/data/entities/big_pentagon/big_pentagon.yaml b/data/entities/orb/orb.yaml similarity index 94% rename from data/entities/big_pentagon/big_pentagon.yaml rename to data/entities/orb/orb.yaml index 5314dec..0a840bd 100644 --- a/data/entities/big_pentagon/big_pentagon.yaml +++ b/data/entities/orb/orb.yaml @@ -1,12 +1,12 @@ -name: big_pentagon -ai_type: big_pentagon # Validat contra el directori; mapeja a EnemyType::BIG_PENTAGON. +name: orb +ai_type: orb # Validat contra el directori; mapeja a EnemyType::ORB. # Shape circular pròpia (anell exterior + anell interior + 6 radis + nucli), # pensada per llegir-se com a "reactor / orb" amb més detall que els enemics # petits. shape: - path: enemy_big_orb.shp - scale: 1.5 + path: enemy_orb.shp + scale: 1.0 collision_factor: 1.0 physics: diff --git a/data/shapes/enemy_big_orb.shp b/data/shapes/enemy_orb.shp similarity index 92% rename from data/shapes/enemy_big_orb.shp rename to data/shapes/enemy_orb.shp index 39c3c87..95be4bc 100644 --- a/data/shapes/enemy_big_orb.shp +++ b/data/shapes/enemy_orb.shp @@ -1,4 +1,4 @@ -# enemy_big_orb.shp - ORNI enemic gegant (orb circular, doble anell amb radis) +# enemy_orb.shp - ORNI enemic gegant (orb circular, doble anell amb radis) # © 2026 JailDesigner # # Forma "reactor / boss circular" — més detall que els enemics petits perquè @@ -9,7 +9,7 @@ # - Petit "+" central com a nucli. # Bounding radius natiu = 20 (alineat amb la resta d'enemics). -name: enemy_big_orb +name: enemy_orb scale: 1.0 center: 0, 0 diff --git a/data/stages/stages.yaml b/data/stages/stages.yaml index e6ebcfd..ccd9562 100644 --- a/data/stages/stages.yaml +++ b/data/stages/stages.yaml @@ -9,7 +9,7 @@ # - { timeout: T } → quan han passat T segons des de l'inici de la wave. # - { all_dead: true, timeout: T } → el que arribe abans (amuntegament si vas lent). # -# Tipus d'enemic: pentagon, square (alias: cuadrado), pinwheel (alias: molinillo), star, big_pentagon. +# Tipus d'enemic: pentagon, square (alias: cuadrado), pinwheel (alias: molinillo), star, orb. metadata: version: "2.0" @@ -47,14 +47,14 @@ stages: spawn_interval: 0.5 next: end - # STAGE 3 — Primer big_pentagon (HP=10). + # STAGE 3 — Primer orb (HP=10). - stage_id: 3 multipliers: { velocity: 1.0, rotation: 1.0, tracking: 0.5 } waves: - spawn: [pentagon, pentagon, square] spawn_interval: 0.4 next: all_dead - - spawn: [big_pentagon] + - spawn: [orb] next: { all_dead: true, timeout: 12.0 } - spawn: [pinwheel, pinwheel] spawn_interval: 0.5 @@ -76,7 +76,7 @@ stages: - spawn: [pinwheel, pinwheel, pinwheel] spawn_interval: 0.4 next: all_dead - - spawn: [big_pentagon, pentagon, pentagon] + - spawn: [orb, pentagon, pentagon] spawn_interval: 0.5 next: end @@ -93,7 +93,7 @@ stages: - spawn: [pinwheel, pinwheel, star, star] spawn_interval: 0.4 next: all_dead - - spawn: [big_pentagon, square, square] + - spawn: [orb, square, square] spawn_interval: 0.5 next: end @@ -110,7 +110,7 @@ stages: - spawn: [pinwheel, pinwheel, pinwheel] spawn_interval: 0.3 next: all_dead - - spawn: [big_pentagon, pinwheel, pinwheel] + - spawn: [orb, pinwheel, pinwheel] spawn_interval: 0.4 next: end @@ -127,7 +127,7 @@ stages: - spawn: [star, star, star] spawn_interval: 0.4 next: all_dead - - spawn: [big_pentagon, pinwheel, pinwheel, square] + - spawn: [orb, pinwheel, pinwheel, square] spawn_interval: 0.5 next: end @@ -141,7 +141,7 @@ stages: - spawn: [square, square, star, star] spawn_interval: 0.3 next: { all_dead: true, timeout: 5.0 } - - spawn: [big_pentagon] + - spawn: [orb] next: { all_dead: true, timeout: 8.0 } - spawn: [pinwheel, pinwheel, square, star, pentagon] spawn_interval: 0.3 @@ -154,13 +154,13 @@ stages: - spawn: [pinwheel, pinwheel, star, star] spawn_interval: 0.3 next: { all_dead: true, timeout: 4.0 } - - spawn: [big_pentagon, square, square] + - spawn: [orb, square, square] spawn_interval: 0.4 next: { all_dead: true, timeout: 8.0 } - spawn: [pinwheel, pinwheel, pinwheel, pinwheel] spawn_interval: 0.3 next: { all_dead: true, timeout: 5.0 } - - spawn: [big_pentagon, pinwheel, pinwheel, square, star] + - spawn: [orb, pinwheel, pinwheel, square, star] spawn_interval: 0.4 next: end @@ -171,12 +171,12 @@ stages: - spawn: [pinwheel, pinwheel, pinwheel, pinwheel] spawn_interval: 0.25 next: { all_dead: true, timeout: 4.0 } - - spawn: [big_pentagon, square, star] + - spawn: [orb, square, star] spawn_interval: 0.4 next: { all_dead: true, timeout: 6.0 } - spawn: [pinwheel, pinwheel, star, star, square] spawn_interval: 0.3 next: { all_dead: true, timeout: 5.0 } - - spawn: [big_pentagon, big_pentagon, pinwheel, pinwheel, star] + - spawn: [orb, orb, pinwheel, pinwheel, star] spawn_interval: 0.4 next: end diff --git a/source/game/entities/enemy.hpp b/source/game/entities/enemy.hpp index aab39fe..f5e9508 100644 --- a/source/game/entities/enemy.hpp +++ b/source/game/entities/enemy.hpp @@ -17,11 +17,11 @@ class Ship; // Tipo de enemy enum class EnemyType : uint8_t { - PENTAGON = 0, // Pentágono esquivador (zigzag) - SQUARE = 1, // Square perseguidor (tracks ship) - PINWHEEL = 2, // Molinillo agresivo (rápido, girando) - STAR = 3, // Estrella de 5 puntes (clone visual de Pentagon, comportament zigzag) - BIG_PENTAGON = 4, // Pentàgon gegant tough (HP=10, chase lent — primer enemic HP>1) + PENTAGON = 0, // Pentágono esquivador (zigzag) + SQUARE = 1, // Square perseguidor (tracks ship) + PINWHEEL = 2, // Molinillo agresivo (rápido, girando) + STAR = 3, // Estrella de 5 puntes (clone visual de Pentagon, comportament zigzag) + ORB = 4, // Orb gegant tough (HP=10, chase lent — primer enemic HP>1) }; // Forward declaration — EnemyConfig viu a enemy_config.hpp i s'inclou només a enemy.cpp. diff --git a/source/game/entities/enemy_config.cpp b/source/game/entities/enemy_config.cpp index 19af094..afb5654 100644 --- a/source/game/entities/enemy_config.cpp +++ b/source/game/entities/enemy_config.cpp @@ -30,7 +30,7 @@ namespace { if (s == "square") { return EnemyType::SQUARE; } if (s == "pinwheel") { return EnemyType::PINWHEEL; } if (s == "star") { return EnemyType::STAR; } - if (s == "big_pentagon") { return EnemyType::BIG_PENTAGON; } + if (s == "orb") { return EnemyType::ORB; } return std::nullopt; } @@ -353,8 +353,8 @@ namespace { out.movement.rotation_proximity_multiplier = legacy.rotation_proximity_multiplier; out.movement.proximity_distance = legacy.proximity_distance; break; - case EnemyType::BIG_PENTAGON: - // Sense legacy fallback: el YAML del big_pentagon ha de definir + case EnemyType::ORB: + // Sense legacy fallback: el YAML de l'orb ha de definir // ai.movement explícitament. Default chase lent perquè el switch // siga exhaustiu i no falli si algú omet el bloc ai. out.movement.type = MovementType::CHASE; diff --git a/source/game/entities/enemy_registry.cpp b/source/game/entities/enemy_registry.cpp index 79e1de3..fdeb8ee 100644 --- a/source/game/entities/enemy_registry.cpp +++ b/source/game/entities/enemy_registry.cpp @@ -13,7 +13,7 @@ EnemyConfig EnemyRegistry::pentagon_config; EnemyConfig EnemyRegistry::square_config; EnemyConfig EnemyRegistry::pinwheel_config; EnemyConfig EnemyRegistry::star_config; -EnemyConfig EnemyRegistry::big_pentagon_config; +EnemyConfig EnemyRegistry::orb_config; bool EnemyRegistry::loaded = false; namespace { @@ -40,7 +40,7 @@ auto EnemyRegistry::loadAll() -> bool { loadOne("square", EnemyType::SQUARE, square_config) && loadOne("pinwheel", EnemyType::PINWHEEL, pinwheel_config) && loadOne("star", EnemyType::STAR, star_config) && - loadOne("big_pentagon", EnemyType::BIG_PENTAGON, big_pentagon_config); + loadOne("orb", EnemyType::ORB, orb_config); loaded = OK; if (OK) { std::cout << "[EnemyRegistry] 5 configuracions d'enemic carregades.\n"; @@ -62,8 +62,8 @@ auto EnemyRegistry::get(EnemyType type) -> const EnemyConfig& { return pinwheel_config; case EnemyType::STAR: return star_config; - case EnemyType::BIG_PENTAGON: - return big_pentagon_config; + case EnemyType::ORB: + return orb_config; } std::cerr << "[EnemyRegistry] FATAL: tipus desconegut\n"; std::exit(EXIT_FAILURE); diff --git a/source/game/entities/enemy_registry.hpp b/source/game/entities/enemy_registry.hpp index 466bcea..ac8ee59 100644 --- a/source/game/entities/enemy_registry.hpp +++ b/source/game/entities/enemy_registry.hpp @@ -27,6 +27,6 @@ class EnemyRegistry { static EnemyConfig square_config; static EnemyConfig pinwheel_config; static EnemyConfig star_config; - static EnemyConfig big_pentagon_config; + static EnemyConfig orb_config; static bool loaded; }; diff --git a/source/game/stage_system/stage_loader.cpp b/source/game/stage_system/stage_loader.cpp index 896e567..71f0e33 100644 --- a/source/game/stage_system/stage_loader.cpp +++ b/source/game/stage_system/stage_loader.cpp @@ -219,8 +219,8 @@ namespace StageSystem { out = EnemyType::PINWHEEL; } else if (type_str == "star") { out = EnemyType::STAR; - } else if (type_str == "big_pentagon") { - out = EnemyType::BIG_PENTAGON; + } else if (type_str == "orb") { + out = EnemyType::ORB; } else { return false; } diff --git a/source/game/systems/collision_system.cpp b/source/game/systems/collision_system.cpp index fa67f14..487c4ba 100644 --- a/source/game/systems/collision_system.cpp +++ b/source/game/systems/collision_system.cpp @@ -234,7 +234,7 @@ namespace Systems::Collision { processWoundedDeaths(ctx); // expiran ANTES de ser tocadas por bala este frame detectBulletEnemy(ctx); // Wounded chain desactivat: era massa fàcil que un enemic ferit topés - // amb el big_pentagon (10 HP) i el matés instantàniament. La regla + // amb l'orb (10 HP) i el matés instantàniament. La regla // "ferit-toca-sa → ferit" queda permanentment fora. detectShipEnemy(ctx); detectBulletPlayer(ctx);