Curation round 13: grid entities, more enemies, Caves, boss helpers and five bosses, chests and costumes, curses and alt stages, the Lua API
This commit is contained in:
1 parent
f8ce24fc6c
commit
8ae02a8422
160 files changed
+16231
-1689
No files matched your search
@@ -13,12 +13,10 @@
|
||||
constexpr int COLLECTIBLE_BINKY = 438;
|
||||
constexpr int COLLECTIBLE_CONE_HEAD = 457;
|
||||
constexpr int COLLECTIBLE_DULL_RAZOR = 486;
|
||||
constexpr int COLLECTIBLE_EVIL_CHARM = 632;
|
||||
constexpr int COLLECTIBLE_HYPERCOAGULATION = 724;
|
||||
constexpr int COLLECTIBLE_JELLY_BELLY = 690;
|
||||
constexpr int COLLECTIBLE_MARBLES = 538;
|
||||
constexpr int COLLECTIBLE_METAL_PLATE = 449;
|
||||
constexpr int COLLECTIBLE_PLUTO = 598;
|
||||
constexpr int COLLECTIBLE_SCAPULAR = 142;
|
||||
constexpr int COLLECTIBLE_SPIRIT_SHACKLES = 674;
|
||||
constexpr int TRINKET_BLIND_RAGE = 81;
|
||||
@@ -73,13 +71,10 @@ constexpr int SOUND_BOSS_DELAY_RANDOM = 130;
|
||||
constexpr int SOUND_BOSS_DELAY_MIN = 50;
|
||||
constexpr int SOUND_FRAME_DELAY = 2;
|
||||
|
||||
constexpr uint64_t DAMAGE_RED_HEARTS = 1ull << 5;
|
||||
constexpr uint64_t DAMAGE_INVINCIBLE_IGNORED = 1ull << 13;
|
||||
constexpr uint64_t DAMAGE_FAKE = 1ull << 21;
|
||||
constexpr uint64_t DAMAGE_NO_MODIFIERS = 1ull << 25;
|
||||
constexpr uint64_t DAMAGE_NO_PENALTIES = 1ull << 28;
|
||||
constexpr uint64_t DAMAGE_IGNORED = 1ull << 34;
|
||||
constexpr uint64_t DAMAGE_THROUGH_COOLDOWN = 1ull << 35;
|
||||
constexpr uint64_t DAMAGE_NO_HURT_EFFECTS = 0x100d0400;
|
||||
constexpr uint64_t DAMAGE_ISAACS_HEART_PIERCE = 0x2820;
|
||||
constexpr uint64_t DAMAGE_UNPENALIZED = DAMAGE_NO_PENALTIES | DAMAGE_RED_HEARTS;
|
||||
@@ -124,7 +119,6 @@ constexpr int EVIL_CHARM_GRID_VARIANT = 10000;
|
||||
// Teleport.
|
||||
constexpr int INVINCIBLE_EFFECTS[] = {93, 77, 298, 44};
|
||||
constexpr int COLLECTIBLE_DARK_ARTS = 705;
|
||||
constexpr int COLLECTIBLE_GNAWED_LEAF = 210;
|
||||
constexpr int NULLITEM_INVINCIBLE_SHIELD = 59;
|
||||
constexpr int BLOOD_DONATION_VARIANT = 2;
|
||||
constexpr int BLOOD_BANK_VARIANT = 5;
|
||||
@@ -406,13 +400,14 @@ bool Entity_Player::TakeDamage(float damage, uint64_t damageFlags, const EntityR
|
||||
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Holy Mantle's shield)");
|
||||
if (hallowedGroundCountdown > 0 && !(damageFlags & DAMAGE_NO_MODIFIERS))
|
||||
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Hallowed Ground)");
|
||||
lua_callback_check(MC_ENTITY_TAKE_DMG, "Entity_Player::TakeDamage 007729d0: LuaEngine::EntityTakeDamage 00864560");
|
||||
(void)damageCountdown;
|
||||
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)
|
||||
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (Tainted Jacob's ghost form)");
|
||||
|
||||
// The online stats tally (Player_stats_add 00425ac0) is not written yet: only the online stats screen shows it.
|
||||
Entity* attacker = source.entity ? source.entity->GetPlayerAncestor() : nullptr;
|
||||
if (attacker) Player_stats_add(game.onlinePlayerStats, ONLINE_STAT_PLAYER_DAMAGE_DEALT, (Entity_Player*)attacker, amount);
|
||||
Player_stats_add(game.onlinePlayerStats, ONLINE_STAT_DAMAGE_TAKEN, this, amount);
|
||||
lastDamageSource = source;
|
||||
lastDamageFlags = damageFlags;
|
||||
isHurtThisRoom = true;
|
||||
@@ -498,7 +493,12 @@ bool Entity_Player::TakeDamage(float damage, uint64_t damageFlags, const EntityR
|
||||
bool isKilled = try_trigger_astral_projection();
|
||||
lastDamageSource = source;
|
||||
if (isKilled && game.deathmatchManager.is_active())
|
||||
reconstruction_missing("Entity_Player::TakeDamage 007729d0 (a versus kill, trigger_npc_death)");
|
||||
for (Entity* killer = source.entity; killer; killer = killer->spawnerEntity.get())
|
||||
if (killer->is_player())
|
||||
{
|
||||
static_cast<Entity_Player*>(killer)->trigger_npc_death(this);
|
||||
break;
|
||||
}
|
||||
if (isDead) death_count(source, damageFlags);
|
||||
}
|
||||
}
|
||||
@@ -751,7 +751,8 @@ bool Entity_Player::try_trigger_astral_projection()
|
||||
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)");
|
||||
// The online stats tally of deaths to spikes (Player_stats_add 00425ac0) is not written yet.
|
||||
if (lastDamageSource.type == ENTITY_SLOT || (lastDamageFlags & DAMAGE_DEVIL))
|
||||
Player_stats_add(g_game->onlinePlayerStats, ONLINE_STAT_DEAL_DEATHS, this, 1);
|
||||
lastDamageSource = EntityRef();
|
||||
}
|
||||
Kill(EntityRef());
|
||||
|
||||
Reference in new issue
Block a user