Curation round 20: player update, costumes and render, Missing No., the last actives and cards, familiars, Pin, the Frail, Wormwood and the Heretic, Dross to Gehenna, effects and the devil room purchase, champion colours, the quit path, save fields, shared vector helpers

This commit is contained in:
shweet committed 2026-11-22 00:33:35 -05:00
1 parent ee863e70e6
commit 8dbeb1bc4a
168 files changed
+15682 -2399

No files matched your search

+4 -15
View File
@@ -54,7 +54,6 @@ constexpr float LEECH_SPEED = 0.85f;
constexpr float MAGGOT_FRICTION = 0.85f;
constexpr float MAGGOT_FRICTION_Y = 0.9647058f;
constexpr int MAGGOT_GRID_PATH = 900;
constexpr int GRID_PATH_LEVELS = 1000;
constexpr float STAIN_CHASE_SCALE = 1.4f;
// The Stain's mound lifts and tilts the maggots that crawl over it.
@@ -196,16 +195,6 @@ struct MaggotFrame
bool isDank = false;
};
// Room::RaiseGridPathAtPos: raises a cell's pathfinding cost to a level, keeping its hundreds of other marks.
static void room_grid_path_raise(Room& room, const Vector& position, int level)
{
int index = room.GetGridIndex(position);
if (index < 0 || level >= GRID_PATH_LEVELS) return;
int current = room.gridPaths[index] % GRID_PATH_LEVELS;
if (current < level) room.gridPaths[index] = room.gridPaths[index] - current + level;
}
// The Gurgling pair: a lead Gurgling brings partners until there are half again as many as the lead ones.
static void gurgling_partners_spawn(Entity_NPC& npc)
{
@@ -520,7 +509,7 @@ static void maggot_wander_update(Entity_NPC& npc, MaggotFrame& frame)
npc.velocity = vector_scale(vector_cardinal(npc.velocity), vector_length(npc.velocity));
}
npc.friction *= MAGGOT_FRICTION;
npc.velocity.y *= npc_friction_scaled(MAGGOT_FRICTION_Y, npc.speedMultiplier);
npc.velocity.y *= timescale_factor(MAGGOT_FRICTION_Y, npc.speedMultiplier);
if (npc.type == ENTITY_SPITTY && npc.variant == SPITTY_TAINTED && npc.sprite.IsEventTriggered("Shoot"))
{
@@ -555,7 +544,7 @@ static void dank_charge_update(Entity_NPC& npc, MaggotFrame& frame)
else
{
npc.friction = 1;
float keep = 1 - npc_friction_scaled(DANK_STEER_FRICTION, npc.speedMultiplier);
float keep = 1 - timescale_factor(DANK_STEER_FRICTION, npc.speedMultiplier);
npc.velocity.x += keep * (npc.v1.x - npc.velocity.x);
npc.velocity.y += keep * (npc.v1.y - npc.velocity.y);
float slowdown = std::clamp(((float)npc.stateFrame - DANK_SLOWDOWN_START) / DANK_SLOWDOWN_FRAMES, 0.0f, 1.0f);
@@ -615,7 +604,7 @@ static void maggot_charge_update(Entity_NPC& npc, MaggotFrame& frame)
if (npc.controllerID != -1) cell = npc.v2;
if (npc.type != ENTITY_GURGLING)
{
float keep = 1 - npc_friction_scaled(CHARGE_ALIGN_FRICTION, npc.speedMultiplier);
float keep = 1 - timescale_factor(CHARGE_ALIGN_FRICTION, npc.speedMultiplier);
if (std::abs(npc.v1.y) <= std::abs(npc.v1.x))
npc.velocity.y = ((cell.y - npc.pos.y) - npc.velocity.y) * keep + npc.velocity.y;
else npc.velocity.x = ((cell.x - npc.pos.x) - npc.velocity.x) * keep + npc.velocity.x;
@@ -836,7 +825,7 @@ void npc_maggot_update(Entity_NPC& npc)
frame.speed = maggot_speed_get(npc);
Room& room = *g_game->room;
frame.cell = room.GetGridIndex(npc.pos);
room_grid_path_raise(room, npc.pos, MAGGOT_GRID_PATH);
room_path_raise_at(npc.pos, MAGGOT_GRID_PATH);
frame.isDank = npc.type == ENTITY_CHARGER && npc.variant == CHARGER_DANK;
if (npc.state == NPC_STATE_SUICIDE) return maggot_thrown_update(npc);