Log inGet started
Package

Combat.module

Newest version

README.md

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.