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:
shweet committed 2026-11-22 11:00:43 -05:00
1 parent 8dbeb1bc4a
commit 6a11163842
184 files changed
+16980 -1419

No files matched your search

+237 -41
View File
@@ -1,5 +1,7 @@
#include "entity_bomb.h"
#include "entity_effect_combat.h"
#include "entity_familiar.h"
#include "entity_pickup.h"
#include "entity_npc.h"
#include "entity_player.h"
#include "entity_player_characters.h"
@@ -12,7 +14,9 @@
#include "lua_engine.h"
#include "manager.h"
#include "npc_ai.h"
#include "npc_basement.h"
#include "room.h"
#include "room_grid.h"
#include <algorithm>
#include <cmath>
@@ -32,13 +36,8 @@ constexpr int NULLITEM_SHACKLES_GHOST = 101;
constexpr int SAMSON_B_HIT_CHARGE = 10000;
constexpr int BLEED_OUT_HEALTH = 600;
// Zodiac's sign a landed hit may set off, until the zodiac's hits are written.
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 VISAGE_CHAIN = 10;
constexpr int WHITE_FIRE_VARIANT = 4;
constexpr int EFFECT_SELF_DAMAGE = 19;
constexpr int EFFECT_POISON_CLOUD = 123;
@@ -57,7 +56,6 @@ constexpr int COIN_THIEF_TYPES[] = {50, 86, 90, 294, 299, 406};
constexpr int COIN_SHOOTER_TYPES[] = {50, 86, 90};
constexpr int ULTRA_GREED = 406;
constexpr int ULTRA_GREED_DOOR = 294;
constexpr uint32_t CHALLENGE_PAY_TO_PLAY = 24;
constexpr int SOUND_NAIL_HURT_1 = 104;
constexpr int SOUND_NAIL_HURT_2 = 106;
@@ -158,8 +156,8 @@ static bool is_damage_ignored(Entity_Player& player, const EntityRef& source, ui
bool isAppearing = player.sprite.IsPlaying("Appear") || player.sprite.IsPlaying("Glitch");
if ((player.variant == PLAYER_VARIANT_COOP_BABY || player.isCoopGhost) && isAppearing) return true;
if (source.type == ENTITY_SEGMENTED_WORM && source.variant == SEGMENTED_WORM_VARIANT && entity)
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (a worm segment of the player's own)");
if (source.type == ENTITY_VISAGE && source.variant == VISAGE_CHAIN && entity)
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (a Visage chain)");
return false;
}
@@ -181,30 +179,185 @@ static bool is_wisp_shield_present(Entity_Player& player)
});
}
// The items that answer a hit before it lands, each stopping or turning it, none written yet.
static void damage_reactions_check(Entity_Player& player, uint64_t damageFlags)
// Plays one of the player's sounds at a volume and pitch, unless the seeds swap it for a fart.
static void voice_play(int sound, float volume, int frameDelay, float pitch)
{
seed_fart_sound_override(&sound);
g_manager->sfxManager.Play(sound, {.volume = volume, .frameDelay = frameDelay, .pitch = pitch});
}
// The answers' strengths and odds: Pyromaniac's heart icon, Host Hat's guard and return volley, Metal Plate's and
// Cone Head's chances, and Jelly Belly's bounce.
constexpr float HEART_ICON_RISE = -24;
constexpr int HOST_HAT_VOLLEY_ODDS = 5;
constexpr float RETURN_SHOT_SPEED = 10;
constexpr float HOST_HAT_SPREAD = 15;
constexpr uint32_t RETURN_SHOT_FLAGS = 7;
constexpr int METAL_PLATE_ODDS = 4;
constexpr int CONE_HEAD_ODDS = 5;
constexpr int CONE_HEAD_FLASH_FRAMES = 10;
constexpr int JELLY_BELLY_ODDS = 2;
constexpr float JELLY_BELLY_REACH = 10;
constexpr float JELLY_BELLY_SHOT_SPEED = 10;
constexpr float JELLY_BELLY_PUSH = 20;
constexpr int JELLY_BELLY_PUSH_FRAMES = 15;
constexpr float JELLY_BELLY_SPEED_UNIT = 25;
constexpr float JELLY_BELLY_PLAYER_PUSH = 40;
constexpr float JELLY_BELLY_BOUNCE = 20;
constexpr float JELLY_BELLY_SHOT_BOUNCE = 14;
constexpr int JELLY_BELLY_COOLDOWN = 8;
constexpr float JELLY_SHOT_VOLUME = 0.8f;
constexpr float JELLY_SHOT_PITCH = 1.25f;
constexpr ColorMod METAL_PLATE_TEAR_COLOR = {{0.5f, 0.5f, 0.5f, 1}, {0, 0, 0, 0}, {0, 0, 0}};
constexpr ColorMod CONE_HEAD_FLASH = {{0.7f, 0.7f, 1, 1}, {0, 0, 0, 0}, {0, 0, 0}};
// The four looks of a Host Hat animation, picked by the way a vector leans.
static std::string host_hat_anim(std::string_view base, Vector direction)
{
constexpr std::string_view SIDES[] = {"Left", "Up", "Right", "Down"};
return std::string(base) + std::string(SIDES[vector_to_direction(direction)]);
}
// The shot a hat or plate sends back: the way the hitting shot came, at 10.
static Vector return_shot_velocity(const EntityRef& source)
{
return vector_scale(vector_resized(source.velocity, RETURN_SHOT_SPEED), -1);
}
// Jelly Belly's bounce, half the time against a living source (an enemy, a shot or a player) that reaches it: an
// enemy is knocked away, a shot turned back, another player pushed by their speeds. Whether it bounced the hit.
static bool jelly_belly_bounce(Entity_Player& player, const EntityRef& source, uint64_t damageFlags)
{
if (!player.HasCollectible(COLLECTIBLE_JELLY_BELLY) || (damageFlags & (DAMAGE_NO_MODIFIERS | DAMAGE_FAKE))) return false;
Entity* hitter = source.entity;
bool isLiving = hitter && ((source.type >= ENTITY_FIRST_ENEMY && source.type <= ENEMY_TYPE_LAST) ||
source.type == ENTITY_PROJECTILE || source.type == ENTITY_PLAYER);
if (random_below(JELLY_BELLY_ODDS) != 0 || !isLiving) return false;
float reach = hitter->size * std::max(hitter->sizeMulti.x, hitter->sizeMulti.y) + player.size + JELLY_BELLY_REACH;
bool isTouching = vector_distance(hitter->pos, player.pos) <= reach;
if (hitter->is_player())
{
if (hitter->HasEntityFlags(FLAG_KNOCKED_BACK) || !isTouching) return false;
float combined = vector_length_squared(hitter->velocity) + vector_length_squared(player.velocity);
float push = std::clamp(combined / JELLY_BELLY_SPEED_UNIT, 0.0f, 1.0f) * JELLY_BELLY_PLAYER_PUSH;
float strength = vector_length_squared(player.velocity) / combined * push;
Vector away = vector_scale(vector_normalized(vector_sub(hitter->pos, player.pos)), strength);
hitter->AddKnockback(EntityRef(&player), away, 1, true);
player.jellyBellyBounceTimer = JELLY_BELLY_BOUNCE;
voice_play(SOUND_JELLY_BOUNCE, 1, SOUND_FRAME_DELAY, 1);
}
else if (hitter->IsEnemy())
{
if (!isTouching) return false;
Vector away = vector_resized(vector_sub(hitter->pos, player.pos), JELLY_BELLY_PUSH);
hitter->AddKnockback(EntityRef(&player), away, JELLY_BELLY_PUSH_FRAMES, true);
player.jellyBellyBounceTimer = JELLY_BELLY_BOUNCE;
voice_play(SOUND_JELLY_BOUNCE, 1, SOUND_FRAME_DELAY, 1);
}
else if (hitter->type == ENTITY_PROJECTILE || hitter->type == ENTITY_TEAR)
{
Vector away = vector_resized(vector_sub(hitter->pos, player.pos), JELLY_BELLY_SHOT_SPEED);
if (hitter->type == ENTITY_PROJECTILE) static_cast<Entity_Projectile*>(hitter)->Reflect(away);
else static_cast<Entity_Tear*>(hitter)->Deflect(&player, away);
player.jellyBellyBounceTimer = JELLY_BELLY_SHOT_BOUNCE;
voice_play(SOUND_BLOBBY_WIGGLE, JELLY_SHOT_VOLUME, SOUND_FRAME_DELAY, JELLY_SHOT_PITCH);
}
else return false;
player.SetMinDamageCooldown(JELLY_BELLY_COOLDOWN);
player.AddEntityFlags(FLAG_NO_DAMAGE_BLINK);
return true;
}
// Walnut cracks open on an explosion a third of the time: a trinket, a heart, a key and a coin (times its multiplier)
// near the player, and it is gone.
static void walnut_crack(Entity_Player& player)
{
constexpr int WALNUT_CHANCE = 33;
constexpr int WALNUT_PICKUPS[] = {PICKUP_TRINKET, PICKUP_HEART, PICKUP_KEY, PICKUP_COIN};
RNG& rng = player.GetTrinketRNG(TRINKET_WALNUT);
if (rng.Next() % 100 >= WALNUT_CHANCE) return;
int count = player.GetTrinketMultiplier(TRINKET_WALNUT);
for (int variant : WALNUT_PICKUPS)
for (int i = 0; i < count; i++)
{
uint32_t seed = rng.Next();
Vector spot = room_free_pickup_position_find({.position = player.pos, .step = PICKUP_SPOT_STEP});
g_game->Spawn({.position = spot, .spawner = &player, .type = ENTITY_PICKUP, .variant = variant, .seed = seed});
}
player.TryRemoveTrinket(TRINKET_WALNUT);
}
// The items that answer a hit before it lands, in the original's order: Pyromaniac heals from explosions and shrugs
// off fire, Host Hat guards explosions and sometimes fires back at shots, Dr. Fetus and the bone with Ipecac ignore
// their own blasts, Hot Bombs fire, the bomb baby explosions, Jelly Belly bounces, Metal Plate returns shots and Cone
// Head shrugs off a fifth of the hits, after Walnut cracks. Whether the hit is stopped. A charmed Bishop's shield
// stops the game.
static bool damage_reactions_check(Entity_Player& player, const EntityRef& source, uint64_t damageFlags)
{
bool isExplosion = damageFlags & DAMAGE_EXPLOSION;
bool isFire = damageFlags & DAMAGE_FIRE;
if (is_bishop_present()) reconstruction_missing("Entity_Player::TakeDamage 007729d0 (a charmed Bishop's shield)");
if (player.HasTrinket(TRINKET_WALNUT) && isExplosion)
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Walnut)");
if (player.HasCollectible(COLLECTIBLE_PYROMANIAC) && (isFire || isExplosion))
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Pyromaniac)");
if (player.HasCollectible(COLLECTIBLE_HOST_HAT))
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Host Hat)");
bool isFetus = player.HasWeaponType(WEAPON_BOMBS) || player.HasWeaponType(WEAPON_BONE);
if (isFetus && player.HasCollectible(COLLECTIBLE_IPECAC) && isExplosion)
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Ipecac with Dr. Fetus)");
if (player.HasCollectible(COLLECTIBLE_HOT_BOMBS) && isFire)
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Hot Bombs)");
if (player.variant == PLAYER_VARIANT_COOP_BABY && player.babySkin == BABY_BOMB && isExplosion)
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (the bomb baby)");
if (player.HasCollectible(COLLECTIBLE_JELLY_BELLY) && !(damageFlags & (DAMAGE_NO_MODIFIERS | DAMAGE_FAKE)))
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Jelly Belly)");
if (player.HasCollectible(COLLECTIBLE_METAL_PLATE) || player.HasCollectible(COLLECTIBLE_CONE_HEAD))
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Metal Plate and Cone Head)");
if (player.HasTrinket(TRINKET_WALNUT) && isExplosion) walnut_crack(player);
if (player.HasCollectible(COLLECTIBLE_PYROMANIAC) && isFire) return true;
if (player.HasCollectible(COLLECTIBLE_PYROMANIAC) && isExplosion)
{
if (player.redHearts >= player.GetEffectiveMaxHearts()) return true;
Entity* icon = g_game->Spawn({.position = player.pos, .type = ENTITY_EFFECT, .variant = EFFECT_HEART, .seed = Random()});
icon->sprite.offset = vector_make(0, HEART_ICON_RISE);
icon->renderDepthOffset = 1;
player.AddHearts(1, false, false);
return true;
}
if (player.HasCollectible(COLLECTIBLE_HOST_HAT) && isExplosion)
{
player.PlayCollectibleAnim(COLLECTIBLE_HOST_HAT, false, host_hat_anim("Guard", vector_from_direction(player.headDirection)), -1);
return true;
}
bool isFetusBomb = source.spawnerType == ENTITY_PLAYER || source.spawnerType == ENTITY_FAMILIAR;
isFetusBomb = isFetusBomb && source.entity && source.entity->type == ENTITY_BOMB &&
static_cast<Entity_Bomb*>(source.entity)->isFetus;
bool isFetus = player.HasWeaponType(WEAPON_BOMBS) ||
(player.HasWeaponType(WEAPON_BONE) && player.HasCollectible(COLLECTIBLE_DR_FETUS));
if (isFetus && player.HasCollectible(COLLECTIBLE_IPECAC) && isExplosion && isFetusBomb) return true;
bool isBoneIpecac = player.HasWeaponType(WEAPON_BONE) && player.HasCollectible(COLLECTIBLE_IPECAC);
if (isBoneIpecac && isExplosion && source.type == ENTITY_KNIFE) return true;
if (player.HasCollectible(COLLECTIBLE_HOT_BOMBS) && isFire) return true;
if (player.variant == PLAYER_VARIANT_COOP_BABY && player.babySkin == BABY_BOMB && isExplosion) return true;
if (jelly_belly_bounce(player, source, damageFlags)) return true;
if (player.HasCollectible(COLLECTIBLE_HOST_HAT) && random_below(HOST_HAT_VOLLEY_ODDS) == 0 &&
source.type == ENTITY_PROJECTILE)
{
Vector back = return_shot_velocity(source);
for (float turn : {-HOST_HAT_SPREAD, 0.0f, HOST_HAT_SPREAD})
player.FireTear({player.pos, vector_rotated(back, turn)}, RETURN_SHOT_FLAGS, nullptr, 1);
player.PlayCollectibleAnim(COLLECTIBLE_HOST_HAT, false, host_hat_anim("Shooting", back), -1);
return true;
}
bool isShot = source.type == ENTITY_PROJECTILE || source.type == ENTITY_TEAR;
if (player.HasCollectible(COLLECTIBLE_METAL_PLATE) &&
player.GetCollectibleRNG(COLLECTIBLE_METAL_PLATE).RandomInt(METAL_PLATE_ODDS) == 0 && isShot)
{
Entity_Tear* tear = player.FireTear({player.pos, return_shot_velocity(source)}, RETURN_SHOT_FLAGS, nullptr, 1);
TearFlags flags = tear->tearFlags;
flags.set(TEAR_HOMING);
flags.set(TEAR_CONFUSION);
tear->SetTearFlags(flags);
tear->SetColor(METAL_PLATE_TEAR_COLOR, -1, 255, false, true);
tear->Update();
return true;
}
if (player.HasCollectible(COLLECTIBLE_CONE_HEAD) && !(damageFlags & (DAMAGE_NO_MODIFIERS | DAMAGE_FAKE)) &&
player.GetCollectibleRNG(COLLECTIBLE_CONE_HEAD).RandomInt(CONE_HEAD_ODDS) == 0)
{
player.SetColor(CONE_HEAD_FLASH, CONE_HEAD_FLASH_FRAMES, 1, true, true);
return true;
}
return false;
}
// Whether a list of ids has one.
@@ -241,13 +394,6 @@ static void bestiary_count_add(std::map<int, int>& counts, int type, int variant
if (entity && entity->isBestiary) counts[entity->id << 20 | entity->variant << 8]++;
}
// Plays one of the player's sounds at a volume and pitch, unless the seeds swap it for a fart.
static void voice_play(int sound, float volume, int frameDelay, float pitch)
{
seed_fart_sound_override(&sound);
g_manager->sfxManager.Play(sound, {.volume = volume, .frameDelay = frameDelay, .pitch = pitch});
}
// The damage a hit deals in half hearts: rounded, two from the Womb on or on a victory lap, halved by the Wafer and
// its likes, doubled by the double damage effect, and set by the seeds that hurt more.
static int damage_amount_get(Entity_Player& player, float damage, uint64_t damageFlags, const EntityRef& source)
@@ -478,7 +624,6 @@ static bool holy_mantle_block(Entity_Player& player)
static bool hit_items_check(Entity_Player& player, int amount, const ItemsHit& hit)
{
passives_hit_trigger(player, amount);
if (player.HasCollectible(ZODIAC)) reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Zodiac's sign)");
bool isHurtShown = late_items_hit_trigger(player, hit);
character_items_hit(player);
if (player.playerType == PLAYER_SAMSON_B && (player.redHearts > 0 || player.soulHearts > 0 || player.boneHearts > 0))
@@ -491,10 +636,46 @@ static bool hit_items_check(Entity_Player& player, int amount, const ItemsHit& h
return isHurtShown;
}
// Glass Cannon held in a slot shatters on a penalized hit: it becomes the Broken Glass Cannon with a crash, an impact
// and shards, the player bleeds (Anemic, and Judas' Birthright's timed boost with Book of Belial), and takes two more
// full heart hits of its own.
static void glass_cannon_break(Entity_Player& player)
{
constexpr int GLASS_SHARD_COUNT = 8;
constexpr float GLASS_SHARD_SPEED_RANGE = 3;
constexpr float GLASS_SHARD_SPEED_MIN = 2;
constexpr int BELIAL_BOOST_FRAMES = 4;
constexpr float SHATTER_DAMAGE = 2;
constexpr uint64_t SHATTER_FLAGS = DAMAGE_NOKILL | DAMAGE_ISAAC_HURT | DAMAGE_INVINCIBLE | DAMAGE_NO_MODIFIERS;
constexpr int SHATTER_COUNTDOWN = 30;
int slot = player.GetActiveItemSlot(COLLECTIBLE_GLASS_CANNON);
if (slot < 0) return;
player.RemoveCollectible(player.activeItems[slot].item, false, slot, true);
player.AddCollectible(COLLECTIBLE_BROKEN_GLASS_CANNON, 0, false, slot, 0);
voice_play(SOUND_GLASS_BREAK, 1, SOUND_FRAME_DELAY, 1);
g_game->Spawn({.position = player.pos, .type = ENTITY_EFFECT, .variant = EFFECT_IMPACT, .seed = Random()})->Update();
game_particles_spawn({.position = player.pos,
.height = player.posOffset.y,
.speed = random_unit() * GLASS_SHARD_SPEED_RANGE + GLASS_SHARD_SPEED_MIN,
.count = GLASS_SHARD_COUNT,
.variant = EFFECT_TOOTH_PARTICLE});
TemporaryEffects& effects = player.temporaryEffects;
if (!effects.HasCollectibleEffect(COLLECTIBLE_ANEMIC))
effects.AddEffect(TemporaryEffect(g_manager->itemConfig.GetCollectible(COLLECTIBLE_ANEMIC)), true, 1);
if (player.HasCollectible(COLLECTIBLE_BOOK_OF_BELIAL_PASSIVE))
effects.AddNullEffect(NULLITEM_JUDAS_BIRTHRIGHT, true, BELIAL_BOOST_FRAMES);
for (int hit = 0; hit < 2; hit++)
{
player.ResetDamageCooldown();
player.TakeDamage(SHATTER_DAMAGE, SHATTER_FLAGS, EntityRef(&player), SHATTER_COUNTDOWN);
}
}
// 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;
Entity* hitter = source.type == ENTITY_SIREN_HELPER && source.entity ? source.entity->parent.get() : nullptr;
if (source.type == ENTITY_FAMILIAR) hitter = source.entity;
if (!hitter || hitter->type != ENTITY_FAMILIAR) return false;
@@ -523,7 +704,7 @@ bool Entity_Player::TakeDamage(float damage, uint64_t damageFlags, const EntityR
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (white fire's lost curse)");
}
if (IsHologram() || is_damage_ignored(*this, source, damageFlags)) return false;
damage_reactions_check(*this, damageFlags);
if (damage_reactions_check(*this, source, damageFlags)) return false;
if (!(damageFlags & DAMAGE_NO_HURT_EFFECTS)) play_hurt_effects();
bool isSeedProtected = game.seedEffects.HasSeedEffect(SEED_INVINCIBLE) ||
@@ -560,8 +741,17 @@ bool Entity_Player::TakeDamage(float damage, uint64_t damageFlags, const EntityR
if (temporaryEffects.HasCollectibleEffect(COLLECTIBLE_HOLY_MANTLE) && !(damageFlags & DAMAGE_RED_HEARTS))
return holy_mantle_block(*this);
if (hallowedGroundCountdown > 0 && !(damageFlags & DAMAGE_NO_MODIFIERS))
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Hallowed Ground)");
if (hallowedGroundCountdown > 0 && !(damageFlags & DAMAGE_NO_MODIFIERS) &&
GetCollectibleRNG(COLLECTIBLE_HALLOWED_GROUND).RandomInt(2) == 0)
{
constexpr ColorMod HALLOWED_FLASH = {{1, 1, 1, 1}, {0, 0, 0, 0}, {64 / 255.0f, 64 / 255.0f, 128 / 255.0f}};
constexpr int HALLOWED_FLASH_FRAMES = 15;
constexpr int HALLOWED_COOLDOWN = 8;
SetColor(HALLOWED_FLASH, HALLOWED_FLASH_FRAMES, 255, true, true);
damageCooldown = damage_cooldown_scale(HALLOWED_COOLDOWN);
AddEntityFlags(FLAG_NO_DAMAGE_BLINK);
return false;
}
if (!lua_engine_get().EntityTakeDamage(this, (float)amount, damageFlags, source, damageCountdown)) return false;
if (try_end_astral_projection()) return false;
if (playerType == PLAYER_JACOB_B && source.type == ENTITY_DARK_ESAU)
@@ -683,7 +873,7 @@ bool Entity_Player::TakeDamage(float damage, uint64_t damageFlags, const EntityR
flags &= ~FLAG_NO_DAMAGE_BLINK;
if (isAstral) reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Astral Projection)");
blind_rage_finger_bone_hit(*this);
if (isPenalized && HasCollectible(COLLECTIBLE_GLASS_CANNON)) reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Glass Cannon)");
if (isPenalized && HasCollectible(COLLECTIBLE_GLASS_CANNON)) glass_cannon_break(*this);
if (isHitAnimated)
{
@@ -720,6 +910,12 @@ void Entity_Player::death_count(const EntityRef& source, uint64_t damageFlags)
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (the achievement for dying to Ipecac)");
}
// 0060d090 Ends the invincibility frames.
void Entity_Player::ResetDamageCooldown()
{
damageCooldown = 0;
}
// 007db6b0 Whether a hit kills at once: the Lost's curse, or Tainted Jacob's ghost.
bool Entity_Player::HasInstantDeathCurse()
{