@korial29/tiny-fps 0.160.0 → 0.162.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -212,6 +212,11 @@ export declare const BLOW: {
212
212
  readonly CROSS: 1;
213
213
  readonly HOOK: 2;
214
214
  readonly LUNGE: 3;
215
+ /** The xenomorph's (kit.ts): a swipe of the left claws, then of the right, while FIRE goes on. */
216
+ readonly CLAW_L: 4;
217
+ readonly CLAW_R: 5;
218
+ /** Its tail's sting, on SPECIAL: slow, far, and it throws whoever it stings. */
219
+ readonly TAIL: 6;
215
220
  };
216
221
  export declare const PUNCHES: {
217
222
  ticks: number;
@@ -223,6 +228,26 @@ export declare const PUNCHES: {
223
228
  knock: number;
224
229
  }[];
225
230
  export declare const PUNCH_HITS: number, PUNCH_STUN: number, PUNCH_MEMORY: number;
231
+ /**
232
+ * The xenomorph (the user, 2026-11-15; kit.ts). XENO_HP health. It clings to a wall it faces with
233
+ * forward held (MODE.CLING, physics.ts): CLING_SPEED m/s up, down or along it while the wall rises
234
+ * CLING_HOLD m over its feet; a jump kicks it off along the look at CLING_LEAP m/s. DASH held on a
235
+ * floor or a wall charges a pounce for up to POUNCE_HOLD ticks (PlayerState.charge); let go, it
236
+ * leaps POUNCE_MIN to POUNCE_MAX m/s along the look, at least POUNCE_PITCH up, and the dash timer
237
+ * runs from POUNCE_COOL: the first POUNCE_FLY ticks of it in the air, an enemy it reaches is
238
+ * pinned (room.ts): POUNCE_HP health, his flag dropped, a stumble of POUNCE_STUN ticks. An enemy
239
+ * whose katana or fists hit it loses ACID_HP.
240
+ */
241
+ export declare const XENO_HP = 12;
242
+ export declare const CLING_SPEED = 4.5;
243
+ export declare const CLING_FACING = 0.6;
244
+ export declare const CLING_HOLD = 0.4;
245
+ export declare const CLING_LEAP = 10;
246
+ export declare const POUNCE_HOLD = 36;
247
+ export declare const POUNCE_MIN: number, POUNCE_MAX: number, POUNCE_PITCH: number;
248
+ export declare const POUNCE_COOL: number, POUNCE_FLY: number;
249
+ export declare const POUNCE_HP: number, POUNCE_STUN: number;
250
+ export declare const ACID_HP = 1;
226
251
  /** Shots the rack loads. */
227
252
  export declare const AMMO_MAX = 60;
228
253
  /**
@@ -3,6 +3,7 @@ export declare const ROLE: {
3
3
  readonly MARINE: 0;
4
4
  readonly NINJA: 1;
5
5
  readonly ASTRONAUT: 2;
6
+ readonly XENO: 3;
6
7
  };
7
8
  export interface Kit {
8
9
  run: number;
@@ -30,12 +31,24 @@ export interface Kit {
30
31
  damage: number;
31
32
  /** His running speeds with a gun in hand, of his own. */
32
33
  slow: number;
34
+ /** Health at a spawn, and what the packs heal up to. */
35
+ hp: number;
36
+ /** Whether the racks give him their weapons and he wears the armour pickups. */
37
+ gear: boolean;
38
+ /**
39
+ * The xenomorph's body: claws and a tail for weapons (PUNCHES from BLOW.CLAW_L), clinging to the
40
+ * walls (MODE.CLING), the dash a pounce charged on DASH held, acid for blood (room.ts).
41
+ */
42
+ xeno: boolean;
33
43
  }
34
44
  /** By ROLE. The astronaut moves and fights as the marine: the moon's gravity is the map's. */
35
45
  export declare const KITS: readonly Kit[];
36
46
  /** Ticks after a dash's start before the next of a chain: the burst and a breath. */
37
47
  export declare const DASH_GAP = 16;
38
- /** The classes a map offers, the first one the default: the astronaut alone on a map with space helmets. */
48
+ /**
49
+ * The classes a map offers, the first one the default: on a map with space helmets the astronaut
50
+ * and the xenomorph, who breathes none.
51
+ */
39
52
  export declare const rolesOf: (def: Pick<WorldDef, "helmets">) => number[];
40
53
  /** The class a player plays on the map: his `role` when the map offers it, else the map's default. */
41
54
  export declare const roleOf: (role: number | undefined, def: Pick<WorldDef, "helmets">) => number;
@@ -25,6 +25,7 @@ export interface Result {
25
25
  frags: number;
26
26
  }
27
27
  /** What put a player down, in a frag message. */
28
+ /** CLAW is all the xenomorph's: claws, tail, pounce, and its acid. */
28
29
  export declare const FRAG: {
29
30
  readonly GUN: 0;
30
31
  readonly BLADE: 1;
@@ -32,6 +33,7 @@ export declare const FRAG: {
32
33
  readonly RAIL: 3;
33
34
  readonly NADE: 4;
34
35
  readonly VEHICLE: 5;
36
+ readonly CLAW: 6;
35
37
  };
36
38
  export type ServerText =
37
39
  /**
@@ -103,6 +103,19 @@ export declare class Room {
103
103
  * tackler goes. Once per TACKLE_COOLDOWN ticks, for the first carrier hit.
104
104
  */
105
105
  private tackle;
106
+ /**
107
+ * A xenomorph's pounce `p` meets an enemy who is up, where `p` drew him: he is pinned, POUNCE_HP
108
+ * of health, his flag dropped and a stumble of POUNCE_STUN thrown the way it leapt. The pounce
109
+ * ends on him: it stops, its dash timer past the strike.
110
+ */
111
+ private pin;
112
+ /** The class `p` plays on this map (kit.ts). */
113
+ private kit;
114
+ /**
115
+ * An enemy's katana or fists struck the xenomorph `foe`: its acid takes ACID_HP from `by`, unless
116
+ * he is one too or already down.
117
+ */
118
+ private acid;
106
119
  /**
107
120
  * The enemies of `p` as `p` drew them at the view tick `view` (lag compensation), without one who
108
121
  * lies down now or did then.
@@ -1,6 +1,11 @@
1
1
  import type { PlayerState } from './types';
2
2
  /** Whether the player's body is a weapon: in a slide, or in the burst of a dash. */
3
3
  export declare const tackling: (p: PlayerState) => boolean;
4
+ /**
5
+ * Whether a xenomorph is in the strike of its pounce: in the air, the first POUNCE_FLY ticks of the
6
+ * dash timer it leapt with (POUNCE_COOL). Only for a xenomorph: another's dash runs through it too.
7
+ */
8
+ export declare const pouncing: (p: PlayerState) => boolean;
4
9
  /**
5
10
  * Whether the cylinders of `a` and `b` overlap, with TACKLE_REACH of reach on top: closer than
6
11
  * two radii and the reach on the floor plane, and their heights (low in a slide) overlap.
@@ -135,6 +135,8 @@ export declare const MODE: {
135
135
  readonly CROUCH: 6;
136
136
  /** Seated in a rover (rover.ts): the body follows the seat, move() leaves it there. */
137
137
  readonly RIDE: 7;
138
+ /** The xenomorph on a wall (`wall` the side): it climbs, goes down and along it with no gravity. */
139
+ readonly CLING: 8;
138
140
  };
139
141
  /**
140
142
  * Which side of the player a wall or a ledge is on (PlayerState.wall). In the air it is the side
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@korial29/tiny-fps",
3
3
  "description": "Tiny multiplayer first-person rooftop game for the browser: raw WebGL, zero runtime dependencies, WebSocket or same-browser multi-tab play.",
4
4
  "license": "Apache-2.0",
5
- "version": "0.160.0",
5
+ "version": "0.162.0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"