Curation round 21: rock drops, Boss Rush and room setup, Dross, Ashpit and Gehenna enemies, Book of Virtues wisps and Dream Catcher, the last familiars and effects, player damage branches, a Corpse floor and Abyss crash fix, shared constants (186 duplicates)

This commit is contained in:
shweet committed 2026-11-22 11:00:43 -05:00
1 parent 8dbeb1bc4a
commit 6a11163842
184 files changed
+16980 -1419

No files matched your search

+58 -6
View File
@@ -4,15 +4,15 @@
#include "entity_config.h"
#include "entity_player.h"
#include "game.h"
#include "manager.h"
#include "grid_entity.h"
#include "npc_alt.h"
#include "room.h"
#include "score_sheet.h"
#include <algorithm>
// The fly kin this AI runs: the fly, Pooter, attack fly, the Sucker's family, Moter, the level 2 fly, the full fly and
// the fly bomb.
constexpr int ENTITY_FLY_L2 = 214;
constexpr int ENTITY_FULL_FLY = 249;
constexpr int SPAWNER_UNBOUNDED = 67;
// The Sucker's variants: the Sucker, Spit, Soul Sucker, Ink, Mama Fly, the Bulbs and the Bloodfly.
@@ -44,6 +44,13 @@ constexpr float SPIT_SHOT_RISE_SCALE = 0.7f;
constexpr float SPIT_SHOT_RISE = 13;
constexpr int SPIT_SHOT_COLOR_PRIORITY = 255;
constexpr ColorMod SPIT_SHOT_COLOR = {{1, 1, 1, 1}, {0.4f, 2, 0.5f, 1}, {0, 0, 0}};
static const Vector SOUL_SWIRL_OFFSET = vector_make(0, -15);
constexpr ColorMod SOUL_TRACER_COLOR = {{0.6f, 0.05f, 0, 0.8f}, {0, 0, 0, 0}, {0, 0, 0}};
constexpr float SOUL_TRACER_SCALE = 4;
constexpr int SOUL_TRACER_TIME = 24;
constexpr ColorMod INK_SHOT_COLOR = {{1, 1, 1, 1}, {0.5f, 0.5f, 0.5f, 1}, {0, 0, 0}};
constexpr float INK_CREEP_SCALE = 4;
constexpr int INK_CREEP_TIME = 450;
constexpr float MOTER_SPLIT_SPEED = 10;
constexpr float MOTER_OVERKILL = -20;
@@ -166,7 +173,29 @@ static void fly_init(Entity_NPC& npc)
npc.i1 = 0;
}
// A dying Sucker bursts by its variant: a plus of shots, the Spit's arcing puddle shot, or the Bloodfly's ring.
// 0060b9d0 (NpcHelper::spawn_tracer_effect198) A warning line along a direction from a spot, as the following tracers
// show: only in an online session and outside the 1x1 and narrow rooms.
static Entity_Effect* tracer_spawn(const Vector& position, const Vector& direction)
{
int shape = g_game->room->GetRoomShape();
if (!g_manager->netplayManager.is_online() || !g_game->room->descriptor || !g_game->room->descriptor->data ||
shape == ROOMSHAPE_1x1 || shape == ROOMSHAPE_IH || shape == ROOMSHAPE_IV)
return nullptr;
auto* tracer = static_cast<Entity_Effect*>(g_game->Spawn(
{.position = position, .type = ENTITY_EFFECT, .variant = EFFECT_GENERIC_TRACER, .seed = Random()}));
if (!tracer) return nullptr;
tracer->sprite.color = SOUL_TRACER_COLOR;
tracer->sprite.scale = vector_make(SOUL_TRACER_SCALE, SOUL_TRACER_SCALE);
tracer->targetPosition = direction;
tracer->timeout = SOUL_TRACER_TIME;
tracer->lifespan = SOUL_TRACER_TIME;
tracer->Update();
return tracer;
}
// A dying Sucker bursts by its variant: a plus of shots, the Spit's arcing puddle shot, the Soul Sucker's brimstone
// swirl (with warning lines online), the Ink's cross of inky shots over a pool of black creep, or the Bloodfly's ring.
static void sucker_death(Entity_NPC& npc)
{
if (npc.HasEntityFlags(FLAG_SHRINK)) return;
@@ -192,9 +221,32 @@ static void sucker_death(Entity_NPC& npc)
break;
}
case SUCKER_SOUL:
reconstruction_missing("npc_fly_update 00506bd0: a Soul Sucker's death (spawn_tracer_effect198)");
{
Entity* swirl = g_game->Spawn({.position = npc.pos,
.spawner = &npc,
.type = ENTITY_EFFECT,
.variant = EFFECT_ENEMY_BRIMSTONE_SWIRL,
.seed = Random()});
swirl->posOffset = SOUL_SWIRL_OFFSET;
swirl->Update();
for (int direction : {DIRECTION_RIGHT, DIRECTION_DOWN, DIRECTION_LEFT, DIRECTION_UP})
tracer_spawn(npc.pos, vector_from_direction(direction));
break;
}
case SUCKER_INK:
reconstruction_missing("npc_fly_update 00506bd0: an Ink's death splash");
{
ProjectileParams params;
params.color = INK_SHOT_COLOR;
float speed = game_is_hard_mode() ? SUCKER_HARD_SHOT_SPEED : SUCKER_SHOT_SPEED;
npc.FireProjectiles(npc.pos, vector_make(speed, 0), PROJECTILES_CROSS, params);
auto* creep = static_cast<Entity_Effect*>(g_game->Spawn(
{.position = npc.pos, .type = ENTITY_EFFECT, .variant = EFFECT_CREEP_BLACK, .seed = Random()}));
creep->sprite.scale = vector_make(INK_CREEP_SCALE, INK_CREEP_SCALE);
creep->timeout = INK_CREEP_TIME;
creep->lifespan = INK_CREEP_TIME;
creep->Update();
break;
}
case SUCKER_BLOODFLY:
{
ProjectileParams params;
@@ -591,7 +643,7 @@ void npc_fly_update(Entity_NPC& npc)
bool isIsaacsFly = npc.spawnerType == ENTITY_ISAAC_BOSS && npc.subtype != 0;
if (isIsaacsFly) npc_isaac_fly_update(npc);
else if (npc.spawnerType == ENTITY_ORBIT_SPAWNER) return NpcAI::ENTITY_FLY_orbit_parent(&npc);
else if (npc.spawnerType == ENTITY_FLY_TRAP) return fly_trap_fly_update(npc);
else
{
if (npc.type == ENTITY_FLY_BOMB && fly_bomb_update(npc)) return;