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

+20 -2
View File
@@ -37,6 +37,7 @@ constexpr int ZODIAC = 392;
constexpr int ENTITY_SEGMENTED_WORM = 903;
constexpr int ENTITY_DAMAGE_RELAY = 966;
constexpr int SIREN_CHARM_SPARE_FRAMES = 29;
constexpr int SEGMENTED_WORM_VARIANT = 10;
constexpr int WHITE_FIRE_VARIANT = 4;
constexpr int EFFECT_SELF_DAMAGE = 19;
@@ -490,6 +491,17 @@ static bool hit_items_check(Entity_Player& player, int amount, const ItemsHit& h
return isHurtShown;
}
// Whether the hit comes from a familiar the Siren charmed under 30 frames ago, or from a relay of its hits.
static bool is_siren_charm_fresh(const EntityRef& source)
{
Entity* hitter = source.type == ENTITY_DAMAGE_RELAY && source.entity ? source.entity->parent.get() : nullptr;
if (source.type == ENTITY_FAMILIAR) hitter = source.entity;
if (!hitter || hitter->type != ENTITY_FAMILIAR) return false;
int frames = static_cast<Entity_Familiar*>(hitter)->sirenCharmFrames;
return frames >= 1 && frames <= SIREN_CHARM_SPARE_FRAMES;
}
// 007729d0 The player takes a hit: the hit is ignored or turned by many items, then costs its hearts, plays the hurt
// grunt and the Hit animation, starts the invincibility frames, and kills the player out of hearts. True when it hurt.
bool Entity_Player::TakeDamage(float damage, uint64_t damageFlags, const EntityRef& source, int damageCountdown)
@@ -502,8 +514,7 @@ bool Entity_Player::TakeDamage(float damage, uint64_t damageFlags, const EntityR
if (twin->itemState == COLLECTIBLE_GLASS_CANNON) twin->bodySprite.Reset();
return twin->TakeDamage(damage, damageFlags, source, damageCountdown);
}
if (source.entity && (source.type == ENTITY_DAMAGE_RELAY || source.type == ENTITY_FAMILIAR))
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (a familiar or relay source)");
if (is_siren_charm_fresh(source)) return false;
if (is_wisp_shield_present(*this)) reconstruction_missing("Entity_Player::TakeDamage 007729d0 (wisp shields)");
if (source.type == ENTITY_FIREPLACE && source.variant == WHITE_FIRE_VARIANT)
{
@@ -993,3 +1004,10 @@ void Entity_Player::ResetItemState()
PlayExtraAnimation("HideItem");
itemState = 0;
}
// 006dad80 Notes the last damage the player took, as a deal or a trinket's price does without a hit.
void Entity_Player::set_last_damage(uint64_t damageFlags, const EntityRef& source)
{
lastDamageFlags = damageFlags;
lastDamageSource = source;
}