Curation round 22: every NpcAI below type 400, Repentance bosses and Rotgut, the player's last branches, clots and familiars, bomb tear effects and chain lightning, Mother and Home to Dogma, Greed and Greedier, the new Anm2Ed JSON loader, shared IDs folded (135 duplicates)

This commit is contained in:
shweet committed 2026-11-22 21:57:51 -05:00
1 parent 6a11163842
commit b9405bfb31
198 files changed
+21859 -2999

No files matched your search

+5 -5
View File
@@ -1,4 +1,5 @@
#include "entity_combat.h"
#include "boss_ai.h"
#include "entity_bomb.h"
#include "entity_config.h"
#include "entity_effect.h"
@@ -81,7 +82,6 @@ constexpr float FROZEN_SHARD_SPEED = 5;
// The sounds the combat code plays (Lua's SoundEffect).
constexpr int SOUND_DEATH_BURST_BONE = 27;
constexpr int SOUND_BISHOP_HIT = 501;
constexpr int SOUND_CHAIN_BREAK = 504;
constexpr int BISHOP_HIT_DELAY = 10;
constexpr float SOUND_LARGE_VOLUME = 1.25f;
@@ -226,16 +226,16 @@ static bool is_static_obstacle(Entity& entity)
STATIC_OBSTACLE_TYPES.end();
}
// 004e7d10 The Bishop nearest a position whose charm matches, in the room's update order. A frozen one does not count,
// a confused, feared or shrunk one half the time.
// 004e7d10 (find_nearest_enemy) The Bishop nearest a position whose charm matches, among the queryable ones in the
// room's update order. A frozen one does not count, a confused, feared or shrunk one half the time.
Entity* bishop_nearest_find(const Vector& position, bool isCharmed)
{
Entity* nearest = nullptr;
float nearestDistance = 1e6f;
for (Entity* entity : g_game->room->entityList.updateEL)
for (Entity* entity : entity_query(ENTITY_BISHOP, -1))
{
if (entity->type != ENTITY_BISHOP || entity->HasEntityFlags(FLAG_FREEZE)) continue;
if (entity->HasEntityFlags(FLAG_FREEZE)) continue;
bool isDistracted = entity->HasEntityFlags(FLAG_CONFUSION | FLAG_FEAR | FLAG_SHRINK);
if ((isDistracted && (Random() & 1)) || entity->HasEntityFlags(FLAG_CHARM) != isCharmed) continue;