Curation round 14: console and Lua API, effects, lasers, enemies, eleven bosses, the Depths and Mom, status effects, the playable characters

This commit is contained in:
shweet committed 2026-11-20 19:04:41 -05:00
1 parent 8ae02a8422
commit 6e3da161fc
138 files changed
+16754 -6825

No files matched your search

+4 -5
View File
@@ -6,7 +6,6 @@
// The headless enemies this AI runs: the Gusher and Pacer, Blubber and Half Sack, Splasher and the Black Globin's body.
constexpr int ENTITY_HALF_SACK = 211;
constexpr int ENTITY_SPLASHER = 238;
constexpr int SOUND_BLOBBY_WIGGLE = 3;
constexpr float WALK_THRESHOLD_GUSHER = 0.1f;
@@ -75,14 +74,14 @@ static void gusher_init(Entity_NPC& npc)
if (is_bleeding_gusher(npc)) npc.sprite.PlayOverlay("Blood");
}
// A Splasher ignores explosions but the players' own, friendly ones' and TNT's.
static void splasher_explosions_ignore(Entity_NPC& npc)
// Cancels the pending damage of the given kinds, but the players' own, friendly ones' and TNT's.
void npc_hostile_damage_ignore(Entity_NPC& npc, uint64_t damageFlags)
{
for (DamageEvent& event : npc.damageEvents)
{
bool isPlayerMade = event.source.type == ENTITY_PLAYER || event.source.spawnerType == ENTITY_PLAYER ||
event.source.spawnerType == ENTITY_FAMILIAR;
if ((event.damageFlags & DAMAGE_EXPLOSION) && !(event.source.flags & ENTITY_REF_FRIENDLY) && !isPlayerMade &&
if ((event.damageFlags & damageFlags) && !(event.source.flags & ENTITY_REF_FRIENDLY) && !isPlayerMade &&
!(event.damageFlags & DAMAGE_TNT))
event.damage = 0;
}
@@ -235,7 +234,7 @@ void npc_gusher_update(Entity_NPC& npc)
npc.health = npc.maxHitPoints;
return;
}
if (npc.type == ENTITY_SPLASHER && npc.pendingDamage > 0) splasher_explosions_ignore(npc);
if (npc.type == ENTITY_SPLASHER && npc.pendingDamage > 0) npc_hostile_damage_ignore(npc, DAMAGE_EXPLOSION);
npc.AnimWalkFrame("WalkHori", "WalkVert", WALK_THRESHOLD_GUSHER);
if (is_bleeding_gusher(npc))