tune(enemy): big_pentagon orb circular, firework petit per hit, sense wounded chain
This commit is contained in:
@@ -83,36 +83,6 @@ namespace Systems::Collision {
|
||||
}
|
||||
}
|
||||
|
||||
void detectWoundedChain(Context& ctx) {
|
||||
const std::size_t N = ctx.enemies.size();
|
||||
for (std::size_t i = 0; i < N; i++) {
|
||||
Enemy& a = ctx.enemies[i];
|
||||
if (!a.isCollidable()) {
|
||||
continue;
|
||||
}
|
||||
for (std::size_t j = i + 1; j < N; j++) {
|
||||
Enemy& b = ctx.enemies[j];
|
||||
if (!b.isCollidable()) {
|
||||
continue;
|
||||
}
|
||||
const bool A_WOUNDED = a.isWounded();
|
||||
const bool B_WOUNDED = b.isWounded();
|
||||
if (A_WOUNDED == B_WOUNDED) {
|
||||
continue; // ambos sanos o ambos heridos: nada que propagar
|
||||
}
|
||||
if (!Physics::checkCollision(a, b, Defaults::Game::COLLISION_WOUNDED_CHAIN_AMPLIFIER)) {
|
||||
continue;
|
||||
}
|
||||
// El sano queda herido, propagando el shooter original.
|
||||
if (A_WOUNDED) {
|
||||
b.hurt(a.getLastHitBy());
|
||||
} else {
|
||||
a.hurt(b.getLastHitBy());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void detectShipEnemy(Context& ctx) {
|
||||
constexpr float AMPLIFIER = Defaults::Game::COLLISION_SHIP_ENEMY_AMPLIFIER;
|
||||
|
||||
@@ -263,7 +233,9 @@ namespace Systems::Collision {
|
||||
void detectAll(Context& ctx) {
|
||||
processWoundedDeaths(ctx); // expiran ANTES de ser tocadas por bala este frame
|
||||
detectBulletEnemy(ctx);
|
||||
detectWoundedChain(ctx); // un herit pot ferir a un sa al fregar-lo
|
||||
// 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
|
||||
// "ferit-toca-sa → ferit" queda permanentment fora.
|
||||
detectShipEnemy(ctx);
|
||||
detectBulletPlayer(ctx);
|
||||
detectEnemyBulletShip(ctx);
|
||||
|
||||
Reference in New Issue
Block a user