Curation round 21: rock drops, Boss Rush and room setup, Dross, Ashpit and Gehenna enemies, Book of Virtues wisps and Dream Catcher, the last familiars and effects, player damage branches, a Corpse floor and Abyss crash fix, shared constants (186 duplicates)
This commit is contained in:
1 parent
8dbeb1bc4a
commit
6a11163842
184 files changed
+16980
-1419
No files matched your search
+38
-13
@@ -41,7 +41,6 @@ constexpr int ENTITY_SCOURGE_TYPE = 830;
|
||||
constexpr int SCOURGE_BONE_VARIANT = 10;
|
||||
constexpr int CHARGER_MY_SHADOW = 3;
|
||||
constexpr int FACING_SHIELD_VARIANT = 1;
|
||||
constexpr float DIAGONAL = 0.70710677f;
|
||||
constexpr int FIREPLACE_NORMAL = 0;
|
||||
constexpr int FIREPLACE_RED = 1;
|
||||
constexpr int FIREPLACE_MOVEABLE = 10;
|
||||
@@ -82,8 +81,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_GOODEATH = 207;
|
||||
constexpr int SOUND_BONE_BREAK = 500;
|
||||
constexpr int SOUND_BISHOP_HIT = 501;
|
||||
constexpr int SOUND_CHAIN_BREAK = 504;
|
||||
constexpr int BISHOP_HIT_DELAY = 10;
|
||||
@@ -270,17 +267,25 @@ static bool bishop_shield(Entity& entity, Entity& bishop)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Part of 006ace60: the boss parts whose own shield may take the hit, none written yet.
|
||||
static void shielded_part_check(Entity& entity)
|
||||
// Part of 006ace60: the boss part whose own shield takes the hit, none for others. Dogma's body is shielded by its
|
||||
// parent, the Heretic's Exorcists while they wake or summon, and Clutch's orbitals by Clutch (the one it holds only
|
||||
// while Clutch is solid).
|
||||
static Entity* part_shield_get(Entity& entity)
|
||||
{
|
||||
constexpr int SHIELD_EXORCIST_WAKING = NPC_STATE_SUICIDE;
|
||||
constexpr int SHIELD_EXORCIST_SUMMONING = NPC_STATE_SPECIAL;
|
||||
|
||||
Entity* spawner = entity.spawnerEntity;
|
||||
Entity* parent = entity.parent;
|
||||
bool isShieldedSpawn = entity.type == ENTITY_SHIELDED_SPAWN && entity.variant == 1 && spawner &&
|
||||
spawner->type == ENTITY_SHIELD_SPAWNER;
|
||||
bool isShieldedPart = entity.type == ENTITY_SHIELDED_PART && parent && parent->type == ENTITY_SHIELD_PARENT;
|
||||
bool isDogmaPart = entity.type == ENTITY_DOGMA && entity.variant == 0 && parent;
|
||||
if (isShieldedSpawn || isShieldedPart || isDogmaPart)
|
||||
reconstruction_missing("Entity::TakeDamage 006ace60: a boss part's own shield");
|
||||
if (entity.type == ENTITY_DOGMA) return entity.variant == 0 ? parent : nullptr;
|
||||
if (entity.type == ENTITY_SHIELDED_SPAWN)
|
||||
{
|
||||
int state = static_cast<Entity_NPC&>(entity).state;
|
||||
bool isGuarded = entity.variant == 1 && spawner && spawner->type == ENTITY_SHIELD_SPAWNER;
|
||||
return isGuarded && (state == SHIELD_EXORCIST_SUMMONING || state == SHIELD_EXORCIST_WAKING) ? spawner : nullptr;
|
||||
}
|
||||
if (entity.type != ENTITY_SHIELDED_PART || !parent || parent->type != ENTITY_SHIELD_PARENT) return nullptr;
|
||||
return parent->child.get() != &entity || parent->entityCollisionClass != ENTCOLL_NONE ? parent : nullptr;
|
||||
}
|
||||
|
||||
// The players a co-op boss fight counts: one for each pair of twins and none for a player's attachments.
|
||||
@@ -307,7 +312,8 @@ bool Entity::TakeDamage(float damage, uint64_t damageFlags, const EntityRef& sou
|
||||
if (damage > 0)
|
||||
{
|
||||
bool isVulnerable = IsVulnerableEnemy(nullptr);
|
||||
if (isVulnerable || type == ENTITY_DOGMA) shielded_part_check(*this);
|
||||
Entity* shield = isVulnerable || type == ENTITY_DOGMA ? part_shield_get(*this) : nullptr;
|
||||
if (shield) return bishop_shield(*this, *shield);
|
||||
if ((isVulnerable && type != ENTITY_BISHOP) || (!isVulnerable && type == ENTITY_DOGMA))
|
||||
{
|
||||
Entity* bishop = bishop_nearest_find(pos, IsFriendly());
|
||||
@@ -1106,6 +1112,25 @@ static void player_contact_missing_check(Entity_Player& player, Entity& collider
|
||||
if (player.suplexState == 1) reconstruction_missing("Entity_Player::HandleCollision 0078e1f0: the suplex grab");
|
||||
}
|
||||
|
||||
// Part of 0078e1f0: The Virus and Serpent's Kiss poison an enemy touched for 60 frames at 2 plus a twentieth of the
|
||||
// square of the player's red hearts (a tenth of an eighth of them, at least 1, in a deathmatch). Serpent's Kiss marks
|
||||
// it to drop a black heart. The poison is handed down the enemy's chain before it is added.
|
||||
constexpr int VIRUS_POISON_FRAMES = 60;
|
||||
constexpr float VIRUS_POISON_BASE = 2;
|
||||
constexpr float VIRUS_POISON_SCALE = 0.05f;
|
||||
constexpr float VIRUS_DEATHMATCH_SCALE = 0.125f * 0.1f;
|
||||
|
||||
static void virus_poison_apply(Entity_Player& player, Entity& collider)
|
||||
{
|
||||
if (player.HasCollectible(COLLECTIBLE_SERPENTS_KISS)) collider.AddEntityFlags(FLAG_SPAWN_BLACK_HP);
|
||||
float hearts = (float)player.redHearts;
|
||||
if (g_game->deathmatchManager.state >= DEATHMATCH_INTRO) hearts = std::max(1.0f, hearts * VIRUS_DEATHMATCH_SCALE);
|
||||
collider.bossStatusEffectCooldown = 0;
|
||||
collider.CopyStatusEffects();
|
||||
collider.AddPoison(EntityRef(&player), VIRUS_POISON_FRAMES, hearts * VIRUS_POISON_SCALE * hearts + VIRUS_POISON_BASE,
|
||||
false);
|
||||
}
|
||||
|
||||
// 0078e1f0 Touches another entity, after a mod's MC_PRE_PLAYER_COLLISION: mid-suplex it passes enemies and shots,
|
||||
// it hurts a vulnerable enemy by its items' contact damage, poisons with The Virus or Serpent's Kiss, and a thrown
|
||||
// Tainted Forgotten slows on enemies. Tainted Forgotten's soul picks the body up. Whether the collision is ignored, which a pony's dash makes it.
|
||||
@@ -1140,7 +1165,7 @@ bool Entity_Player::HandleCollision(Entity* collider, bool isLow)
|
||||
HasCollectible(COLLECTIBLE_SERPENTS_KISS);
|
||||
if (collider->IsActiveEnemy(DEAD_EXCLUDED) && isPoisoning && !collider->HasEntityFlags(FLAG_NO_STATUS_EFFECTS) &&
|
||||
!collider->IsFriendly())
|
||||
reconstruction_missing("Entity_Player::HandleCollision 0078e1f0: The Virus' poison (Entity::AddPoison)");
|
||||
virus_poison_apply(*this, *collider);
|
||||
if (playerType == PLAYER_THEFORGOTTEN_B && !isIgnored && collider->IsEnemy() && HasEntityFlags(FLAG_THROWN) &&
|
||||
!collider->IsFriendly())
|
||||
velocity = vector_scale(velocity, SLOW_ON_CONTACT);
|
||||
|
||||
Reference in new issue
Block a user