Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@civ-clone/core-unit

Latest version: v0.1.33

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: dom111
0 Stars
0 Forks
16 Versions
5.6K Downloads
TypeScript Repo language

Scan summary

@civ-clone/core-unit was last scanned on 24 Nov 2026 at version 0.1.33. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 16 versions; the latest was published on 24 Nov 2026.
  • Findings: No rules fired in version 0.1.33.
  • Downloads: 5,633 downloads.

Versions

16 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.33 LATEST 24 Nov 2026 No rules fired
0.1.32 15 Nov 2026 No rules fired
0.1.31 12 Nov 2026 No rules fired
0.1.30 12 Nov 2026 Not shown
0.1.29 24 Oct 2026 Not shown

No rules fired in 0.1.33

Findings

Findings for v0.1.33. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.33; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

core-unit

Contains the core models relating to Units.

The primary model, Unit, stores related state objects (Player, City, Tile, Yields, Actions) and convenience methods for accessing and modifying these.

A key component of a Unit is its ability to perform Actions. This package includes a DelayedAction class which can easily wrap any Actions that take time to be carried out (BuildIrrigation, Fortify, etc.).

There's also a UnitRegistry which can be used to retrieve Units by City, Player or Tile.

Various base Yields are included to represent the values of the Unit.

Unit traits

A UnitTrait is something a unit type can do or is, other than its domain: ignoring zones of control, founding cities, carrying aircraft. The trait classes themselves live in their own base-unit-trait-* packages. A game declares which of its unit classes have which traits with UnitTraits rules, so the same class can differ between games and a RuleSet can switch a single trait:

ruleRegistry.register(
  ...unitTraits('civ1-unit:unit/trait', Diplomat, IgnoresZoneOfControl, NonCombatant),
  ...unitTraits('civ1-unit:unit/trait', Carrier, new Carries(Air))
);

Rules then ask unit.hasTrait(NonCombatant) (from the unit's own RuleRegistry), or, for a class such as a build item, hasTrait(Diplomat, NonCombatant, ruleRegistry). traitsOf returns the traits themselves, with their parameters, traitCriterion(Trait) is a ready-made Criterion, and unitAction accepts trait classes alongside unit classes. The answers are kept per class and registry until a UnitTraits rule is registered, removed or switched.

So a trait declaration must depend on the class alone: never on game state, which it isn't asked about again, and never on traits (a declaration that asks about the class being resolved throws UnitTraitCycleError). Don't subclass UnitTraits: registering a subclass's rule doesn't clear the registry's cache for UnitTraits. traitsOf lists every declaration, so a trait declared on both a parent and a leaf class appears twice for the leaf.

npm run bench logs what a lookup costs against instanceof.

Traits belong to the class, so they are never saved and never sent to a client. A unit's own state (veteran, fortified) stays a UnitImprovement.

When this package is included in your build of civ-clone, it will automatically provide the AdditionalData key units for City, Player and Tileobjects as a convenience method.

Includes the following Rules:

  • Action for controlling which Actions are available to the Unit.
  • Activate triggers actions when a Unit is Unit.activated.
  • Busy for tracking if DelayedActions are complete.
  • CannotSupportUnit triggered when a City cannot support a Unit for whatever reason.
  • CombatResolver fights a battle (see "Combat" below).
  • Created when Units are created.
  • Damaged when a Unit survives a battle with damage.
  • Defeated " " defeated (and destroyed).
  • DefenderRank scores the units on an attacked square to choose its defender.
  • Destroyed " " destroyed.
  • Moved " " moved.
  • MovementCost which controls the cost of moving the Unit.
  • UnitTraits declares which UnitTraits a unit class has (see above).
  • ValidateMove to confirm if the Action was successful or not.
  • Visibility for applying the results of the Units Visibility Yield to the PlayerWorld.
  • WorkRate for how fast a Unit gets through a DelayedAction (2 halves the turns, rounded up).
  • Yield controls the various Yields applicable for the Unit (Attack, Defence, Firepower, HitPoints, Movement, Visibility).

Combat

None of these rules has to be registered: a game that registers none fights as before, with a single roll and units that are either whole or destroyed.

  • HitPoints and Firepower are Yields like Attack. unit.hitPoints() is [remaining, maximum], and unit.damage()/unit.setDamage(n) hold what the unit has taken (setDamage refuses a non-finite n with a RangeError). A unit only has a _damage property while it is damaged, so it isn't saved for an undamaged unit. It isn't one of the unit's keys either: send it to a client through AdditionalData if it should see it.
  • CombatResolver ([attacker, defender, attack, defence, power, randomNumberGenerator] → CombatResult) decides a battle in place of the single roll. The attack applies the winner's damage, processes Defeated for the loser and Damaged for a winner that took damage.
  • DefenderRank ([attacker, candidate, attack, defence] → a score) chooses the defender in place of the highest defence.
  • WorkRate ([unit] → a rate) shortens a DelayedAction to ceil(turns / rate) turns.

Each of the three uses the first answer that isn't undefined. A rule declines through its Criterion, not by returning undefined: every rule whose criteria match still runs, so only one should match (a second resolver would fight the battle again). A resolver must name the attacker and defender as winner and loser and leave the winner alive (damage below its HitPoints); Attack throws otherwise.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @civ-clone/core-unit

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

PHP2Shell, Day 5 93.6% of Measurable Instances Still Unpatched (1)
Vulnerability Insights

PHP2Shell, Day 5: The Panic Hasn’t Turned Into Patching

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229