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:
shweet committed 2026-11-20 16:32:45 -05:00
1 parent f8ce24fc6c
commit 8ae02a8422
160 files changed
+16231 -1689

No files matched your search

+35 -14
View File
@@ -3,7 +3,8 @@
#include "grid_entity.h"
#include <string>
// The kinds of poop (Lua's PoopGridEntityVariant).
// The kinds of poop (Lua's PoopGridEntityVariant). Stone, flaming and stinky are the poop enemies' own, for their gibs
// and break effects.
enum PoopVariant : int
{
POOP_NORMAL,
@@ -17,22 +18,40 @@ enum PoopVariant : int
POOP_GIGA_TOP_RIGHT,
POOP_GIGA_BOTTOM_LEFT,
POOP_GIGA_BOTTOM_RIGHT,
POOP_CHARMING
POOP_CHARMING,
POOP_STONE,
POOP_FLAMING,
POOP_STINKY
};
// Destruction (0070bc60) is the default. ReduceSpawnRate (00456870) sets varData to 1. A poop (Lua's GridEntityPoop):
// it breaks in four hits into gibs and drops. Red poop grows back.
// A poop's state once broken, and a red poop's while it grows back.
constexpr int POOP_STATE_BROKEN = 1000;
constexpr int POOP_STATE_REVIVING = 1000;
// A hit on a poop as its rewards and drops see it: where it broke, its kind and seed, the state before the hit and
// the damage dealt, and who dealt it. A poop reduced by ReduceSpawnRate rarely drops. The poop enemies leave out
// the swinging player's wisps.
struct PoopHit
{
EntityRef source{};
Vector position{};
uint32_t seed = 0;
int damage = 0;
int previousState = 0;
int variant = POOP_NORMAL;
bool isLowDropChance = false;
bool isNoWisp = false;
};
// Destruction (0070bc60) is the default, and Destroy is the base hurt of 4. ReduceSpawnRate (00456870) sets varData
// to 1. A poop (Lua's GridEntityPoop): it breaks in four hits into gibs and drops, red poop grows back, and four
// giant poop parts share one state through the bottom left part.
struct GridEntity_Poop : GridEntity
{
EntityRef destroySource{};
std::string stateAnimation;
Vector unknown184{};
Vector unknown18c{};
Vector unknown194{};
int reviveTimer = 0;
int unknown174 = 0;
int unknown178 = 0;
int unknown17c = 0;
int unknown180 = 0;
bool isEnemyInside = false;
bool isUnderPlayer = false;
void subclass_init() override;
@@ -43,8 +62,10 @@ struct GridEntity_Poop : GridEntity
WaterClipInfo GetWaterClipInfo() override;
void RespawnRedPoop();
static void spawn_hit_gibs(const Vector& position, int poopVariant, int maxGibs);
void destroy_effects();
void spawn_drops();
Vector center_get();
GridEntity_Poop* get_giga_part(int partVariant, bool isCreate);
static void spawn_hit_gibs(const Vector& position, int poopVariant, int maxGibs);
static void destroy_effects(const Vector& position, int poopVariant);
static void spawn_rewards(const PoopHit& hit);
static void spawn_drops(const PoopHit& hit);
};