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

+5 -165
View File
@@ -44,9 +44,8 @@ constexpr float RENDER_Z_NORMAL_MIN = 10000;
constexpr float RENDER_Z_DEPTH_SCALE = 100;
constexpr float RENDER_Z_DEPTH_BASE = 10030;
// The defaults Init and LoadEntityConfig give: status tick damage, slowing, the shadow without a config, and the
// update clock's start just before zero.
constexpr float STATUS_TICK_DAMAGE_DEFAULT = 2;
// The defaults Init and LoadEntityConfig give: slowing, the shadow without a config, and the update clock's start
// just before zero.
constexpr float SLOWING_AMOUNT_DEFAULT = 0.9f;
constexpr float SHADOW_SIZE_DEFAULT = 0.015625f;
constexpr float UPDATE_TIME_START = -1e-05f;
@@ -75,12 +74,7 @@ constexpr int FLICKER_COLORS = 6;
constexpr int STATUS_DAMAGE_INTERVAL = 20;
constexpr int STATUS_DAMAGE_PHASE = 1;
constexpr float BLEED_FLICKER_SCALE = 0.02f;
constexpr int STATUS_COLOR_PRIORITY = 255;
constexpr int STATUS_COLOR_FRAMES = 2;
// How long a boss shrugs off status effects after one, and the trinket that doubles their durations.
constexpr int BOSS_STATUS_COOLDOWN = 240;
constexpr int SLOW_BRIEF_FRAMES = 2;
constexpr int TRINKET_SECOND_HAND = 78;
// A hit flashes the entity for a third of its damage in frames, from one to six.
constexpr int HIT_FLASH_DIVISOR = 3;
constexpr int HIT_FLASH_MIN = 1;
@@ -309,12 +303,6 @@ void Entity::SetSize(float newSize, Vector newSizeMulti, int gridCollisionPoints
}
}
// 006a9ba0
void Entity::GetCollisionCapsule(Capsule&, const Vector&)
{
reconstruction_missing("Entity::GetCollisionCapsule 006a9ba0");
}
// 006a8990 The top of its parent chain.
Entity* Entity::GetLastParent()
{
@@ -991,7 +979,7 @@ void Entity::damage_events_update()
pendingDamageFlags = 0;
}
// Poisons and burns an enemy every twentieth frame of the effect, then bleeds it and pulls it in when magnetized.
// Poisons and burns an enemy every twentieth frame of the effect and bleeds it, then a magnetized one pulls things in.
void Entity::status_damage_update()
{
if (is_enemy_type(type))
@@ -1006,11 +994,9 @@ void Entity::status_damage_update()
SetColor(BURN_COLOR, STATUS_COLOR_FRAMES, STATUS_COLOR_PRIORITY, false, true);
TakeDamage(burnTickDamage, DAMAGE_POISON_BURN, EntityRef(), 0);
}
if (HasEntityFlags(FLAG_BLEED_OUT) && !IsDescendantOf(bleedSource.entity))
reconstruction_missing("Entity::Update 006ae820: the bleeding of Mom's Razor and the creep it leaves");
if (HasEntityFlags(FLAG_BLEED_OUT) && !IsDescendantOf(bleedSource.entity)) bleed_update();
}
if (!isDead && HasEntityFlags(FLAG_MAGNETIZED))
reconstruction_missing("Entity::Update 006ae820: the pull of a magnetized entity");
if (!isDead && HasEntityFlags(FLAG_MAGNETIZED)) magnet_pull_update();
}
// 006b0eb0 Moves it half a step for the in-between frame and resolves the grid, unless told to skip one.
@@ -1233,110 +1219,6 @@ void Entity::convert_shot_for_enemy_owner(Entity*)
reconstruction_missing("Entity::convert_shot_for_enemy_owner 0064bb70");
}
// 006ad350 A status effect's duration, twice per copy of Second Hand the player behind its source holds. A player is
// only affected so in versus.
int Entity::apply_second_hand_duration(int duration, const EntityRef& source)
{
if ((type == ENTITY_PLAYER && !g_game->deathmatchManager.is_active()) || !source.entity) return duration;
Entity* root = source.entity;
while (root->spawnerEntity) root = root->spawnerEntity;
if (root->type != ENTITY_PLAYER) return duration;
Entity_Player& player = *static_cast<Entity_Player*>(root);
if (!player.HasTrinket(TRINKET_SECOND_HAND)) return duration;
return player.GetTrinketMultiplier(TRINKET_SECOND_HAND) * duration * 2;
}
// 006ad3c0
void Entity::AddFreeze(const EntityRef&, int, bool)
{
reconstruction_missing("Entity::AddFreeze 006ad3c0");
}
// 006ad500
void Entity::AddPoison(const EntityRef&, int, float, bool)
{
reconstruction_missing("Entity::AddPoison 006ad500");
}
// 006ad750 Slows the entity (the head of a body sharing its status) unless a friend did it: a negative duration for
// two frames, a positive one added up and tinted, then bosses shrug status off for a while. The amount is set either
// way, and the segments copy it.
void Entity::AddSlowing(const EntityRef& source, int duration, float amount, ColorMod slowColor,
bool isIgnoreBossCooldown)
{
if (IsDamageSourceFriendly(source)) return;
duration = apply_second_hand_duration(duration, source);
Entity* head = this;
if (DoesEntityShareStatus())
while (head->parent) head = head->parent;
bool isImmune = head->HasEntityFlags(FLAG_NO_STATUS_EFFECTS);
if (duration < 0 && !isImmune)
{
head->slowingCountdown = SLOW_BRIEF_FRAMES;
head->AddEntityFlags(FLAG_SLOW);
}
else if (duration > 0 && !isImmune && (head->bossStatusEffectCooldown < 1 || isIgnoreBossCooldown))
{
head->slowingCountdown += duration;
head->AddEntityFlags(FLAG_SLOW);
head->SetColor(slowColor, duration, STATUS_COLOR_PRIORITY, false, true);
bool isBossLike = head->IsBoss() || (g_game->deathmatchManager.is_active() && head->type == ENTITY_PLAYER);
if (!isIgnoreBossCooldown && isBossLike) head->bossStatusEffectCooldown = BOSS_STATUS_COOLDOWN;
}
head->slowingAmount = amount;
head->CopyStatusEffects();
}
// 006ad870
void Entity::AddCharmed(const EntityRef&, int, bool, bool)
{
reconstruction_missing("Entity::AddCharmed 006ad870");
}
// 006add70
void Entity::AddConfusion(const EntityRef&, int, bool)
{
reconstruction_missing("Entity::AddConfusion 006add70");
}
// 006adf40
void Entity::AddMidasFreeze(const EntityRef&, int, bool)
{
reconstruction_missing("Entity::AddMidasFreeze 006adf40");
}
// 006ae0a0
void Entity::AddFear(const EntityRef&, int, bool)
{
reconstruction_missing("Entity::AddFear 006ae0a0");
}
// 006ae280
void Entity::AddBurn(const EntityRef&, int, float, bool)
{
reconstruction_missing("Entity::AddBurn 006ae280");
}
// 006ae420
void Entity::AddBleeding(const EntityRef&, int)
{
reconstruction_missing("Entity::AddBleeding 006ae420");
}
// 006ae630
void Entity::RemoveStatusEffects()
{
reconstruction_missing("Entity::RemoveStatusEffects 006ae630");
}
// 006b5c10
void Entity::AddShrink(const EntityRef&, int, bool)
{
reconstruction_missing("Entity::AddShrink 006b5c10");
}
// 006b5e60
void* Entity::GetData(void*)
{
@@ -1349,18 +1231,6 @@ void* Entity::GetDebugShape(bool)
reconstruction_missing("Entity::GetDebugShape 006b5f10");
}
// 006b6550
Entity_Effect* Entity::MakeGroundPoof(const Vector&, const ColorMod&, float)
{
reconstruction_missing("Entity::MakeGroundPoof 006b6550");
}
// 006b66a0
Entity_Effect* Entity::MakeGroundPoofAtSelf(const ColorMod&, float)
{
reconstruction_missing("Entity::MakeGroundPoofAtSelf 006b66a0");
}
// 006b6c20
void Entity::GetNullCapsule(Capsule&, std::string_view)
{
@@ -1373,36 +1243,6 @@ int Entity::get_water_splash_variant()
reconstruction_missing("Entity::get_water_splash_variant 006b6ed0");
}
// 006b7280
void Entity::AddMagnetized(const EntityRef&, int)
{
reconstruction_missing("Entity::AddMagnetized 006b7280");
}
// 006b7560
void Entity::AddBaited(const EntityRef&, int)
{
reconstruction_missing("Entity::AddBaited 006b7560");
}
// 006b77d0
void Entity::AddWeakness(const EntityRef&, int)
{
reconstruction_missing("Entity::AddWeakness 006b77d0");
}
// 006b78d0
void Entity::AddBrimstoneMark(const EntityRef&, int)
{
reconstruction_missing("Entity::AddBrimstoneMark 006b78d0");
}
// 006b79d0
void Entity::AddIce(const EntityRef&, int)
{
reconstruction_missing("Entity::AddIce 006b79d0");
}
// 006b7be0
Entity_NPC* Entity::GiveMinecart(const Vector&, const Vector&)
{