Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld e2fc9693-0…

Combat

The combat core: everything the Badajo obeys, in one place, so the enemy, HUD and progression slices read the same numbers instead of three copies of them.

by◐Catapulta33·posted 9d ago
What it does

umbral.Combat

The combat core: everything the Badajo obeys, in one place, so the enemy, HUD and progression slices read the same numbers instead of three copies of them.

Called by: umbral.Ilva (the swings, the echo, the ladder). Read by the enemies slice for takeHit and the HUD slice for nothing at all — the HUD reads umbral.Ilva's public fields.

What it exports

NameWhat
Combat.SWINGlight and heavy: damage, whole-swing time, chainFrom, hitAt, reach, height, all from Config.PLAYER.
Combat.CORO_PER_HIT / CORO_PER_HEAL / HEAL_AMOUNT / HEAL_TIME / INVULN / KNOCKBACKThe Coro economy and the feel of taking a blow.
Combat.ECHO_TIME / ECHO_RADIUSHow long hidden geometry stays lit, and how far a bell's echo reaches.
Combat.ABILITIES, Combat.LADDERThe movement verbs as data: dash, doubleJump, wallJump, glide, all locked at the start.
Combat.unlock(id) / Combat.lock(id) / Combat.unlocked(id) / Combat.onUnlock(fn)The ladder. umbral.Ilva mirrors it onto the motor, so a region handing her a verb is one call.
Combat.strike(cx, cy, hw, hh, damage, dirX, skip)Resolve a hit box. Returns landed, rung.
Combat.ringNearest(x, y, radius)Ring the closest bell_ entity in reach. Returns its bare name.
Combat.setHiddenVisible(on)Show or hide every hidden_ entity.
Combat.registerScheme()Register controlsKit's umbral scheme: platformer + attack / echo / heal, on keyboard, gamepad and touch.

The two conventions other slices use

  • Anything a swing can hurt carries a component with a takeHit method, called as comp:takeHit(damage, dirX). Nothing registers and nothing is listed: strike finds it by reflection over the scene, so an enemy written tomorrow is hittable the moment it exists.
  • Hidden geometry is any entity named hidden_<anything>; a bell is any entity named bell_<name>. These are the spec's words, not a list this module holds.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

UMBRAL · the combat core. What the Badajo obeys: the two swings and their chain, what a landed strike is worth in Coro, what healing costs, how far a blow shoves her, and how far a bell's echo reaches. `umbral.Ilva` runs the verbs; this is the table they obey, so the enemies, the HUD and the progression slices read one set of numbers instead of three. Three things here are shared with other slices and nothing else is: * Anything a swing can hurt carries a component with a `takeHit` method, called as `comp:takeHit(damage, dirX)`. The Badajo finds it by reflection, so the enemies slice needs no registration. * A bell is any entity named `bell_<name>`; ringing one reveals every entity whose name starts with `hidden_` for `ecoTime` seconds. * The movement verbs are unlocked from `Combat.ABILITIES`, so the progression slice turns dash, double jump and wall jump on by data.

onUnlock(fn: (string) → void

!desc Called whenever a movement verb is unlocked, with its id.

argtypedescription
fn(string

unlocked(id: string) → boolean

!desc Whether Ilva has this movement verb yet.

argtypedescription
idstring

unlock(id: string) → boolean

!desc Unlock a movement verb. Returns false for an id the ladder has not.

argtypedescription
idstring

lock(id: string) → void

!desc Take a verb back (a fresh run, a debug check).

argtypedescription
idstring

hiddenEntities( ) → void

Hidden geometry is the convention, not a list: everything named `hidden_<anything>`. The world slice authors it; this shows and hides it. !desc Every entity whose name starts with `hidden_`.

bells( ) → void

!desc Every entity named `bell_<name>`.

setHiddenVisible(on: boolean) → void

!desc Show or hide every `hidden_` entity.

argtypedescription
onboolean

onEcho(fn: (number, number, number) → void

!desc Register a listener for a bell being rung: `fn(x, y, radius)`. `umbral.Art.echoPulse` registers here rather than being required from the gameplay path, so this module carries no dependency on the art.

argtypedescription
fn(number, number, number

ring(bell: any) → string

argtypedescription
bellany

ringNearest(x: number, y: number, radius: number) → string

!desc Ring the nearest bell within `radius` of a point. Returns its bare name.

argtypedescription
xnumber
ynumber
radiusnumber

componentNamesOf(entry: any) → void

argtypedescription
entryany

strike(cx: number, cy: number, halfW: number, halfH: number, damage: number, dirX: number, skip: any) → void

!desc Every entity a box in front of Ilva touches, with a `takeHit` method or a `bell_` name. Returns how many blows landed and how many bells rang.

argtypedescription
cxnumber
cynumber
halfWnumber
halfHnumber
damagenumber
dirXnumber
skipany

registerScheme( ) → boolean

!desc Register controlsKit's `umbral` scheme. Safe to call more than once.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

7items
▣
module · born here
❒asset
# umbral.Config The one shared module. Every number UMBRAL obeys and every table it reads lives here so a system never invents its own copy. **Read by:** `scenes/main.scene/build.luau` (which builds the map from `MAP`), `umbral.Art` (region palettes and backdrop depths), `umbral.Ilva` (the `PLAYER` tuning table), `umbral.Enemies` and `umbral.Hud`. ## What it holds | Table | What it is | |---|---| | `PALETTE` | The seven colours the whole game is drawn in, as linear rgb. Void, stone, bronze, turquoise, amber, bone, blood. | | `PLAYER` | Ilva's tuning: health, the Coro's maximum and what fills and spends it, the healing ring, i-frames, the two swings' damage and timing, the Badajo's reach, the echo's radius and duration. | | `REGIONS` | The nine regions: id, display name, the palette tint it leans on, its musical bordón, and the depth band its backdrop sits at. | | `MAP` | The geometry: `solids` (solid rectangles), `oneWay` (jumped up through), `braziers`, `bells`, and the spawn point. | ## Conventions A tile is **one world unit** and the grid is whole units. Gameplay is the plane `z = 0`. Rectangles are `{ x, y, w, h }` with `x, y` the bottom-left corner. Ilva's collision box is `0.625 × 1.25`, so a corridor is at least 3 units high and a doorway at least 2. A bell is named `bell_<name>`; hidden geometry is named `hidden_<anything>`. Those two names are the only contract between the art pass and the echo mechanic. `Config.colour(name)` returns the three channels of a palette entry so a light can be built from a name rather than from numbers repeated in five files.
▲ 0↑ born
backing path · umbral/Combat.module

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.