Curation round 23 (code only): the Mods menu and HUD pieces, Dogma and the Beast, Visage, Hornfel and other bosses, enemies and Entity_NPC branches, player revivals and missing methods, the player's frame, familiars, lasers, weapons and bombs, shared constants folded (115 duplicates, 385 gaps)
This commit is contained in:
1 parent
b9405bfb31
commit
11c71fe041
208 files changed
+20487
-5741
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#include "boss_ai.h"
|
||||
#include "boss_repentance.h"
|
||||
#include "entity_bomb.h"
|
||||
#include "entity_effect_combat.h"
|
||||
#include "entity_familiar.h"
|
||||
@@ -123,6 +124,7 @@ constexpr float BAR_FRICTION = 0.86f;
|
||||
constexpr int BAR_DIM_FRAMES = 10;
|
||||
|
||||
// The cleaver's slash splits an enemy it holds from frame 3.
|
||||
constexpr float CLEAVER_WISP_MIN_SCALE = 0.25f;
|
||||
constexpr int CLEAVER_SPLIT_FRAME = 3;
|
||||
constexpr float CLEAVER_DEPTH = 4;
|
||||
|
||||
@@ -741,12 +743,6 @@ static void hidden_kept_init(Entity_Effect& effect)
|
||||
effect.AddEntityFlags(FLAG_DONT_OVERWRITE);
|
||||
}
|
||||
|
||||
// 005da269 (Update's case 152) Hornfel's room controller.
|
||||
static void hornfel_controller_update(Entity_Effect& controller)
|
||||
{
|
||||
NpcHelper::hornfel_room_controller(&controller);
|
||||
}
|
||||
|
||||
// 005efc0b (Update's case 28) Monstro's tooth: Monstro follows his target (a player only so long), jumps back up once
|
||||
// down and goes once up, landing on frame 33 with a stomp and a crushing blast.
|
||||
static void tooth_update(Entity_Effect& tooth)
|
||||
@@ -807,6 +803,24 @@ static void bar_particle_update(Entity_Effect& bar)
|
||||
bar.friction *= BAR_FRICTION;
|
||||
}
|
||||
|
||||
// 0043e9f0 The cleaver splits a wisp in two halves of its size and strength, the new one beside its player's
|
||||
// orbit. A wisp already a quarter its size dies instead.
|
||||
static void wisp_cleave(Entity_Familiar& wisp)
|
||||
{
|
||||
if (wisp.wispScale <= CLEAVER_WISP_MIN_SCALE)
|
||||
{
|
||||
wisp.Kill(EntityRef(nullptr));
|
||||
return;
|
||||
}
|
||||
|
||||
wisp.wispScale *= 0.5f;
|
||||
wisp.sprite.scale = vector_make(wisp.sprite.scale.x * 0.5f, wisp.sprite.scale.y * 0.5f);
|
||||
Entity_Familiar* half = wisp.player->AddWisp(wisp.subtype, wisp.pos, true, false);
|
||||
if (!half) return;
|
||||
half->wispScale = wisp.wispScale;
|
||||
half->sprite.scale = wisp.sprite.scale;
|
||||
}
|
||||
|
||||
// 005df80d (Update's case 176) The cleaver's slash holds its target from frame 3, splitting an enemy for its damage,
|
||||
// then lets go and goes when done.
|
||||
static void cleaver_slash_update(Entity_Effect& slash)
|
||||
@@ -824,7 +838,7 @@ static void cleaver_slash_update(Entity_Effect& slash)
|
||||
static_cast<Entity_NPC*>(target)->split(slash.collisionDamage, source, false);
|
||||
}
|
||||
if (target->type == ENTITY_FAMILIAR && target->variant == Entity_Familiar::WISP)
|
||||
reconstruction_missing("Entity_Effect::Update 005d4380: the cleaver splitting a wisp (FUN_0043e9f0)");
|
||||
wisp_cleave(*static_cast<Entity_Familiar*>(target));
|
||||
slash.target = nullptr;
|
||||
}
|
||||
}
|
||||
@@ -1449,7 +1463,7 @@ constexpr auto ITEM_EFFECT_BEHAVIOURS = std::to_array<EffectBehaviour>({
|
||||
{EFFECT_FARTWAVE, spreading_wave_init, effect_finishing<fartwave_update>, nullptr},
|
||||
{EFFECT_FIRE_JET, nullptr, effect_finishing<fire_jet_update>, nullptr},
|
||||
{EFFECT_FIRE_WAVE, spreading_wave_init, effect_finishing<fire_wave_update>, nullptr},
|
||||
{EFFECT_HORNFEL_ROOM_CONTROLLER, hidden_kept_init, effect_finishing<hornfel_controller_update>, nullptr},
|
||||
{EFFECT_HORNFEL_ROOM_CONTROLLER, hidden_kept_init, effect_finishing<hornfel_room_controller>, nullptr},
|
||||
{EFFECT_BISHOP_SHIELD, nullptr, bishop_shield_update, nullptr},
|
||||
{EFFECT_HERETIC_PENTAGRAM, floor_init, effect_poof_update, nullptr},
|
||||
{EFFECT_SIREN_RING, siren_ring_init, effect_poof_update, nullptr},
|
||||
|
||||
Reference in new issue
Block a user