Skip to content

feat(smash): spawn the Smash Crystal, so an ultimate is reachable without a command #998

Description

@andrewgazelka

MapSpec::crystals already parses "3 red data points for areas where the Smash
Crystal will spawn" out of every map file, and #997 added the half of the
mechanic that lives in the ability layer: kit::grant_ultimate hands a player
their kit's ultimate for ability::ULTIMATE_SECONDS, and ability::GrantedFor
counts that window down and takes the ability back when it lapses.

Nothing puts a crystal in the world. Until something does, the only way to reach
an ultimate is /crystal, which is what nix run .#smash-e2e uses to exercise
all fifteen of them.

What is missing is the pickup: an entity at one of the map's crystal points, a
respawn timer on it, and a collision that calls kit::grant_ultimate on whoever
walks into it. That is arena and terrain work rather than ability work, which is
why it was left.

Mineplex's version, for whoever picks this up: one crystal at a time, dropped at
a random one of the map's three points, respawning on a timer, and picking it up
gives the holder their kit's ultimate for a fixed window rather than a charge.

Suggested shape: an observer in terrain.rs or arena.rs that spawns the
entity on the transition into Phase::Playing, and a proximity check that calls
kit::grant_ultimate(&world, player, ability::ULTIMATE_SECONDS). Nothing under
module/ability.rs or module/kit.rs needs to change; the seam is already
there and /crystal can go once it exists.

Filed by an agent while wiring the ability registry in #997; the mechanic works
end to end today, only its trigger is missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions