Entities/Blocks/BlockMimic.cs
namespace BlockParty;
/// <summary>Per-block "mimic memory". A block that spawned as a <see cref="BlockType.Mimic"/> carries one
/// of these; the stage swaps the live instance for a real disguise type at each phase-up
/// (<c>GameStage.ProcessMimicTransforms</c>) and hands this same object to the replacement, so the
/// disguise remembers it is a mimic and transforms again at the next phase.</summary>
public sealed class MimicState
{
/// <summary>Highest phase whose mimic transform has already been applied. A fresh mimic starts at 0
/// (still showing its own mystery form); once it reaches phase 1 it is replaced by a real disguise and
/// this becomes 1; at phase 2 it is replaced again and this becomes 2.</summary>
public int TransformedThroughPhase;
/// <summary>The block type chosen for the phase-1 transform (valid once
/// <see cref="TransformedThroughPhase"/> >= 1). The phase-2 transform excludes it so the two
/// disguises are always different types.</summary>
public BlockType Phase1Type;
}
/// <summary>
/// Mimic block — a shape-shifter. In phase 0 it roams like any block, showing its own mystery art. The
/// moment it reaches phase 1 the stage transforms it into the phase-1 form of a random OTHER block type
/// (one this level does not use, and never another mimic), spawning a puff of clouds. That disguise
/// remembers it is a mimic: when the disguise reaches phase 2 it transforms a second time into a random
/// block type's phase-2 form (again not one this level uses, never the same type as the phase-1
/// disguise, and never one of <c>GameStage.MimicPhase2Excluded</c>. A slow blue body-color pulse and subtle shimmer of clouds mark a transformed mimic;
/// buttons and spikes keep their usual phase and hazard colors.
///
/// The transformation is genuine instance replacement (see <c>GameStage.TransformMimic</c>): the disguise
/// is a real block of that type with its full behaviour, so the end-of-run progress blocks naturally show
/// whichever type the mimic currently is. The phase-0 form has no special attack of its own — it is only
/// the seed that becomes something else.
/// </summary>
public sealed class BlockMimic : Block
{
// No behaviour of its own: a phase-0 mimic is just a roaming block. Everything special about it (the
// phase-driven transforms, clouds and aura) lives in Block (the carried MimicState + aura) and in
// GameStage (the deferred instance swap), so this only needs to exist as the type the stage spawns.
}