warscript 0.0.1-dev.797e3f9 → 0.0.1-dev.7b00732

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.
Files changed (117) hide show
  1. package/attributes.d.ts +0 -1
  2. package/binaryreader.d.ts +1 -0
  3. package/binaryreader.lua +3 -0
  4. package/core/types/frame.d.ts +5 -1
  5. package/core/types/frame.lua +34 -1
  6. package/core/types/group.d.ts +0 -1
  7. package/core/types/image.d.ts +0 -1
  8. package/core/types/missile.d.ts +2 -2
  9. package/core/types/missile.lua +8 -2
  10. package/core/types/unit.lua +8 -0
  11. package/core/util.d.ts +1 -1
  12. package/core/util.lua +6 -0
  13. package/decl/index.d.ts +1 -0
  14. package/engine/ability.d.ts +1 -1
  15. package/engine/behavior.d.ts +10 -10
  16. package/engine/behavior.lua +6 -6
  17. package/engine/behaviour/ability/apply-buff.d.ts +3 -5
  18. package/engine/behaviour/ability/apply-unit-behavior.d.ts +6 -1
  19. package/engine/behaviour/ability/damage.d.ts +33 -11
  20. package/engine/behaviour/ability/damage.lua +89 -31
  21. package/engine/behaviour/ability/heal.d.ts +33 -6
  22. package/engine/behaviour/ability/heal.lua +89 -10
  23. package/engine/behaviour/ability/instant-impact.lua +4 -0
  24. package/engine/behaviour/ability/restore-mana.d.ts +15 -0
  25. package/engine/behaviour/ability/restore-mana.lua +29 -0
  26. package/engine/behaviour/ability.d.ts +8 -1
  27. package/engine/behaviour/ability.lua +62 -0
  28. package/engine/behaviour/unit/stun-immunity.d.ts +0 -1
  29. package/engine/behaviour/unit.d.ts +8 -2
  30. package/engine/behaviour/unit.lua +27 -0
  31. package/engine/buff.d.ts +62 -20
  32. package/engine/buff.lua +247 -72
  33. package/engine/game-map.d.ts +7 -0
  34. package/engine/game-map.lua +32 -0
  35. package/engine/internal/ability.d.ts +1 -11
  36. package/engine/internal/ability.lua +2 -78
  37. package/engine/internal/item+owner.lua +2 -2
  38. package/engine/internal/unit/bonus.d.ts +9 -8
  39. package/engine/internal/unit/bonus.lua +6 -1
  40. package/engine/internal/unit/item.d.ts +23 -0
  41. package/engine/internal/unit/item.lua +74 -0
  42. package/engine/internal/unit/main-selected.d.ts +7 -0
  43. package/engine/internal/unit/main-selected.lua +40 -0
  44. package/engine/internal/unit+ability.lua +2 -2
  45. package/engine/internal/unit+transport.lua +4 -10
  46. package/engine/internal/unit-missile-launch.lua +25 -6
  47. package/engine/internal/unit.d.ts +51 -16
  48. package/engine/internal/unit.lua +289 -111
  49. package/engine/local-client.d.ts +7 -2
  50. package/engine/local-client.lua +81 -0
  51. package/engine/object-data/auxiliary/attachment-preset.d.ts +0 -1
  52. package/engine/object-data/auxiliary/combat-classification.d.ts +0 -2
  53. package/engine/object-data/entry/ability-type/blank-configurable.d.ts +0 -1
  54. package/engine/object-data/entry/ability-type/blank-passive.d.ts +0 -1
  55. package/engine/object-data/entry/ability-type/channel.d.ts +0 -1
  56. package/engine/object-data/entry/ability-type/mine.d.ts +10 -0
  57. package/engine/object-data/entry/ability-type/mine.lua +39 -0
  58. package/engine/object-data/entry/ability-type/spirit-touch.d.ts +2 -2
  59. package/engine/object-data/entry/ability-type/spirit-touch.lua +6 -6
  60. package/engine/object-data/entry/ability-type.d.ts +0 -1
  61. package/engine/object-data/entry/buff-type/applicable.d.ts +0 -1
  62. package/engine/object-data/entry/buff-type/blank.d.ts +0 -1
  63. package/engine/object-data/entry/buff-type.d.ts +0 -1
  64. package/engine/object-data/entry/destructible-type.d.ts +0 -1
  65. package/engine/object-data/entry/item-type/blank.d.ts +0 -1
  66. package/engine/object-data/entry/item-type.d.ts +12 -1
  67. package/engine/object-data/entry/item-type.lua +78 -0
  68. package/engine/object-data/entry/lightning-type.d.ts +0 -1
  69. package/engine/object-data/entry/unit-type.d.ts +21 -2
  70. package/engine/object-data/entry/unit-type.lua +223 -49
  71. package/engine/object-data/entry/upgrade/blank.d.ts +0 -1
  72. package/engine/object-data/entry/upgrade.d.ts +0 -1
  73. package/engine/object-data/entry.d.ts +2 -3
  74. package/engine/object-field/ability.d.ts +18 -1
  75. package/engine/object-field/ability.lua +51 -1
  76. package/engine/object-field.d.ts +0 -1
  77. package/engine/random.d.ts +1 -0
  78. package/engine/random.lua +9 -0
  79. package/engine/standard/entries/unit-type.d.ts +39 -1
  80. package/engine/standard/entries/unit-type.lua +39 -1
  81. package/engine/standard/fields/ability.d.ts +1 -1
  82. package/engine/standard/fields/ability.lua +1 -1
  83. package/engine/unit.d.ts +2 -0
  84. package/engine/unit.lua +11 -2
  85. package/event.d.ts +2 -3
  86. package/event.lua +9 -5
  87. package/index.d.ts +1 -0
  88. package/index.lua +1 -0
  89. package/lualib_bundle.lua +146 -42
  90. package/math/vec2.d.ts +2 -9
  91. package/math.d.ts +0 -2
  92. package/net/socket.d.ts +7 -1
  93. package/net/socket.lua +45 -4
  94. package/network.d.ts +1 -0
  95. package/network.lua +3 -2
  96. package/objutil/ability.d.ts +0 -1
  97. package/objutil/buff.d.ts +0 -1
  98. package/objutil/buff.lua +1 -1
  99. package/objutil/object.d.ts +0 -1
  100. package/objutil/unit.d.ts +0 -1
  101. package/package.json +13 -13
  102. package/patch-lua.d.ts +0 -0
  103. package/patch-lua.lua +10 -0
  104. package/property.d.ts +55 -0
  105. package/property.lua +374 -0
  106. package/string.d.ts +16 -0
  107. package/string.lua +5 -0
  108. package/util/stream.d.ts +0 -1
  109. package/utility/arrays.d.ts +3 -4
  110. package/utility/bit-set.d.ts +0 -2
  111. package/utility/linked-set.d.ts +11 -3
  112. package/utility/linked-set.lua +5 -2
  113. package/utility/lua-maps.d.ts +1 -2
  114. package/utility/lua-sets.d.ts +1 -2
  115. package/utility/types.d.ts +1 -0
  116. package/core/mapbounds.d.ts +0 -8
  117. package/core/mapbounds.lua +0 -12
@@ -2,6 +2,7 @@
2
2
  export type AnyNonNullable = {};
3
3
  export type IsExactlyAny<T> = boolean extends (T extends never ? true : false) ? true : false;
4
4
  export type NonEmptyArray<T> = [T, ...T[]];
5
+ export type ReadonlyNonEmptyArray<T> = readonly [T, ...T[]];
5
6
  export type InvertRecordType<T extends Record<PropertyKey, PropertyKey | null | undefined>> = {
6
7
  [P in keyof T as NonNullable<T[P]>]: P;
7
8
  };
@@ -1,8 +0,0 @@
1
- /** @noSelfInFile */
2
- import { Rect } from "./types/rect";
3
- import { Region } from "./types/region";
4
- export declare const boundRect: Rect;
5
- export declare const boundRegion: Region;
6
- export declare const boundMin: Readonly<Vec2>;
7
- export declare const boundMax: Readonly<Vec2>;
8
- export declare const boundCenter: Readonly<Vec2>;
@@ -1,12 +0,0 @@
1
- local ____exports = {}
2
- local ____rect = require("core.types.rect")
3
- local Rect = ____rect.Rect
4
- local ____region = require("core.types.region")
5
- local Region = ____region.Region
6
- ____exports.boundRect = Rect:of(GetWorldBounds())
7
- ____exports.boundRegion = Region:create()
8
- ____exports.boundRegion:addRect(____exports.boundRect)
9
- ____exports.boundMin = vec2(____exports.boundRect.minX, ____exports.boundRect.minY)
10
- ____exports.boundMax = vec2(____exports.boundRect.maxX, ____exports.boundRect.maxY)
11
- ____exports.boundCenter = (____exports.boundMin + ____exports.boundMax) * 0.5
12
- return ____exports