Curation round 22: every NpcAI below type 400, Repentance bosses and Rotgut, the player's last branches, clots and familiars, bomb tear effects and chain lightning, Mother and Home to Dogma, Greed and Greedier, the new Anm2Ed JSON loader, shared IDs folded (135 duplicates)
This commit is contained in:
1 parent
6a11163842
commit
b9405bfb31
198 files changed
+21859
-2999
No files matched your search
+421
-53
@@ -1,6 +1,9 @@
|
||||
#include "boss_ai.h"
|
||||
#include "entity_bomb.h"
|
||||
#include "entity_combat.h"
|
||||
#include "entity_effect_combat.h"
|
||||
#include "entity_familiar.h"
|
||||
#include "entity_laser.h"
|
||||
#include "entity_pickup.h"
|
||||
#include "entity_npc.h"
|
||||
#include "entity_player.h"
|
||||
@@ -9,12 +12,14 @@
|
||||
#include "entity_player_trinkets.h"
|
||||
#include "entity_tear.h"
|
||||
#include "game.h"
|
||||
#include "grid_entity_trap_door.h"
|
||||
#include "level.h"
|
||||
#include "log.h"
|
||||
#include "lua_engine.h"
|
||||
#include "manager.h"
|
||||
#include "npc_ai.h"
|
||||
#include "npc_basement.h"
|
||||
#include "persistent_game_data.h"
|
||||
#include "room.h"
|
||||
#include "room_grid.h"
|
||||
#include <algorithm>
|
||||
@@ -42,7 +47,6 @@ constexpr int WHITE_FIRE_VARIANT = 4;
|
||||
constexpr int EFFECT_SELF_DAMAGE = 19;
|
||||
constexpr int EFFECT_POISON_CLOUD = 123;
|
||||
constexpr int ITEM_STATE_HOLD_STILL = 47;
|
||||
constexpr int ENEMY_TYPE_LAST = 999;
|
||||
constexpr int BABY_GHOST = 59;
|
||||
constexpr int BABY_HALO = 24;
|
||||
constexpr int BABY_SHIELD = 11;
|
||||
@@ -63,8 +67,6 @@ constexpr int SOUND_BOSS_DELAY_RANDOM = 130;
|
||||
constexpr int SOUND_BOSS_DELAY_MIN = 50;
|
||||
constexpr int SOUND_FRAME_DELAY = 2;
|
||||
|
||||
constexpr uint64_t DAMAGE_INVINCIBLE_IGNORED = 1ull << 13;
|
||||
constexpr uint64_t DAMAGE_IGNORED = 1ull << 34;
|
||||
// Tainted Jacob turned ghost by Dark Esau cannot be hurt for 90 frames.
|
||||
constexpr int JACOB_GHOST_COOLDOWN = 90;
|
||||
constexpr uint64_t DAMAGE_NO_HURT_EFFECTS = 0x100d0400;
|
||||
@@ -75,8 +77,6 @@ constexpr int LAST_DAMAGE_STAGE_MAX = 13;
|
||||
constexpr int HURT_FRAMES_PER_HEART = 60;
|
||||
constexpr int HURT_HEARTS_MAX = 2;
|
||||
constexpr int HIT_COOLDOWN = 4;
|
||||
constexpr uint32_t DEBUG_INFINITE_HP = 1 << 2;
|
||||
constexpr uint32_t DEBUG_DAMAGE_VALUES = 1 << 6;
|
||||
constexpr uint32_t STAGE_FULL_HEART_DAMAGE = 7;
|
||||
constexpr int MASSIVE_DAMAGE = 24;
|
||||
constexpr int EVIL_CHARM_GRACE_FRAMES = 30;
|
||||
@@ -131,7 +131,7 @@ constexpr float GNAWED_LEAF_MASS = 1000;
|
||||
constexpr int BREATH_OF_LIFE_WINDOW = 5;
|
||||
|
||||
// Whether a hit passes the player by: its own self damage, friendly sources, another's Dark Esau, a dead player,
|
||||
// Isaac's Heart, Evil Charm's hazards, and a co-op baby still appearing.
|
||||
// Isaac's Heart, Evil Charm's hazards, a co-op baby still appearing, and a Visage chain whose end holds the player.
|
||||
static bool is_damage_ignored(Entity_Player& player, const EntityRef& source, uint64_t damageFlags)
|
||||
{
|
||||
Game& game = *g_game;
|
||||
@@ -156,27 +156,57 @@ 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_VISAGE && source.variant == VISAGE_CHAIN && entity)
|
||||
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (a Visage chain)");
|
||||
return false;
|
||||
if (source.type != ENTITY_VISAGE || source.variant != VISAGE_CHAIN || !entity) return false;
|
||||
Entity* link = entity;
|
||||
while (link->child && link->child->type == ENTITY_VISAGE && link->child->variant == VISAGE_CHAIN) link = link->child.get();
|
||||
return link->target.get() == &player;
|
||||
}
|
||||
|
||||
// Whether a Bishop the player charmed stands in the room to take the hit (find_nearest_enemy 004e7d10).
|
||||
static bool is_bishop_present()
|
||||
// A charmed Bishop takes the hit for the player: it is hurt instead and its shield flashes on the player. Whether a
|
||||
// Bishop took it.
|
||||
static bool bishop_shield_block(Entity_Player& player)
|
||||
{
|
||||
return std::ranges::any_of(g_game->room->entityList.updateEL, [](Entity* entity)
|
||||
{ return entity->type == ENTITY_BISHOP && entity->HasEntityFlags(FLAG_CHARM); });
|
||||
constexpr float BISHOP_HIT_DAMAGE = 3.5f;
|
||||
constexpr int BISHOP_HIT_COUNTDOWN = 15;
|
||||
constexpr int BISHOP_SOUND_DELAY = 10;
|
||||
constexpr float BISHOP_SHIELD_RISE = -24;
|
||||
Entity* bishop = bishop_nearest_find(player.pos, true);
|
||||
if (!bishop) return false;
|
||||
|
||||
bishop->TakeDamage(BISHOP_HIT_DAMAGE, DAMAGE_COUNTDOWN, EntityRef(), BISHOP_HIT_COUNTDOWN);
|
||||
int sound = SOUND_BISHOP_HIT;
|
||||
seed_fart_sound_override(&sound);
|
||||
g_manager->sfxManager.Play(sound, {.frameDelay = BISHOP_SOUND_DELAY});
|
||||
if (player.hitEffect) player.hitEffect->Remove();
|
||||
auto* shield = static_cast<Entity_Effect*>(g_game->Spawn({.position = player.pos, .spawner = bishop,
|
||||
.type = ENTITY_EFFECT, .variant = EFFECT_BISHOP_SHIELD,
|
||||
.seed = Random()}));
|
||||
shield->parent = bishop;
|
||||
shield->target = &player;
|
||||
shield->parentOffset = vector_make(0, BISHOP_SHIELD_RISE);
|
||||
shield->posOffset = vector_make(player.posOffset.x, player.posOffset.y + BISHOP_SHIELD_RISE);
|
||||
shield->Update();
|
||||
player.hitEffect = shield;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Whether a wisp of the player's could take the hit (FUN_007c7b10).
|
||||
static bool is_wisp_shield_present(Entity_Player& player)
|
||||
// (007c7b10) Dull Razor's wisps shield the player: for each live one, one hit in five (not a fake or red heart one)
|
||||
// is taken by the wisp, which dies, and the player stays unhurtable for a moment. Whether a wisp took it.
|
||||
static bool wisp_shield_block(Entity_Player& player, uint64_t damageFlags)
|
||||
{
|
||||
return std::ranges::any_of(g_game->room->entityList.updateEL, [&](Entity* entity)
|
||||
constexpr int SHIELD_ODDS = 5;
|
||||
constexpr int SHIELD_COOLDOWN = 15;
|
||||
for (Entity* entity : entity_query(ENTITY_FAMILIAR, Entity_Familiar::WISP))
|
||||
{
|
||||
return !entity->isDead && entity->IsFamiliar() && entity->variant == Entity_Familiar::WISP &&
|
||||
entity->subtype == COLLECTIBLE_DULL_RAZOR &&
|
||||
static_cast<Entity_Familiar*>(entity)->player == &player;
|
||||
});
|
||||
auto& wisp = *static_cast<Entity_Familiar*>(entity);
|
||||
bool isShield = !wisp.isDead && wisp.player == &player && wisp.subtype == COLLECTIBLE_DULL_RAZOR &&
|
||||
!(damageFlags & (DAMAGE_FAKE | DAMAGE_RED_HEARTS));
|
||||
if (!isShield || Random() % SHIELD_ODDS != 0) continue;
|
||||
player.damageCooldown = std::max(player.damageCooldown, SHIELD_COOLDOWN);
|
||||
wisp.Kill(EntityRef());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Plays one of the player's sounds at a volume and pitch, unless the seeds swap it for a fart.
|
||||
@@ -230,7 +260,7 @@ static bool jelly_belly_bounce(Entity_Player& player, const EntityRef& source, u
|
||||
{
|
||||
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) ||
|
||||
bool isLiving = hitter && ((source.type >= ENTITY_FIRST_ENEMY && source.type <= ENTITY_LAST_ENEMY) ||
|
||||
source.type == ENTITY_PROJECTILE || source.type == ENTITY_PLAYER);
|
||||
if (random_below(JELLY_BELLY_ODDS) != 0 || !isLiving) return false;
|
||||
|
||||
@@ -292,14 +322,13 @@ static void walnut_crack(Entity_Player& player)
|
||||
// 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.
|
||||
// Head shrugs off a fifth of the hits, after a charmed Bishop's shield and Walnut's crack. Whether the hit is stopped.
|
||||
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 (bishop_shield_block(player)) return true;
|
||||
if (player.HasTrinket(TRINKET_WALNUT) && isExplosion) walnut_crack(player);
|
||||
if (player.HasCollectible(COLLECTIBLE_PYROMANIAC) && isFire) return true;
|
||||
if (player.HasCollectible(COLLECTIBLE_PYROMANIAC) && isExplosion)
|
||||
@@ -683,6 +712,134 @@ static bool is_siren_charm_fresh(const EntityRef& source)
|
||||
return frames >= 1 && frames <= SIREN_CHARM_SPARE_FRAMES;
|
||||
}
|
||||
|
||||
// A hit that spawns a fly gives one blue fly to the player behind the hit (its source or the source's spawner), else
|
||||
// to the player nearest the one hit. The fly goes after the player hit.
|
||||
static void hit_fly_spawn(Entity_Player& player, const EntityRef& source)
|
||||
{
|
||||
Entity* owner = source.entity;
|
||||
if (owner && !owner->is_player()) owner = owner->spawnerEntity.get();
|
||||
if (!owner || !owner->is_player()) owner = game_nearest_player(player.pos);
|
||||
static_cast<Entity_Player*>(owner)->AddBlueFlies(1, owner->pos, &player);
|
||||
}
|
||||
|
||||
// Greed and the coin thieves (all hits in Pay to Play) knock a coin out of the player, then one to three more fly
|
||||
// out as pennies.
|
||||
static void coins_drop(Entity_Player& player)
|
||||
{
|
||||
constexpr int COIN_DROP_RANGE = 3;
|
||||
constexpr float COIN_DROP_SPEED_RANGE = 5;
|
||||
constexpr float COIN_DROP_SPEED_MIN = 2;
|
||||
player.AddCoins(-1);
|
||||
int dropped = std::min(random_below(COIN_DROP_RANGE) + 1, player.numCoins);
|
||||
for (int i = 0; i < dropped; i++)
|
||||
{
|
||||
uint32_t seed = Random();
|
||||
Vector direction = random_direction();
|
||||
Vector velocity = vector_scale(direction, random_unit() * COIN_DROP_SPEED_RANGE + COIN_DROP_SPEED_MIN);
|
||||
g_game->Spawn({.position = player.pos, .velocity = velocity, .spawner = &player, .subType = COIN_PENNY,
|
||||
.type = ENTITY_PICKUP, .variant = PICKUP_COIN, .seed = seed});
|
||||
}
|
||||
player.AddCoins(-dropped);
|
||||
}
|
||||
|
||||
// The co-op babies that answer a hit: the fart baby farts (or only blows), the bomb baby explodes and the book baby
|
||||
// rolls the room with the D6.
|
||||
static void coop_baby_hit(Entity_Player& player)
|
||||
{
|
||||
constexpr float BABY_FART_RADIUS = 85;
|
||||
constexpr float BABY_BEAN_RADIUS = 120;
|
||||
constexpr float BABY_BOMB_DAMAGE = 40;
|
||||
constexpr float BABY_BOMB_RADIUS = 60;
|
||||
switch (player.babySkin)
|
||||
{
|
||||
case BABY_FART:
|
||||
{
|
||||
bool isBlowOnly = random_below(2) != 0;
|
||||
if (!isBlowOnly) game_fart({.position = player.pos, .source = &player, .radius = BABY_FART_RADIUS});
|
||||
game_butter_bean_fart({.position = player.pos, .source = &player, .radius = BABY_BEAN_RADIUS,
|
||||
.isShowEffect = isBlowOnly, .isSuperKnockback = false});
|
||||
break;
|
||||
}
|
||||
case BABY_BOMB:
|
||||
explosion_damage({.position = player.pos, .source = &player, .damage = BABY_BOMB_DAMAGE,
|
||||
.radius = BABY_BOMB_RADIUS});
|
||||
g_game->Spawn({.position = player.pos, .type = ENTITY_EFFECT, .variant = EFFECT_BOMB_EXPLOSION,
|
||||
.seed = Random()})->Update();
|
||||
break;
|
||||
case BABY_BOOK:
|
||||
player.UseActiveItem({.item = COLLECTIBLE_D6, .flags = USE_NOANIM});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Marbles: a hit holding a trinket swallows it one time in ten (always in Pica Run), as by the Smelter.
|
||||
static void marbles_swallow(Entity_Player& player)
|
||||
{
|
||||
constexpr int MARBLES_ODDS = 10;
|
||||
bool isRolled = player.GetCollectibleRNG(COLLECTIBLE_MARBLES).RandomInt(MARBLES_ODDS) == 0;
|
||||
if (!isRolled && g_game->challenge != CHALLENGE_PICA_RUN) return;
|
||||
|
||||
player.FlushQueueItem();
|
||||
player.UseActiveItem({.item = COLLECTIBLE_SMELTER, .flags = USE_NOANIM});
|
||||
sound_play(SOUND_VAMP_GULP);
|
||||
}
|
||||
|
||||
// Heartbreak: a killing hit breaks a heart container (one for coin health, else two) and sets off the Necronomicon.
|
||||
// True when a heart is left to save the player with.
|
||||
static bool heartbreak_break(Entity_Player& player)
|
||||
{
|
||||
player.AddBrokenHearts(player.GetHealthType() == HEALTH_COIN ? 1 : 2);
|
||||
player.UseActiveItem({.item = COLLECTIBLE_NECRONOMICON, .flags = USE_NOANIM | USE_ALLOWNONMAIN});
|
||||
sound_play(SOUND_BLACK_POOF);
|
||||
return player.GetHeartLimit(false) >= 1;
|
||||
}
|
||||
|
||||
// Monkey Paw: a black heart per copy near the player on its last heart, three times before the paw is spent.
|
||||
static void monkey_paw_grant(Entity_Player& player)
|
||||
{
|
||||
for (int i = player.GetTrinketMultiplier(TRINKET_MONKEY_PAW); i > 0; i--)
|
||||
{
|
||||
uint32_t seed = Random();
|
||||
Vector spot = room_free_pickup_position_find({.position = player.pos, .step = PICKUP_SPOT_STEP});
|
||||
g_game->Spawn({.position = spot, .spawner = &player, .subType = HEART_BLACK, .type = ENTITY_PICKUP,
|
||||
.variant = PICKUP_HEART, .seed = seed});
|
||||
}
|
||||
if (--player.monkeyPawCounter >= 1) return;
|
||||
player.TryRemoveTrinket(TRINKET_MONKEY_PAW);
|
||||
player.monkeyPawCounter = MONKEY_PAW_USES;
|
||||
}
|
||||
|
||||
// Astral Projection's start: the room pauses, the body stays behind as a ghost corpse and the spirit goes on for 150
|
||||
// frames, with a bloom, a white flash fading back to the room's colours, a shockwave and a heartbeat.
|
||||
static void astral_projection_start(Entity_Player& player)
|
||||
{
|
||||
constexpr int ASTRAL_PAUSE = 60;
|
||||
constexpr int ASTRAL_ROOM_FRAMES = 150;
|
||||
constexpr int ASTRAL_BLOOM = 10;
|
||||
constexpr float ASTRAL_FLASH_RATE = 0.015f;
|
||||
constexpr float ASTRAL_FADE_RATE = 0.008f;
|
||||
constexpr float ASTRAL_SHOCK_AMPLITUDE = 0.05f;
|
||||
constexpr float ASTRAL_SHOCK_SPEED = 0.07f;
|
||||
constexpr int ASTRAL_SHOCK_DURATION = 12;
|
||||
constexpr ColorModState ASTRAL_FLASH = {1, 1, 1, 1, 0, 1};
|
||||
Game& game = *g_game;
|
||||
Room& room = *game.room;
|
||||
room.SetPauseTimer(ASTRAL_PAUSE);
|
||||
player.spawn_ghost_corpse();
|
||||
player.temporaryEffects.AddCollectibleEffect(COLLECTIBLE_ASTRAL_PROJECTION, true, 1);
|
||||
TemporaryEffect roomEffect(g_manager->itemConfig.GetCollectible(COLLECTIBLE_ASTRAL_PROJECTION));
|
||||
roomEffect.cooldown = ASTRAL_ROOM_FRAMES;
|
||||
room.temporaryEffects.AddEffect(roomEffect, true, 1);
|
||||
game.bloomDuration = ASTRAL_BLOOM;
|
||||
game.bloomTimer = ASTRAL_BLOOM;
|
||||
game.bloomStrength = 1;
|
||||
game.SetColorModifier(ASTRAL_FLASH, false, ASTRAL_FLASH_RATE);
|
||||
game.SetColorModifier(room.get_color_modifier(), true, ASTRAL_FADE_RATE);
|
||||
shockwave_make(player.pos, ASTRAL_SHOCK_AMPLITUDE, ASTRAL_SHOCK_SPEED, ASTRAL_SHOCK_DURATION);
|
||||
sound_play(SOUND_HEARTBEAT);
|
||||
player.damageCooldown += damage_cooldown_scale(ASTRAL_PAUSE);
|
||||
}
|
||||
|
||||
// 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)
|
||||
@@ -696,12 +853,16 @@ bool Entity_Player::TakeDamage(float damage, uint64_t damageFlags, const EntityR
|
||||
return twin->TakeDamage(damage, damageFlags, source, damageCountdown);
|
||||
}
|
||||
if (is_siren_charm_fresh(source)) return false;
|
||||
if (is_wisp_shield_present(*this)) reconstruction_missing("Entity_Player::TakeDamage 007729d0 (wisp shields)");
|
||||
if (wisp_shield_block(*this, damageFlags)) return false;
|
||||
if (source.type == ENTITY_FIREPLACE && source.variant == WHITE_FIRE_VARIANT)
|
||||
{
|
||||
bool isGhost = playerType == PLAYER_THELOST || playerType == PLAYER_THELOST_B || playerType == PLAYER_THESOUL_B;
|
||||
if (isGhost || HasInstantDeathCurse() || isDead) return false;
|
||||
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (white fire's lost curse)");
|
||||
spawn_ghost_corpse();
|
||||
if (!temporaryEffects.HasNullEffect(NULLITEM_LOST_CURSE)) game.playerManager.add_lost_curse(NULLITEM_LOST_CURSE);
|
||||
sound_play(SOUND_FIREDEATH_HISS);
|
||||
// The controllers' rumble is not wired here.
|
||||
return true;
|
||||
}
|
||||
if (IsHologram() || is_damage_ignored(*this, source, damageFlags)) return false;
|
||||
if (damage_reactions_check(*this, source, damageFlags)) return false;
|
||||
@@ -727,7 +888,7 @@ bool Entity_Player::TakeDamage(float damage, uint64_t damageFlags, const EntityR
|
||||
int amount = damage_amount_get(*this, damage, damageFlags, source);
|
||||
bool isFake = damageFlags & DAMAGE_FAKE;
|
||||
if (isFake) amount = 0;
|
||||
if (damageFlags & DAMAGE_SPAWN_FLY) reconstruction_missing("Entity_Player::TakeDamage 007729d0 (a fly for the hit)");
|
||||
if (damageFlags & DAMAGE_SPAWN_FLY) hit_fly_spawn(*this, source);
|
||||
|
||||
bool isInvincibleNow = HasInvincibility(damageFlags, source);
|
||||
bool isPenalized = !(damageFlags & DAMAGE_UNPENALIZED);
|
||||
@@ -776,7 +937,7 @@ bool Entity_Player::TakeDamage(float damage, uint64_t damageFlags, const EntityR
|
||||
roomDamageTaken += amount;
|
||||
if (playerType != PLAYER_MAGDALENE_B || !is_maggy_draining(*this)) totalDamageTaken += amount;
|
||||
}
|
||||
if (source.type >= ENTITY_FIRST_ENEMY && source.type <= ENEMY_TYPE_LAST)
|
||||
if (source.type >= ENTITY_FIRST_ENEMY && source.type <= ENTITY_LAST_ENEMY)
|
||||
bestiary_count_add(g_manager->persistentGameData.bestiary.hits, source.type, source.variant);
|
||||
if (game.debugFlags & DEBUG_DAMAGE_VALUES)
|
||||
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (spawn_debug_damage_text)");
|
||||
@@ -786,12 +947,10 @@ bool Entity_Player::TakeDamage(float damage, uint64_t damageFlags, const EntityR
|
||||
bool isThief = is_listed(COIN_THIEF_TYPES, source.type) || source.spawnerType == ULTRA_GREED ||
|
||||
source.spawnerType == ULTRA_GREED_DOOR ||
|
||||
(source.type == ENTITY_PROJECTILE && is_listed(COIN_SHOOTER_TYPES, source.spawnerType));
|
||||
if ((isThief || game.challenge == CHALLENGE_PAY_TO_PLAY) && numCoins > 0)
|
||||
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (dropping coins to Greed)");
|
||||
if (variant == PLAYER_VARIANT_COOP_BABY && (babySkin == BABY_FART || babySkin == BABY_BOMB || babySkin == BABY_BOOK))
|
||||
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (the co-op babies that answer hits)");
|
||||
if (HasCollectible(COLLECTIBLE_MARBLES) && (trinkets[0] != 0 || queuedItem.item))
|
||||
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Marbles)");
|
||||
if ((isThief || game.challenge == CHALLENGE_PAY_TO_PLAY) && numCoins > 0) coins_drop(*this);
|
||||
if (variant == PLAYER_VARIANT_COOP_BABY) coop_baby_hit(*this);
|
||||
bool isTrinketQueued = queuedItem.item && queuedItem.item->type == ITEM_TRINKET;
|
||||
if (HasCollectible(COLLECTIBLE_MARBLES) && (trinkets[0] != 0 || isTrinketQueued)) marbles_swallow(*this);
|
||||
|
||||
float pitch = get_voice_pitch();
|
||||
int grunt = SOUND_ISAAC_HURT_GRUNT;
|
||||
@@ -828,8 +987,8 @@ bool Entity_Player::TakeDamage(float damage, uint64_t damageFlags, const EntityR
|
||||
|
||||
if ((redHearts < 1 && soulHearts < 1 && boneHearts < 1) || isInstantDeath)
|
||||
{
|
||||
if (HasCollectible(COLLECTIBLE_HEARTBREAK)) reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Heartbreak)");
|
||||
if (damageFlags & DAMAGE_NOKILL) TryPreventDeath();
|
||||
bool isHeartbreakSaved = HasCollectible(COLLECTIBLE_HEARTBREAK) && heartbreak_break(*this);
|
||||
if (isHeartbreakSaved || (damageFlags & DAMAGE_NOKILL)) TryPreventDeath();
|
||||
else
|
||||
{
|
||||
if (isInstantDeath)
|
||||
@@ -865,13 +1024,12 @@ bool Entity_Player::TakeDamage(float damage, uint64_t damageFlags, const EntityR
|
||||
{
|
||||
last_heart_items_trigger(*this, damageFlags);
|
||||
bool isLastHeart = soulHearts < 1 || (redHearts < 1 && soulHearts == scale_for_hard_difficulty(1));
|
||||
if (isLastHeart && HasTrinket(TRINKET_MONKEY_PAW) && variant == PLAYER_VARIANT_PLAYER)
|
||||
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Monkey Paw)");
|
||||
if (isLastHeart && HasTrinket(TRINKET_MONKEY_PAW) && variant == PLAYER_VARIANT_PLAYER) monkey_paw_grant(*this);
|
||||
}
|
||||
|
||||
damageCooldown = damage_cooldown_scale(std::min(hurtFrames, HURT_HEARTS_MAX) * HURT_FRAMES_PER_HEART);
|
||||
flags &= ~FLAG_NO_DAMAGE_BLINK;
|
||||
if (isAstral) reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Astral Projection)");
|
||||
if (isAstral) astral_projection_start(*this);
|
||||
blind_rage_finger_bone_hit(*this);
|
||||
if (isPenalized && HasCollectible(COLLECTIBLE_GLASS_CANNON)) glass_cannon_break(*this);
|
||||
|
||||
@@ -889,25 +1047,30 @@ bool Entity_Player::TakeDamage(float damage, uint64_t damageFlags, const EntityR
|
||||
if (damageCooldown > 0 && !isDead && twin && twin->damageCooldown < damageCooldown && !twin->isDead)
|
||||
twin->damageCooldown = damageCooldown;
|
||||
if (HasTrinket(TRINKET_SWALLOWED_M80) && !(damageFlags & DAMAGE_NO_PENALTIES))
|
||||
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Swallowed M80)");
|
||||
{
|
||||
int odds = std::max(1, 3 - GetTrinketMultiplier(TRINKET_SWALLOWED_M80));
|
||||
if (GetTrinketRNG(TRINKET_SWALLOWED_M80).RandomInt(odds) == 0)
|
||||
UseActiveItem({.item = COLLECTIBLE_KAMIKAZE, .flags = USE_NOANIM | USE_NOCOSTUME | USE_ALLOWNONMAIN});
|
||||
}
|
||||
bool isGlitching = isPlayingExtraAnimation && sprite.IsPlaying("Glitch");
|
||||
if (!isDead && playerType == PLAYER_EDEN_B && isPenalized && !isGlitching)
|
||||
tainted_eden_glitch(*this);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Counts the player's death in the bestiary of the enemy behind the hit. Dying to one's own Ipecac unlocks an
|
||||
// achievement that is not written yet.
|
||||
// Counts the player's death in the bestiary of the enemy behind the hit. Dying to an explosive poison tear (Ipecac)
|
||||
// unlocks Lil Spewer.
|
||||
void Entity_Player::death_count(const EntityRef& source, uint64_t damageFlags)
|
||||
{
|
||||
PersistentGameData_Bestiary& bestiary = g_manager->persistentGameData.bestiary;
|
||||
|
||||
if (source.type >= ENTITY_FIRST_ENEMY && source.type <= ENEMY_TYPE_LAST)
|
||||
if (source.type >= ENTITY_FIRST_ENEMY && source.type <= ENTITY_LAST_ENEMY)
|
||||
bestiary_count_add(bestiary.deaths, source.type, source.variant);
|
||||
else if (source.spawnerType >= ENTITY_FIRST_ENEMY && source.spawnerType <= ENEMY_TYPE_LAST)
|
||||
else if (source.spawnerType >= ENTITY_FIRST_ENEMY && source.spawnerType <= ENTITY_LAST_ENEMY)
|
||||
bestiary_count_add(bestiary.deaths, source.spawnerType, (int)source.spawnerVariant);
|
||||
if ((damageFlags & DAMAGE_EXPLOSION) && source.type == ENTITY_TEAR && source.entity)
|
||||
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (the achievement for dying to Ipecac)");
|
||||
if (!(damageFlags & DAMAGE_EXPLOSION) || source.type != ENTITY_TEAR || !source.entity) return;
|
||||
TearFlags& tearFlags = static_cast<Entity_Tear*>(source.entity)->tearFlags;
|
||||
if (tearFlags[TEAR_EXPLOSIVE] && tearFlags[TEAR_POISON]) g_manager->persistentGameData.TryUnlock(ACHIEVEMENT_LIL_SPEWER);
|
||||
}
|
||||
|
||||
// 0060d090 Ends the invincibility frames.
|
||||
@@ -960,7 +1123,7 @@ bool Entity_Player::IsNullItemCostumeVisible(int nullItemID, int playerSpriteLay
|
||||
// donation hurt.
|
||||
bool Entity_Player::HasInvincibility(uint64_t damageFlags, const EntityRef& source)
|
||||
{
|
||||
if (damageFlags & DAMAGE_INVINCIBLE_IGNORED) return false;
|
||||
if (damageFlags & DAMAGE_INVINCIBLE) return false;
|
||||
|
||||
TemporaryEffects& effects = temporaryEffects;
|
||||
bool isRedHit = damageFlags & DAMAGE_RED_HEARTS;
|
||||
@@ -1036,15 +1199,67 @@ float Entity_Player::local_volume_get()
|
||||
return (float)g_manager->optionsConfig.onlinePlayerVolume * REMOTE_VOLUME_SCALE;
|
||||
}
|
||||
|
||||
// 007d1c10 Breath of Life's holy light when the player is hit as it runs out, not written yet. True when it shines.
|
||||
// 007d1c10 Breath of Life's answer to a hit in its first frames of invincibility: four holy beams strike around the
|
||||
// player and it stays unhurtable for 30 frames more (as Book of Shadows), or with Book of Belial the Necronomicon
|
||||
// goes off and the dark spell lasts. With the Book of Virtues its wisps are topped up to four. True when it answered.
|
||||
uint32_t Entity_Player::play_hurt_effects()
|
||||
{
|
||||
constexpr int BREATH_BEAMS = 4;
|
||||
constexpr float BREATH_BEAM_TURN = 90;
|
||||
constexpr int BREATH_BEAM_TIMEOUT = 30;
|
||||
constexpr float BREATH_BEAM_RISE = -12;
|
||||
constexpr float BREATH_BEAM_DAMAGE = 12;
|
||||
constexpr float BREATH_BEAM_DEPTH = 3000;
|
||||
constexpr float LAST_BREATH_BEAM_DEPTH = -10;
|
||||
constexpr int SHADOWS_FRAMES = 30;
|
||||
constexpr int SHADOWS_LONG = 149;
|
||||
constexpr int BELIAL_FRAMES = 150;
|
||||
constexpr int BELIAL_COUNT = 20;
|
||||
constexpr int BREATH_WISPS = 4;
|
||||
constexpr ColorMod BREATH_BEAM_COLOR = {{1, 1, 1, 1}, {1, 1, 1, 1}, {0, 0, 0}};
|
||||
TemporaryEffect* effect = temporaryEffects.GetCollectibleEffect(COLLECTIBLE_BREATH_OF_LIFE);
|
||||
bool isBlocked = damageCooldown > 0 && !HasEntityFlags(FLAG_NO_DAMAGE_BLINK);
|
||||
if (isBlocked || !effect || effect->count != 2) return 0;
|
||||
if (effect->cooldown < g_manager->itemConfig.GetCollectible(COLLECTIBLE_BREATH_OF_LIFE)->maxCooldown - BREATH_OF_LIFE_WINDOW)
|
||||
return 0;
|
||||
reconstruction_missing("Entity_Player::play_hurt_effects 007d1c10 (Breath of Life)");
|
||||
|
||||
temporaryEffects.RemoveCollectibleEffect(COLLECTIBLE_BREATH_OF_LIFE, 1);
|
||||
if (!HasCollectible(COLLECTIBLE_BOOK_OF_BELIAL_PASSIVE))
|
||||
{
|
||||
for (int i = 0; i < BREATH_BEAMS; i++)
|
||||
{
|
||||
Entity_Laser* beam = Entity_Laser::ShootAngle({.position = pos, .posOffset = vector_make(0, BREATH_BEAM_RISE),
|
||||
.source = this, .angleDegrees = (float)i * BREATH_BEAM_TURN,
|
||||
.timeout = BREATH_BEAM_TIMEOUT, .variant = LASER_LIGHT_BEAM});
|
||||
beam->SetCollisionDamage(BREATH_BEAM_DAMAGE);
|
||||
beam->SetColor(BREATH_BEAM_COLOR, -1, COLOR_PRIORITY_DEFAULT, false, true);
|
||||
beam->isDisableFollowParent = true;
|
||||
beam->renderDepthOffset = i == BREATH_BEAMS - 1 ? LAST_BREATH_BEAM_DEPTH : BREATH_BEAM_DEPTH;
|
||||
}
|
||||
TemporaryEffect* shadows = temporaryEffects.GetCollectibleEffect(COLLECTIBLE_BOOK_OF_SHADOWS);
|
||||
if (!shadows || shadows->cooldown <= SHADOWS_LONG)
|
||||
{
|
||||
TemporaryEffect shield(g_manager->itemConfig.GetCollectible(COLLECTIBLE_BOOK_OF_SHADOWS));
|
||||
shield.cooldown = SHADOWS_FRAMES;
|
||||
temporaryEffects.AddEffect(shield, true, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UseActiveItem({.item = COLLECTIBLE_NECRONOMICON, .flags = USE_NOANIM | USE_ALLOWNONMAIN});
|
||||
sound_play(SOUND_BLACK_POOF);
|
||||
sound_play(SOUND_DEVIL_CARD);
|
||||
TemporaryEffect spell(g_manager->itemConfig.GetNullItem(NULLITEM_DARK_ARTS));
|
||||
spell.cooldown = BELIAL_FRAMES;
|
||||
temporaryEffects.AddEffect(spell, true, BELIAL_COUNT);
|
||||
}
|
||||
if (!HasCollectible(COLLECTIBLE_BOOK_OF_VIRTUES)) return 1;
|
||||
|
||||
int wisps = 0;
|
||||
for (Entity* entity : entity_query(ENTITY_FAMILIAR, Entity_Familiar::WISP))
|
||||
if (entity->subtype == COLLECTIBLE_BREATH_OF_LIFE && static_cast<Entity_Familiar*>(entity)->player == this) wisps++;
|
||||
for (int i = wisps; i < BREATH_WISPS; i++) AddWisp(COLLECTIBLE_BREATH_OF_LIFE, pos, true, false);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// 007caaa0 Whether a heart container is a bone heart.
|
||||
@@ -1100,8 +1315,71 @@ bool Entity_Player::TryPreventDeath()
|
||||
return true;
|
||||
}
|
||||
|
||||
// Spirit Shackles' second chance: the player comes back as a shackled ghost with a last heart of its kind, its body
|
||||
// left behind (once) in the middle of its death, chained to it.
|
||||
static void spirit_shackles_bind(Entity_Player& player)
|
||||
{
|
||||
constexpr int SHACKLED_COOLDOWN = 30;
|
||||
constexpr int BODY_STATE = 10;
|
||||
constexpr float SHACKLES_CHAIN_SCALE = 80;
|
||||
constexpr float SHACKLES_CHAIN_REACH = 10;
|
||||
player.temporaryEffects.AddNullEffect(NULLITEM_SHACKLES_GHOST, true, 1);
|
||||
player.temporaryEffects.AddNullEffect(NULLITEM_SPIRIT_SHACKLES_DISABLED, true, 1);
|
||||
player.soulHearts = 0;
|
||||
player.blackHearts = 0;
|
||||
player.eternalHearts = 0;
|
||||
player.boneHeartsMask = 0;
|
||||
player.boneHearts = 0;
|
||||
player.rottenHearts = 0;
|
||||
HealthType health = player.GetHealthType();
|
||||
if (player.maxHearts >= 1) player.redHearts = health == HEALTH_COIN ? 2 : 1;
|
||||
else if (health == HEALTH_BONE)
|
||||
{
|
||||
player.redHearts = 0;
|
||||
player.AddBoneHearts(1);
|
||||
}
|
||||
else if (health == HEALTH_COIN)
|
||||
{
|
||||
player.redHearts = 2;
|
||||
player.maxHearts = 2;
|
||||
}
|
||||
else if (player.playerType == PLAYER_BETHANY)
|
||||
{
|
||||
player.maxHearts = 2;
|
||||
player.redHearts = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.redHearts = 0;
|
||||
player.soulHearts = 1;
|
||||
}
|
||||
player.damageCooldown = SHACKLED_COOLDOWN;
|
||||
|
||||
if (!player.astralProjectionBody)
|
||||
{
|
||||
auto* body = static_cast<Entity_Effect*>(g_game->Spawn({.position = player.pos, .spawner = &player,
|
||||
.type = ENTITY_EFFECT, .variant = EFFECT_DEVIL,
|
||||
.seed = Random()}));
|
||||
body->sprite = player.sprite;
|
||||
if (LayerState* ghost = body->sprite.GetLayer("ghost")) ghost->isVisible = false;
|
||||
body->sprite.overlayAnimState.SetAnimationData(nullptr);
|
||||
body->sprite.Play("Death");
|
||||
body->AddEntityFlags(FLAG_DONT_OVERWRITE);
|
||||
body->state = BODY_STATE;
|
||||
body->Update();
|
||||
player.astralProjectionBody = body;
|
||||
}
|
||||
auto* chain = static_cast<Entity_Effect*>(g_game->Spawn({.position = player.pos, .type = ENTITY_EFFECT,
|
||||
.variant = EFFECT_FORGOTTEN_CHAIN, .seed = Random()}));
|
||||
chain->child = player.astralProjectionBody;
|
||||
chain->target = &player;
|
||||
chain->scale = SHACKLES_CHAIN_SCALE;
|
||||
chain->targetPosition = vector_make(SHACKLES_CHAIN_REACH, 0);
|
||||
chain->Update();
|
||||
}
|
||||
|
||||
// 007afc20 Kills the player out of hearts and starts the death sequence, unless it is dead, a ghost, berserk or
|
||||
// projected. Spirit Shackles' second chance is not written yet. True when it killed.
|
||||
// projected. Spirit Shackles gives a second chance instead. True when it killed.
|
||||
bool Entity_Player::try_trigger_astral_projection()
|
||||
{
|
||||
bool isOutOfHearts = redHearts < 1 && soulHearts < 1 && boneHearts < 1;
|
||||
@@ -1116,7 +1394,11 @@ bool Entity_Player::try_trigger_astral_projection()
|
||||
bool isShackled = HasCollectible(COLLECTIBLE_SPIRIT_SHACKLES) &&
|
||||
temporaryEffects.GetNullEffectNum(NULLITEM_SPIRIT_SHACKLES_DISABLED) == 0 &&
|
||||
temporaryEffects.GetNullEffectNum(NULLITEM_SHACKLES_GHOST) == 0;
|
||||
if (isShackled) reconstruction_missing("Entity_Player::try_trigger_astral_projection 007afc20 (Spirit Shackles)");
|
||||
if (isShackled)
|
||||
{
|
||||
spirit_shackles_bind(*this);
|
||||
return false;
|
||||
}
|
||||
if (lastDamageSource.type == ENTITY_SLOT || (lastDamageFlags & DAMAGE_DEVIL))
|
||||
Player_stats_add(g_game->onlinePlayerStats, ONLINE_STAT_DEAL_DEATHS, this, 1);
|
||||
lastDamageSource = EntityRef();
|
||||
@@ -1125,12 +1407,98 @@ bool Entity_Player::try_trigger_astral_projection()
|
||||
return true;
|
||||
}
|
||||
|
||||
// 007d35b0 Ends Astral Projection's spirit form when the spirit is hit, not written yet. True when it ended.
|
||||
// The spirit's way back to its body: a trail of ghostly wisps along the way (between 4 and 12, one per 20 units)
|
||||
// drifting after it, and a white poof where the spirit was.
|
||||
static void astral_trail_spawn(Entity_Player& player, Entity& body)
|
||||
{
|
||||
constexpr float ASTRAL_TRAIL_STEP_SCALE = 0.1f;
|
||||
constexpr float ASTRAL_TRAIL_STEP_MAX = 4;
|
||||
constexpr float ASTRAL_TRAIL_SPACING = 20;
|
||||
constexpr int ASTRAL_TRAIL_MIN = 4;
|
||||
constexpr int ASTRAL_TRAIL_MAX = 12;
|
||||
constexpr float ASTRAL_TRAIL_SCATTER = 15;
|
||||
constexpr float ASTRAL_TRAIL_SCALE_RANGE = 0.3f;
|
||||
constexpr float ASTRAL_TRAIL_HEIGHT = 16;
|
||||
constexpr int ASTRAL_POOF_SUBTYPE = 10;
|
||||
constexpr ColorMod ASTRAL_TRAIL_COLOR = {{1, 1, 1, 1}, {0, 0, 0, 0}, {1, 1, 1}};
|
||||
constexpr ColorMod ASTRAL_POOF_COLOR = {{1, 1, 1, 1}, {1, 1, 1, 1}, {0, 0, 0}};
|
||||
Vector toBody = vector_sub(body.pos, player.pos);
|
||||
Vector step = vector_scale(toBody, ASTRAL_TRAIL_STEP_SCALE);
|
||||
if (vector_length(step) > ASTRAL_TRAIL_STEP_MAX) step = vector_resized(step, ASTRAL_TRAIL_STEP_MAX);
|
||||
int count = std::clamp((int)std::floor(vector_length(toBody) / ASTRAL_TRAIL_SPACING), ASTRAL_TRAIL_MIN, ASTRAL_TRAIL_MAX);
|
||||
|
||||
for (int i = 1; i <= count; i++)
|
||||
{
|
||||
float along = (float)i / (float)(count + 1);
|
||||
Vector direction = random_direction();
|
||||
Vector scatter = vector_scale(direction, random_unit() * ASTRAL_TRAIL_SCATTER);
|
||||
Vector spot = vector_add(scatter, vector_add(player.pos, vector_scale(toBody, along)));
|
||||
uint32_t seed = Random();
|
||||
Vector velocity = vector_scale(step, random_unit() * HALF + HALF);
|
||||
Entity* wisp = g_game->Spawn({.position = spot, .velocity = velocity, .type = ENTITY_EFFECT,
|
||||
.variant = EFFECT_HAEMO_TRAIL, .seed = seed});
|
||||
wisp->SetColor(ASTRAL_TRAIL_COLOR, -1, COLOR_PRIORITY_DEFAULT, false, true);
|
||||
float size = along * (random_unit() * ASTRAL_TRAIL_SCALE_RANGE + ASTRAL_TRAIL_SCALE_RANGE);
|
||||
wisp->sprite.scale = vector_make(size, size);
|
||||
wisp->posOffset = vector_make(player.posOffset.x, player.posOffset.y - player.sprite.scale.y * ASTRAL_TRAIL_HEIGHT);
|
||||
}
|
||||
Entity* poof = g_game->Spawn({.position = player.pos, .velocity = step, .subType = ASTRAL_POOF_SUBTYPE,
|
||||
.type = ENTITY_EFFECT, .variant = EFFECT_POOF02, .seed = Random()});
|
||||
poof->SetColor(ASTRAL_POOF_COLOR, -1, COLOR_PRIORITY_DEFAULT, false, true);
|
||||
poof->posOffset = player.posOffset;
|
||||
poof->sprite.scale = player.sprite.scale;
|
||||
}
|
||||
|
||||
// 007d35b0 Ends Astral Projection's spirit form when the spirit is hit: the spirit flies back to its body along a
|
||||
// ghostly trail, flashes white with a bloom and the room's colours at once, and then dies if it has no hearts left
|
||||
// (the death skipping ahead) or stays unhurtable for 4 seconds. True when it ended.
|
||||
bool Entity_Player::try_end_astral_projection()
|
||||
{
|
||||
constexpr int ASTRAL_END_BLOOM = 10;
|
||||
constexpr float ASTRAL_END_BLOOM_STRENGTH = 0.6f;
|
||||
constexpr int ASTRAL_END_FLASH = 8;
|
||||
constexpr int ASTRAL_END_COOLDOWN = 120;
|
||||
constexpr float DEATH_SKIP_FRAME = 24;
|
||||
constexpr ColorMod WHITE_FLASH = {{1, 1, 1, 1}, {0, 0, 0, 0}, {1, 1, 1}};
|
||||
TemporaryEffect* astral = temporaryEffects.isDisabled ? nullptr : temporaryEffects.GetCollectibleEffect(COLLECTIBLE_ASTRAL_PROJECTION);
|
||||
if (!astral || astral->count != 1) return false;
|
||||
reconstruction_missing("Entity_Player::try_end_astral_projection 007d35b0");
|
||||
|
||||
ItemConfig_Item* item = g_manager->itemConfig.GetCollectible(COLLECTIBLE_ASTRAL_PROJECTION);
|
||||
if (item) temporaryEffects.AddEffect(TemporaryEffect(item), true, 1);
|
||||
RemoveCostume(item);
|
||||
if (Entity* body = astralProjectionBody.get())
|
||||
{
|
||||
astral_trail_spawn(*this, *body);
|
||||
velocity = {};
|
||||
Teleport(body->pos, false, false);
|
||||
body->Remove();
|
||||
}
|
||||
|
||||
ResetColor();
|
||||
ColorMod flash = sprite.color;
|
||||
color_multiply(flash, WHITE_FLASH);
|
||||
SetColor(flash, ASTRAL_END_FLASH, COLOR_PRIORITY_DEFAULT, true, true);
|
||||
Game& game = *g_game;
|
||||
game.bloomDuration = ASTRAL_END_BLOOM;
|
||||
game.bloomTimer = ASTRAL_END_BLOOM;
|
||||
game.bloomStrength = ASTRAL_END_BLOOM_STRENGTH;
|
||||
game.targetColorModifier = game.room->get_color_modifier();
|
||||
game.currentColorModifier = game.targetColorModifier;
|
||||
game.isColorModifierLerped = false;
|
||||
|
||||
try_trigger_astral_projection();
|
||||
if (!isDead)
|
||||
{
|
||||
damageCooldown = std::max(damageCooldown, ASTRAL_END_COOLDOWN);
|
||||
return true;
|
||||
}
|
||||
if (std::string_view(GetDeathAnimName()) != "Death") return true;
|
||||
PlayExtraAnimation("Death");
|
||||
if (sprite.animState.animData) sprite.animState.SetFrameFloat(DEATH_SKIP_FRAME);
|
||||
int sound = SOUND_ISAACDIES;
|
||||
seed_fart_sound_override(&sound);
|
||||
g_manager->sfxManager.Play(sound, {.pitch = get_voice_pitch()});
|
||||
return true;
|
||||
}
|
||||
|
||||
// 007828f0 The animation the player dies with: the Lost's for ghosts and the cursed, Forgotten's, or falling in a hole.
|
||||
|
||||
Reference in new issue
Block a user