Curation round 25 (code only): the ultra horsemen and the Beast's background, the Scourge and Polty, the player's last gaps with the frame gate removed, game core, debug and daily, local co-op and player-controlled enemies, TMTRAINER, local versus, the vanilla Lua API, the special-daily fix, shared constants folded (60 duplicates, 10 offline gaps)

This commit is contained in:
shweet committed 2026-11-23 07:35:21 -05:00
1 parent 534339a496
commit 5c89798773
280 files changed
+14904 -5309

No files matched your search

+33 -11
View File
@@ -339,7 +339,7 @@ static void monster_manual_use(ItemUse& use)
}
// Dead Sea Scrolls: one of 32 first floor actives used at once, named over the HUD, with its wisp for Book of
// Virtues. Ten tries skip what Cantripped forbids, then Tammy's Head.
// Virtues. Ten tries skip what Cantripped or the versus rules forbid, then Tammy's Head.
static void dead_sea_scrolls_use(ItemUse& use)
{
Entity_Player& player = use.player;
@@ -349,13 +349,13 @@ static void dead_sea_scrolls_use(ItemUse& use)
if (player.itemState == 0)
{
int pick = COLLECTIBLE_TAMMYS_HEAD;
if (g_game->deathmatchManager.is_active())
reconstruction_missing("Entity_Player::UseActiveItem 005b39d0 (Dead Sea Scrolls in a versus match)");
DeathmatchManager& versus = g_game->deathmatchManager;
for (int i = 0; i < DEAD_SEA_SCROLLS_TRIES; i++)
{
int id = DEAD_SEA_SCROLLS_ITEMS[player.GetCollectibleRNG(use.id).RandomInt(DEAD_SEA_SCROLLS_ITEMS.size())];
if (g_game->challenge == CHALLENGE_CANTRIPPED && ItemConfig::is_collectible_tagged(id, TAG_NO_CANTRIP))
continue;
if (versus.is_active() && versus.type->is_collectible_banned(id)) continue;
pick = id;
break;
}
@@ -383,13 +383,13 @@ static void forget_me_now_restart(Entity_Effect* timer)
g_game->stageTransition.start({.player = player, .type = STAGE_TRANSITION_FORGET_ME_NOW, .isSameStage = true});
}
// Forget Me Now: the floor restarts a frame later. It goes once owned, or used through the Void.
// Forget Me Now: the floor restarts a frame later (during a versus fight it only buzzes). It goes once owned, or used
// through the Void.
static void forget_me_now_use(ItemUse& use)
{
if (use.player.variant != PLAYER_VARIANT_PLAYER) return;
if (use.request.flags & (USE_OWNED | USE_VOID)) use.result.isRemove = true;
if (g_game->deathmatchManager.is_active())
reconstruction_missing("Entity_Player::UseActiveItem 005b39d0 (Forget Me Now in a versus match)");
if (g_game->deathmatchManager.is_fighting()) return g_manager->sfxManager.Play(SOUND_ERROR_BUZZ);
Entity_Effect* timer = Entity_Effect::CreateTimer(reinterpret_cast<void*>(&forget_me_now_restart), 1, 0, false);
timer->parent = &use.player;
@@ -984,9 +984,12 @@ static void flush_npc(ItemUse& use, Entity_NPC& npc)
if (npc.minecart) static_cast<Entity_NPC*>(npc.minecart.get())->MinecartUpdateChild(poop);
}
// The Flush: the room flooded for its effect, and every enemy flushed but the friendly ones.
// The Flush: the room flooded for its effect, and every enemy flushed but the friendly ones. The other versus players
// take 30.
static void flush_use(ItemUse& use)
{
constexpr float FLUSH_VERSUS_DAMAGE = 30;
constexpr int FLUSH_VERSUS_COUNTDOWN = 30;
Entity_Player& player = use.player;
if (player.variant == PLAYER_VARIANT_PLAYER)
{
@@ -998,7 +1001,10 @@ static void flush_use(ItemUse& use)
Entity_NPC* npc = dynamic_cast<Entity_NPC*>(entities[i]);
if (npc && npc->HasEntityFlags(FLAG_FRIENDLY)) continue;
if (entities[i]->is_player() && entities[i] != &player && g_game->deathmatchManager.is_active())
reconstruction_missing("Entity_Player::UseActiveItem 005b39d0 (the Flush in a versus match)");
{
entities[i]->TakeDamage(FLUSH_VERSUS_DAMAGE, 0, EntityRef(), FLUSH_VERSUS_COUNTDOWN);
continue;
}
if (npc) flush_npc(use, *npc);
}
}
@@ -1559,7 +1565,24 @@ static void box_open(Entity_Player& player, int stage)
}
}
// Pandora's Box: opened by a main player, it gives what the floor holds (or the Strange Key's collectibles), one wisp
// Pandora's Box in a versus match: a collectible for each player on one of the arena's spawn points (each used once).
// The original reads an empty list's head when the points run out. Here no more collectibles come.
static void versus_box_open()
{
constexpr float VERSUS_BOX_RADIUS = 40;
DeathmatchTypeBase& versus = *g_game->deathmatchManager.type;
std::list<Vector> points = versus.itemSpawnPoints;
for (int i = 0; i < g_game->playerManager.count_main_players() && !points.empty(); i++)
{
auto point = std::next(points.begin(), (long)(Random() % points.size()));
versus.collectible_spawn(*point, VERSUS_BOX_RADIUS);
points.erase(point);
}
}
// Pandora's Box: opened by a main player, it gives what the floor holds (or the Strange Key's collectibles, or in a
// versus match a collectible per player), one wisp
// per floor past the first with Book of Virtues and a devil familiar with Judas's kept Book of Belial. It goes once
// owned, or used through the Void.
static void pandoras_box_use(ItemUse& use)
@@ -1572,8 +1595,7 @@ static void pandoras_box_use(ItemUse& use)
if (use.request.flags & (USE_OWNED | USE_VOID)) use.result.isRemove = true;
int stage = g_game->stage;
if (player.HasTrinket(TRINKET_STRANGE_KEY)) strange_key_open(player);
else if (g_game->deathmatchManager.is_active())
reconstruction_missing("Entity_Player::UseActiveItem 005b39d0 (Pandora's Box in a versus match)");
else if (g_game->deathmatchManager.is_active()) versus_box_open();
else if (g_game->IsGreedMode()) greed_box_open(player, stage);
else box_open(player, stage);