Curation round 14: console and Lua API, effects, lasers, enemies, eleven bosses, the Depths and Mom, status effects, the playable characters
This commit is contained in:
1 parent
8ae02a8422
commit
6e3da161fc
138 files changed
+16754
-6825
No files matched your search
+40
-3
@@ -18,7 +18,6 @@ constexpr float PLAYER_START_TEAR_FALLING_SPEED = 0.2f;
|
||||
constexpr float PLAYER_START_TEAR_RANGE = 260;
|
||||
constexpr float ROCK_BOTTOM_LUCK_UNSET = -9999;
|
||||
constexpr int COSTUME_RESERVE = 32;
|
||||
constexpr int FORGOTTEN_BODY_ROOM_NONE = -99999;
|
||||
constexpr int MAX_PEE_BURST_COOLDOWN = 30;
|
||||
constexpr int MONKEY_PAW_USES = 3;
|
||||
constexpr int PLAYER_RENDER_Z_OFFSET = 5;
|
||||
@@ -696,6 +695,44 @@ void Entity_Player::eden_stats_roll(RNG& rng)
|
||||
edenLuck = rng.RandomFloat() * 2 - 1;
|
||||
}
|
||||
|
||||
// The part of 007bc740 that rolls Eden's starting pickups and items: a trinket on a third of the rolls, else maybe a
|
||||
// card or a pill, then the first active and the first passive among 100 random collectibles Eden may start with.
|
||||
void Entity_Player::eden_items_roll(RNG& rng)
|
||||
{
|
||||
constexpr int EDEN_ITEM_ROLLS = 100;
|
||||
constexpr std::array<int, 3> REMOVED_COLLECTIBLES = {235, 43, 61};
|
||||
ItemConfig& items = g_manager->itemConfig;
|
||||
ItemPool& pool = g_game->itemPool;
|
||||
|
||||
if (rng.Next() % 3 == 0) AddTrinket((int)pool.GetTrinket(TRINKET_DRAW_TAKE), true);
|
||||
else if ((rng.Next() & 1) == 0)
|
||||
{
|
||||
if ((rng.Next() & 1) == 0) AddPocketItem(card_roll(rng.Next(), 0, false), POCKET_CARD);
|
||||
else AddPocketItem(ItemPool::GetPill(rng.Next()), POCKET_PILL);
|
||||
}
|
||||
|
||||
int active = 0;
|
||||
int passive = 0;
|
||||
uint32_t range = (uint32_t)items.collectibles.size() - 1;
|
||||
for (int roll = 0; roll < EDEN_ITEM_ROLLS; roll++)
|
||||
{
|
||||
uint32_t next = rng.Next();
|
||||
int id = (int)(range == 0 ? 0 : next % range) + 1;
|
||||
ItemConfig_Item* item = items.GetCollectible(id);
|
||||
if (std::ranges::find(REMOVED_COLLECTIBLES, id) != REMOVED_COLLECTIBLES.end() || !item || item->HasTags(TAG_NO_EDEN) ||
|
||||
!item->IsAvailableEx(AVAILABLE_ALL))
|
||||
continue;
|
||||
int& kept = item->type == ITEM_ACTIVE ? active : passive;
|
||||
if (kept == 0) kept = id;
|
||||
}
|
||||
for (int id : {active, passive})
|
||||
if (id != 0)
|
||||
{
|
||||
AddCollectible(id, -1, true, 0, 0);
|
||||
pool.RemoveCollectible(id, REMOVE_ANY, REMOVE_APPLY);
|
||||
}
|
||||
}
|
||||
|
||||
// Gives the player a starting collectible, as the run's start does: added as picked up, out of the pools, and its
|
||||
// temporary effect gone.
|
||||
void Entity_Player::starting_collectible_add(int id)
|
||||
@@ -744,7 +781,7 @@ void Entity_Player::InitPostLevelInitStats()
|
||||
else if (playerConfig->pill > 0) AddPocketItem(playerConfig->pill, POCKET_PILL);
|
||||
else if (playerConfig->pill < 0) AddPocketItem(ItemPool::GetPill(initSeed), POCKET_PILL);
|
||||
else if (playerType == PLAYER_MAGDALENE && is_run_unlocked(ACHIEVEMENT_MAGDALENE_HOLDS_A_PILL))
|
||||
reconstruction_missing("Entity_Player::InitPostLevelInitStats 007bc740 (Magdalene's starting pill)");
|
||||
magdalene_pill_add();
|
||||
|
||||
std::vector<int> items = playerConfig->collectibles;
|
||||
if (game.challenge == 0)
|
||||
@@ -782,7 +819,7 @@ void Entity_Player::InitPostLevelInitStats()
|
||||
|
||||
if ((playerConfig->id == PLAYER_EDEN || playerConfig->id == TAINTED_EDEN_PLAYER_ID) &&
|
||||
!game.deathmatchManager.is_active())
|
||||
reconstruction_missing("Entity_Player::InitPostLevelInitStats 007bc740 (Eden's rolled items)");
|
||||
eden_items_roll(rng);
|
||||
if (challenge.isMegaSatan)
|
||||
{
|
||||
starting_collectible_add(COLLECTIBLE_KEY_PIECE_1);
|
||||
|
||||
Reference in new issue
Block a user