@v12-engine/engine 0.1.0 → 0.4.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.
- package/dist/abilities/amounts.d.ts +28 -0
- package/dist/abilities/amounts.js +74 -0
- package/dist/abilities/amounts.js.map +1 -0
- package/dist/abilities/buffs.d.ts +106 -6
- package/dist/abilities/buffs.js +443 -0
- package/dist/abilities/buffs.js.map +1 -0
- package/dist/abilities/castTold.d.ts +2 -0
- package/dist/abilities/castTold.js +66 -0
- package/dist/abilities/castTold.js.map +1 -0
- package/dist/abilities/chance.d.ts +38 -0
- package/dist/abilities/chance.js +77 -0
- package/dist/abilities/chance.js.map +1 -0
- package/dist/abilities/charges.d.ts +18 -0
- package/dist/abilities/charges.js +101 -0
- package/dist/abilities/charges.js.map +1 -0
- package/dist/abilities/control.d.ts +28 -0
- package/dist/abilities/control.js +113 -0
- package/dist/abilities/control.js.map +1 -0
- package/dist/abilities/dispel.js +51 -0
- package/dist/abilities/dispel.js.map +1 -0
- package/dist/abilities/effectFields.d.ts +1 -1
- package/dist/abilities/effectFields.js +676 -0
- package/dist/abilities/effectFields.js.map +1 -0
- package/dist/abilities/effectIndex.d.ts +27 -0
- package/dist/abilities/effectIndex.js +64 -0
- package/dist/abilities/effectIndex.js.map +1 -0
- package/dist/abilities/effects/buff.d.ts +9 -3
- package/dist/abilities/effects/buff.js +84 -0
- package/dist/abilities/effects/buff.js.map +1 -0
- package/dist/abilities/effects/conditions.d.ts +2 -0
- package/dist/abilities/effects/conditions.js +41 -0
- package/dist/abilities/effects/conditions.js.map +1 -0
- package/dist/abilities/effects/core.js +54 -0
- package/dist/abilities/effects/core.js.map +1 -0
- package/dist/abilities/effects/damage.d.ts +1 -1
- package/dist/abilities/effects/damage.js +43 -0
- package/dist/abilities/effects/damage.js.map +1 -0
- package/dist/abilities/effects/heal.d.ts +2 -2
- package/dist/abilities/effects/heal.js +51 -0
- package/dist/abilities/effects/heal.js.map +1 -0
- package/dist/abilities/effects/missile.d.ts +13 -1
- package/dist/abilities/effects/missile.js +104 -0
- package/dist/abilities/effects/missile.js.map +1 -0
- package/dist/abilities/effects/morph.d.ts +5 -0
- package/dist/abilities/effects/morph.js +43 -0
- package/dist/abilities/effects/morph.js.map +1 -0
- package/dist/abilities/effects/moves.d.ts +16 -4
- package/dist/abilities/effects/moves.js +212 -0
- package/dist/abilities/effects/moves.js.map +1 -0
- package/dist/abilities/effects/passives.d.ts +19 -9
- package/dist/abilities/effects/passives.js +131 -0
- package/dist/abilities/effects/passives.js.map +1 -0
- package/dist/abilities/effects/proxy.d.ts +5 -0
- package/dist/abilities/effects/proxy.js +60 -0
- package/dist/abilities/effects/proxy.js.map +1 -0
- package/dist/abilities/effects/sight.d.ts +2 -2
- package/dist/abilities/effects/sight.js +39 -0
- package/dist/abilities/effects/sight.js.map +1 -0
- package/dist/abilities/effects/spawn.d.ts +5 -2
- package/dist/abilities/effects/spawn.js +40 -0
- package/dist/abilities/effects/spawn.js.map +1 -0
- package/dist/abilities/effects/timed.d.ts +2 -2
- package/dist/abilities/effects/timed.js +96 -0
- package/dist/abilities/effects/timed.js.map +1 -0
- package/dist/abilities/effects/trade.d.ts +1 -1
- package/dist/abilities/effects/trade.js +25 -0
- package/dist/abilities/effects/trade.js.map +1 -0
- package/dist/abilities/effects.d.ts +97 -23
- package/dist/abilities/effects.js +860 -0
- package/dist/abilities/effects.js.map +1 -0
- package/dist/abilities/land.d.ts +38 -4
- package/dist/abilities/land.js +189 -0
- package/dist/abilities/land.js.map +1 -0
- package/dist/abilities/recast.d.ts +45 -0
- package/dist/abilities/recast.js +118 -0
- package/dist/abilities/recast.js.map +1 -0
- package/dist/abilities/scaled.js +40 -0
- package/dist/abilities/scaled.js.map +1 -0
- package/dist/abilities/screen.d.ts +6 -0
- package/dist/abilities/screen.js +83 -0
- package/dist/abilities/screen.js.map +1 -0
- package/dist/abilities/shapes.d.ts +66 -0
- package/dist/abilities/shapes.js +122 -0
- package/dist/abilities/shapes.js.map +1 -0
- package/dist/abilities/text.d.ts +14 -2
- package/dist/abilities/text.js +204 -0
- package/dist/abilities/text.js.map +1 -0
- package/dist/abilities/triggers.d.ts +98 -0
- package/dist/abilities/triggers.js +351 -0
- package/dist/abilities/triggers.js.map +1 -0
- package/dist/abilityChanges.d.ts +131 -0
- package/dist/abilityChanges.js +345 -0
- package/dist/abilityChanges.js.map +1 -0
- package/dist/ai/area.d.ts +4 -1
- package/dist/ai/brain.d.ts +4 -1
- package/dist/ai/brain.js +844 -0
- package/dist/ai/brain.js.map +1 -0
- package/dist/ai/budget.js +74 -0
- package/dist/ai/budget.js.map +1 -0
- package/dist/ai/checks.d.ts +9 -1
- package/dist/ai/checks.js +242 -0
- package/dist/ai/checks.js.map +1 -0
- package/dist/ai/computer.d.ts +11 -4
- package/dist/ai/computer.js +251 -0
- package/dist/ai/computer.js.map +1 -0
- package/dist/ai/defence.d.ts +4 -0
- package/dist/ai/defence.js +430 -0
- package/dist/ai/defence.js.map +1 -0
- package/dist/ai/define.d.ts +3 -2
- package/dist/ai/define.js +31 -0
- package/dist/ai/define.js.map +1 -0
- package/dist/ai/economy.d.ts +10 -7
- package/dist/ai/economy.js +780 -0
- package/dist/ai/economy.js.map +1 -0
- package/dist/ai/geometry.js +38 -0
- package/dist/ai/geometry.js.map +1 -0
- package/dist/ai/goals.d.ts +1 -0
- package/dist/ai/goals.js +560 -0
- package/dist/ai/goals.js.map +1 -0
- package/dist/ai/knowledge.d.ts +72 -7
- package/dist/ai/knowledge.js +804 -0
- package/dist/ai/knowledge.js.map +1 -0
- package/dist/ai/lanes.d.ts +10 -2
- package/dist/ai/lanes.js +715 -0
- package/dist/ai/lanes.js.map +1 -0
- package/dist/ai/melee/build.js +264 -0
- package/dist/ai/melee/build.js.map +1 -0
- package/dist/ai/melee/goals.d.ts +7 -0
- package/dist/ai/melee/goals.js +720 -0
- package/dist/ai/melee/goals.js.map +1 -0
- package/dist/ai/melee/heroes.js +68 -0
- package/dist/ai/melee/heroes.js.map +1 -0
- package/dist/ai/melee/index.d.ts +1 -1
- package/dist/ai/melee/index.js +51 -0
- package/dist/ai/melee/index.js.map +1 -0
- package/dist/ai/melee/production.js +29 -0
- package/dist/ai/melee/production.js.map +1 -0
- package/dist/ai/melee/surrender.js +64 -0
- package/dist/ai/melee/surrender.js.map +1 -0
- package/dist/ai/micro.d.ts +9 -0
- package/dist/ai/micro.js +1316 -0
- package/dist/ai/micro.js.map +1 -0
- package/dist/ai/mission.d.ts +9 -2
- package/dist/ai/mission.js +538 -0
- package/dist/ai/mission.js.map +1 -0
- package/dist/ai/missionRules.d.ts +1 -1
- package/dist/ai/missionRules.js +26 -0
- package/dist/ai/missionRules.js.map +1 -0
- package/dist/ai/module.d.ts +6 -2
- package/dist/ai/module.js +37 -0
- package/dist/ai/module.js.map +1 -0
- package/dist/ai/options.d.ts +3 -3
- package/dist/ai/plans/build.d.ts +20 -1
- package/dist/ai/plans/build.js +608 -0
- package/dist/ai/plans/build.js.map +1 -0
- package/dist/ai/plans/placement.d.ts +4 -1
- package/dist/ai/plans/placement.js +295 -0
- package/dist/ai/plans/placement.js.map +1 -0
- package/dist/ai/plans/plans.d.ts +9 -0
- package/dist/ai/plans/plans.js +110 -0
- package/dist/ai/plans/plans.js.map +1 -0
- package/dist/ai/plans/production.d.ts +14 -2
- package/dist/ai/plans/production.js +434 -0
- package/dist/ai/plans/production.js.map +1 -0
- package/dist/ai/plans/purse.d.ts +6 -3
- package/dist/ai/plans/purse.js +139 -0
- package/dist/ai/plans/purse.js.map +1 -0
- package/dist/ai/plans/tech.d.ts +6 -0
- package/dist/ai/plans/tech.js +122 -0
- package/dist/ai/plans/tech.js.map +1 -0
- package/dist/ai/profiles.d.ts +4 -4
- package/dist/{profiles-B3NS9jwk.js → ai/profiles.js} +3 -98
- package/dist/ai/profiles.js.map +1 -0
- package/dist/ai/reach.js +54 -0
- package/dist/ai/reach.js.map +1 -0
- package/dist/ai/report.d.ts +8 -0
- package/dist/ai/report.js +87 -0
- package/dist/ai/report.js.map +1 -0
- package/dist/ai/roles.d.ts +4 -0
- package/dist/ai/roles.js +207 -0
- package/dist/ai/roles.js.map +1 -0
- package/dist/ai/rules.d.ts +8 -2
- package/dist/ai/rules.js +416 -0
- package/dist/ai/rules.js.map +1 -0
- package/dist/ai/scouting.d.ts +6 -0
- package/dist/ai/scouting.js +324 -0
- package/dist/ai/scouting.js.map +1 -0
- package/dist/ai/settings.js +99 -0
- package/dist/ai/settings.js.map +1 -0
- package/dist/ai/squads.d.ts +21 -2
- package/dist/ai/squads.js +916 -0
- package/dist/ai/squads.js.map +1 -0
- package/dist/ai/strength.js +320 -0
- package/dist/ai/strength.js.map +1 -0
- package/dist/ai/task.d.ts +3 -1
- package/dist/ai/task.js +17 -0
- package/dist/ai/task.js.map +1 -0
- package/dist/ai/tasks/attack.js +24 -0
- package/dist/ai/tasks/attack.js.map +1 -0
- package/dist/ai/tasks/capture.d.ts +3 -3
- package/dist/ai/tasks/capture.js +37 -0
- package/dist/ai/tasks/capture.js.map +1 -0
- package/dist/ai/tasks/creep.js +29 -0
- package/dist/ai/tasks/creep.js.map +1 -0
- package/dist/ai/tasks/defend.js +61 -0
- package/dist/ai/tasks/defend.js.map +1 -0
- package/dist/ai/tasks/drop.js +81 -0
- package/dist/ai/tasks/drop.js.map +1 -0
- package/dist/ai/tasks/escort.js +59 -0
- package/dist/ai/tasks/escort.js.map +1 -0
- package/dist/ai/tasks/gather.js +48 -0
- package/dist/ai/tasks/gather.js.map +1 -0
- package/dist/ai/tasks/harass.js +39 -0
- package/dist/ai/tasks/harass.js.map +1 -0
- package/dist/ai/tasks/hold.js +32 -0
- package/dist/ai/tasks/hold.js.map +1 -0
- package/dist/ai/tasks/index.js +34 -0
- package/dist/ai/tasks/index.js.map +1 -0
- package/dist/ai/tasks/move.js +26 -0
- package/dist/ai/tasks/move.js.map +1 -0
- package/dist/ai/tasks/patrol.js +59 -0
- package/dist/ai/tasks/patrol.js.map +1 -0
- package/dist/ai/tasks/retreat.js +28 -0
- package/dist/ai/tasks/retreat.js.map +1 -0
- package/dist/ai/tasks/scout.js +73 -0
- package/dist/ai/tasks/scout.js.map +1 -0
- package/dist/ai/tasks/shared.d.ts +1 -1
- package/dist/ai/tasks/shared.js +137 -0
- package/dist/ai/tasks/shared.js.map +1 -0
- package/dist/ai/team.d.ts +18 -1
- package/dist/ai/team.js +492 -0
- package/dist/ai/team.js.map +1 -0
- package/dist/ai/threat.d.ts +6 -0
- package/dist/ai/threat.js +206 -0
- package/dist/ai/threat.js.map +1 -0
- package/dist/ai/view.d.ts +21 -7
- package/dist/ai/view.js +677 -0
- package/dist/ai/view.js.map +1 -0
- package/dist/ai/waves.d.ts +6 -0
- package/dist/ai/waves.js +410 -0
- package/dist/ai/waves.js.map +1 -0
- package/dist/ai.js +54 -6239
- package/dist/aiTesting.d.ts +6 -3
- package/dist/aiTesting.js +229 -0
- package/dist/aiTesting.js.map +1 -0
- package/dist/areas.d.ts +4 -1
- package/dist/areas.js +295 -0
- package/dist/areas.js.map +1 -0
- package/dist/attacks.d.ts +3 -3
- package/dist/attacks.js +127 -0
- package/dist/attacks.js.map +1 -0
- package/dist/burning.d.ts +267 -0
- package/dist/burning.js +795 -0
- package/dist/burning.js.map +1 -0
- package/dist/bytes.js +21 -0
- package/dist/bytes.js.map +1 -0
- package/dist/callings.d.ts +71 -0
- package/dist/callings.js +157 -0
- package/dist/callings.js.map +1 -0
- package/dist/cameraOrders.d.ts +78 -0
- package/dist/cameraOrders.js +114 -0
- package/dist/cameraOrders.js.map +1 -0
- package/dist/camps.d.ts +70 -4
- package/dist/camps.js +501 -0
- package/dist/camps.js.map +1 -0
- package/dist/capture.d.ts +15 -3
- package/dist/capture.js +304 -0
- package/dist/capture.js.map +1 -0
- package/dist/cellLayers.d.ts +78 -13
- package/dist/cellLayers.js +275 -0
- package/dist/cellLayers.js.map +1 -0
- package/dist/cellPatches.d.ts +24 -0
- package/dist/cellPatches.js +73 -0
- package/dist/cellPatches.js.map +1 -0
- package/dist/cinematics.d.ts +10 -5
- package/dist/cinematics.js +161 -0
- package/dist/cinematics.js.map +1 -0
- package/dist/clock.d.ts +2 -2
- package/dist/clock.js +78 -0
- package/dist/clock.js.map +1 -0
- package/dist/commands.d.ts +36 -4
- package/dist/commands.js +636 -0
- package/dist/commands.js.map +1 -0
- package/dist/components.d.ts +31 -10
- package/dist/components.js +74 -0
- package/dist/components.js.map +1 -0
- package/dist/computers.d.ts +4 -4
- package/dist/computers.js +194 -0
- package/dist/computers.js.map +1 -0
- package/dist/concealment.d.ts +25 -2
- package/dist/concealment.js +409 -0
- package/dist/concealment.js.map +1 -0
- package/dist/coreComponents.js +130 -0
- package/dist/coreComponents.js.map +1 -0
- package/dist/createGame.d.ts +306 -0
- package/dist/createGame.js +405 -0
- package/dist/createGame.js.map +1 -0
- package/dist/dashing.d.ts +18 -2
- package/dist/dashing.js +41 -0
- package/dist/dashing.js.map +1 -0
- package/dist/debug.d.ts +8 -0
- package/dist/debug.js +5 -3
- package/dist/debug2.js +76 -0
- package/dist/debug2.js.map +1 -0
- package/dist/debugCommands.d.ts +6 -6
- package/dist/debugCommands.js +537 -0
- package/dist/debugCommands.js.map +1 -0
- package/dist/debugging.d.ts +1 -0
- package/dist/defaultSets.d.ts +183 -0
- package/dist/defaultSets.js +216 -0
- package/dist/defaultSets.js.map +1 -0
- package/dist/definitions.d.ts +6 -0
- package/dist/definitions.js +78 -0
- package/dist/definitions.js.map +1 -0
- package/dist/defs.d.ts +1895 -165
- package/dist/defs.js +380 -0
- package/dist/defs.js.map +1 -0
- package/dist/denying.d.ts +4 -4
- package/dist/denying.js +106 -0
- package/dist/denying.js.map +1 -0
- package/dist/destructibles.d.ts +2 -2
- package/dist/destructibles.js +36 -0
- package/dist/destructibles.js.map +1 -0
- package/dist/determinism.d.ts +4 -4
- package/dist/determinism.js +247 -0
- package/dist/determinism.js.map +1 -0
- package/dist/dialog.d.ts +17 -2
- package/dist/dialog.js +108 -0
- package/dist/dialog.js.map +1 -0
- package/dist/effectRefs.js +28 -0
- package/dist/effectRefs.js.map +1 -0
- package/dist/effects.d.ts +27 -11
- package/dist/effects.js +110 -0
- package/dist/effects.js.map +1 -0
- package/dist/endings.d.ts +1 -1
- package/dist/endings.js +78 -0
- package/dist/endings.js.map +1 -0
- package/dist/engagement.d.ts +40 -6
- package/dist/engagement.js +530 -0
- package/dist/engagement.js.map +1 -0
- package/dist/engineEvents.d.ts +72 -9
- package/dist/engineEvents.js +520 -0
- package/dist/engineEvents.js.map +1 -0
- package/dist/entity.d.ts +275 -26
- package/dist/entity.js +441 -0
- package/dist/entity.js.map +1 -0
- package/dist/entityIndex.d.ts +10 -3
- package/dist/entityIndex.js +149 -0
- package/dist/entityIndex.js.map +1 -0
- package/dist/errors.d.ts +6 -2
- package/dist/errors.js +59 -0
- package/dist/errors.js.map +1 -0
- package/dist/events.d.ts +11 -5
- package/dist/events.js +158 -0
- package/dist/events.js.map +1 -0
- package/dist/exactMath.js +273 -0
- package/dist/exactMath.js.map +1 -0
- package/dist/features.d.ts +1 -1
- package/dist/features.js +127 -0
- package/dist/features.js.map +1 -0
- package/dist/fields.d.ts +25 -5
- package/dist/fields.js +140 -0
- package/dist/fields.js.map +1 -0
- package/dist/fixture.d.ts +3 -3
- package/dist/fixture.js +512 -0
- package/dist/fixture.js.map +1 -0
- package/dist/fog.d.ts +26 -3
- package/dist/fog.js +333 -0
- package/dist/fog.js.map +1 -0
- package/dist/foliage.d.ts +476 -0
- package/dist/foliage.js +1478 -0
- package/dist/foliage.js.map +1 -0
- package/dist/foliageDebug.d.ts +57 -0
- package/dist/foliageDebug.js +172 -0
- package/dist/foliageDebug.js.map +1 -0
- package/dist/foliageRegrowth.d.ts +20 -0
- package/dist/foliageRegrowth.js +332 -0
- package/dist/foliageRegrowth.js.map +1 -0
- package/dist/formState.d.ts +67 -0
- package/dist/formState.js +65 -0
- package/dist/formState.js.map +1 -0
- package/dist/formation.d.ts +46 -8
- package/dist/formation.js +297 -0
- package/dist/formation.js.map +1 -0
- package/dist/forms.d.ts +58 -0
- package/dist/forms.js +146 -0
- package/dist/forms.js.map +1 -0
- package/dist/friendlyFire.d.ts +2 -2
- package/dist/friendlyFire.js +37 -0
- package/dist/friendlyFire.js.map +1 -0
- package/dist/game.d.ts +141 -48
- package/dist/game.js +834 -0
- package/dist/game.js.map +1 -0
- package/dist/gameData.d.ts +96 -22
- package/dist/gameData.js +1690 -0
- package/dist/gameData.js.map +1 -0
- package/dist/gameFiles.d.ts +3 -3
- package/dist/gameFiles.js +14 -0
- package/dist/gameFiles.js.map +1 -0
- package/dist/gates.js +92 -0
- package/dist/gates.js.map +1 -0
- package/dist/generate.d.ts +28 -1
- package/dist/generate.js +1062 -0
- package/dist/generate.js.map +1 -0
- package/dist/generateWorker.d.ts +7 -3
- package/dist/generateWorker.js +86 -0
- package/dist/generateWorker.js.map +1 -0
- package/dist/grid.d.ts +9 -0
- package/dist/grid.js +102 -0
- package/dist/grid.js.map +1 -0
- package/dist/ground.d.ts +17 -1
- package/dist/ground.js +375 -0
- package/dist/ground.js.map +1 -0
- package/dist/groundObjects.d.ts +70 -0
- package/dist/groundObjects.js +371 -0
- package/dist/groundObjects.js.map +1 -0
- package/dist/groundSpeed.d.ts +20 -3
- package/dist/groundSpeed.js +117 -0
- package/dist/groundSpeed.js.map +1 -0
- package/dist/hero.d.ts +126 -10
- package/dist/hero.js +432 -0
- package/dist/hero.js.map +1 -0
- package/dist/holds.d.ts +94 -0
- package/dist/holds.js +305 -0
- package/dist/holds.js.map +1 -0
- package/dist/home.d.ts +1 -1
- package/dist/home.js +30 -0
- package/dist/home.js.map +1 -0
- package/dist/hooks.d.ts +339 -57
- package/dist/hooks.js +105 -0
- package/dist/hooks.js.map +1 -0
- package/dist/hotReload.d.ts +6 -5
- package/dist/hotReload.js +145 -0
- package/dist/hotReload.js.map +1 -0
- package/dist/ids.d.ts +3 -3
- package/dist/ids.js +30 -0
- package/dist/ids.js.map +1 -0
- package/dist/idsFile.d.ts +36 -0
- package/dist/idsFile.js +134 -0
- package/dist/idsFile.js.map +1 -0
- package/dist/index.d.ts +105 -68
- package/dist/index.js +194 -4701
- package/dist/inspect.d.ts +29 -2
- package/dist/{inspect-D9dWHmZ0.js → inspect.js} +21 -12
- package/dist/inspect.js.map +1 -0
- package/dist/inventory.d.ts +14 -1
- package/dist/inventory.js +84 -0
- package/dist/inventory.js.map +1 -0
- package/dist/items.d.ts +136 -8
- package/dist/items.js +585 -0
- package/dist/items.js.map +1 -0
- package/dist/lanes.d.ts +12 -3
- package/dist/lanes.js +496 -0
- package/dist/lanes.js.map +1 -0
- package/dist/life.d.ts +6 -2
- package/dist/life.js +287 -0
- package/dist/life.js.map +1 -0
- package/dist/log.d.ts +26 -3
- package/dist/log.js +192 -0
- package/dist/log.js.map +1 -0
- package/dist/manaBurn.d.ts +2 -2
- package/dist/manaBurn.js +75 -0
- package/dist/manaBurn.js.map +1 -0
- package/dist/map/file.d.ts +56 -3
- package/dist/map/file.js +264 -0
- package/dist/map/file.js.map +1 -0
- package/dist/map/images.js +61 -0
- package/dist/map/images.js.map +1 -0
- package/dist/map/look.d.ts +1 -1
- package/dist/map/look.js +30 -0
- package/dist/map/look.js.map +1 -0
- package/dist/map/pathProfile.js +183 -0
- package/dist/map/pathProfile.js.map +1 -0
- package/dist/map/resize.d.ts +4 -0
- package/dist/map/resize.js +136 -0
- package/dist/map/resize.js.map +1 -0
- package/dist/map/schema.js +257 -0
- package/dist/map/schema.js.map +1 -0
- package/dist/map/terrain.js +214 -0
- package/dist/map/terrain.js.map +1 -0
- package/dist/map/types.d.ts +92 -13
- package/dist/map/types.js +251 -0
- package/dist/map/types.js.map +1 -0
- package/dist/mapCheck/cells.js +94 -0
- package/dist/mapCheck/cells.js.map +1 -0
- package/dist/mapCheck/rules/foliage.d.ts +9 -0
- package/dist/mapCheck/rules/foliage.js +83 -0
- package/dist/mapCheck/rules/foliage.js.map +1 -0
- package/dist/mapCheck/rules/names.js +39 -0
- package/dist/mapCheck/rules/names.js.map +1 -0
- package/dist/mapCheck/rules/objects.d.ts +1 -1
- package/dist/mapCheck/rules/objects.js +56 -0
- package/dist/mapCheck/rules/objects.js.map +1 -0
- package/dist/mapCheck/rules/paths.js +32 -0
- package/dist/mapCheck/rules/paths.js.map +1 -0
- package/dist/mapCheck/rules/players.js +20 -0
- package/dist/mapCheck/rules/players.js.map +1 -0
- package/dist/mapCheck/rules/races.js +56 -0
- package/dist/mapCheck/rules/races.js.map +1 -0
- package/dist/mapCheck/rules/random.js +47 -0
- package/dist/mapCheck/rules/random.js.map +1 -0
- package/dist/mapCheck/rules/regions.js +30 -0
- package/dist/mapCheck/rules/regions.js.map +1 -0
- package/dist/mapCheck/rules/targets.js +31 -0
- package/dist/mapCheck/rules/targets.js.map +1 -0
- package/dist/mapCheck/rules/walking.js +45 -0
- package/dist/mapCheck/rules/walking.js.map +1 -0
- package/dist/mapCheck.d.ts +2 -2
- package/dist/mapCheck.js +63 -0
- package/dist/mapCheck.js.map +1 -0
- package/dist/mapFields.d.ts +25 -2
- package/dist/mapFields.js +134 -0
- package/dist/mapFields.js.map +1 -0
- package/dist/mapFile.js +176 -0
- package/dist/mapFile.js.map +1 -0
- package/dist/mapMeasure.d.ts +8 -0
- package/dist/mapMeasure.js +283 -0
- package/dist/mapMeasure.js.map +1 -0
- package/dist/mapMerge.d.ts +1 -0
- package/dist/mapMerge.js +172 -0
- package/dist/mapMerge.js.map +1 -0
- package/dist/mapObjectives.js +138 -0
- package/dist/mapObjectives.js.map +1 -0
- package/dist/mapObjects.js +80 -0
- package/dist/mapObjects.js.map +1 -0
- package/dist/math.d.ts +37 -7
- package/dist/math.js +155 -0
- package/dist/math.js.map +1 -0
- package/dist/messages.d.ts +71 -4
- package/dist/messages.js +29 -0
- package/dist/messages.js.map +1 -0
- package/dist/missionRules.d.ts +10 -2
- package/dist/{missionRules-C-bGxm0Q.js → missionRules.js} +30 -150
- package/dist/missionRules.js.map +1 -0
- package/dist/mods.d.ts +39 -20
- package/dist/mods.js +271 -0
- package/dist/mods.js.map +1 -0
- package/dist/moves.d.ts +87 -0
- package/dist/moves.js +539 -0
- package/dist/moves.js.map +1 -0
- package/dist/names.d.ts +7 -0
- package/dist/names.js +122 -0
- package/dist/names.js.map +1 -0
- package/dist/navigation/agentParams.js +14 -0
- package/dist/navigation/agentParams.js.map +1 -0
- package/dist/navigation/air.d.ts +7 -3
- package/dist/navigation/air.js +401 -0
- package/dist/navigation/air.js.map +1 -0
- package/dist/navigation/builds.d.ts +34 -2
- package/dist/navigation/builds.js +287 -0
- package/dist/navigation/builds.js.map +1 -0
- package/dist/navigation/groundAreas.d.ts +59 -1
- package/dist/navigation/groundAreas.js +407 -0
- package/dist/navigation/groundAreas.js.map +1 -0
- package/dist/navigation/navigation.d.ts +98 -9
- package/dist/navigation/recast.d.ts +194 -18
- package/dist/navigation/recast.js +1379 -0
- package/dist/navigation/recast.js.map +1 -0
- package/dist/navigation/sidePaths.d.ts +8 -3
- package/dist/navigation/sidePaths.js +241 -0
- package/dist/navigation/sidePaths.js.map +1 -0
- package/dist/navigation/sized.js +243 -0
- package/dist/navigation/sized.js.map +1 -0
- package/dist/nearest.js +32 -0
- package/dist/nearest.js.map +1 -0
- package/dist/noise.js +59 -0
- package/dist/noise.js.map +1 -0
- package/dist/objectives.d.ts +12 -3
- package/dist/objectives.js +144 -0
- package/dist/objectives.js.map +1 -0
- package/dist/orders/basic.d.ts +5 -5
- package/dist/orders/basic.js +417 -0
- package/dist/orders/basic.js.map +1 -0
- package/dist/orders/build.js +278 -0
- package/dist/orders/build.js.map +1 -0
- package/dist/orders/cast.d.ts +13 -3
- package/dist/orders/cast.js +558 -0
- package/dist/orders/cast.js.map +1 -0
- package/dist/orders/facts.js +16 -0
- package/dist/orders/facts.js.map +1 -0
- package/dist/orders/harvest.d.ts +21 -5
- package/dist/orders/harvest.js +540 -0
- package/dist/orders/harvest.js.map +1 -0
- package/dist/orders/idle.d.ts +3 -1
- package/dist/orders/idle.js +234 -0
- package/dist/orders/idle.js.map +1 -0
- package/dist/orders/items.js +92 -0
- package/dist/orders/items.js.map +1 -0
- package/dist/orders/queue.js +108 -0
- package/dist/orders/queue.js.map +1 -0
- package/dist/orders/waiting.d.ts +39 -0
- package/dist/orders/waiting.js +149 -0
- package/dist/orders/waiting.js.map +1 -0
- package/dist/pack.schema.js +13 -0
- package/dist/pack.schema.js.map +1 -0
- package/dist/pack.schema.json +7622 -841
- package/dist/packs/director/index.d.ts +13 -5
- package/dist/packs/director/index.js +204 -0
- package/dist/packs/director/index.js.map +1 -0
- package/dist/packs/heroes/campaign.d.ts +3 -2
- package/dist/packs/heroes/campaign.js +241 -0
- package/dist/packs/heroes/campaign.js.map +1 -0
- package/dist/packs/heroes/carry.d.ts +6 -0
- package/dist/packs/heroes/carry.js +112 -0
- package/dist/packs/heroes/carry.js.map +1 -0
- package/dist/packs/heroes/commands.js +115 -0
- package/dist/packs/heroes/commands.js.map +1 -0
- package/dist/packs/heroes/fallen.d.ts +43 -0
- package/dist/packs/heroes/fallen.js +61 -0
- package/dist/packs/heroes/fallen.js.map +1 -0
- package/dist/packs/heroes/hire.js +60 -0
- package/dist/packs/heroes/hire.js.map +1 -0
- package/dist/packs/heroes/index.d.ts +7 -6
- package/dist/packs/heroes/index.js +130 -0
- package/dist/packs/heroes/index.js.map +1 -0
- package/dist/packs/heroes/loop.d.ts +95 -0
- package/dist/packs/heroes/loop.js +250 -0
- package/dist/packs/heroes/loop.js.map +1 -0
- package/dist/packs/heroes/making.d.ts +6 -3
- package/dist/packs/heroes/making.js +55 -0
- package/dist/packs/heroes/making.js.map +1 -0
- package/dist/packs/heroes/respawn.d.ts +3 -3
- package/dist/packs/heroes/respawn.js +87 -0
- package/dist/packs/heroes/respawn.js.map +1 -0
- package/dist/packs/heroes/sets.d.ts +32 -0
- package/dist/packs/heroes/sets.js +51 -0
- package/dist/packs/heroes/sets.js.map +1 -0
- package/dist/packs/heroes/spells.d.ts +16 -0
- package/dist/packs/heroes/spells.js +269 -0
- package/dist/packs/heroes/spells.js.map +1 -0
- package/dist/packs/items/defaults.d.ts +43 -0
- package/dist/packs/items/defaults.js +1504 -0
- package/dist/packs/items/defaults.js.map +1 -0
- package/dist/packs/items/index.d.ts +27 -0
- package/dist/packs/items/index.js +214 -0
- package/dist/packs/items/index.js.map +1 -0
- package/dist/packs/moba/index.d.ts +3 -3
- package/dist/packs/moba/index.js +174 -0
- package/dist/packs/moba/index.js.map +1 -0
- package/dist/packs/pack.d.ts +15 -15
- package/dist/packs/pack.js +14 -0
- package/dist/packs/pack.js.map +1 -0
- package/dist/packs.d.ts +15 -7
- package/dist/packs.js +222 -0
- package/dist/packs.js.map +1 -0
- package/dist/paths.d.ts +2 -0
- package/dist/paths.js +109 -0
- package/dist/paths.js.map +1 -0
- package/dist/plain.js +57 -0
- package/dist/plain.js.map +1 -0
- package/dist/player.d.ts +33 -10
- package/dist/player.js +159 -0
- package/dist/player.js.map +1 -0
- package/dist/portals.d.ts +1 -1
- package/dist/portals.js +194 -0
- package/dist/portals.js.map +1 -0
- package/dist/prefabs.d.ts +25 -2
- package/dist/prefabs.js +239 -0
- package/dist/prefabs.js.map +1 -0
- package/dist/presetBuildings.js +58 -0
- package/dist/presetBuildings.js.map +1 -0
- package/dist/presetFoliage.d.ts +27 -0
- package/dist/presetFoliage.js +98 -0
- package/dist/presetFoliage.js.map +1 -0
- package/dist/presetGround.js +65 -0
- package/dist/presetGround.js.map +1 -0
- package/dist/proxies.d.ts +12 -0
- package/dist/proxies.js +79 -0
- package/dist/proxies.js.map +1 -0
- package/dist/query.d.ts +56 -0
- package/dist/query.js +88 -0
- package/dist/query.js.map +1 -0
- package/dist/races.d.ts +15 -14
- package/dist/races.js +172 -0
- package/dist/races.js.map +1 -0
- package/dist/randomGroups.js +91 -0
- package/dist/randomGroups.js.map +1 -0
- package/dist/registry.d.ts +117 -53
- package/dist/registry.js +323 -0
- package/dist/registry.js.map +1 -0
- package/dist/remains.d.ts +11 -9
- package/dist/remains.js +188 -0
- package/dist/remains.js.map +1 -0
- package/dist/replication.d.ts +12 -7
- package/dist/replication.js +100 -0
- package/dist/replication.js.map +1 -0
- package/dist/rng.d.ts +2 -0
- package/dist/rng.js +40 -0
- package/dist/rng.js.map +1 -0
- package/dist/rules.d.ts +186 -99
- package/dist/rules.js +179 -0
- package/dist/rules.js.map +1 -0
- package/dist/rulesCheck.d.ts +5 -4
- package/dist/rulesCheck.js +693 -0
- package/dist/rulesCheck.js.map +1 -0
- package/dist/runes.d.ts +2 -2
- package/dist/runes.js +80 -0
- package/dist/runes.js.map +1 -0
- package/dist/save.d.ts +37 -12
- package/dist/save.js +532 -0
- package/dist/save.js.map +1 -0
- package/dist/scenario.d.ts +2 -2
- package/dist/scenario.js +99 -0
- package/dist/scenario.js.map +1 -0
- package/dist/scheduler.d.ts +3 -0
- package/dist/scheduler.js +156 -0
- package/dist/scheduler.js.map +1 -0
- package/dist/score.d.ts +19 -19
- package/dist/score.js +709 -0
- package/dist/score.js.map +1 -0
- package/dist/sequences.d.ts +10 -6
- package/dist/sequences.js +206 -0
- package/dist/sequences.js.map +1 -0
- package/dist/server/doorman.js +154 -0
- package/dist/server/doorman.js.map +1 -0
- package/dist/server/gameServer.d.ts +16 -1
- package/dist/server/gameServer.js +643 -0
- package/dist/server/gameServer.js.map +1 -0
- package/dist/server/index.d.ts +1 -1
- package/dist/server/lobby.js +199 -0
- package/dist/server/lobby.js.map +1 -0
- package/dist/server/log.js +18 -0
- package/dist/server/log.js.map +1 -0
- package/dist/server/match.js +267 -0
- package/dist/server/match.js.map +1 -0
- package/dist/server/mode.d.ts +18 -9
- package/dist/server/mode.js +220 -0
- package/dist/server/mode.js.map +1 -0
- package/dist/{navigation-worker.js → server/navigation-worker.js} +1 -1
- package/dist/server/navigation-worker.js.map +1 -0
- package/dist/server/navigation.js +39 -0
- package/dist/server/navigation.js.map +1 -0
- package/dist/server/ops.d.ts +4 -0
- package/dist/server/ops.js +137 -0
- package/dist/server/ops.js.map +1 -0
- package/dist/server/packs.d.ts +3 -3
- package/dist/server/packs.js +32 -0
- package/dist/server/packs.js.map +1 -0
- package/dist/server/ratings.d.ts +5 -0
- package/dist/server/ratings.js +104 -0
- package/dist/server/ratings.js.map +1 -0
- package/dist/server/relay.d.ts +12 -2
- package/dist/server/relay.js +144 -0
- package/dist/server/relay.js.map +1 -0
- package/dist/server/rooms.d.ts +9 -2
- package/dist/server/rooms.js +442 -0
- package/dist/server/rooms.js.map +1 -0
- package/dist/server/seat.js +116 -0
- package/dist/server/seat.js.map +1 -0
- package/dist/server/seatSettings.d.ts +3 -3
- package/dist/server/seatSettings.js +63 -0
- package/dist/server/seatSettings.js.map +1 -0
- package/dist/server/secret.js +13 -0
- package/dist/server/secret.js.map +1 -0
- package/dist/server/start.d.ts +13 -6
- package/dist/server/start.js +76 -0
- package/dist/server/start.js.map +1 -0
- package/dist/server/websocket.d.ts +9 -1
- package/dist/server/websocket.js +306 -0
- package/dist/server/websocket.js.map +1 -0
- package/dist/server.js +15 -2861
- package/dist/session/can.js +26 -0
- package/dist/session/can.js.map +1 -0
- package/dist/session/commandReplay.d.ts +8 -2
- package/dist/session/commandReplay.js +293 -0
- package/dist/session/commandReplay.js.map +1 -0
- package/dist/session/debug.js +151 -0
- package/dist/session/debug.js.map +1 -0
- package/dist/session/delay.js +62 -0
- package/dist/session/delay.js.map +1 -0
- package/dist/session/delta.d.ts +14 -1
- package/dist/session/delta.js +407 -0
- package/dist/session/delta.js.map +1 -0
- package/dist/session/entityState.js +415 -0
- package/dist/session/entityState.js.map +1 -0
- package/dist/session/local.d.ts +47 -5
- package/dist/session/local.js +670 -0
- package/dist/session/local.js.map +1 -0
- package/dist/session/memory.d.ts +20 -2
- package/dist/session/memory.js +131 -0
- package/dist/session/memory.js.map +1 -0
- package/dist/session/protocol.d.ts +325 -31
- package/dist/session/protocol.js +55 -0
- package/dist/session/protocol.js.map +1 -0
- package/dist/session/remote.d.ts +74 -12
- package/dist/session/remote.js +1394 -0
- package/dist/session/remote.js.map +1 -0
- package/dist/session/replay.d.ts +11 -2
- package/dist/session/replay.js +160 -0
- package/dist/session/replay.js.map +1 -0
- package/dist/session/seed.js +12 -0
- package/dist/session/seed.js.map +1 -0
- package/dist/session/share.d.ts +5 -1
- package/dist/session/share.js +94 -0
- package/dist/session/share.js.map +1 -0
- package/dist/session/socket.d.ts +1 -1
- package/dist/session/socket.js +29 -0
- package/dist/session/socket.js.map +1 -0
- package/dist/session/wire.d.ts +5 -0
- package/dist/session/wire.js +84 -0
- package/dist/session/wire.js.map +1 -0
- package/dist/session/worker.d.ts +77 -12
- package/dist/session/worker.js +499 -0
- package/dist/session/worker.js.map +1 -0
- package/dist/shared.d.ts +31 -5
- package/dist/shared.js +166 -0
- package/dist/shared.js.map +1 -0
- package/dist/sides.d.ts +9 -3
- package/dist/sides.js +149 -0
- package/dist/sides.js.map +1 -0
- package/dist/sight.js +85 -0
- package/dist/sight.js.map +1 -0
- package/dist/simulate-worker.js +1 -1
- package/dist/simulate.d.ts +12 -8
- package/dist/{simulate-oXBiw1Ff.js → simulate.js} +10 -11
- package/dist/simulate.js.map +1 -0
- package/dist/smart.js +77 -0
- package/dist/smart.js.map +1 -0
- package/dist/spatial.d.ts +32 -16
- package/dist/spatial.js +234 -0
- package/dist/spatial.js.map +1 -0
- package/dist/spawning.d.ts +1 -0
- package/dist/spawning.js +224 -0
- package/dist/spawning.js.map +1 -0
- package/dist/stances.d.ts +6 -3
- package/dist/stances.js +169 -0
- package/dist/stances.js.map +1 -0
- package/dist/start.d.ts +10 -10
- package/dist/start.js +75 -0
- package/dist/start.js.map +1 -0
- package/dist/stats.d.ts +42 -16
- package/dist/stats.js +290 -0
- package/dist/stats.js.map +1 -0
- package/dist/summoned.d.ts +52 -0
- package/dist/summoned.js +38 -0
- package/dist/summoned.js.map +1 -0
- package/dist/summons.d.ts +10 -13
- package/dist/summons.js +271 -0
- package/dist/summons.js.map +1 -0
- package/dist/systems/abilities.js +224 -0
- package/dist/systems/abilities.js.map +1 -0
- package/dist/systems/combat.d.ts +35 -1
- package/dist/systems/combat.js +677 -0
- package/dist/systems/combat.js.map +1 -0
- package/dist/systems/combatTold.d.ts +3 -1
- package/dist/systems/combatTold.js +85 -0
- package/dist/systems/combatTold.js.map +1 -0
- package/dist/systems/construction.js +80 -0
- package/dist/systems/construction.js.map +1 -0
- package/dist/systems/economy.d.ts +0 -6
- package/dist/systems/economy.js +128 -0
- package/dist/systems/economy.js.map +1 -0
- package/dist/systems/fog.d.ts +1 -1
- package/dist/systems/fog.js +120 -0
- package/dist/systems/fog.js.map +1 -0
- package/dist/systems/life.js +32 -0
- package/dist/systems/life.js.map +1 -0
- package/dist/systems/movement.d.ts +24 -12
- package/dist/systems/movement.js +1247 -0
- package/dist/systems/movement.js.map +1 -0
- package/dist/systems/orders.js +64 -0
- package/dist/systems/orders.js.map +1 -0
- package/dist/systems/production.js +322 -0
- package/dist/systems/production.js.map +1 -0
- package/dist/systems/productionQueue.js +120 -0
- package/dist/systems/productionQueue.js.map +1 -0
- package/dist/systems/victory.d.ts +1 -1
- package/dist/systems/victory.js +56 -0
- package/dist/systems/victory.js.map +1 -0
- package/dist/talk.d.ts +6 -6
- package/dist/talk.js +153 -0
- package/dist/talk.js.map +1 -0
- package/dist/targeting.d.ts +142 -0
- package/dist/targeting.js +49 -0
- package/dist/targeting.js.map +1 -0
- package/dist/tech.d.ts +20 -3
- package/dist/tech.js +239 -0
- package/dist/tech.js.map +1 -0
- package/dist/techTree.d.ts +7 -0
- package/dist/techTree.js +90 -0
- package/dist/techTree.js.map +1 -0
- package/dist/terrain.d.ts +59 -7
- package/dist/terrain.js +389 -0
- package/dist/terrain.js.map +1 -0
- package/dist/terrainSave.d.ts +6 -0
- package/dist/terrainSave.js +74 -0
- package/dist/terrainSave.js.map +1 -0
- package/dist/testing.d.ts +8 -7
- package/dist/testing.js +13 -739
- package/dist/testing.js.map +1 -1
- package/dist/tiles.d.ts +1 -1
- package/dist/tiles.js +43 -0
- package/dist/tiles.js.map +1 -0
- package/dist/timers.d.ts +29 -4
- package/dist/timers.js +242 -0
- package/dist/timers.js.map +1 -0
- package/dist/tomes.d.ts +4 -4
- package/dist/tomes.js +94 -0
- package/dist/tomes.js.map +1 -0
- package/dist/trade.js +103 -0
- package/dist/trade.js.map +1 -0
- package/dist/transport.d.ts +6 -1
- package/dist/transport.js +281 -0
- package/dist/transport.js.map +1 -0
- package/dist/tunables.d.ts +10 -3
- package/dist/tunables.js +56 -0
- package/dist/tunables.js.map +1 -0
- package/dist/unitResources.d.ts +67 -0
- package/dist/unitResources.js +266 -0
- package/dist/unitResources.js.map +1 -0
- package/dist/upkeep.d.ts +6 -1
- package/dist/upkeep.js +26 -0
- package/dist/upkeep.js.map +1 -0
- package/dist/veterancy.d.ts +8 -3
- package/dist/veterancy.js +131 -0
- package/dist/veterancy.js.map +1 -0
- package/dist/vision.d.ts +36 -0
- package/dist/vision.js +133 -0
- package/dist/vision.js.map +1 -0
- package/dist/walls.d.ts +1 -1
- package/dist/walls.js +278 -0
- package/dist/walls.js.map +1 -0
- package/dist/world.d.ts +606 -88
- package/dist/world.js +1263 -0
- package/dist/world.js.map +1 -0
- package/package.json +2 -2
- package/dist/ai.js.map +0 -1
- package/dist/attributes.d.ts +0 -66
- package/dist/brain-BvVdUhX8.js +0 -7659
- package/dist/brain-BvVdUhX8.js.map +0 -1
- package/dist/builds-C6LfgvEU.js +0 -460
- package/dist/builds-C6LfgvEU.js.map +0 -1
- package/dist/coreComponents-syuh2fPG.js +0 -5149
- package/dist/coreComponents-syuh2fPG.js.map +0 -1
- package/dist/debugCommands-CzjrSm66.js +0 -14739
- package/dist/debugCommands-CzjrSm66.js.map +0 -1
- package/dist/determinism-BCymQwiE.js +0 -518
- package/dist/determinism-BCymQwiE.js.map +0 -1
- package/dist/game-DiJEN-Ks.js +0 -5800
- package/dist/game-DiJEN-Ks.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/inspect-D9dWHmZ0.js.map +0 -1
- package/dist/local-Dkovq42k.js +0 -1379
- package/dist/local-Dkovq42k.js.map +0 -1
- package/dist/missionRules-C-bGxm0Q.js.map +0 -1
- package/dist/navigation-worker.js.map +0 -1
- package/dist/packs-g5thvmGn.js +0 -3199
- package/dist/packs-g5thvmGn.js.map +0 -1
- package/dist/profiles-B3NS9jwk.js.map +0 -1
- package/dist/server.js.map +0 -1
- package/dist/simulate-oXBiw1Ff.js.map +0 -1
package/dist/world.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ import { Clock } from './clock';
|
|
|
5
5
|
import { Spawning } from './spawning';
|
|
6
6
|
import { type IssuedCommand } from './commands';
|
|
7
7
|
import type { Camp } from './camps';
|
|
8
|
-
import type { ChatAudience,
|
|
8
|
+
import type { ChatAudience, PingId } from './talk';
|
|
9
9
|
import { type DebugChecks } from './debug';
|
|
10
|
-
import { type AbilityDef, type AttackDef, type Cost, type DamageType, type EffectDef, type EffectOf, type
|
|
10
|
+
import { type AbilityDef, type AttackDef, type Cost, type DamageType, type EffectDef, type EffectOf, type MorphBack, type ResourceId } from './defs';
|
|
11
11
|
import { Entity, type EntityId, type ItemInstance, type PlayerId } from './entity';
|
|
12
12
|
import { EntityIndex } from './entityIndex';
|
|
13
13
|
import { type ErrorPolicy, type ErrorSite, type RejectedKind, type WorldFailure } from './errors';
|
|
@@ -21,7 +21,7 @@ import type { SidePaths } from './navigation/sidePaths';
|
|
|
21
21
|
import type { Navigation } from './navigation/navigation';
|
|
22
22
|
import { Player, type PlayerInit, type SpentOn } from './player';
|
|
23
23
|
import type { Registry, System } from './registry';
|
|
24
|
-
import type {
|
|
24
|
+
import type { RuleSettings } from './rules';
|
|
25
25
|
import { Scheduler } from './scheduler';
|
|
26
26
|
import { Score } from './score';
|
|
27
27
|
import { Computers } from './computers';
|
|
@@ -34,14 +34,17 @@ import { type GroundItem } from './items';
|
|
|
34
34
|
import type { Terrain } from './terrain';
|
|
35
35
|
import { type GroundBase, type TerrainPatch } from './ground';
|
|
36
36
|
import { type AreaDef, type AreaShape, Areas } from './areas';
|
|
37
|
+
import { type WorldQuery } from './query';
|
|
37
38
|
import { Dialog, type SaidLine } from './dialog';
|
|
38
39
|
import { Objectives, type ObjectiveState, type ObjectiveStatus } from './objectives';
|
|
39
40
|
import { type SequenceDef, Sequences } from './sequences';
|
|
40
41
|
import { type TimerDef, Timers } from './timers';
|
|
41
42
|
import type { ListenerDef } from './events';
|
|
42
43
|
import type { Trace } from './inspect';
|
|
44
|
+
import type { CameraOrder } from './cameraOrders';
|
|
45
|
+
import type { WindGust } from './foliage';
|
|
43
46
|
import type { CinematicChoice, CinematicCue, CinematicCueSent, CinematicEnded } from './cinematics';
|
|
44
|
-
import { type
|
|
47
|
+
import { type FxCue, type FxOptions } from './effects';
|
|
45
48
|
import { WorldMap } from './names';
|
|
46
49
|
import type { MapEnvironment } from './map';
|
|
47
50
|
import { type PrefabDef, type SpawnedPrefab, type SpawnPrefabOptions } from './prefabs';
|
|
@@ -51,27 +54,45 @@ import { type PrefabDef, type SpawnedPrefab, type SpawnPrefabOptions } from './p
|
|
|
51
54
|
* @beta
|
|
52
55
|
*/
|
|
53
56
|
export type PlayerRelation = 'ally' | 'enemy' | 'neutral';
|
|
54
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* A shot in flight to a target or a point; it deals its damage when it lands (`world.projectiles`)
|
|
59
|
+
*
|
|
60
|
+
* @beta
|
|
61
|
+
*/
|
|
55
62
|
export interface Projectile {
|
|
63
|
+
/** The projectile's id, from `world.newId` */
|
|
56
64
|
id: number;
|
|
65
|
+
/** The entity that fired it */
|
|
57
66
|
source: EntityId;
|
|
67
|
+
/** The player whose unit fired it, who is credited with what it does */
|
|
58
68
|
owner: PlayerId;
|
|
69
|
+
/** The entity it is after; 0 or gone for a shot that hits an area */
|
|
59
70
|
target: EntityId;
|
|
71
|
+
/** Where it is now, east-west, in world units */
|
|
60
72
|
x: number;
|
|
73
|
+
/** Where it is now, north-south, in world units */
|
|
61
74
|
z: number;
|
|
75
|
+
/** Where it was at the last tick, east-west, for the screen to blend by */
|
|
62
76
|
prevX: number;
|
|
77
|
+
/** Where it was at the last tick, north-south, for the screen to blend by */
|
|
63
78
|
prevZ: number;
|
|
64
79
|
/** Where it is heading. Follows the target while it lives */
|
|
65
80
|
tx: number;
|
|
81
|
+
/** The north-south coordinate it is heading for */
|
|
66
82
|
tz: number;
|
|
83
|
+
/** World units it flies per second */
|
|
67
84
|
speed: number;
|
|
85
|
+
/** The damage it deals on landing */
|
|
68
86
|
damage: number;
|
|
87
|
+
/** The type of damage it deals */
|
|
69
88
|
type: DamageType;
|
|
89
|
+
/** Whether the hit is a critical one */
|
|
70
90
|
crit: boolean;
|
|
71
91
|
/** Fired uphill and going to miss: it flies all the way and does nothing when it comes down */
|
|
72
92
|
miss: boolean;
|
|
73
93
|
/** Where it was fired from */
|
|
74
94
|
sx: number;
|
|
95
|
+
/** North-south coordinate it was fired from */
|
|
75
96
|
sz: number;
|
|
76
97
|
/** Set for shots that hit an area instead of a target */
|
|
77
98
|
splash?: {
|
|
@@ -96,25 +117,39 @@ export interface Projectile {
|
|
|
96
117
|
* @beta
|
|
97
118
|
*/
|
|
98
119
|
export interface Missile {
|
|
120
|
+
/** The missile's id, from `world.newId` */
|
|
99
121
|
id: number;
|
|
122
|
+
/** The player whose unit sent it */
|
|
100
123
|
owner: PlayerId;
|
|
124
|
+
/** The caster entity that sent it */
|
|
101
125
|
source: EntityId;
|
|
126
|
+
/** The id of the ability it was sent by */
|
|
102
127
|
ability: string;
|
|
128
|
+
/** The ability's level when it was sent */
|
|
103
129
|
level: number;
|
|
130
|
+
/** Where it is now, east-west, in world units */
|
|
104
131
|
x: number;
|
|
132
|
+
/** Where it is now, north-south, in world units */
|
|
105
133
|
z: number;
|
|
134
|
+
/** Where it was at the last tick, east-west */
|
|
106
135
|
prevX: number;
|
|
136
|
+
/** Where it was at the last tick, north-south */
|
|
107
137
|
prevZ: number;
|
|
108
138
|
/** Direction, of length 1 */
|
|
109
139
|
dx: number;
|
|
140
|
+
/** North-south part of its direction */
|
|
110
141
|
dz: number;
|
|
142
|
+
/** World units it travels per second */
|
|
111
143
|
speed: number;
|
|
112
144
|
/** How far it still goes */
|
|
113
145
|
left: number;
|
|
114
146
|
/** Seconds until it sets off, and how long that took in all */
|
|
115
147
|
delay: number;
|
|
148
|
+
/** Seconds it takes to take shape before it sets off: `delay` starts from it and counts down */
|
|
116
149
|
forms: number;
|
|
150
|
+
/** How far from its path it hits things, in world units */
|
|
117
151
|
radius: number;
|
|
152
|
+
/** The missile effect of the ability that made it, which says what it does to what it hits */
|
|
118
153
|
effect: EffectOf<'missile'>;
|
|
119
154
|
/** Whom it has passed through already. Missiles sent together share it: what one of them hit the others pass by */
|
|
120
155
|
hit: Set<EntityId>;
|
|
@@ -130,6 +165,18 @@ export interface Missile {
|
|
|
130
165
|
bounces: number;
|
|
131
166
|
/** Something got in its way: what happens where it ends does not */
|
|
132
167
|
stopped: boolean;
|
|
168
|
+
/** On its way back to the caster (`EffectFields.returns`): it touches nobody (unless it `hitsOnReturn`), and ends where the caster is */
|
|
169
|
+
returning?: boolean;
|
|
170
|
+
/** How many it went through, for one that goes through so many (`pierce`) or less on each (`falloff`) */
|
|
171
|
+
struck?: number;
|
|
172
|
+
/** The last one it hit, for what happens where it meets a wall (`onWall`) */
|
|
173
|
+
last?: EntityId;
|
|
174
|
+
/** The level of the ground it set off from, for one that stops at a wall (`onWall`): a cliff above it is a wall */
|
|
175
|
+
floor?: number;
|
|
176
|
+
/** Where its owner steers it (`steer`, `steerMissile`) */
|
|
177
|
+
steerTo?: Vec2;
|
|
178
|
+
/** How full the ability that sent it was held (`EffectContext.held`), for one held and let go */
|
|
179
|
+
held?: number;
|
|
133
180
|
}
|
|
134
181
|
/**
|
|
135
182
|
* Something an ability does a while after it was cast
|
|
@@ -137,14 +184,24 @@ export interface Missile {
|
|
|
137
184
|
* @beta
|
|
138
185
|
*/
|
|
139
186
|
export interface Delayed {
|
|
187
|
+
/** Seconds until its effects happen */
|
|
140
188
|
left: number;
|
|
189
|
+
/** The unit that cast the ability */
|
|
141
190
|
caster: Entity;
|
|
191
|
+
/** The ability whose effects are waiting */
|
|
142
192
|
ability: AbilityDef;
|
|
193
|
+
/** The ability's level when it was cast */
|
|
143
194
|
level: number;
|
|
195
|
+
/** Where the effects happen */
|
|
144
196
|
point: Vec2;
|
|
197
|
+
/** The effects to run when the time is up */
|
|
145
198
|
effects: EffectDef[];
|
|
146
199
|
/** What its arrival goes by, when not the ability */
|
|
147
200
|
impact?: string;
|
|
201
|
+
/** Where the effects went off from and the way they faced as it was cast, for those with a shape (`EffectCommon.shape`) */
|
|
202
|
+
from?: Vec2;
|
|
203
|
+
/** The way the effects faced as it was cast, in radians as a unit's `facing` (0 along +z), for those with a shape */
|
|
204
|
+
heading?: number;
|
|
148
205
|
}
|
|
149
206
|
/**
|
|
150
207
|
* Ground an ability goes on working on for a while
|
|
@@ -152,22 +209,51 @@ export interface Delayed {
|
|
|
152
209
|
* @beta
|
|
153
210
|
*/
|
|
154
211
|
export interface Zone {
|
|
212
|
+
/** The zone's id, from `world.newId` */
|
|
155
213
|
id: number;
|
|
214
|
+
/** The unit that cast the ability */
|
|
156
215
|
caster: Entity;
|
|
216
|
+
/** The ability that made the zone */
|
|
157
217
|
ability: AbilityDef;
|
|
218
|
+
/** The ability's level when it was cast */
|
|
158
219
|
level: number;
|
|
220
|
+
/** Centre of the zone, east-west */
|
|
159
221
|
x: number;
|
|
222
|
+
/** Centre of the zone, north-south */
|
|
160
223
|
z: number;
|
|
224
|
+
/** Seconds the zone goes on */
|
|
161
225
|
left: number;
|
|
162
226
|
/** Seconds until what is inside is next seen to */
|
|
163
227
|
next: number;
|
|
228
|
+
/** The zone effect that says what it does to what is inside */
|
|
164
229
|
effect: EffectOf<'zone'>;
|
|
230
|
+
/**
|
|
231
|
+
* Where the effects went off from and the way they faced as it was cast, kept for what it holds with a shape
|
|
232
|
+
* (`EffectCommon.shape`): a cone of it goes off from there, the way it faced. Left out for one with no shape
|
|
233
|
+
*/
|
|
234
|
+
from?: Vec2;
|
|
235
|
+
/** The way it faced as it was cast, in radians as a unit's `facing` (0 along +z); left out for one with no shape */
|
|
236
|
+
heading?: number;
|
|
237
|
+
/** The unit it goes with (`follow`) */
|
|
238
|
+
follows?: EntityId;
|
|
239
|
+
/** Who is in it now, by id from the lowest, for one that sees to who comes and goes (`onEnter`, `onLeave`, `edge`) */
|
|
240
|
+
inside?: EntityId[];
|
|
165
241
|
}
|
|
166
|
-
/**
|
|
242
|
+
/**
|
|
243
|
+
* How a message to a player is shown: an error, information or a hint
|
|
244
|
+
*
|
|
245
|
+
* @beta
|
|
246
|
+
*/
|
|
167
247
|
export type MessageKind = 'error' | 'info' | 'hint';
|
|
168
|
-
/**
|
|
248
|
+
/**
|
|
249
|
+
* The events a world emits (`world.events`), by name, each with its payload; what hooks do not cover and listeners and sessions hear
|
|
250
|
+
*
|
|
251
|
+
* @beta
|
|
252
|
+
*/
|
|
169
253
|
export interface WorldEvents {
|
|
254
|
+
/** An entity was added to the world */
|
|
170
255
|
entitySpawned: Entity;
|
|
256
|
+
/** An entity left the world, dead or taken away */
|
|
171
257
|
entityRemoved: Entity;
|
|
172
258
|
/**
|
|
173
259
|
* `cause`: the blow, for what died of damage. `how`: what the rules made of the death in the `death` hook, for the
|
|
@@ -196,6 +282,7 @@ export interface WorldEvents {
|
|
|
196
282
|
buff: string;
|
|
197
283
|
expired: boolean;
|
|
198
284
|
};
|
|
285
|
+
/** Damage was dealt to a target: how much, of which type, by whom and by what ability or attack */
|
|
199
286
|
damaged: {
|
|
200
287
|
target: Entity;
|
|
201
288
|
source?: Entity;
|
|
@@ -213,6 +300,7 @@ export interface WorldEvents {
|
|
|
213
300
|
source?: Entity;
|
|
214
301
|
target?: Entity;
|
|
215
302
|
};
|
|
303
|
+
/** A target was healed by an amount, by a source when it has one */
|
|
216
304
|
healed: {
|
|
217
305
|
target: Entity;
|
|
218
306
|
source?: Entity;
|
|
@@ -224,7 +312,18 @@ export interface WorldEvents {
|
|
|
224
312
|
target?: Entity;
|
|
225
313
|
weapon: number;
|
|
226
314
|
};
|
|
315
|
+
/**
|
|
316
|
+
* A swing called off before its blow (`cancelSwing`): the unit was told something else, its target went, it was
|
|
317
|
+
* stunned. What it was swinging at, where it was at something, and with which of its attacks
|
|
318
|
+
*/
|
|
319
|
+
swingCancelled: {
|
|
320
|
+
attacker: Entity;
|
|
321
|
+
target?: Entity;
|
|
322
|
+
weapon: number;
|
|
323
|
+
};
|
|
324
|
+
/** A projectile was fired */
|
|
227
325
|
projectileSpawned: Projectile;
|
|
326
|
+
/** A projectile landed or was taken away */
|
|
228
327
|
projectileRemoved: Projectile;
|
|
229
328
|
/** An attack that hits an area came down */
|
|
230
329
|
impact: {
|
|
@@ -233,7 +332,9 @@ export interface WorldEvents {
|
|
|
233
332
|
radius: number;
|
|
234
333
|
owner: PlayerId;
|
|
235
334
|
};
|
|
335
|
+
/** A building's construction began, its site placed */
|
|
236
336
|
constructionStarted: Entity;
|
|
337
|
+
/** A building was completed */
|
|
237
338
|
constructionFinished: Entity;
|
|
238
339
|
/** A construction was called off by its owner: it dies next, with the reason `cancelled` */
|
|
239
340
|
constructionCancelled: Entity;
|
|
@@ -248,6 +349,7 @@ export interface WorldEvents {
|
|
|
248
349
|
entity: Entity;
|
|
249
350
|
into: string;
|
|
250
351
|
};
|
|
352
|
+
/** A building finished training a unit */
|
|
251
353
|
unitTrained: {
|
|
252
354
|
building: Entity;
|
|
253
355
|
unit: Entity;
|
|
@@ -257,6 +359,13 @@ export interface WorldEvents {
|
|
|
257
359
|
entity: Entity;
|
|
258
360
|
from: string;
|
|
259
361
|
};
|
|
362
|
+
/** A hero in a form turned back into what it was (`leaveForm`): `form`, the type it was in; `why`, what turned it back */
|
|
363
|
+
morphedBack: {
|
|
364
|
+
entity: Entity;
|
|
365
|
+
form: string;
|
|
366
|
+
why?: MorphBack | (string & {});
|
|
367
|
+
};
|
|
368
|
+
/** A player was defeated, out of the game */
|
|
260
369
|
playerDefeated: Player;
|
|
261
370
|
/** A player gave up (see `surrender`): `playerDefeated` follows */
|
|
262
371
|
playerSurrendered: {
|
|
@@ -268,6 +377,7 @@ export interface WorldEvents {
|
|
|
268
377
|
seconds: number;
|
|
269
378
|
left: number;
|
|
270
379
|
};
|
|
380
|
+
/** The game ended; `winner` is the winning team */
|
|
271
381
|
gameOver: {
|
|
272
382
|
winner: number;
|
|
273
383
|
};
|
|
@@ -284,10 +394,12 @@ export interface WorldEvents {
|
|
|
284
394
|
unit: Entity;
|
|
285
395
|
player: PlayerId;
|
|
286
396
|
};
|
|
397
|
+
/** A unit got out of a transport */
|
|
287
398
|
unloaded: {
|
|
288
399
|
passenger: Entity;
|
|
289
400
|
transport: Entity;
|
|
290
401
|
};
|
|
402
|
+
/** A hero reached a new level */
|
|
291
403
|
heroLevelUp: {
|
|
292
404
|
hero: Entity;
|
|
293
405
|
level: number;
|
|
@@ -319,6 +431,7 @@ export interface WorldEvents {
|
|
|
319
431
|
amount: number;
|
|
320
432
|
reason?: string;
|
|
321
433
|
};
|
|
434
|
+
/** A fallen hero was brought back */
|
|
322
435
|
heroRevived: Entity;
|
|
323
436
|
/** `duration`: seconds of the wind-up */
|
|
324
437
|
castStarted: {
|
|
@@ -327,23 +440,36 @@ export interface WorldEvents {
|
|
|
327
440
|
point?: Vec2;
|
|
328
441
|
duration: number;
|
|
329
442
|
};
|
|
443
|
+
/**
|
|
444
|
+
* A wind-up called off before it went off: the caster stunned, killed, or ordered elsewhere. `ability`: the one wound up,
|
|
445
|
+
* where it is still known (an item's, gone with the item, is not)
|
|
446
|
+
*/
|
|
447
|
+
castCancelled: {
|
|
448
|
+
caster: Entity;
|
|
449
|
+
ability?: AbilityDef;
|
|
450
|
+
};
|
|
330
451
|
/** A channelled ability started to be kept up, or ended: done, or `interrupted` */
|
|
331
452
|
channelStarted: {
|
|
332
453
|
caster: Entity;
|
|
333
454
|
ability: AbilityDef;
|
|
334
455
|
duration: number;
|
|
335
456
|
};
|
|
457
|
+
/** A channelled ability stopped being kept up; `interrupted` when it was broken off */
|
|
336
458
|
channelEnded: {
|
|
337
459
|
caster: Entity;
|
|
338
460
|
ability: AbilityDef;
|
|
339
461
|
interrupted: boolean;
|
|
340
462
|
};
|
|
463
|
+
/** A missile was sent on its way */
|
|
341
464
|
missileSpawned: Missile;
|
|
465
|
+
/** A missile passed through a target */
|
|
342
466
|
missileHit: {
|
|
343
467
|
missile: Missile;
|
|
344
468
|
target: Entity;
|
|
345
469
|
};
|
|
470
|
+
/** A missile ended or was taken away */
|
|
346
471
|
missileRemoved: Missile;
|
|
472
|
+
/** An ability was cast: by whom, at what level, at which target or point, and whether it used a charge */
|
|
347
473
|
abilityCast: {
|
|
348
474
|
caster: Entity;
|
|
349
475
|
ability: AbilityDef;
|
|
@@ -352,7 +478,11 @@ export interface WorldEvents {
|
|
|
352
478
|
point: Vec2;
|
|
353
479
|
charged?: boolean;
|
|
354
480
|
};
|
|
355
|
-
/**
|
|
481
|
+
/**
|
|
482
|
+
* What an ability set off arrived: a missile hit, a rush ended, the time was up. `from`: where it went off from,
|
|
483
|
+
* when not the caster (`EffectContext.origin`). `effect`: the effect of the ability whose arrival it is (a missile, a
|
|
484
|
+
* delay, a zone at its end), where the list that landed is one of the ability's
|
|
485
|
+
*/
|
|
356
486
|
abilityImpact: {
|
|
357
487
|
caster: Entity;
|
|
358
488
|
ability: AbilityDef;
|
|
@@ -361,17 +491,28 @@ export interface WorldEvents {
|
|
|
361
491
|
point: Vec2;
|
|
362
492
|
radius: number;
|
|
363
493
|
impact?: string;
|
|
494
|
+
from?: Vec2;
|
|
495
|
+
effect?: EffectDef;
|
|
364
496
|
};
|
|
497
|
+
/** A building finished researching an upgrade, to this level */
|
|
365
498
|
researchFinished: {
|
|
366
499
|
building: Entity;
|
|
367
500
|
upgrade: string;
|
|
368
501
|
level: number;
|
|
369
502
|
};
|
|
503
|
+
/** An item came to lie on the ground */
|
|
370
504
|
itemDropped: GroundItem;
|
|
505
|
+
/** An entity picked an item up from the ground */
|
|
371
506
|
itemPicked: {
|
|
372
507
|
entity: Entity;
|
|
373
508
|
item: ItemInstance;
|
|
374
509
|
};
|
|
510
|
+
/** A hero took a purchase back at a shop (`undoBuy`): what it cost came back, the parts it used up came back */
|
|
511
|
+
itemUndone: {
|
|
512
|
+
entity: Entity;
|
|
513
|
+
item: string;
|
|
514
|
+
shop: number;
|
|
515
|
+
};
|
|
375
516
|
/** Every creep of a camp is gone. It comes back after a while, when it says so (see `Camp.respawn`) */
|
|
376
517
|
campCleared: {
|
|
377
518
|
camp: Camp;
|
|
@@ -384,7 +525,7 @@ export interface WorldEvents {
|
|
|
384
525
|
pinged: {
|
|
385
526
|
player: PlayerId;
|
|
386
527
|
point: Vec2;
|
|
387
|
-
kind:
|
|
528
|
+
kind: PingId;
|
|
388
529
|
to: ChatAudience;
|
|
389
530
|
by?: string;
|
|
390
531
|
};
|
|
@@ -415,6 +556,7 @@ export interface WorldEvents {
|
|
|
415
556
|
inventoryChanged: {
|
|
416
557
|
entity: Entity;
|
|
417
558
|
};
|
|
559
|
+
/** A player was paid a bounty of this amount for an entity's death */
|
|
418
560
|
bounty: {
|
|
419
561
|
entity: Entity;
|
|
420
562
|
player: PlayerId;
|
|
@@ -434,7 +576,7 @@ export interface WorldEvents {
|
|
|
434
576
|
resourcesDeposited: {
|
|
435
577
|
entity: Entity;
|
|
436
578
|
player: PlayerId;
|
|
437
|
-
kind:
|
|
579
|
+
kind: ResourceId;
|
|
438
580
|
amount: number;
|
|
439
581
|
upkeep?: number;
|
|
440
582
|
};
|
|
@@ -478,7 +620,7 @@ export interface WorldEvents {
|
|
|
478
620
|
kind: MessageKind;
|
|
479
621
|
seconds?: number;
|
|
480
622
|
};
|
|
481
|
-
/** A unit walked into an area of the game (`
|
|
623
|
+
/** A unit walked into an area of the game (`Rules.areas`) */
|
|
482
624
|
enteredArea: {
|
|
483
625
|
area: string;
|
|
484
626
|
entity: Entity;
|
|
@@ -515,14 +657,18 @@ export interface WorldEvents {
|
|
|
515
657
|
cinematicCue: CinematicCue;
|
|
516
658
|
/** The rules cue the cinematic playing on some screens, or everyone's (see `cueCinematic`) */
|
|
517
659
|
cinematicCued: CinematicCueSent;
|
|
660
|
+
/** The rules pan or shake one player's camera (see `cameraFor`) */
|
|
661
|
+
cameraOrdered: {
|
|
662
|
+
player: PlayerId;
|
|
663
|
+
} & Pick<CameraOrder, 'pan' | 'shake'>;
|
|
518
664
|
/** A cinematic the rules played is over on a player's screen, as their screen said (see `cinematic`'s `wait`) */
|
|
519
665
|
cinematicEnded: CinematicEnded;
|
|
520
666
|
/** A player picked an answer of a cinematic's choice, as their screen said (see `cinematicChose`) */
|
|
521
667
|
cinematicChoice: CinematicChoice;
|
|
522
|
-
/** The rules play one of the view's effects at a place or on an entity, for everyone who sees it (see `world.
|
|
523
|
-
|
|
524
|
-
/** The rules stop an effect they played (see `world.
|
|
525
|
-
|
|
668
|
+
/** The rules play one of the view's effects at a place or on an entity, for everyone who sees it (see `world.fx`) */
|
|
669
|
+
fxStarted: FxCue;
|
|
670
|
+
/** The rules stop an effect they played (see `world.stopFx`) */
|
|
671
|
+
fxStopped: {
|
|
526
672
|
id: number;
|
|
527
673
|
fade?: number;
|
|
528
674
|
};
|
|
@@ -539,14 +685,25 @@ export interface WorldEvents {
|
|
|
539
685
|
entered: boolean;
|
|
540
686
|
teams?: number[];
|
|
541
687
|
};
|
|
688
|
+
/**
|
|
689
|
+
* A gust of wind blew at a place (`gust`, `WindGust`): where, and the gust. Told to the players who see the place,
|
|
690
|
+
* for their screens to bend the grass and bushes there
|
|
691
|
+
*/
|
|
692
|
+
gusted: {
|
|
693
|
+
x: number;
|
|
694
|
+
z: number;
|
|
695
|
+
gust: WindGust;
|
|
696
|
+
};
|
|
542
697
|
/**
|
|
543
698
|
* Cells of a layer (`Terrain.cells`) were set to a value (`setCells`): told to the players who see them, the others
|
|
544
|
-
* as they come into sight (`cellsSeen`)
|
|
699
|
+
* as they come into sight (`cellsSeen`). `over`: the seconds the screens ease into it over, where the rules said
|
|
700
|
+
* (grass growing back)
|
|
545
701
|
*/
|
|
546
702
|
cellsChanged: {
|
|
547
703
|
layer: string;
|
|
548
704
|
cells: number[];
|
|
549
705
|
value: number;
|
|
706
|
+
over?: number;
|
|
550
707
|
};
|
|
551
708
|
/**
|
|
552
709
|
* Cells of a layer that changed out of a team's sight came into it (`TeamMemory.cells`): told to that team's players,
|
|
@@ -586,13 +743,17 @@ export interface WorldChecks {
|
|
|
586
743
|
* @beta
|
|
587
744
|
*/
|
|
588
745
|
export interface WorldOptions extends WorldChecks {
|
|
746
|
+
/** The ground the world stands on */
|
|
589
747
|
terrain: Terrain;
|
|
748
|
+
/** The navigation units on the ground walk by */
|
|
590
749
|
navigation: Navigation;
|
|
591
750
|
/** Where boats go (`UnitTypeDef.naval`): the deep water. None for a map without, and boats go on the ground */
|
|
592
751
|
waterNavigation?: Navigation;
|
|
593
|
-
/** The navigations the sides plan their routes on, of what each knows (`
|
|
752
|
+
/** The navigations the sides plan their routes on, of what each knows (`Rules.paths: 'seen'`). None when left out */
|
|
594
753
|
sidePaths?: SidePaths;
|
|
754
|
+
/** The game's definitions: unit types, abilities, orders and the rest */
|
|
595
755
|
registry: Registry;
|
|
756
|
+
/** The players of the world, in order, from which its `Player`s are made */
|
|
596
757
|
players: PlayerInit[];
|
|
597
758
|
/** The races one is drawn from for a player given `random`: all of the game's when left out */
|
|
598
759
|
randomRaces?: readonly string[];
|
|
@@ -608,17 +769,22 @@ export interface WorldOptions extends WorldChecks {
|
|
|
608
769
|
timers?: TimerDef[];
|
|
609
770
|
/** Scripts of steps the game can start, by id */
|
|
610
771
|
sequences?: SequenceDef[];
|
|
772
|
+
/** Seed for the world's random generator; 1 when left out */
|
|
611
773
|
seed?: number;
|
|
612
774
|
/** Simulation steps per second */
|
|
613
775
|
tickRate?: number;
|
|
614
776
|
/** The logger the world's own is made under (`world.log`): the root one when left out */
|
|
615
777
|
log?: Logger;
|
|
616
|
-
/** The least an entry of the world's log must matter to be said (`
|
|
778
|
+
/** The least an entry of the world's log must matter to be said (`Rules.log`) */
|
|
617
779
|
logLevel?: LogLevel;
|
|
618
|
-
/** What becomes of a part of the game that throws (`
|
|
780
|
+
/** What becomes of a part of the game that throws (`Rules.onError`): it throws on, when left out */
|
|
619
781
|
onError?: ErrorPolicy;
|
|
620
782
|
}
|
|
621
|
-
/**
|
|
783
|
+
/**
|
|
784
|
+
* How a blow is described to `world.damage`: its type, whether it is an attack or crit, its ability, tags and how it kills
|
|
785
|
+
*
|
|
786
|
+
* @beta
|
|
787
|
+
*/
|
|
622
788
|
export interface DamageOptions {
|
|
623
789
|
/** Physical when left out */
|
|
624
790
|
damageType?: DamageType;
|
|
@@ -632,8 +798,6 @@ export interface DamageOptions {
|
|
|
632
798
|
tags?: string[];
|
|
633
799
|
/** How what this blow kills dies, for the screen (`'burnt'`): the death's `how` (`AttackDef.how`, `AbilityDef.how`) */
|
|
634
800
|
how?: string;
|
|
635
|
-
/** The attack's type by the game's damage table (`GameRules.combat.damageTable`): an ability's say, where a basic attack has its `AttackDef.attackType` */
|
|
636
|
-
attackType?: string;
|
|
637
801
|
}
|
|
638
802
|
/**
|
|
639
803
|
* What killed something that died of damage: the blow that did it
|
|
@@ -641,13 +805,17 @@ export interface DamageOptions {
|
|
|
641
805
|
* @beta
|
|
642
806
|
*/
|
|
643
807
|
export interface DeathCause {
|
|
808
|
+
/** The type of damage that killed */
|
|
644
809
|
type: DamageType;
|
|
645
810
|
/** What the blow took off */
|
|
646
811
|
amount: number;
|
|
647
812
|
/** How much more it was than there was health left */
|
|
648
813
|
overkill: number;
|
|
814
|
+
/** Whether the killing blow was a critical hit */
|
|
649
815
|
crit: boolean;
|
|
816
|
+
/** The id of the ability that dealt the blow, when it was one */
|
|
650
817
|
ability?: string;
|
|
818
|
+
/** Words of the game's own about the blow (`DamageOptions.tags`) */
|
|
651
819
|
tags?: string[];
|
|
652
820
|
/** How the blow says what it kills dies (`DamageOptions.how`) */
|
|
653
821
|
how?: string;
|
|
@@ -667,23 +835,43 @@ export type DeathReason = 'damage' | 'killed' | 'cancelled' | 'expired' | 'deple
|
|
|
667
835
|
* @beta
|
|
668
836
|
*/
|
|
669
837
|
export interface Reveal {
|
|
838
|
+
/** The reveal's id, from `world.newId` */
|
|
670
839
|
id: number;
|
|
840
|
+
/** The team that sees the spot */
|
|
671
841
|
team: number;
|
|
842
|
+
/** Centre of the revealed spot, east-west */
|
|
672
843
|
x: number;
|
|
844
|
+
/** Centre of the revealed spot, north-south */
|
|
673
845
|
z: number;
|
|
846
|
+
/** How far from the centre it reveals, in world units */
|
|
674
847
|
radius: number;
|
|
675
848
|
/** Seconds it goes on */
|
|
676
849
|
left: number;
|
|
677
850
|
/** Shown, and nothing drawn for it: what the rules show a player, as a cinematic looks at it. A spell's, when left out */
|
|
678
851
|
quiet?: boolean;
|
|
679
852
|
}
|
|
680
|
-
/**
|
|
853
|
+
/**
|
|
854
|
+
* What `world.spawn` is told besides type, owner and position: facing, size, look and the rest
|
|
855
|
+
*
|
|
856
|
+
* @beta
|
|
857
|
+
*/
|
|
681
858
|
export interface SpawnOptions {
|
|
859
|
+
/** The way it faces, in radians; the engine's default facing when left out */
|
|
682
860
|
facing?: number;
|
|
683
861
|
/** How big it is drawn */
|
|
684
862
|
scale?: number;
|
|
685
863
|
/** Which of the models of its type it is drawn with, for things that come in kinds like trees */
|
|
686
864
|
look?: string;
|
|
865
|
+
/**
|
|
866
|
+
* Drawn as this entity is: its type's model, its owner's colour, its size and its look, while the new one stays what
|
|
867
|
+
* its own type and owner say it is (a soul in the fallen's shape). `scale` and `look` here win over the entity's
|
|
868
|
+
*/
|
|
869
|
+
looksLike?: Entity;
|
|
870
|
+
/**
|
|
871
|
+
* Components it starts with, by id, as `Component.default` would not give them: `{ 'warden.soul': { hero: 4 } }`.
|
|
872
|
+
* They are on it before the hooks of its making run. An id the game does not have throws
|
|
873
|
+
*/
|
|
874
|
+
data?: Record<string, unknown>;
|
|
687
875
|
/** A name of its own, for the rules to find it by: `world.named('gate')` */
|
|
688
876
|
name?: string;
|
|
689
877
|
/** Seconds it lasts, when that is not what its type says */
|
|
@@ -694,6 +882,17 @@ export interface SpawnOptions {
|
|
|
694
882
|
paid?: Cost;
|
|
695
883
|
};
|
|
696
884
|
}
|
|
885
|
+
/**
|
|
886
|
+
* Where a new entity goes and whose it is, with what else it starts with (`World.spawn(type, { at, owner })`)
|
|
887
|
+
*
|
|
888
|
+
* @public
|
|
889
|
+
*/
|
|
890
|
+
export interface SpawnAt extends SpawnOptions {
|
|
891
|
+
/** Where it stands, in cells; a building is centred on the cells nearest it */
|
|
892
|
+
at: Vec2;
|
|
893
|
+
/** The player it belongs to */
|
|
894
|
+
owner: PlayerId;
|
|
895
|
+
}
|
|
697
896
|
/** See `World.internals` */
|
|
698
897
|
export interface WorldInternals {
|
|
699
898
|
nextEntityId: number;
|
|
@@ -719,17 +918,38 @@ export interface WorldWatcher {
|
|
|
719
918
|
/** A tick ran */
|
|
720
919
|
stepped?(): void;
|
|
721
920
|
}
|
|
722
|
-
/**
|
|
921
|
+
/**
|
|
922
|
+
* The simulation: the ground, entities, players, systems and rules of one game, stepped a tick at a time with `step`
|
|
923
|
+
*
|
|
924
|
+
* @public
|
|
925
|
+
*/
|
|
723
926
|
export declare class World {
|
|
724
|
-
/**
|
|
927
|
+
/**
|
|
928
|
+
* Obstacles the navigation had no room for (`RecastNavigationOptions.maxObstacles`): what is put down past it does not block the way
|
|
929
|
+
*
|
|
930
|
+
* @beta
|
|
931
|
+
*/
|
|
725
932
|
obstaclesRefused: number;
|
|
933
|
+
/**
|
|
934
|
+
* The ground the world stands on
|
|
935
|
+
*
|
|
936
|
+
* @beta
|
|
937
|
+
*/
|
|
726
938
|
readonly terrain: Terrain;
|
|
727
|
-
/**
|
|
939
|
+
/**
|
|
940
|
+
* The ground it started on, where it was made from a map (S36): what a save keeps only the changes of
|
|
941
|
+
*
|
|
942
|
+
* @beta
|
|
943
|
+
*/
|
|
728
944
|
ground?: GroundBase;
|
|
729
|
-
/**
|
|
945
|
+
/**
|
|
946
|
+
* The ground and the air. Agents find their own layer, everything else is about the ground
|
|
947
|
+
*
|
|
948
|
+
* @beta
|
|
949
|
+
*/
|
|
730
950
|
readonly nav: Navigation;
|
|
731
951
|
/**
|
|
732
|
-
* The navigations the sides plan their routes on, of the buildings each knows (`
|
|
952
|
+
* The navigations the sides plan their routes on, of the buildings each knows (`Rules.paths: 'seen'`): routes
|
|
733
953
|
* of ground units are planned on their side's, and walked on `nav`. None where routes know everything
|
|
734
954
|
*
|
|
735
955
|
* @beta
|
|
@@ -737,12 +957,42 @@ export declare class World {
|
|
|
737
957
|
readonly sidePaths?: SidePaths;
|
|
738
958
|
/** The ground, the air and the water, to find where a kind of unit can be */
|
|
739
959
|
private readonly layers;
|
|
960
|
+
/**
|
|
961
|
+
* The navigation an entity walks by: the air, the water or the ground, by its layer
|
|
962
|
+
*
|
|
963
|
+
* @beta
|
|
964
|
+
*/
|
|
740
965
|
navFor(entity: Entity): Navigation;
|
|
741
|
-
/**
|
|
966
|
+
/**
|
|
967
|
+
* The air alone
|
|
968
|
+
*
|
|
969
|
+
* @beta
|
|
970
|
+
*/
|
|
742
971
|
readonly air: Navigation;
|
|
972
|
+
/** The game's definitions: unit types, abilities, orders and the rest */
|
|
743
973
|
readonly registry: Registry;
|
|
974
|
+
/**
|
|
975
|
+
* Which cells are taken by buildings and what can be built where
|
|
976
|
+
*
|
|
977
|
+
* @beta
|
|
978
|
+
*/
|
|
744
979
|
readonly grid: BuildGrid;
|
|
980
|
+
/**
|
|
981
|
+
* What each team has seen and sees, per cell
|
|
982
|
+
*
|
|
983
|
+
* @beta
|
|
984
|
+
*/
|
|
745
985
|
readonly fog: FogOfWar;
|
|
986
|
+
/**
|
|
987
|
+
* Index of entities by position, for asking what is near a point.
|
|
988
|
+
*
|
|
989
|
+
* Units are filed once a tick, where they stand as it starts (after the commands, before the systems: `step`).
|
|
990
|
+
* A unit that moves during the tick (the `move` phase) is still filed where it was until the next, so a query in
|
|
991
|
+
* `resolve` searches by where units started and checks distance against where they are now: a unit that walked
|
|
992
|
+
* into range this tick may be found only the next. Structures are filed where they stand, as they are made
|
|
993
|
+
*
|
|
994
|
+
* @beta
|
|
995
|
+
*/
|
|
746
996
|
readonly spatial: SpatialIndex;
|
|
747
997
|
/** What happened, for whoever watches: sessions, tests. Sent out at the end of each tick. Rules use `hooks` */
|
|
748
998
|
readonly events: Emitter;
|
|
@@ -755,11 +1005,21 @@ export declare class World {
|
|
|
755
1005
|
/**
|
|
756
1006
|
* The engine's checks on itself this world runs (`DebugChecks`): what it was made with (`CreateWorldOptions.checks`),
|
|
757
1007
|
* the process's (`setDebugChecks`) when it says nothing. Slow: tests and development
|
|
1008
|
+
*
|
|
1009
|
+
* @beta
|
|
758
1010
|
*/
|
|
759
1011
|
checks: DebugChecks;
|
|
760
|
-
/**
|
|
1012
|
+
/**
|
|
1013
|
+
* Moved on by `invalidateStats` without an entity: every entity's stats are added up again when next asked for
|
|
1014
|
+
*
|
|
1015
|
+
* @beta
|
|
1016
|
+
*/
|
|
761
1017
|
statsVersion: number;
|
|
762
|
-
/**
|
|
1018
|
+
/**
|
|
1019
|
+
* What the debug tools follow of the rules as they run: hooks and listeners. Null when nobody asks, see `EventLog`
|
|
1020
|
+
*
|
|
1021
|
+
* @beta
|
|
1022
|
+
*/
|
|
763
1023
|
trace: Trace | null;
|
|
764
1024
|
/** Where game modules and mods take part in damage, deaths, orders and the like, see `HookEvents` */
|
|
765
1025
|
readonly hooks: Hooks;
|
|
@@ -772,7 +1032,7 @@ export declare class World {
|
|
|
772
1032
|
/** What each player is set to do, in a mission */
|
|
773
1033
|
readonly objectives: Objectives;
|
|
774
1034
|
/**
|
|
775
|
-
* What the game counts of its players (`
|
|
1035
|
+
* What the game counts of its players (`RuleSettings.score`): `world.score.add(player, 'towersLost')`, `get`, `team`.
|
|
776
1036
|
* Counts nothing in a game that does not ask
|
|
777
1037
|
*
|
|
778
1038
|
* @beta
|
|
@@ -780,27 +1040,68 @@ export declare class World {
|
|
|
780
1040
|
readonly score: Score;
|
|
781
1041
|
/** What is said, by whom, to whom: `world.dialog.say(player, line)`, or `talk` in a sequence */
|
|
782
1042
|
readonly dialog: Dialog;
|
|
1043
|
+
/** The world's seeded random generator; the only source of randomness the simulation uses */
|
|
783
1044
|
readonly rng: Rng;
|
|
1045
|
+
/** Every player of the world, by id */
|
|
784
1046
|
readonly players: Map<number, Player>;
|
|
785
|
-
/**
|
|
1047
|
+
/**
|
|
1048
|
+
* Everything in the world, by id. Fallen heroes stay in here while they wait to be brought back
|
|
1049
|
+
*
|
|
1050
|
+
* @beta
|
|
1051
|
+
*/
|
|
786
1052
|
readonly entities: Map<number, Entity>;
|
|
787
1053
|
/**
|
|
788
|
-
* The entities that
|
|
789
|
-
* every tick go through these instead of `entities`, which on a big map is mostly trees.
|
|
1054
|
+
* The entities that act: the ones that move, fight, build or change by themselves, which is everything but scenery.
|
|
1055
|
+
* Systems that run every tick go through these instead of `entities`, which on a big map is mostly trees.
|
|
1056
|
+
*
|
|
1057
|
+
* In the order each became a unit, which is the order of ids except for scenery woken later (`Spawning.wake`: a
|
|
1058
|
+
* tree given a buff), which comes last, after units made before it. A save keeps this order, so a loaded world
|
|
1059
|
+
* walks it the same. A component's index (`EntityIndex`, `SystemDef.over`) walks in id order instead, so code that
|
|
1060
|
+
* picks the first of equals breaks the tie by id, not by which it met first, to stay the same either way
|
|
790
1061
|
*/
|
|
791
|
-
readonly
|
|
1062
|
+
readonly units: Map<number, Entity>;
|
|
792
1063
|
/**
|
|
793
1064
|
* The scenery each team sees right now, by team. Kept by the fog system whenever it works out what everyone sees:
|
|
794
1065
|
* scenery never moves, so this only changes then. Lets a session describe what is in sight without testing every tree
|
|
1066
|
+
*
|
|
1067
|
+
* @beta
|
|
795
1068
|
*/
|
|
796
1069
|
readonly sceneryInSight: Map<number, Set<Entity>>;
|
|
797
|
-
/**
|
|
1070
|
+
/**
|
|
1071
|
+
* Entities by owner, heroes by owner, shops. For questions that would otherwise go through every entity
|
|
1072
|
+
*
|
|
1073
|
+
* @beta
|
|
1074
|
+
*/
|
|
798
1075
|
readonly index: EntityIndex;
|
|
1076
|
+
/**
|
|
1077
|
+
* The shots in flight
|
|
1078
|
+
*
|
|
1079
|
+
* @beta
|
|
1080
|
+
*/
|
|
799
1081
|
readonly projectiles: Projectile[];
|
|
1082
|
+
/**
|
|
1083
|
+
* The missiles in flight
|
|
1084
|
+
*
|
|
1085
|
+
* @beta
|
|
1086
|
+
*/
|
|
800
1087
|
readonly missiles: Missile[];
|
|
1088
|
+
/**
|
|
1089
|
+
* Effects waiting for their time to come
|
|
1090
|
+
*
|
|
1091
|
+
* @beta
|
|
1092
|
+
*/
|
|
801
1093
|
readonly delayed: Delayed[];
|
|
1094
|
+
/**
|
|
1095
|
+
* The zones that are working on the ground now
|
|
1096
|
+
*
|
|
1097
|
+
* @beta
|
|
1098
|
+
*/
|
|
802
1099
|
readonly zones: Zone[];
|
|
803
|
-
/**
|
|
1100
|
+
/**
|
|
1101
|
+
* Switches for trying things out. A game that is played for real leaves them off
|
|
1102
|
+
*
|
|
1103
|
+
* @beta
|
|
1104
|
+
*/
|
|
804
1105
|
readonly cheats: {
|
|
805
1106
|
/** Abilities and what is carried can be used again at once */
|
|
806
1107
|
noCooldowns: boolean;
|
|
@@ -814,51 +1115,111 @@ export declare class World {
|
|
|
814
1115
|
/**
|
|
815
1116
|
* Players who may use the debug commands (`debug.*`, see `debugCommands.ts`): who a session lets, a seat in the page
|
|
816
1117
|
* that asked, a server started to. Not in a save: whoever loads it says again
|
|
1118
|
+
*
|
|
1119
|
+
* @beta
|
|
817
1120
|
*/
|
|
818
1121
|
readonly debugPlayers: Set<number>;
|
|
819
1122
|
/**
|
|
820
1123
|
* The entity each object of the map became, by the object's id (`MapObject.id`): what the map put down as the world
|
|
821
1124
|
* was made of it (`createWorldFromMap`), and what the editor's Play here put down since (`debug.mapObject`), for the
|
|
822
1125
|
* editor to find again what it moves and takes away (EQ10). Kept in a save
|
|
1126
|
+
*
|
|
1127
|
+
* @beta
|
|
1128
|
+
*/
|
|
1129
|
+
readonly fromMap: Map<number, number>;
|
|
1130
|
+
/**
|
|
1131
|
+
* Spots a team sees for a while without anything there to see them
|
|
1132
|
+
*
|
|
1133
|
+
* @beta
|
|
823
1134
|
*/
|
|
824
|
-
readonly mapEntities: Map<number, number>;
|
|
825
|
-
/** Spots a team sees for a while without anything there to see them */
|
|
826
1135
|
readonly reveals: Reveal[];
|
|
827
|
-
/**
|
|
1136
|
+
/**
|
|
1137
|
+
* State of game modules and mods for the whole game, see `state`
|
|
1138
|
+
*
|
|
1139
|
+
* @beta
|
|
1140
|
+
*/
|
|
828
1141
|
readonly states: StateStore;
|
|
829
|
-
/**
|
|
1142
|
+
/**
|
|
1143
|
+
* Items lying on the ground
|
|
1144
|
+
*
|
|
1145
|
+
* @beta
|
|
1146
|
+
*/
|
|
830
1147
|
readonly items: GroundItem[];
|
|
831
|
-
/**
|
|
1148
|
+
/**
|
|
1149
|
+
* Runs the systems, in order, each as often as it asks
|
|
1150
|
+
*
|
|
1151
|
+
* @beta
|
|
1152
|
+
*/
|
|
832
1153
|
readonly scheduler: Scheduler;
|
|
833
1154
|
/** The computer players: who is seated, kept in a save and seated again by a load (`world.computers.seat`) */
|
|
834
1155
|
readonly computers: Computers;
|
|
835
|
-
/**
|
|
1156
|
+
/**
|
|
1157
|
+
* What the world's numbers started from (`rng`): 1 when none was given. A computer player's own numbers start from it and its player
|
|
1158
|
+
*
|
|
1159
|
+
* @beta
|
|
1160
|
+
*/
|
|
836
1161
|
readonly seed: number;
|
|
1162
|
+
/** Simulation ticks per second */
|
|
837
1163
|
readonly tickRate: number;
|
|
838
|
-
/**
|
|
1164
|
+
/**
|
|
1165
|
+
* Seconds per tick
|
|
1166
|
+
*
|
|
1167
|
+
* @beta
|
|
1168
|
+
*/
|
|
839
1169
|
readonly dt: number;
|
|
1170
|
+
/** The tick number the world is at, from 0; it goes up by one for each `step` */
|
|
840
1171
|
tick: number;
|
|
841
|
-
/**
|
|
1172
|
+
/**
|
|
1173
|
+
* How things are hurt, healed and die (`Life`)
|
|
1174
|
+
*
|
|
1175
|
+
* @beta
|
|
1176
|
+
*/
|
|
842
1177
|
readonly life: Life;
|
|
843
|
-
/**
|
|
1178
|
+
/**
|
|
1179
|
+
* What each team sees of the entities (`Sight`): the fog, what is invisible, the game's say
|
|
1180
|
+
*
|
|
1181
|
+
* @beta
|
|
1182
|
+
*/
|
|
844
1183
|
readonly sight: Sight;
|
|
845
|
-
/**
|
|
1184
|
+
/**
|
|
1185
|
+
* Who is on whose side (`Sides`): teams, relations, shared vision and control
|
|
1186
|
+
*
|
|
1187
|
+
* @beta
|
|
1188
|
+
*/
|
|
846
1189
|
readonly sides: Sides;
|
|
847
|
-
/**
|
|
1190
|
+
/**
|
|
1191
|
+
* How entities come into the world and are moved about in it (`Spawning`)
|
|
1192
|
+
*
|
|
1193
|
+
* @beta
|
|
1194
|
+
*/
|
|
848
1195
|
readonly spawning: Spawning;
|
|
849
|
-
/**
|
|
1196
|
+
/**
|
|
1197
|
+
* The time of day (`Clock`): the hour, night, turned forward or stopped
|
|
1198
|
+
*
|
|
1199
|
+
* @beta
|
|
1200
|
+
*/
|
|
850
1201
|
readonly clock: Clock;
|
|
851
1202
|
/** Team that won, once the game is decided */
|
|
852
1203
|
winner: number | null;
|
|
853
1204
|
/**
|
|
854
1205
|
* What becomes of a part of the game that throws: a hook's handler, a listener, a system, a timer, an order, a
|
|
855
|
-
* command (`ErrorPolicy`). The game's own (`
|
|
1206
|
+
* command (`ErrorPolicy`). The game's own (`Rules.onError`), or whoever runs the world's; with neither it
|
|
856
1207
|
* throws, as it always did. A server and a launched game end the game where nothing is said (`??= 'end'`)
|
|
1208
|
+
*
|
|
1209
|
+
* @beta
|
|
857
1210
|
*/
|
|
858
1211
|
errorPolicy?: ErrorPolicy;
|
|
859
|
-
/**
|
|
1212
|
+
/**
|
|
1213
|
+
* Why the game ended on an error, once it has (`end`): the world is not stepped again
|
|
1214
|
+
*
|
|
1215
|
+
* @beta
|
|
1216
|
+
*/
|
|
860
1217
|
failure: WorldFailure | null;
|
|
861
|
-
/**
|
|
1218
|
+
/**
|
|
1219
|
+
* The parts switched off for having thrown (`disable`), by name (`siteKey`): kept in a save, and off again when it is loaded
|
|
1220
|
+
*
|
|
1221
|
+
* @beta
|
|
1222
|
+
*/
|
|
862
1223
|
readonly disabled: Map<string, ErrorSite>;
|
|
863
1224
|
/** True through a tick: an error then can end the game; outside one it is whoever called's */
|
|
864
1225
|
private stepping;
|
|
@@ -884,42 +1245,95 @@ export declare class World {
|
|
|
884
1245
|
* @beta
|
|
885
1246
|
*/
|
|
886
1247
|
commandLimit: number;
|
|
1248
|
+
/**
|
|
1249
|
+
* Makes an empty world of the options' terrain, rules and players; a game makes one with `createWorld` or
|
|
1250
|
+
* `createWorldFromMap`, which also place the map's things and start the rules
|
|
1251
|
+
*
|
|
1252
|
+
* @beta
|
|
1253
|
+
*/
|
|
887
1254
|
constructor(options: WorldOptions);
|
|
888
|
-
/**
|
|
1255
|
+
/**
|
|
1256
|
+
* The systems, in the order they run
|
|
1257
|
+
*
|
|
1258
|
+
* @beta
|
|
1259
|
+
*/
|
|
889
1260
|
get systems(): readonly System[];
|
|
890
|
-
/**
|
|
1261
|
+
/**
|
|
1262
|
+
* Adds a system to the running world, like a computer player. It takes its place by its phase, `before` and `after`
|
|
1263
|
+
*
|
|
1264
|
+
* @beta
|
|
1265
|
+
*/
|
|
891
1266
|
addSystem(system: System): void;
|
|
892
1267
|
/** What systems kept in themselves when the game was saved, for those not added yet */
|
|
893
1268
|
private readonly savedSystems;
|
|
894
|
-
/**
|
|
1269
|
+
/**
|
|
1270
|
+
* Gives the systems what they kept in a save (see `System.save`): those there now, and those added later
|
|
1271
|
+
*
|
|
1272
|
+
* @beta
|
|
1273
|
+
*/
|
|
895
1274
|
restoreSystems(saved: Record<string, unknown>): void;
|
|
896
|
-
/**
|
|
1275
|
+
/**
|
|
1276
|
+
* Takes a system out by name. False when there is none of that name
|
|
1277
|
+
*
|
|
1278
|
+
* @beta
|
|
1279
|
+
*/
|
|
897
1280
|
removeSystem(name: string): boolean;
|
|
1281
|
+
/** Seconds of game time that have passed: `tick` times `dt` */
|
|
898
1282
|
get time(): number;
|
|
899
|
-
/**
|
|
1283
|
+
/**
|
|
1284
|
+
* A number of the rules as it is tuned now (`TunableDef`): what it was set to while playing, or its default
|
|
1285
|
+
*
|
|
1286
|
+
* @beta
|
|
1287
|
+
*/
|
|
900
1288
|
tunable(id: string): number;
|
|
901
|
-
/**
|
|
1289
|
+
/**
|
|
1290
|
+
* Tunes a number of the rules, within its bounds, and says so (`tunableChanged`)
|
|
1291
|
+
*
|
|
1292
|
+
* @beta
|
|
1293
|
+
*/
|
|
902
1294
|
setTunable(id: string, value: number): void;
|
|
903
1295
|
/**
|
|
904
1296
|
* Changes a definition while the game runs (S61): a unit type's health, an ability's cooldown, as the editor's Data
|
|
905
1297
|
* panel tries them. What is made of it from then on is made of the new one; a unit type's units already in the world
|
|
906
1298
|
* take it at once, with as much of their health lost as before. Kept with the world and in its save, and said
|
|
907
|
-
* (`definitionChanged`). False for a definition the game does not have
|
|
1299
|
+
* (`definitionChanged`). False for a definition the game does not have. Not held to what the game lets be changed
|
|
1300
|
+
* (`Rules.editable`), as `layData` and a map's definitions are: any field is taken. The check is the command's that
|
|
1301
|
+
* the Data panel sends (`redefineCommand`); code that calls this says what it allows itself
|
|
1302
|
+
*
|
|
1303
|
+
* @beta
|
|
908
1304
|
*/
|
|
909
1305
|
redefine(kind: DataKind, id: string, values: DataValues): boolean;
|
|
910
1306
|
/** State of a game module or a mod for the whole game: made from the component's default when first asked for */
|
|
911
1307
|
state<T>(key: Component<T, unknown>): T;
|
|
1308
|
+
/** Sets the whole game's state for a component, replacing what `state` gives for it */
|
|
912
1309
|
setState<T>(key: Component<T, unknown>, value: T): void;
|
|
913
|
-
/** The game's numbers that are not about any one unit, like the supply cap (`
|
|
914
|
-
get
|
|
915
|
-
/**
|
|
1310
|
+
/** The game's numbers that are not about any one unit, like the supply cap (`Rules.settings`) */
|
|
1311
|
+
get settings(): Readonly<RuleSettings>;
|
|
1312
|
+
/**
|
|
1313
|
+
* Hour of the day, 0..24. Noon in a game without days (`clock.hour`)
|
|
1314
|
+
*
|
|
1315
|
+
* @beta
|
|
1316
|
+
*/
|
|
916
1317
|
get hour(): number;
|
|
917
|
-
/**
|
|
1318
|
+
/**
|
|
1319
|
+
* Whether the sun is down (`clock.night`): asked for every unit's sight and stats, many times a tick
|
|
1320
|
+
*
|
|
1321
|
+
* @beta
|
|
1322
|
+
*/
|
|
918
1323
|
get night(): boolean;
|
|
919
|
-
/**
|
|
1324
|
+
/**
|
|
1325
|
+
* Unique id for orders, order groups and projectiles
|
|
1326
|
+
*
|
|
1327
|
+
* @beta
|
|
1328
|
+
*/
|
|
920
1329
|
newId(): number;
|
|
1330
|
+
/** The player of this id; throws when there is none */
|
|
921
1331
|
player(id: PlayerId): Player;
|
|
922
|
-
/**
|
|
1332
|
+
/**
|
|
1333
|
+
* Whether an entity of this id was ever made here: one that died was, one of a number not yet given out never was
|
|
1334
|
+
*
|
|
1335
|
+
* @beta
|
|
1336
|
+
*/
|
|
923
1337
|
made(id: EntityId): boolean;
|
|
924
1338
|
/** Living entity with this id */
|
|
925
1339
|
get(id: EntityId | undefined): Entity | undefined;
|
|
@@ -928,11 +1342,17 @@ export declare class World {
|
|
|
928
1342
|
* dead, or when there never was one. A game can say which names there are: `world.named<RoadNames>('gate')`
|
|
929
1343
|
*/
|
|
930
1344
|
named<Name extends string = string>(name: Name): Entity | undefined;
|
|
931
|
-
/**
|
|
1345
|
+
/**
|
|
1346
|
+
* The name an entity was given, if any
|
|
1347
|
+
*
|
|
1348
|
+
* @beta
|
|
1349
|
+
*/
|
|
932
1350
|
nameOf(entity: Entity): string | undefined;
|
|
933
1351
|
/**
|
|
934
1352
|
* Names an entity, for the rules to find it by (`named`), or takes its name away with none. It has one name, and a
|
|
935
1353
|
* name is one entity's: taking that of another that still lives throws. The name of the dead is free
|
|
1354
|
+
*
|
|
1355
|
+
* @beta
|
|
936
1356
|
*/
|
|
937
1357
|
setName(entity: Entity, name: string | undefined): void;
|
|
938
1358
|
/**
|
|
@@ -944,9 +1364,17 @@ export declare class World {
|
|
|
944
1364
|
areEnemies(a: PlayerId, b: PlayerId): boolean;
|
|
945
1365
|
/** Whether two players are on one side (`sides.allies`) */
|
|
946
1366
|
areAllies(a: PlayerId, b: PlayerId): boolean;
|
|
947
|
-
/**
|
|
1367
|
+
/**
|
|
1368
|
+
* Whether a player may command an entity (`sides.mayCommand`): what every command is checked against
|
|
1369
|
+
*
|
|
1370
|
+
* @beta
|
|
1371
|
+
*/
|
|
948
1372
|
mayCommand(player: PlayerId, entity: Entity): boolean;
|
|
949
|
-
/**
|
|
1373
|
+
/**
|
|
1374
|
+
* Whether a team currently sees the entity (`sight.sees`): asked of every entity, team and snapshot
|
|
1375
|
+
*
|
|
1376
|
+
* @beta
|
|
1377
|
+
*/
|
|
950
1378
|
isVisibleTo(entity: Entity, team: number): boolean;
|
|
951
1379
|
/**
|
|
952
1380
|
* Creates an entity. Structures are centered on the grid cells closest to `position`;
|
|
@@ -959,10 +1387,26 @@ export declare class World {
|
|
|
959
1387
|
* @beta
|
|
960
1388
|
*/
|
|
961
1389
|
spawnPrefab(prefab: PrefabDef | string, options: SpawnPrefabOptions): SpawnedPrefab;
|
|
1390
|
+
/**
|
|
1391
|
+
* The neutral player, who owns what belongs to nobody (a soul, a mine, a tree): the first of them, the game's
|
|
1392
|
+
* `MAP_NEUTRAL`. Throws for a game that has none
|
|
1393
|
+
*
|
|
1394
|
+
* @beta
|
|
1395
|
+
*/
|
|
1396
|
+
get neutral(): PlayerId;
|
|
1397
|
+
/**
|
|
1398
|
+
* Puts a new entity of the unit type `typeId` into the world for `owner` at `at`, and returns it:
|
|
1399
|
+
* `world.spawn('footman', { at: { x: 10, z: 12 }, owner: 1 })`, with the rest of what it may start with
|
|
1400
|
+
* (`SpawnOptions`: `facing`, `name`, `lifetime`, `data`…) beside them
|
|
1401
|
+
*/
|
|
1402
|
+
spawn(typeId: string, options: SpawnAt): Entity;
|
|
1403
|
+
/** Puts a new entity of the unit type `typeId` into the world for `owner` at `position`, and returns it */
|
|
962
1404
|
spawn(typeId: string, owner: PlayerId, position: Vec2, options?: SpawnOptions): Entity;
|
|
963
1405
|
/**
|
|
964
1406
|
* Turns scenery into an actor, for good: something gave it a reason to be looked at every tick, like a buff
|
|
965
1407
|
* that has to run out. Whatever does that to an entity calls this; the debug checks catch what forgets to.
|
|
1408
|
+
*
|
|
1409
|
+
* @beta
|
|
966
1410
|
*/
|
|
967
1411
|
wake(entity: Entity): void;
|
|
968
1412
|
/**
|
|
@@ -982,35 +1426,49 @@ export declare class World {
|
|
|
982
1426
|
over?: number;
|
|
983
1427
|
}): void;
|
|
984
1428
|
/**
|
|
985
|
-
* Plays one of the view's
|
|
1429
|
+
* Plays one of the view's fx (`GameView.fx.defs`) on the screens of the players who see where it is, or those it is
|
|
986
1430
|
* for (`to`): at a place (`at`), or on an entity (`on`, at a `point` of its model), with knobs (`params`). Its random
|
|
987
1431
|
* parts go by a seed, the same on every screen. Nothing it does decides anything: it is not in the world's state, a
|
|
988
|
-
* save, or what a player who joins later is told. What it gives back stops it (`
|
|
1432
|
+
* save, or what a player who joins later is told. What it gives back stops it (`stopFx`)
|
|
989
1433
|
*
|
|
990
1434
|
* @beta
|
|
991
1435
|
*/
|
|
992
|
-
|
|
1436
|
+
fx(fx: string, options?: FxOptions): number;
|
|
993
1437
|
/**
|
|
994
|
-
* Stops an
|
|
1438
|
+
* Stops an fx the rules played (`fx`) on every screen, as its own `stop` says, over `fade` seconds
|
|
995
1439
|
*
|
|
996
1440
|
* @beta
|
|
997
1441
|
*/
|
|
998
|
-
|
|
1442
|
+
stopFx(id: number, options?: {
|
|
999
1443
|
fade?: number;
|
|
1000
1444
|
}): void;
|
|
1001
|
-
|
|
1445
|
+
/**
|
|
1446
|
+
* Sets the cells of a cell layer, given as indices or an area, to a value 0..255, and returns the cells that changed.
|
|
1447
|
+
* `over`: the seconds the screens that see them ease into the value over (grass growing back), told with the cells;
|
|
1448
|
+
* a screen told of them later, as they come into its sight, eases in as it can
|
|
1449
|
+
*
|
|
1450
|
+
* @beta
|
|
1451
|
+
*/
|
|
1452
|
+
setCells(layer: string, cells: readonly number[] | AreaShape, value: number, options?: {
|
|
1453
|
+
over?: number;
|
|
1454
|
+
}): number[];
|
|
1002
1455
|
/**
|
|
1003
1456
|
* Reshapes a part of the ground as the game goes (`TerrainPatch`): its heights, cliffs, water, paint, what is kept
|
|
1004
1457
|
* off it and the game's layers of cells, all at once, as the editor's Play here pushes the map's ground into the game
|
|
1005
1458
|
* played (`debug.ground`, EQ10). What the rules go by follows: who sees whom from the levels, where can be built, and
|
|
1006
|
-
* the ways, cut again of the ground as it is now (`Navigation.reshape`: on this thread, every machine the same
|
|
1007
|
-
*
|
|
1008
|
-
*
|
|
1459
|
+
* the ways, cut again of the ground as it is now (`Navigation.reshape`: on this thread, every machine the same; only
|
|
1460
|
+
* the tiles of the ways the patch reaches, a few milliseconds for a field, where the ground is still cut on the same
|
|
1461
|
+
* grid, else all of them, which is not for nothing on a big map). What stands on it stays where it is. Every player
|
|
1462
|
+
* is told (a `ground` event), and saves keep it. Throws where the patch does not fit the ground (`terrainPatchProblem`)
|
|
1009
1463
|
*
|
|
1010
1464
|
* @beta
|
|
1011
1465
|
*/
|
|
1012
1466
|
reshapeGround(patch: TerrainPatch): void;
|
|
1013
|
-
/**
|
|
1467
|
+
/**
|
|
1468
|
+
* Lets a team see a spot for a while, with nothing standing there
|
|
1469
|
+
*
|
|
1470
|
+
* @beta
|
|
1471
|
+
*/
|
|
1014
1472
|
reveal(team: number, point: Vec2, radius: number, seconds: number, options?: {
|
|
1015
1473
|
quiet?: boolean;
|
|
1016
1474
|
}): Reveal;
|
|
@@ -1025,9 +1483,15 @@ export declare class World {
|
|
|
1025
1483
|
* Takes a unit out of the world for a while, or puts it back: a worker inside a gold mine, a unit carried in
|
|
1026
1484
|
* something. While hidden it is not found, not seen and in nobody's way, and its orders wait. It comes back at
|
|
1027
1485
|
* `at`, or where it went in, on the nearest ground it can stand on. Structures cannot hide
|
|
1486
|
+
*
|
|
1487
|
+
* @beta
|
|
1028
1488
|
*/
|
|
1029
1489
|
setHidden(entity: Entity, hidden: boolean, at?: Vec2): void;
|
|
1030
|
-
/**
|
|
1490
|
+
/**
|
|
1491
|
+
* Gives an entity a time after which it is gone by itself, like a ward, or takes it away with `null`
|
|
1492
|
+
*
|
|
1493
|
+
* @beta
|
|
1494
|
+
*/
|
|
1031
1495
|
setLifetime(entity: Entity, seconds: number | null): void;
|
|
1032
1496
|
/** Deals damage (`life.damage`): the hooks, armor and shields, health, death */
|
|
1033
1497
|
damage(target: Entity, amount: number, source?: Entity, options?: DamageOptions): void;
|
|
@@ -1043,11 +1507,17 @@ export declare class World {
|
|
|
1043
1507
|
/**
|
|
1044
1508
|
* Gives a player a hint (campaign plan CP5): a message of the kind `hint`, shown for `seconds` (the screen's own
|
|
1045
1509
|
* time when left out), which a player who turned hints off in the settings does not see
|
|
1510
|
+
*
|
|
1511
|
+
* @beta
|
|
1046
1512
|
*/
|
|
1047
1513
|
hint(player: PlayerId, message: MessageRef, options?: {
|
|
1048
1514
|
seconds?: number;
|
|
1049
1515
|
}): void;
|
|
1050
|
-
/**
|
|
1516
|
+
/**
|
|
1517
|
+
* The command being carried out, to find out whether it was refused: see `executeCommand`
|
|
1518
|
+
*
|
|
1519
|
+
* @beta
|
|
1520
|
+
*/
|
|
1051
1521
|
handling?: {
|
|
1052
1522
|
player: PlayerId;
|
|
1053
1523
|
refusal: Message | undefined;
|
|
@@ -1055,11 +1525,21 @@ export declare class World {
|
|
|
1055
1525
|
/**
|
|
1056
1526
|
* What a save needs that is the world's own business: id counters, the clock and the commands waiting for
|
|
1057
1527
|
* the next tick. For `saveWorld` and `loadWorld` only
|
|
1528
|
+
*
|
|
1529
|
+
* @beta
|
|
1058
1530
|
*/
|
|
1059
1531
|
internals(): WorldInternals;
|
|
1060
|
-
/**
|
|
1532
|
+
/**
|
|
1533
|
+
* Puts back what `internals` gave, for `loadWorld` only
|
|
1534
|
+
*
|
|
1535
|
+
* @beta
|
|
1536
|
+
*/
|
|
1061
1537
|
restoreInternals(internals: WorldInternals): void;
|
|
1062
|
-
/**
|
|
1538
|
+
/**
|
|
1539
|
+
* Puts back who died and waits to be taken out (`WorldInternals.dead`), once the entities are back. For `loadWorld` only
|
|
1540
|
+
*
|
|
1541
|
+
* @beta
|
|
1542
|
+
*/
|
|
1063
1543
|
restoreDead(ids: readonly EntityId[]): void;
|
|
1064
1544
|
/**
|
|
1065
1545
|
* Queues a player command. It is applied at the start of the next tick; talk (a command whose def says
|
|
@@ -1075,12 +1555,16 @@ export declare class World {
|
|
|
1075
1555
|
* @beta
|
|
1076
1556
|
*/
|
|
1077
1557
|
watch(watcher: WorldWatcher): () => void;
|
|
1078
|
-
/**
|
|
1558
|
+
/**
|
|
1559
|
+
* A save of the world was taken, which put its crowd back (`saveWorld`): told to what watches it. The engine's
|
|
1560
|
+
*
|
|
1561
|
+
* @beta
|
|
1562
|
+
*/
|
|
1079
1563
|
saved(): void;
|
|
1080
1564
|
/** Advances the simulation by one fixed tick */
|
|
1081
1565
|
/**
|
|
1082
1566
|
* The entities that are all of what is asked, for scripts: whose they are, of which type, in which area. Only the
|
|
1083
|
-
* living, unless asked. A new list: for what runs every tick, go through `index` or `areas` instead
|
|
1567
|
+
* living, unless asked. A new list: for what runs every tick, go through `index` or `areas` instead; by place and condition, `query`
|
|
1084
1568
|
*/
|
|
1085
1569
|
find(filter?: {
|
|
1086
1570
|
owner?: PlayerId;
|
|
@@ -1088,24 +1572,58 @@ export declare class World {
|
|
|
1088
1572
|
area?: string;
|
|
1089
1573
|
dead?: boolean;
|
|
1090
1574
|
}): Entity[];
|
|
1575
|
+
/**
|
|
1576
|
+
* What in the world is all a query asks (`WorldQuery`): around a point or a unit (`near`, `radius`), in an area, of
|
|
1577
|
+
* whom, of which type, kind and layer, what it carries and how hurt it is (`UnitCondition`), what a player sees, or
|
|
1578
|
+
* code (`where`); in an order (`sort`: `nearest`, `lowestHealthShare`, `random`…), as many as `limit` says. A new list:
|
|
1579
|
+
* `world.query({ near: hero, radius: 8, is: 'enemy', healthBelow: 0.3, sort: 'nearest', limit: 3 })`
|
|
1580
|
+
*
|
|
1581
|
+
* @beta
|
|
1582
|
+
*/
|
|
1583
|
+
query(query?: WorldQuery): Entity[];
|
|
1091
1584
|
/**
|
|
1092
1585
|
* Marks a moment to start again from, like the start of a wave, with what the player is told it is ("Wave 6").
|
|
1093
1586
|
* A session keeps a save of the world as it is at the end of this tick, for "Retry from wave 6"
|
|
1094
1587
|
*/
|
|
1095
1588
|
checkpoint(label: MessageRef): void;
|
|
1589
|
+
/**
|
|
1590
|
+
* Steps the world one tick; does nothing once the game failed. In this order:
|
|
1591
|
+
*
|
|
1592
|
+
* 1. The commands sent since the last tick are carried out.
|
|
1593
|
+
* 2. Units are filed by where they stand (`spatial`).
|
|
1594
|
+
* 3. The systems run, phase by phase (`commands`, `decide`, `move`, `resolve`, `cleanup`).
|
|
1595
|
+
* 4. The dead are taken out of the world (`remove` hook, `entityRemoved`).
|
|
1596
|
+
* 5. `tick` goes up by one.
|
|
1597
|
+
* 6. The tick's events go out to listeners (`world.events.on`), held until now.
|
|
1598
|
+
*
|
|
1599
|
+
* So a listener runs after the tick is over: `world.tick` is already the next one, and an entity that died this
|
|
1600
|
+
* tick is no longer in `world.entities` (the event still carries it; a fallen hero waiting to be brought back
|
|
1601
|
+
* stays). Hooks run at once, inside the tick, where
|
|
1602
|
+
* what they are asked about happens
|
|
1603
|
+
*/
|
|
1096
1604
|
step(): void;
|
|
1097
1605
|
/**
|
|
1098
1606
|
* What a part of the game that threw comes to, by what the world says of errors (`errorPolicy`). It returns when
|
|
1099
1607
|
* the part is to be switched off or let go (`disable`): the caller does that, and goes on. It throws otherwise: the
|
|
1100
1608
|
* error itself (`throw`), or what leaves the tick of a game that ends there (`end`)
|
|
1609
|
+
*
|
|
1610
|
+
* @beta
|
|
1101
1611
|
*/
|
|
1102
1612
|
caught(error: unknown, where: ErrorSite): void;
|
|
1103
|
-
/**
|
|
1613
|
+
/**
|
|
1614
|
+
* Switches off the parts a save says were (`world.disabled`): the same game goes on as the one that was saved
|
|
1615
|
+
*
|
|
1616
|
+
* @beta
|
|
1617
|
+
*/
|
|
1104
1618
|
disable(sites: Iterable<ErrorSite>): void;
|
|
1105
1619
|
private advance;
|
|
1106
|
-
/** Throws when scenery has something that only
|
|
1620
|
+
/** Throws when scenery has something that only units get looked after for. See `debugChecks` */
|
|
1107
1621
|
private checkScenery;
|
|
1108
|
-
/**
|
|
1622
|
+
/**
|
|
1623
|
+
* Whether it was disposed: its navigation is freed, and it is not to be stepped again
|
|
1624
|
+
*
|
|
1625
|
+
* @beta
|
|
1626
|
+
*/
|
|
1109
1627
|
get disposed(): boolean;
|
|
1110
1628
|
private wasDisposed;
|
|
1111
1629
|
/**
|