@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
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Triggers and what uses a buff up (E2E-PLAN AB7): what the passives of a unit (its abilities', its items' and the buffs
|
|
3
|
+
* it carries: `BuffDef.passive`) set off when its attacks land (`onHit`, every `every`th, using up `consumes`), it is
|
|
4
|
+
* hurt (`onDamaged`), its abilities hit (`onAbilityHit`), it casts (`onCast`), it kills (`onKill`), its health falls low
|
|
5
|
+
* (`onLowHealth`), each once in its `cooldown`; what takes a buff off (`removeBuff`, `BuffDef.breaksOn`), and what a buff
|
|
6
|
+
* does at its most stacks (`onMaxStacks`) and where its carrier dies (`onCarrierDeath`)
|
|
7
|
+
*/
|
|
8
|
+
import { type AbilityDef, type AnyEffect, type BuffBreak } from '#engine/defs';
|
|
9
|
+
import type { BuffInstance, Entity } from '#engine/entity';
|
|
10
|
+
import type { World } from '#engine/world';
|
|
11
|
+
import type { AfterDamage } from '#engine/hooks';
|
|
12
|
+
/**
|
|
13
|
+
* The kinds of trigger a passive has (`EffectTypes`): what sets each off is said by its type
|
|
14
|
+
*
|
|
15
|
+
* @beta
|
|
16
|
+
*/
|
|
17
|
+
export type TriggerType = 'onHit' | 'onKill' | 'onCast' | 'onDamaged' | 'onAbilityHit' | 'onLowHealth' | 'onFatal';
|
|
18
|
+
/**
|
|
19
|
+
* Takes stacks of a buff off an entity: `count` of the first of it, the buff once none is left; all of it, every one of
|
|
20
|
+
* it there is, when `count` is left out. What `removeBuff` does, and an attack that `consumes` its buff
|
|
21
|
+
*
|
|
22
|
+
* @beta
|
|
23
|
+
*/
|
|
24
|
+
export declare function removeStacks(world: World, entity: Entity, buff: string, count?: number): void;
|
|
25
|
+
/**
|
|
26
|
+
* One of what an attack of a unit sets off (an `onHit` of its abilities, items or buffs), as the rule of slots sees it
|
|
27
|
+
* (`RuleSettings.combat.attackModifiers`): where it comes from, its slot and priority
|
|
28
|
+
*
|
|
29
|
+
* @beta
|
|
30
|
+
*/
|
|
31
|
+
export interface AttackModifier {
|
|
32
|
+
/** The `onHit` effect */
|
|
33
|
+
readonly effect: Readonly<AnyEffect>;
|
|
34
|
+
/** Where it comes from: an ability the unit learned, an item it carries, a buff on it */
|
|
35
|
+
readonly from: 'ability' | 'item' | 'buff';
|
|
36
|
+
/** The ability it goes by: the learned one, the item's passive, the ability that put the buff on (or the buff, as one) */
|
|
37
|
+
readonly ability: AbilityDef;
|
|
38
|
+
/** The level it goes off at */
|
|
39
|
+
readonly level: number;
|
|
40
|
+
/** Its slot (`EffectFields.slot`): none for one that always adds up */
|
|
41
|
+
readonly slot?: string;
|
|
42
|
+
/** Its priority among those of its slot (`EffectFields.priority`): 0 when it says none */
|
|
43
|
+
readonly priority: number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The engine's rule of attack modifiers (`RuleSettings.combat.attackModifiers`): of those that share a slot, only the
|
|
47
|
+
* one of the highest priority (the first among equals: abilities, then items, then buffs); those of different slots,
|
|
48
|
+
* and those of none, all of them. In the order they came
|
|
49
|
+
*
|
|
50
|
+
* @beta
|
|
51
|
+
*/
|
|
52
|
+
export declare function bySlot(_world: World, _attacker: Entity, _target: Entity, modifiers: readonly AttackModifier[]): readonly AttackModifier[];
|
|
53
|
+
/**
|
|
54
|
+
* An attack of `attacker` landed on `target` (dead of it or not): its `onHit` triggers are asked. Of those that can go
|
|
55
|
+
* off (while their buff, not cooling), the game's rule of slots picks (`RuleSettings.combat.attackModifiers`: one a
|
|
56
|
+
* slot, by priority); each of those counts the attack towards its `every`, those due do what they do to a target
|
|
57
|
+
* still alive, and use up a stack of their `whileBuff` (`consumes`) either way. One a slot passed over counts nothing
|
|
58
|
+
*/
|
|
59
|
+
export declare function attackLanded(world: World, attacker: Entity, target: Entity, damage: number): void;
|
|
60
|
+
/**
|
|
61
|
+
* How many of a unit's attacks are counted towards an `onHit` that goes off every so many (`EffectFields.every`): the one
|
|
62
|
+
* of an ability's passive at `place` in its list, of an item's (`item: true`) or of a buff's (`buff: true`). 0 when none
|
|
63
|
+
* are: for a screen to show, a test to check
|
|
64
|
+
*
|
|
65
|
+
* @beta
|
|
66
|
+
*/
|
|
67
|
+
export declare function attacksCounted(entity: Entity, id: string, place?: number, from?: 'ability' | 'item' | 'buff'): number;
|
|
68
|
+
/** What a unit's casting sets off (`onCast`): for a hero, only one of the abilities it learns */
|
|
69
|
+
export declare function castTriggers(world: World, caster: Entity, cast: AbilityDef): void;
|
|
70
|
+
/** What killing someone sets off (`onKill`); `attack`, whether one of its attacks did */
|
|
71
|
+
export declare function killTriggers(world: World, killer: Entity, victim: Entity, attack: boolean, carried?: readonly BuffInstance[]): void;
|
|
72
|
+
/**
|
|
73
|
+
* What damage sets off besides an attack's own triggers: the target's `onDamaged` (not for what a trigger's effects did)
|
|
74
|
+
* and `onLowHealth`, the source's `onAbilityHit`, and the buffs it breaks (`breaksOn`): the target's that break on damage,
|
|
75
|
+
* the attacker's that break on its attack
|
|
76
|
+
*/
|
|
77
|
+
export declare function damageTriggers(world: World, event: AfterDamage): void;
|
|
78
|
+
/**
|
|
79
|
+
* Takes off what a unit carries that breaks on what it just did or had done to it (`BuffDef.breaksOn`); `ability`, for
|
|
80
|
+
* a cast, the ability whose buffs stay (what it put on itself)
|
|
81
|
+
*
|
|
82
|
+
* @beta
|
|
83
|
+
*/
|
|
84
|
+
export declare function breakBuffs(world: World, entity: Entity, by: BuffBreak, ability?: string): void;
|
|
85
|
+
/** What the buffs of one dying do where it dies (`onCarrierDeath`), while it still stands there */
|
|
86
|
+
export declare function carrierDied(world: World, entity: Entity): void;
|
|
87
|
+
/** A stack was added to a buff: what it does at its most (`onMaxStacks`), as it gets there */
|
|
88
|
+
export declare function stacked(world: World, carrier: Entity, instance: BuffInstance, before: number): void;
|
|
89
|
+
/**
|
|
90
|
+
* A unit about to die of a blow or a kill (`onFatal`): the first of its `onFatal` triggers not cooling down (and whose
|
|
91
|
+
* `chance` draws yes) keeps it alive, with `health` of its max (all of it when left out), and does its effects in its
|
|
92
|
+
* name, its cooldown started. True when one did: it does not die
|
|
93
|
+
*/
|
|
94
|
+
export declare function cheatDeath(world: World, entity: Entity): boolean;
|
|
95
|
+
/** Every trigger type, for the rules' check and the Data panel */
|
|
96
|
+
export declare const TRIGGER_TYPES: readonly TriggerType[];
|
|
97
|
+
/** Every way a buff breaks (`BuffBreak`), for the rules' check */
|
|
98
|
+
export declare const BUFF_BREAKS: readonly BuffBreak[];
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import { at, passiveEffects } from "../defs.js";
|
|
2
|
+
import { defineComponent } from "../components.js";
|
|
3
|
+
import { carriedPassives } from "../inventory.js";
|
|
4
|
+
import { learnsOf } from "../formState.js";
|
|
5
|
+
import { heroState } from "../hero.js";
|
|
6
|
+
import { byChance } from "./chance.js";
|
|
7
|
+
import { buffEffects, run } from "./land.js";
|
|
8
|
+
import { removeBuff } from "./buffs.js";
|
|
9
|
+
//#region src/abilities/triggers.ts
|
|
10
|
+
/**
|
|
11
|
+
* Triggers and what uses a buff up (E2E-PLAN AB7): what the passives of a unit (its abilities', its items' and the buffs
|
|
12
|
+
* it carries: `BuffDef.passive`) set off when its attacks land (`onHit`, every `every`th, using up `consumes`), it is
|
|
13
|
+
* hurt (`onDamaged`), its abilities hit (`onAbilityHit`), it casts (`onCast`), it kills (`onKill`), its health falls low
|
|
14
|
+
* (`onLowHealth`), each once in its `cooldown`; what takes a buff off (`removeBuff`, `BuffDef.breaksOn`), and what a buff
|
|
15
|
+
* does at its most stacks (`onMaxStacks`) and where its carrier dies (`onCarrierDeath`)
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* What the triggers of a unit keep on it, by trigger (`<where>:<id>:<place>`): `n:` its attacks counted towards `every`,
|
|
19
|
+
* `t:` the time it may go off again (an item's and a buff's `cooldown`; an ability's is its own). Saved with the unit
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
var triggerState = defineComponent({ id: "core.triggers" });
|
|
24
|
+
/** The places of a list's triggers of each type, worked out once a list */
|
|
25
|
+
var placesByList = /* @__PURE__ */ new WeakMap();
|
|
26
|
+
function places(list, type) {
|
|
27
|
+
let found = placesByList.get(list);
|
|
28
|
+
if (!found) {
|
|
29
|
+
found = {};
|
|
30
|
+
list.forEach((effect, index) => (found[effect.type] ??= []).push(index));
|
|
31
|
+
placesByList.set(list, found);
|
|
32
|
+
}
|
|
33
|
+
return found[type];
|
|
34
|
+
}
|
|
35
|
+
/** The ability a buff's trigger goes by: the one that put the buff on, or the buff itself */
|
|
36
|
+
function abilityOfBuff(world, instance, def) {
|
|
37
|
+
return instance.ability && world.registry.abilities.has(instance.ability) ? world.registry.ability(instance.ability) : {
|
|
38
|
+
id: instance.id,
|
|
39
|
+
name: def.name,
|
|
40
|
+
target: "passive",
|
|
41
|
+
effects: []
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The triggers of a type a unit has now: those of its abilities (learned), of what it carries (an item's `passive`),
|
|
46
|
+
* and of the buffs on it (`BuffDef.passive`), in that order. A list of its own, so that what they do (a buff used up)
|
|
47
|
+
* changes nothing being walked
|
|
48
|
+
*/
|
|
49
|
+
function triggersOf(world, entity, type, abilitiesOnly = false) {
|
|
50
|
+
const out = [];
|
|
51
|
+
for (const state of entity.abilities) {
|
|
52
|
+
if (state.level < 1) continue;
|
|
53
|
+
const ability = world.registry.ability(state.id);
|
|
54
|
+
const list = passiveEffects(ability);
|
|
55
|
+
for (const index of places(list, type) ?? []) out.push({
|
|
56
|
+
effect: list[index],
|
|
57
|
+
ability,
|
|
58
|
+
level: state.level,
|
|
59
|
+
key: `a:${ability.id}:${index}`,
|
|
60
|
+
state
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
if (abilitiesOnly) return out;
|
|
64
|
+
for (const passive of carriedPassives(world, entity)) {
|
|
65
|
+
const ability = world.registry.ability(passive);
|
|
66
|
+
const list = passiveEffects(ability);
|
|
67
|
+
for (const index of places(list, type) ?? []) out.push({
|
|
68
|
+
effect: list[index],
|
|
69
|
+
ability,
|
|
70
|
+
level: 1,
|
|
71
|
+
key: `i:${ability.id}:${index}`
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
for (const instance of entity.buffs) {
|
|
75
|
+
const def = world.registry.buff(instance.id);
|
|
76
|
+
if (!def.passive) continue;
|
|
77
|
+
for (const index of places(def.passive, type) ?? []) out.push({
|
|
78
|
+
effect: def.passive[index],
|
|
79
|
+
ability: abilityOfBuff(world, instance, def),
|
|
80
|
+
level: instance.level,
|
|
81
|
+
key: `b:${instance.id}:${index}`,
|
|
82
|
+
buff: instance
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
return out;
|
|
86
|
+
}
|
|
87
|
+
/** Whether a trigger is waiting out its `cooldown` */
|
|
88
|
+
function cooling(world, entity, trigger) {
|
|
89
|
+
if (trigger.effect.cooldown === void 0) return false;
|
|
90
|
+
if (trigger.state) return trigger.state.cooldown > 0;
|
|
91
|
+
return (entity.get(triggerState)?.[`t:${trigger.key}`] ?? -Infinity) > world.time;
|
|
92
|
+
}
|
|
93
|
+
/** A trigger went off: its `cooldown` starts */
|
|
94
|
+
function cool(world, entity, trigger) {
|
|
95
|
+
const seconds = at(trigger.effect.cooldown, trigger.level, 0);
|
|
96
|
+
if (trigger.effect.cooldown === void 0 || seconds <= 0) return;
|
|
97
|
+
if (trigger.state) {
|
|
98
|
+
trigger.state.cooldown = seconds;
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
keep(entity)[`t:${trigger.key}`] = world.time + seconds;
|
|
102
|
+
}
|
|
103
|
+
function keep(entity) {
|
|
104
|
+
let kept = entity.get(triggerState);
|
|
105
|
+
if (!kept) entity.set(triggerState, kept = {});
|
|
106
|
+
return kept;
|
|
107
|
+
}
|
|
108
|
+
/** How deep in the effects of triggers the world is: what they do sets off no `onDamaged`, `onAbilityHit` (no echo) */
|
|
109
|
+
var triggering = 0;
|
|
110
|
+
/**
|
|
111
|
+
* Runs a trigger's effects, its cooldown started; what they do sets off no other trigger of damage. One that goes off by
|
|
112
|
+
* `chance` does nothing, its cooldown not started, when the draw says no
|
|
113
|
+
*/
|
|
114
|
+
function fire(world, carrier, trigger, target, damage, first) {
|
|
115
|
+
const where = target ?? carrier;
|
|
116
|
+
const context = {
|
|
117
|
+
world,
|
|
118
|
+
caster: carrier,
|
|
119
|
+
ability: trigger.ability,
|
|
120
|
+
level: trigger.level,
|
|
121
|
+
target,
|
|
122
|
+
point: {
|
|
123
|
+
x: where.pos.x,
|
|
124
|
+
z: where.pos.z
|
|
125
|
+
},
|
|
126
|
+
...damage !== void 0 && { damage }
|
|
127
|
+
};
|
|
128
|
+
if (trigger.effect.chance !== void 0 && !byChance(context, trigger.effect.chance, target)) return false;
|
|
129
|
+
cool(world, carrier, trigger);
|
|
130
|
+
first?.();
|
|
131
|
+
triggering++;
|
|
132
|
+
try {
|
|
133
|
+
run(context, trigger.effect.effects);
|
|
134
|
+
} finally {
|
|
135
|
+
triggering--;
|
|
136
|
+
}
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Takes stacks of a buff off an entity: `count` of the first of it, the buff once none is left; all of it, every one of
|
|
141
|
+
* it there is, when `count` is left out. What `removeBuff` does, and an attack that `consumes` its buff
|
|
142
|
+
*
|
|
143
|
+
* @beta
|
|
144
|
+
*/
|
|
145
|
+
function removeStacks(world, entity, buff, count) {
|
|
146
|
+
if (count === void 0) {
|
|
147
|
+
while (entity.buffs.some((instance) => instance.id === buff)) removeOne(world, entity, buff);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const instance = entity.buffs.find((carried) => carried.id === buff);
|
|
151
|
+
if (!instance) return;
|
|
152
|
+
if ((instance.stacks ?? 0) > count) instance.stacks -= count;
|
|
153
|
+
else removeOne(world, entity, buff);
|
|
154
|
+
}
|
|
155
|
+
/** Taking one buff off as `removeBuff` does, its hooks told */
|
|
156
|
+
var removeOne = (world, entity, buff) => removeBuff(world, entity, buff);
|
|
157
|
+
/**
|
|
158
|
+
* The engine's rule of attack modifiers (`RuleSettings.combat.attackModifiers`): of those that share a slot, only the
|
|
159
|
+
* one of the highest priority (the first among equals: abilities, then items, then buffs); those of different slots,
|
|
160
|
+
* and those of none, all of them. In the order they came
|
|
161
|
+
*
|
|
162
|
+
* @beta
|
|
163
|
+
*/
|
|
164
|
+
function bySlot(_world, _attacker, _target, modifiers) {
|
|
165
|
+
if (!modifiers.some((modifier) => modifier.slot !== void 0)) return modifiers;
|
|
166
|
+
const best = /* @__PURE__ */ new Map();
|
|
167
|
+
for (const modifier of modifiers) {
|
|
168
|
+
if (modifier.slot === void 0) continue;
|
|
169
|
+
const held = best.get(modifier.slot);
|
|
170
|
+
if (!held || modifier.priority > held.priority) best.set(modifier.slot, modifier);
|
|
171
|
+
}
|
|
172
|
+
return modifiers.filter((modifier) => modifier.slot === void 0 || best.get(modifier.slot) === modifier);
|
|
173
|
+
}
|
|
174
|
+
var FROM = {
|
|
175
|
+
a: "ability",
|
|
176
|
+
i: "item",
|
|
177
|
+
b: "buff"
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Of the `onHit` triggers that can go off (their buff there, not cooling), those the game's rule of slots lets
|
|
181
|
+
* (`RuleSettings.combat.attackModifiers`): all of them where none has a slot and the rule is the engine's
|
|
182
|
+
*/
|
|
183
|
+
function modifiersOf(world, attacker, target, ready) {
|
|
184
|
+
const rule = world.settings.combat.attackModifiers;
|
|
185
|
+
if (!ready.length || rule === bySlot && !ready.some((trigger) => trigger.effect.slot !== void 0)) return ready;
|
|
186
|
+
const byModifier = /* @__PURE__ */ new Map();
|
|
187
|
+
return rule(world, attacker, target, ready.map((trigger) => {
|
|
188
|
+
const { effect } = trigger;
|
|
189
|
+
const modifier = {
|
|
190
|
+
effect,
|
|
191
|
+
from: FROM[trigger.key[0]],
|
|
192
|
+
ability: trigger.ability,
|
|
193
|
+
level: trigger.level,
|
|
194
|
+
...effect.slot !== void 0 && { slot: effect.slot },
|
|
195
|
+
priority: effect.priority ?? 0
|
|
196
|
+
};
|
|
197
|
+
byModifier.set(modifier, trigger);
|
|
198
|
+
return modifier;
|
|
199
|
+
})).flatMap((modifier) => byModifier.get(modifier) ?? []);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* An attack of `attacker` landed on `target` (dead of it or not): its `onHit` triggers are asked. Of those that can go
|
|
203
|
+
* off (while their buff, not cooling), the game's rule of slots picks (`RuleSettings.combat.attackModifiers`: one a
|
|
204
|
+
* slot, by priority); each of those counts the attack towards its `every`, those due do what they do to a target
|
|
205
|
+
* still alive, and use up a stack of their `whileBuff` (`consumes`) either way. One a slot passed over counts nothing
|
|
206
|
+
*/
|
|
207
|
+
function attackLanded(world, attacker, target, damage) {
|
|
208
|
+
const ready = triggersOf(world, attacker, "onHit").filter((trigger) => !(trigger.effect.whileBuff && !attacker.buffs.some((instance) => instance.id === trigger.effect.whileBuff)) && !cooling(world, attacker, trigger));
|
|
209
|
+
for (const trigger of modifiersOf(world, attacker, target, ready)) {
|
|
210
|
+
const { effect } = trigger;
|
|
211
|
+
if (effect.every !== void 0 && effect.every > 1) {
|
|
212
|
+
const kept = keep(attacker);
|
|
213
|
+
const count = (kept[`n:${trigger.key}`] ?? 0) + 1;
|
|
214
|
+
if (count < effect.every) {
|
|
215
|
+
kept[`n:${trigger.key}`] = count;
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
218
|
+
delete kept[`n:${trigger.key}`];
|
|
219
|
+
}
|
|
220
|
+
if (target.alive) fire(world, attacker, trigger, target, damage);
|
|
221
|
+
else cool(world, attacker, trigger);
|
|
222
|
+
if (effect.consumes && effect.whileBuff && attacker.alive) removeStacks(world, attacker, effect.whileBuff, 1);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* How many of a unit's attacks are counted towards an `onHit` that goes off every so many (`EffectFields.every`): the one
|
|
227
|
+
* of an ability's passive at `place` in its list, of an item's (`item: true`) or of a buff's (`buff: true`). 0 when none
|
|
228
|
+
* are: for a screen to show, a test to check
|
|
229
|
+
*
|
|
230
|
+
* @beta
|
|
231
|
+
*/
|
|
232
|
+
function attacksCounted(entity, id, place = 0, from = "ability") {
|
|
233
|
+
return entity.get(triggerState)?.[`n:${from[0]}:${id}:${place}`] ?? 0;
|
|
234
|
+
}
|
|
235
|
+
/** What a unit's casting sets off (`onCast`): for a hero, only one of the abilities it learns */
|
|
236
|
+
function castTriggers(world, caster, cast) {
|
|
237
|
+
if (caster.def.hero && !learnsOf(caster).includes(cast.id)) return;
|
|
238
|
+
for (const trigger of triggersOf(world, caster, "onCast")) {
|
|
239
|
+
if (cooling(world, caster, trigger)) continue;
|
|
240
|
+
fire(world, caster, trigger, void 0);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
/** What killing someone sets off (`onKill`); `attack`, whether one of its attacks did */
|
|
244
|
+
function killTriggers(world, killer, victim, attack, carried) {
|
|
245
|
+
for (const trigger of triggersOf(world, killer, "onKill")) {
|
|
246
|
+
const { effect } = trigger;
|
|
247
|
+
if (effect.attack && !attack || effect.only === "heroes" && !victim.has(heroState)) continue;
|
|
248
|
+
if (effect.whileBuff && !killer.buffs.some((instance) => instance.id === effect.whileBuff)) continue;
|
|
249
|
+
if (cooling(world, killer, trigger)) continue;
|
|
250
|
+
if (!carried?.length) {
|
|
251
|
+
fire(world, killer, trigger, victim);
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
const buffs = victim.buffs;
|
|
255
|
+
buffs.unshift(...carried);
|
|
256
|
+
victim.buffsChanged();
|
|
257
|
+
try {
|
|
258
|
+
fire(world, killer, trigger, victim);
|
|
259
|
+
} finally {
|
|
260
|
+
for (let i = buffs.length - 1; i >= 0; i--) if (carried.includes(buffs[i])) buffs.splice(i, 1);
|
|
261
|
+
victim.buffsChanged();
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
/** Whether an attack is made from up close: one with no missile (`AttackDef.projectileSpeed`) */
|
|
266
|
+
var melee = (entity) => !entity.def.attacks?.[0]?.projectileSpeed;
|
|
267
|
+
/**
|
|
268
|
+
* What damage sets off besides an attack's own triggers: the target's `onDamaged` (not for what a trigger's effects did)
|
|
269
|
+
* and `onLowHealth`, the source's `onAbilityHit`, and the buffs it breaks (`breaksOn`): the target's that break on damage,
|
|
270
|
+
* the attacker's that break on its attack
|
|
271
|
+
*/
|
|
272
|
+
function damageTriggers(world, event) {
|
|
273
|
+
const { target, source, dealt, attack, ability } = event;
|
|
274
|
+
if (!triggering && target.alive && source && source !== target) for (const trigger of triggersOf(world, target, "onDamaged")) {
|
|
275
|
+
const { effect } = trigger;
|
|
276
|
+
if ((effect.attack || effect.melee) && !attack) continue;
|
|
277
|
+
if (effect.melee && !melee(source)) continue;
|
|
278
|
+
if (cooling(world, target, trigger) || !source.alive) continue;
|
|
279
|
+
fire(world, target, trigger, source, dealt);
|
|
280
|
+
}
|
|
281
|
+
if (!triggering && source?.alive && !attack && ability !== void 0 && world.areEnemies(source.owner, target.owner)) {
|
|
282
|
+
for (const trigger of triggersOf(world, source, "onAbilityHit")) if (!cooling(world, source, trigger)) fire(world, source, trigger, target, dealt);
|
|
283
|
+
}
|
|
284
|
+
if (target.alive && dealt > 0) for (const trigger of triggersOf(world, target, "onLowHealth")) {
|
|
285
|
+
const line = (trigger.effect.below ?? 0) * target.maxHealth;
|
|
286
|
+
if (target.health >= line || target.health + dealt < line || cooling(world, target, trigger)) continue;
|
|
287
|
+
fire(world, target, trigger, void 0);
|
|
288
|
+
}
|
|
289
|
+
if (dealt > 0 && target.alive && target.buffs.length) breakBuffs(world, target, "damage");
|
|
290
|
+
if (attack && source?.alive && source.buffs.length) breakBuffs(world, source, "attack");
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Takes off what a unit carries that breaks on what it just did or had done to it (`BuffDef.breaksOn`); `ability`, for
|
|
294
|
+
* a cast, the ability whose buffs stay (what it put on itself)
|
|
295
|
+
*
|
|
296
|
+
* @beta
|
|
297
|
+
*/
|
|
298
|
+
function breakBuffs(world, entity, by, ability) {
|
|
299
|
+
for (let i = entity.buffs.length - 1; i >= 0; i--) {
|
|
300
|
+
const instance = entity.buffs[i];
|
|
301
|
+
if (!instance || ability !== void 0 && instance.ability === ability) continue;
|
|
302
|
+
if (world.registry.buff(instance.id).breaksOn?.includes(by)) removeOne(world, entity, instance.id);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
/** What the buffs of one dying do where it dies (`onCarrierDeath`), while it still stands there */
|
|
306
|
+
function carrierDied(world, entity) {
|
|
307
|
+
for (const instance of [...entity.buffs]) {
|
|
308
|
+
const def = world.registry.buff(instance.id);
|
|
309
|
+
if (def.onCarrierDeath) buffEffects(world, entity, instance, def.onCarrierDeath);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
/** A stack was added to a buff: what it does at its most (`onMaxStacks`), as it gets there */
|
|
313
|
+
function stacked(world, carrier, instance, before) {
|
|
314
|
+
const def = world.registry.buff(instance.id);
|
|
315
|
+
if (!def.onMaxStacks || def.maxStacks === void 0) return;
|
|
316
|
+
if (before < def.maxStacks && (instance.stacks ?? 0) >= def.maxStacks) buffEffects(world, carrier, instance, def.onMaxStacks);
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* A unit about to die of a blow or a kill (`onFatal`): the first of its `onFatal` triggers not cooling down (and whose
|
|
320
|
+
* `chance` draws yes) keeps it alive, with `health` of its max (all of it when left out), and does its effects in its
|
|
321
|
+
* name, its cooldown started. True when one did: it does not die
|
|
322
|
+
*/
|
|
323
|
+
function cheatDeath(world, entity) {
|
|
324
|
+
if (!entity.isUnit) return false;
|
|
325
|
+
for (const trigger of triggersOf(world, entity, "onFatal")) {
|
|
326
|
+
if (cooling(world, entity, trigger)) continue;
|
|
327
|
+
const share = trigger.effect.health ?? 1;
|
|
328
|
+
if (fire(world, entity, trigger, void 0, void 0, () => entity.health = Math.max(Math.min(share, 1) * entity.maxHealth, 1))) return true;
|
|
329
|
+
}
|
|
330
|
+
return false;
|
|
331
|
+
}
|
|
332
|
+
/** Every trigger type, for the rules' check and the Data panel */
|
|
333
|
+
var TRIGGER_TYPES = [
|
|
334
|
+
"onHit",
|
|
335
|
+
"onKill",
|
|
336
|
+
"onCast",
|
|
337
|
+
"onDamaged",
|
|
338
|
+
"onAbilityHit",
|
|
339
|
+
"onLowHealth",
|
|
340
|
+
"onFatal"
|
|
341
|
+
];
|
|
342
|
+
/** Every way a buff breaks (`BuffBreak`), for the rules' check */
|
|
343
|
+
var BUFF_BREAKS = [
|
|
344
|
+
"damage",
|
|
345
|
+
"attack",
|
|
346
|
+
"cast"
|
|
347
|
+
];
|
|
348
|
+
//#endregion
|
|
349
|
+
export { BUFF_BREAKS, TRIGGER_TYPES, attackLanded, attacksCounted, breakBuffs, bySlot, carrierDied, castTriggers, cheatDeath, damageTriggers, killTriggers, removeStacks, stacked, triggerState };
|
|
350
|
+
|
|
351
|
+
//# sourceMappingURL=triggers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggers.js","names":[],"sources":["../../src/abilities/triggers.ts"],"sourcesContent":["/**\n * Triggers and what uses a buff up (E2E-PLAN AB7): what the passives of a unit (its abilities', its items' and the buffs\n * it carries: `BuffDef.passive`) set off when its attacks land (`onHit`, every `every`th, using up `consumes`), it is\n * hurt (`onDamaged`), its abilities hit (`onAbilityHit`), it casts (`onCast`), it kills (`onKill`), its health falls low\n * (`onLowHealth`), each once in its `cooldown`; what takes a buff off (`removeBuff`, `BuffDef.breaksOn`), and what a buff\n * does at its most stacks (`onMaxStacks`) and where its carrier dies (`onCarrierDeath`)\n */\nimport { type AbilityDef, type AnyEffect, at, type BuffBreak, type BuffDef, type EffectDef, passiveEffects } from '#engine/defs'\nimport { defineComponent } from '#engine/components'\nimport type { AbilityState, BuffInstance, Entity } from '#engine/entity'\nimport { heroState } from '#engine/hero'\nimport { learnsOf } from '#engine/formState'\nimport { carriedPassives } from '#engine/inventory'\nimport type { World } from '#engine/world'\nimport type { AfterDamage } from '#engine/hooks'\nimport { buffEffects, run } from './land'\nimport { removeBuff } from './buffs'\nimport { byChance } from './chance'\n\n/**\n * The kinds of trigger a passive has (`EffectTypes`): what sets each off is said by its type\n *\n * @beta\n */\nexport type TriggerType = 'onHit' | 'onKill' | 'onCast' | 'onDamaged' | 'onAbilityHit' | 'onLowHealth' | 'onFatal'\n\n/**\n * What the triggers of a unit keep on it, by trigger (`<where>:<id>:<place>`): `n:` its attacks counted towards `every`,\n * `t:` the time it may go off again (an item's and a buff's `cooldown`; an ability's is its own). Saved with the unit\n *\n * @internal\n */\nexport const triggerState = defineComponent<Record<string, number>>({ id: 'core.triggers' })\n\n/** One trigger of a unit, about to be asked: the effect, whose it is, at what level, and where its count and time are kept */\ninterface Trigger {\n\teffect: AnyEffect\n\tability: AbilityDef\n\tlevel: number\n\tkey: string\n\t/** The ability's own state, for one of an ability: its cooldown is the trigger's */\n\tstate?: AbilityState\n\t/** The buff it comes from, for one of a buff's */\n\tbuff?: BuffInstance\n}\n\n/** The places of a list's triggers of each type, worked out once a list */\nconst placesByList = new WeakMap<readonly EffectDef[], Partial<Record<string, number[]>>>()\n\nfunction places(list: readonly EffectDef[], type: TriggerType): number[] | undefined {\n\tlet found = placesByList.get(list)\n\tif (!found) {\n\t\tfound = {}\n\t\tlist.forEach((effect, index) => (found![effect.type] ??= []).push(index))\n\t\tplacesByList.set(list, found)\n\t}\n\treturn found[type]\n}\n\n/** The ability a buff's trigger goes by: the one that put the buff on, or the buff itself */\nfunction abilityOfBuff(world: World, instance: BuffInstance, def: BuffDef): AbilityDef {\n\treturn instance.ability && world.registry.abilities.has(instance.ability)\n\t\t? world.registry.ability(instance.ability)\n\t\t: ({ id: instance.id, name: def.name, target: 'passive', effects: [] } as AbilityDef)\n}\n\n/**\n * The triggers of a type a unit has now: those of its abilities (learned), of what it carries (an item's `passive`),\n * and of the buffs on it (`BuffDef.passive`), in that order. A list of its own, so that what they do (a buff used up)\n * changes nothing being walked\n */\nfunction triggersOf(world: World, entity: Entity, type: TriggerType, abilitiesOnly = false): Trigger[] {\n\tconst out: Trigger[] = []\n\tfor (const state of entity.abilities) {\n\t\tif (state.level < 1) continue\n\t\tconst ability = world.registry.ability(state.id)\n\t\tconst list = passiveEffects(ability)\n\t\tfor (const index of places(list, type) ?? []) out.push({ effect: list[index] as AnyEffect, ability, level: state.level, key: `a:${ability.id}:${index}`, state })\n\t}\n\tif (abilitiesOnly) return out\n\tfor (const passive of carriedPassives(world, entity)) {\n\t\tconst ability = world.registry.ability(passive)\n\t\tconst list = passiveEffects(ability)\n\t\tfor (const index of places(list, type) ?? []) out.push({ effect: list[index] as AnyEffect, ability, level: 1, key: `i:${ability.id}:${index}` })\n\t}\n\tfor (const instance of entity.buffs) {\n\t\tconst def = world.registry.buff(instance.id)\n\t\tif (!def.passive) continue\n\t\tfor (const index of places(def.passive, type) ?? [])\n\t\t\tout.push({ effect: def.passive[index] as AnyEffect, ability: abilityOfBuff(world, instance, def), level: instance.level, key: `b:${instance.id}:${index}`, buff: instance })\n\t}\n\treturn out\n}\n\n/** Whether a trigger is waiting out its `cooldown` */\nfunction cooling(world: World, entity: Entity, trigger: Trigger): boolean {\n\tif (trigger.effect.cooldown === undefined) return false\n\tif (trigger.state) return trigger.state.cooldown > 0\n\treturn (entity.get(triggerState)?.[`t:${trigger.key}`] ?? -Infinity) > world.time\n}\n\n/** A trigger went off: its `cooldown` starts */\nfunction cool(world: World, entity: Entity, trigger: Trigger): void {\n\tconst seconds = at(trigger.effect.cooldown, trigger.level, 0)\n\tif (trigger.effect.cooldown === undefined || seconds <= 0) return\n\tif (trigger.state) {\n\t\ttrigger.state.cooldown = seconds\n\t\treturn\n\t}\n\tkeep(entity)[`t:${trigger.key}`] = world.time + seconds\n}\n\nfunction keep(entity: Entity): Record<string, number> {\n\tlet kept = entity.get(triggerState)\n\tif (!kept) entity.set(triggerState, (kept = {}))\n\treturn kept\n}\n\n/** How deep in the effects of triggers the world is: what they do sets off no `onDamaged`, `onAbilityHit` (no echo) */\nlet triggering = 0\n\n/**\n * Runs a trigger's effects, its cooldown started; what they do sets off no other trigger of damage. One that goes off by\n * `chance` does nothing, its cooldown not started, when the draw says no\n */\nfunction fire(world: World, carrier: Entity, trigger: Trigger, target: Entity | undefined, damage?: number, first?: () => void): boolean {\n\tconst where = target ?? carrier\n\tconst context = { world, caster: carrier, ability: trigger.ability, level: trigger.level, target, point: { x: where.pos.x, z: where.pos.z }, ...(damage !== undefined && { damage }) }\n\tif (trigger.effect.chance !== undefined && !byChance(context, trigger.effect.chance, target)) return false\n\tcool(world, carrier, trigger)\n\tfirst?.()\n\ttriggering++\n\ttry {\n\t\trun(context, trigger.effect.effects)\n\t} finally {\n\t\ttriggering--\n\t}\n\treturn true\n}\n\n/**\n * Takes stacks of a buff off an entity: `count` of the first of it, the buff once none is left; all of it, every one of\n * it there is, when `count` is left out. What `removeBuff` does, and an attack that `consumes` its buff\n *\n * @beta\n */\nexport function removeStacks(world: World, entity: Entity, buff: string, count?: number): void {\n\tif (count === undefined) {\n\t\twhile (entity.buffs.some((instance) => instance.id === buff)) removeOne(world, entity, buff)\n\t\treturn\n\t}\n\tconst instance = entity.buffs.find((carried) => carried.id === buff)\n\tif (!instance) return\n\tif ((instance.stacks ?? 0) > count) instance.stacks! -= count\n\telse removeOne(world, entity, buff)\n}\n\n/** Taking one buff off as `removeBuff` does, its hooks told */\nconst removeOne = (world: World, entity: Entity, buff: string) => removeBuff(world, entity, buff)\n\n/**\n * One of what an attack of a unit sets off (an `onHit` of its abilities, items or buffs), as the rule of slots sees it\n * (`RuleSettings.combat.attackModifiers`): where it comes from, its slot and priority\n *\n * @beta\n */\nexport interface AttackModifier {\n\t/** The `onHit` effect */\n\treadonly effect: Readonly<AnyEffect>\n\t/** Where it comes from: an ability the unit learned, an item it carries, a buff on it */\n\treadonly from: 'ability' | 'item' | 'buff'\n\t/** The ability it goes by: the learned one, the item's passive, the ability that put the buff on (or the buff, as one) */\n\treadonly ability: AbilityDef\n\t/** The level it goes off at */\n\treadonly level: number\n\t/** Its slot (`EffectFields.slot`): none for one that always adds up */\n\treadonly slot?: string\n\t/** Its priority among those of its slot (`EffectFields.priority`): 0 when it says none */\n\treadonly priority: number\n}\n\n/**\n * The engine's rule of attack modifiers (`RuleSettings.combat.attackModifiers`): of those that share a slot, only the\n * one of the highest priority (the first among equals: abilities, then items, then buffs); those of different slots,\n * and those of none, all of them. In the order they came\n *\n * @beta\n */\nexport function bySlot(_world: World, _attacker: Entity, _target: Entity, modifiers: readonly AttackModifier[]): readonly AttackModifier[] {\n\tif (!modifiers.some((modifier) => modifier.slot !== undefined)) return modifiers\n\tconst best = new Map<string, AttackModifier>()\n\tfor (const modifier of modifiers) {\n\t\tif (modifier.slot === undefined) continue\n\t\tconst held = best.get(modifier.slot)\n\t\tif (!held || modifier.priority > held.priority) best.set(modifier.slot, modifier)\n\t}\n\treturn modifiers.filter((modifier) => modifier.slot === undefined || best.get(modifier.slot) === modifier)\n}\n\nconst FROM: Record<string, AttackModifier['from']> = { a: 'ability', i: 'item', b: 'buff' }\n\n/**\n * Of the `onHit` triggers that can go off (their buff there, not cooling), those the game's rule of slots lets\n * (`RuleSettings.combat.attackModifiers`): all of them where none has a slot and the rule is the engine's\n */\nfunction modifiersOf(world: World, attacker: Entity, target: Entity, ready: Trigger[]): Trigger[] {\n\tconst rule = world.settings.combat.attackModifiers\n\tif (!ready.length || (rule === bySlot && !ready.some((trigger) => trigger.effect.slot !== undefined))) return ready\n\tconst byModifier = new Map<AttackModifier, Trigger>()\n\tconst modifiers = ready.map((trigger) => {\n\t\tconst { effect } = trigger\n\t\tconst modifier: AttackModifier = {\n\t\t\teffect,\n\t\t\tfrom: FROM[trigger.key[0]],\n\t\t\tability: trigger.ability,\n\t\t\tlevel: trigger.level,\n\t\t\t...(effect.slot !== undefined && { slot: effect.slot }),\n\t\t\tpriority: effect.priority ?? 0\n\t\t}\n\t\tbyModifier.set(modifier, trigger)\n\t\treturn modifier\n\t})\n\treturn rule(world, attacker, target, modifiers).flatMap((modifier) => byModifier.get(modifier) ?? [])\n}\n\n/**\n * An attack of `attacker` landed on `target` (dead of it or not): its `onHit` triggers are asked. Of those that can go\n * off (while their buff, not cooling), the game's rule of slots picks (`RuleSettings.combat.attackModifiers`: one a\n * slot, by priority); each of those counts the attack towards its `every`, those due do what they do to a target\n * still alive, and use up a stack of their `whileBuff` (`consumes`) either way. One a slot passed over counts nothing\n */\nexport function attackLanded(world: World, attacker: Entity, target: Entity, damage: number): void {\n\tconst ready = triggersOf(world, attacker, 'onHit').filter(\n\t\t(trigger) => !(trigger.effect.whileBuff && !attacker.buffs.some((instance) => instance.id === trigger.effect.whileBuff)) && !cooling(world, attacker, trigger)\n\t)\n\tfor (const trigger of modifiersOf(world, attacker, target, ready)) {\n\t\tconst { effect } = trigger\n\t\tif (effect.every !== undefined && effect.every > 1) {\n\t\t\tconst kept = keep(attacker)\n\t\t\tconst count = (kept[`n:${trigger.key}`] ?? 0) + 1\n\t\t\tif (count < effect.every) {\n\t\t\t\tkept[`n:${trigger.key}`] = count\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tdelete kept[`n:${trigger.key}`]\n\t\t}\n\t\tif (target.alive) fire(world, attacker, trigger, target, damage)\n\t\telse cool(world, attacker, trigger)\n\t\tif (effect.consumes && effect.whileBuff && attacker.alive) removeStacks(world, attacker, effect.whileBuff, 1)\n\t}\n}\n\n/**\n * How many of a unit's attacks are counted towards an `onHit` that goes off every so many (`EffectFields.every`): the one\n * of an ability's passive at `place` in its list, of an item's (`item: true`) or of a buff's (`buff: true`). 0 when none\n * are: for a screen to show, a test to check\n *\n * @beta\n */\nexport function attacksCounted(entity: Entity, id: string, place = 0, from: 'ability' | 'item' | 'buff' = 'ability'): number {\n\treturn entity.get(triggerState)?.[`n:${from[0]}:${id}:${place}`] ?? 0\n}\n\n/** What a unit's casting sets off (`onCast`): for a hero, only one of the abilities it learns */\nexport function castTriggers(world: World, caster: Entity, cast: AbilityDef): void {\n\tif (caster.def.hero && !learnsOf(caster).includes(cast.id)) return\n\tfor (const trigger of triggersOf(world, caster, 'onCast')) {\n\t\tif (cooling(world, caster, trigger)) continue\n\t\tfire(world, caster, trigger, undefined)\n\t}\n}\n\n/** What killing someone sets off (`onKill`); `attack`, whether one of its attacks did */\nexport function killTriggers(world: World, killer: Entity, victim: Entity, attack: boolean, carried?: readonly BuffInstance[]): void {\n\tfor (const trigger of triggersOf(world, killer, 'onKill')) {\n\t\tconst { effect } = trigger\n\t\tif ((effect.attack && !attack) || (effect.only === 'heroes' && !victim.has(heroState))) continue\n\t\tif (effect.whileBuff && !killer.buffs.some((instance) => instance.id === effect.whileBuff)) continue\n\t\tif (cooling(world, killer, trigger)) continue\n\t\tif (!carried?.length) {\n\t\t\tfire(world, killer, trigger, victim)\n\t\t\tcontinue\n\t\t}\n\t\t// the one killed carries what it did as it fell while the effects ask it (Kindred's mark, B44), and not after\n\t\tconst buffs = victim.buffs as BuffInstance[]\n\t\tbuffs.unshift(...carried)\n\t\tvictim.buffsChanged()\n\t\ttry {\n\t\t\tfire(world, killer, trigger, victim)\n\t\t} finally {\n\t\t\tfor (let i = buffs.length - 1; i >= 0; i--) if (carried.includes(buffs[i])) buffs.splice(i, 1)\n\t\t\tvictim.buffsChanged()\n\t\t}\n\t}\n}\n\n/** Whether an attack is made from up close: one with no missile (`AttackDef.projectileSpeed`) */\nconst melee = (entity: Entity) => !entity.def.attacks?.[0]?.projectileSpeed\n\n/**\n * What damage sets off besides an attack's own triggers: the target's `onDamaged` (not for what a trigger's effects did)\n * and `onLowHealth`, the source's `onAbilityHit`, and the buffs it breaks (`breaksOn`): the target's that break on damage,\n * the attacker's that break on its attack\n */\nexport function damageTriggers(world: World, event: AfterDamage): void {\n\tconst { target, source, dealt, attack, ability } = event\n\tif (!triggering && target.alive && source && source !== target) {\n\t\tfor (const trigger of triggersOf(world, target, 'onDamaged')) {\n\t\t\tconst { effect } = trigger\n\t\t\tif ((effect.attack || effect.melee) && !attack) continue\n\t\t\tif (effect.melee && !melee(source)) continue\n\t\t\tif (cooling(world, target, trigger) || !source.alive) continue\n\t\t\tfire(world, target, trigger, source, dealt)\n\t\t}\n\t}\n\tif (!triggering && source?.alive && !attack && ability !== undefined && world.areEnemies(source.owner, target.owner))\n\t\tfor (const trigger of triggersOf(world, source, 'onAbilityHit')) if (!cooling(world, source, trigger)) fire(world, source, trigger, target, dealt)\n\tif (target.alive && dealt > 0)\n\t\tfor (const trigger of triggersOf(world, target, 'onLowHealth')) {\n\t\t\tconst line = (trigger.effect.below ?? 0) * target.maxHealth\n\t\t\tif (target.health >= line || target.health + dealt < line || cooling(world, target, trigger)) continue\n\t\t\tfire(world, target, trigger, undefined)\n\t\t}\n\tif (dealt > 0 && target.alive && target.buffs.length) breakBuffs(world, target, 'damage')\n\tif (attack && source?.alive && source.buffs.length) breakBuffs(world, source, 'attack')\n}\n\n/**\n * Takes off what a unit carries that breaks on what it just did or had done to it (`BuffDef.breaksOn`); `ability`, for\n * a cast, the ability whose buffs stay (what it put on itself)\n *\n * @beta\n */\nexport function breakBuffs(world: World, entity: Entity, by: BuffBreak, ability?: string): void {\n\tfor (let i = entity.buffs.length - 1; i >= 0; i--) {\n\t\tconst instance = entity.buffs[i]\n\t\tif (!instance || (ability !== undefined && instance.ability === ability)) continue\n\t\tif (world.registry.buff(instance.id).breaksOn?.includes(by)) removeOne(world, entity, instance.id)\n\t}\n}\n\n/** What the buffs of one dying do where it dies (`onCarrierDeath`), while it still stands there */\nexport function carrierDied(world: World, entity: Entity): void {\n\tfor (const instance of [...entity.buffs]) {\n\t\tconst def = world.registry.buff(instance.id)\n\t\tif (def.onCarrierDeath) buffEffects(world, entity, instance, def.onCarrierDeath)\n\t}\n}\n\n/** A stack was added to a buff: what it does at its most (`onMaxStacks`), as it gets there */\nexport function stacked(world: World, carrier: Entity, instance: BuffInstance, before: number): void {\n\tconst def = world.registry.buff(instance.id)\n\tif (!def.onMaxStacks || def.maxStacks === undefined) return\n\tif (before < def.maxStacks && (instance.stacks ?? 0) >= def.maxStacks) buffEffects(world, carrier, instance, def.onMaxStacks)\n}\n\n/**\n * A unit about to die of a blow or a kill (`onFatal`): the first of its `onFatal` triggers not cooling down (and whose\n * `chance` draws yes) keeps it alive, with `health` of its max (all of it when left out), and does its effects in its\n * name, its cooldown started. True when one did: it does not die\n */\nexport function cheatDeath(world: World, entity: Entity): boolean {\n\tif (!entity.isUnit) return false\n\tfor (const trigger of triggersOf(world, entity, 'onFatal')) {\n\t\tif (cooling(world, entity, trigger)) continue\n\t\tconst share = trigger.effect.health ?? 1\n\t\tif (fire(world, entity, trigger, undefined, undefined, () => (entity.health = Math.max(Math.min(share, 1) * entity.maxHealth, 1)))) return true\n\t}\n\treturn false\n}\n\n/** Every trigger type, for the rules' check and the Data panel */\nexport const TRIGGER_TYPES: readonly TriggerType[] = ['onHit', 'onKill', 'onCast', 'onDamaged', 'onAbilityHit', 'onLowHealth', 'onFatal']\n\n/** Every way a buff breaks (`BuffBreak`), for the rules' check */\nexport const BUFF_BREAKS: readonly BuffBreak[] = ['damage', 'attack', 'cast']\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgCA,IAAa,eAAe,gBAAwC,EAAE,IAAI,gBAAgB,CAAC;;AAe3F,IAAM,+BAAe,IAAI,QAAiE;AAE1F,SAAS,OAAO,MAA4B,MAAyC;CACpF,IAAI,QAAQ,aAAa,IAAI,IAAI;CACjC,IAAI,CAAC,OAAO;EACX,QAAQ,CAAC;EACT,KAAK,SAAS,QAAQ,WAAW,MAA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 @@
|
|
|
1
|
+
import type { AbilityState, Entity, PlayerId } from './entity';
|
|
2
|
+
import type { GamePack } from './packs/pack';
|
|
3
|
+
import type { World } from './world';
|
|
4
|
+
/**
|
|
5
|
+
* The ability changes pack's id
|
|
6
|
+
*
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export declare const ABILITY_CHANGES = "core.abilityChanges";
|
|
10
|
+
/**
|
|
11
|
+
* An ability a unit was given for a while (`grantAbility`, `swapAbility`, a stolen one): seconds `left`, casts left
|
|
12
|
+
* (`uses`), and what it took the place of (`replaced`), back as it is gone
|
|
13
|
+
*
|
|
14
|
+
* @beta
|
|
15
|
+
*/
|
|
16
|
+
export interface AbilityGrant {
|
|
17
|
+
/** The ability given */
|
|
18
|
+
ability: string;
|
|
19
|
+
/** Seconds until it is gone, where it is for a time */
|
|
20
|
+
left?: number;
|
|
21
|
+
/** Casts of it before it is gone, where it is for so many */
|
|
22
|
+
uses?: number;
|
|
23
|
+
/** The ability it took the place of, as it was (its cooldown running on meanwhile): back in its place as this goes */
|
|
24
|
+
replaced?: AbilityState;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* What a unit's owner is told of its abilities given for a while (`AbilityGrant`): which, for how long, how many casts,
|
|
28
|
+
* and in place of which
|
|
29
|
+
*
|
|
30
|
+
* @beta
|
|
31
|
+
*/
|
|
32
|
+
export interface GrantSent {
|
|
33
|
+
/** The ability given */
|
|
34
|
+
ability: string;
|
|
35
|
+
/** Seconds until it is gone */
|
|
36
|
+
left?: number;
|
|
37
|
+
/** Casts of it before it is gone */
|
|
38
|
+
uses?: number;
|
|
39
|
+
/** The ability it took the place of, by id */
|
|
40
|
+
replaces?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A unit's abilities given for a while (`AbilityGrant`), in the order they were given. Told to its owner
|
|
44
|
+
*
|
|
45
|
+
* @beta
|
|
46
|
+
*/
|
|
47
|
+
export declare const abilityGrants: import("./components").Component<AbilityGrant[], GrantSent[]>;
|
|
48
|
+
/**
|
|
49
|
+
* Whose a unit made someone else's for a while (`convert` with a `duration`) was, and for how much longer
|
|
50
|
+
*
|
|
51
|
+
* @beta
|
|
52
|
+
*/
|
|
53
|
+
export interface Converted {
|
|
54
|
+
/** Whose it was, and is again as the time is up */
|
|
55
|
+
owner: PlayerId;
|
|
56
|
+
/** Seconds left */
|
|
57
|
+
left: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Whose a unit made someone else's for a while was (`Converted`)
|
|
61
|
+
*
|
|
62
|
+
* @beta
|
|
63
|
+
*/
|
|
64
|
+
export declare const converted: import("./components").Component<Converted, Converted>;
|
|
65
|
+
/**
|
|
66
|
+
* Options of a change of a unit's abilities (`grantAbility`, `swapAbility`): its level, for how long or how many casts,
|
|
67
|
+
* where on the card
|
|
68
|
+
*
|
|
69
|
+
* @beta
|
|
70
|
+
*/
|
|
71
|
+
export interface GrantOptions {
|
|
72
|
+
/** The level it is given at: 1, or that of what it takes the place of, when left out */
|
|
73
|
+
level?: number;
|
|
74
|
+
/** Seconds until it is gone (and what it took the place of back): for good when left out */
|
|
75
|
+
until?: number;
|
|
76
|
+
/** Casts of it before it is gone: for good when left out */
|
|
77
|
+
uses?: number;
|
|
78
|
+
/** Where among its abilities (and so on the card) it goes: after the rest when left out */
|
|
79
|
+
slot?: number;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Gives a unit an ability it has not (`GrantOptions`: at a level, for a while or so many casts, at a place on its card).
|
|
83
|
+
* What lasts a while needs the ability changes pack (`abilityChangesPack`) to end; for good, it does not. False where
|
|
84
|
+
* the ability is none or the unit has it already
|
|
85
|
+
*
|
|
86
|
+
* @beta
|
|
87
|
+
*/
|
|
88
|
+
export declare function grantAbility(world: World, entity: Entity, ability: string, options?: GrantOptions): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Takes an ability off a unit; what it took the place of, where it was given in place of another for a while, is back
|
|
91
|
+
* there. False where it had none
|
|
92
|
+
*
|
|
93
|
+
* @beta
|
|
94
|
+
*/
|
|
95
|
+
export declare function removeAbility(world: World, entity: Entity, ability: string): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Puts an ability in the place of another of a unit's (`from`), at its level (or `options.level`): for good, or for a
|
|
98
|
+
* while or so many casts (`until`, `uses`: then `from` is back, its cooldown having run on). A stance, an awakened
|
|
99
|
+
* ability, a weapon of a set. False where it has no `from`, the new one is none or it has it already
|
|
100
|
+
*
|
|
101
|
+
* @beta
|
|
102
|
+
*/
|
|
103
|
+
export declare function swapAbility(world: World, entity: Entity, from: string, to: string, options?: Omit<GrantOptions, 'slot'>): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Makes an ability of a unit's into one it may become (`AbilityDef.upgrades`), for good: at its level, with its cooldown.
|
|
106
|
+
* False where it has no such ability or that is not one it may become
|
|
107
|
+
*
|
|
108
|
+
* @beta
|
|
109
|
+
*/
|
|
110
|
+
export declare function upgradeAbility(world: World, entity: Entity, from: string, to: string): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Makes one of a unit's abilities into one it may become (`upgradeAbility`): Viktor's augment chosen
|
|
113
|
+
*
|
|
114
|
+
* @beta
|
|
115
|
+
*/
|
|
116
|
+
export declare const upgradeAbilityCommand: import("#engine/commands").DefinedCommand<"upgradeAbility", {
|
|
117
|
+
entity: import("./fields").Check<number>;
|
|
118
|
+
ability: import("./fields").Check<string>;
|
|
119
|
+
into: import("./fields").Check<string>;
|
|
120
|
+
}>;
|
|
121
|
+
/**
|
|
122
|
+
* Abilities changed at runtime: what a game with it (`Rules.packs`) gets. The effects `grantAbility` (an ability given,
|
|
123
|
+
* for a while or so many casts), `swapAbility` (one in the place of another on the card, and back), `stealAbility` (the
|
|
124
|
+
* target's ultimate in the place of the one cast, for one cast: Hijack) and `convert` (the target the caster's: Charm);
|
|
125
|
+
* an ability's `upgrades`, one chosen for good (the `upgradeAbility` command); what lasts a while kept in the
|
|
126
|
+
* `abilityGrants` component, told to the owner (a stolen one shown in the place of what it took). `grantAbility`,
|
|
127
|
+
* `removeAbility`, `swapAbility` and `upgradeAbility` in code
|
|
128
|
+
*
|
|
129
|
+
* @beta
|
|
130
|
+
*/
|
|
131
|
+
export declare function abilityChangesPack(): GamePack;
|