Curation round 12: basement enemies, projectiles, tear flags, lighting and blend modes, actives, boss deaths, familiars, shops and secret rooms
This commit is contained in:
1 parent
698eeb74e9
commit
f8ce24fc6c
146 files changed
+16389
-3104
No files matched your search
+42
-7
@@ -77,11 +77,14 @@ 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;
|
||||
constexpr int HIT_FLASH_MAX = 6;
|
||||
constexpr int SOUND_FIREDEATH_HISS = 43;
|
||||
constexpr float POSITION_LIMIT = 10000;
|
||||
// The debug flags PostRender draws for: entity positions, collision shapes and grid collision points.
|
||||
constexpr uint32_t DEBUG_ENTITY_POSITIONS = 1 << 0;
|
||||
@@ -1236,10 +1239,18 @@ void Entity::convert_shot_for_enemy_owner(Entity*)
|
||||
reconstruction_missing("Entity::convert_shot_for_enemy_owner 0064bb70");
|
||||
}
|
||||
|
||||
// 006ad350
|
||||
int Entity::apply_second_hand_duration(int, const EntityRef&)
|
||||
// 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)
|
||||
{
|
||||
reconstruction_missing("Entity::apply_second_hand_duration 006ad350");
|
||||
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
|
||||
@@ -1254,10 +1265,34 @@ void Entity::AddPoison(const EntityRef&, int, float, bool)
|
||||
reconstruction_missing("Entity::AddPoison 006ad500");
|
||||
}
|
||||
|
||||
// 006ad750
|
||||
void Entity::AddSlowing(const EntityRef&, int, float, ColorMod, bool)
|
||||
// 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)
|
||||
{
|
||||
reconstruction_missing("Entity::AddSlowing 006ad750");
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user