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:
1 parent
534339a496
commit
5c89798773
280 files changed
+14904
-5309
No files matched your search
+9
-21
@@ -148,7 +148,6 @@ constexpr float BEAST_STALACTITE_HURT = 14;
|
||||
constexpr float BEAST_STALACTITE_HURT_NEAR = 500;
|
||||
constexpr float BEAST_STALACTITE_HURT_FALLOFF = 1500;
|
||||
constexpr float BEAST_STALACTITE_HURT_FAR = 0.8f;
|
||||
constexpr int BEAST_STALACTITE_HIT_COUNTDOWN = 30;
|
||||
constexpr int BEAST_RING_AFTER = 20;
|
||||
constexpr int BEAST_RING_EVERY = 30;
|
||||
constexpr uint32_t BEAST_RING_GAPS = 20;
|
||||
@@ -256,7 +255,7 @@ static void beast_stalactites_hurt(Entity_NPC& npc, float left, float right)
|
||||
BEAST_STALACTITE_HURT_FALLOFF,
|
||||
0.0f, 1.0f);
|
||||
stalactite->TakeDamage((1 - falloff * BEAST_STALACTITE_HURT_FAR) * (roll * BEAST_STALACTITE_HURT + BEAST_STALACTITE_HURT),
|
||||
0, EntityRef(), BEAST_STALACTITE_HIT_COUNTDOWN);
|
||||
0, EntityRef(), HIT_COUNTDOWN);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -921,8 +920,8 @@ static void beast_switch(Entity_NPC& npc, Room& room)
|
||||
npc.stateFrame = 0;
|
||||
}
|
||||
|
||||
// Red rays burst from the Beast: a wide one and three thin ones at random turns.
|
||||
static void beast_rays_spawn(Entity_NPC& npc)
|
||||
// Red rays burst from a beast at an offset: a wide one and three thin ones at random turns.
|
||||
void beast_rays_spawn(Entity_NPC& npc, const Vector& offset)
|
||||
{
|
||||
int frames = (int)std::ceil(BEAST_RAY_FRAMES);
|
||||
auto* ray = static_cast<Entity_Effect*>(g_game->Spawn({.position = npc.pos,
|
||||
@@ -931,7 +930,7 @@ static void beast_rays_spawn(Entity_NPC& npc)
|
||||
.type = ENTITY_EFFECT,
|
||||
.variant = EFFECT_BIG_ATTRACT,
|
||||
.seed = Random()}));
|
||||
ray->posOffset = BEAST_RAY_OFFSET;
|
||||
ray->posOffset = offset;
|
||||
ray->SetColor(BEAST_RAY_COLOR, -1, COLOR_PRIORITY_DEFAULT, false, true);
|
||||
ray->minRadius = BEAST_RAY_INNER;
|
||||
ray->maxRadius = BEAST_RAY_OUTER;
|
||||
@@ -948,7 +947,7 @@ static void beast_rays_spawn(Entity_NPC& npc)
|
||||
.type = ENTITY_EFFECT,
|
||||
.variant = EFFECT_BIG_ATTRACT,
|
||||
.seed = Random()}));
|
||||
line->posOffset = BEAST_RAY_OFFSET;
|
||||
line->posOffset = offset;
|
||||
line->sprite.rotation = random_unit() * BEAST_THIN_RAY_SPREAD - BEAST_THIN_RAY_SPREAD * HALF +
|
||||
(float)thin * BEAST_THIN_RAY_TURN + turn;
|
||||
line->SetColor(BEAST_RAY_COLOR, -1, COLOR_PRIORITY_DEFAULT, false, true);
|
||||
@@ -982,7 +981,7 @@ static void beast_soul_call(Entity_NPC& npc, Room& room)
|
||||
g_game->Spawn({.position = at, .spawner = &npc, .type = ENTITY_BEAST, .variant = BEAST_SOUL, .seed = seed})
|
||||
->Update();
|
||||
}
|
||||
if ((npc.stateFrame & 1) == 0) beast_rays_spawn(npc);
|
||||
if ((npc.stateFrame & 1) == 0) beast_rays_spawn(npc, BEAST_RAY_OFFSET);
|
||||
npc.stateFrame++;
|
||||
}
|
||||
}
|
||||
@@ -1274,7 +1273,7 @@ static void stalactite_burst(Entity_NPC& npc)
|
||||
{
|
||||
for (int draw = 0; draw < STALACTITE_DISCARDED_DRAWS; draw++) Random();
|
||||
uint32_t seed = Random();
|
||||
float scatterAngle = random_unit() * RANDOM_HALF_TURN;
|
||||
float scatterAngle = random_unit() * PI_ROUGH;
|
||||
scatterAngle += scatterAngle;
|
||||
float scatter = random_unit();
|
||||
float turn = random_unit() * STALACTITE_THROW_SPREAD - STALACTITE_THROW_SPREAD * HALF;
|
||||
@@ -1295,7 +1294,7 @@ static void stalactite_burst(Entity_NPC& npc)
|
||||
piece->Update();
|
||||
|
||||
uint32_t dustSeed = Random();
|
||||
float dustAngle = random_unit() * RANDOM_HALF_TURN;
|
||||
float dustAngle = random_unit() * PI_ROUGH;
|
||||
dustAngle += dustAngle;
|
||||
float dustSpeed = random_unit() * STALACTITE_SCATTER;
|
||||
auto* dust = static_cast<Entity_Effect*>(g_game->Spawn({.position = capsule.center,
|
||||
@@ -1676,33 +1675,22 @@ void boss_beast_update(Entity_NPC& npc)
|
||||
case BEAST_SOUL:
|
||||
return beast_soul_update(npc);
|
||||
case BEAST_ULTRA_FAMINE:
|
||||
return NpcAI::ENTITY_BEAST_ultra_famine(&npc);
|
||||
case BEAST_ULTRA_FAMINE_FLY:
|
||||
return NpcAI::ENTITY_BEAST_ultra_famine_fly(&npc);
|
||||
case BEAST_ULTRA_PESTILENCE:
|
||||
return NpcAI::ENTITY_BEAST_ultra_pestilence(&npc);
|
||||
case BEAST_ULTRA_PESTILENCE_FLY:
|
||||
return NpcAI::ENTITY_BEAST_pestilence_fly(&npc);
|
||||
case BEAST_ULTRA_PESTILENCE_MAGGOT:
|
||||
return NpcAI::ENTITY_BEAST_ultra_pestilence_maggot(&npc);
|
||||
case BEAST_ULTRA_PESTILENCE_FLY_BALL:
|
||||
return NpcAI::ENTITY_BEAST_ultra_pestilence_fly_ball(&npc);
|
||||
case BEAST_ULTRA_WAR:
|
||||
return NpcAI::ENTITY_BEAST_ultra_war(&npc);
|
||||
case BEAST_ULTRA_WAR_BOMB:
|
||||
return NpcAI::ENTITY_BEAST_ultra_war_bomb(&npc);
|
||||
case BEAST_ULTRA_DEATH:
|
||||
return NpcAI::ENTITY_BEAST_ultra_death(&npc);
|
||||
case BEAST_ULTRA_DEATH_SCYTHE:
|
||||
return NpcAI::ENTITY_BEAST_ultra_death_scythe(&npc);
|
||||
case BEAST_ULTRA_DEATH_HEAD:
|
||||
return NpcAI::ENTITY_BEAST_ultra_death_head(&npc);
|
||||
case BEAST_BACKGROUND_BEAST:
|
||||
case BEAST_BACKGROUND_FAMINE:
|
||||
case BEAST_BACKGROUND_PESTILENCE:
|
||||
case BEAST_BACKGROUND_WAR:
|
||||
case BEAST_BACKGROUND_DEATH:
|
||||
return NpcAI::ENTITY_BEAST_background(&npc);
|
||||
return beast_horseman_update(npc);
|
||||
default:
|
||||
return beast_update(npc);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user