warscript 0.0.1-dev.5abc199 → 0.0.1-dev.5c35450
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/core/types/frame.lua +47 -1
- package/core/types/item.d.ts +1 -0
- package/core/types/item.lua +1 -0
- package/core/types/sound.lua +1 -1
- package/engine/behaviour/ability/damage.d.ts +3 -0
- package/engine/behaviour/ability/damage.lua +8 -2
- package/engine/behaviour/ability/emulate-impact.lua +5 -4
- package/engine/behaviour/ability.d.ts +5 -5
- package/engine/buff.d.ts +41 -13
- package/engine/buff.lua +222 -116
- package/engine/internal/ability.lua +25 -15
- package/engine/internal/item/fields.d.ts +12 -0
- package/engine/internal/item/fields.lua +33 -0
- package/engine/internal/item.d.ts +0 -4
- package/engine/internal/item.lua +0 -37
- package/engine/internal/object-data/attribute-bonus.lua +2 -2
- package/engine/internal/object-data/health-bonus.d.ts +2 -0
- package/engine/internal/object-data/health-bonus.lua +16 -0
- package/engine/internal/object-data/mana-bonus.d.ts +2 -0
- package/engine/internal/object-data/mana-bonus.lua +16 -0
- package/engine/internal/unit/bonus.d.ts +4 -0
- package/engine/internal/unit/bonus.lua +23 -3
- package/engine/internal/unit+bonus.lua +3 -3
- package/engine/local-client.d.ts +5 -0
- package/engine/local-client.lua +56 -1
- package/engine/object-data/auxiliary/unit-attribute.lua +1 -1
- package/engine/object-data/entry/ability-type/{armor-increase.d.ts → armor-bonus.d.ts} +3 -3
- package/engine/object-data/entry/ability-type/{armor-increase.lua → armor-bonus.lua} +9 -9
- package/engine/object-data/entry/ability-type/health-bonus.d.ts +8 -0
- package/engine/object-data/entry/ability-type/health-bonus.lua +26 -0
- package/engine/object-data/entry/ability-type/mana-bonus.d.ts +8 -0
- package/engine/object-data/entry/ability-type/mana-bonus.lua +26 -0
- package/engine/object-data/entry/ability-type.lua +4 -0
- package/engine/object-data/entry/buff-type/applicable.lua +113 -109
- package/engine/object-field/ability.lua +2 -2
- package/engine/object-field/item.d.ts +22 -0
- package/engine/object-field/item.lua +118 -0
- package/engine/object-field.d.ts +1 -1
- package/engine/object-field.lua +9 -7
- package/engine/standard/fields/item.d.ts +4 -0
- package/engine/standard/fields/item.lua +6 -0
- package/lualib_bundle.lua +1 -1
- package/math.d.ts +2 -0
- package/math.lua +14 -0
- package/objutil/object.lua +1 -1
- package/operation.lua +1 -4
- package/package.json +4 -4
- package/utility/linked-map.d.ts +2 -1
- package/utility/linked-map.lua +6 -0
- package/utility/linked-set.d.ts +1 -0
- package/utility/linked-set.lua +6 -0
- package/utility/unordered-map.d.ts +27 -0
- package/utility/unordered-map.lua +99 -0
- /package/engine/internal/object-data/{armor-increase.d.ts → armor-bonus.d.ts} +0 -0
- /package/engine/internal/object-data/{armor-increase.lua → armor-bonus.lua} +0 -0
- /package/engine/object-data/entry/ability-type/{attribute-increase.d.ts → attribute-bonus.d.ts} +0 -0
- /package/engine/object-data/entry/ability-type/{attribute-increase.lua → attribute-bonus.lua} +0 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__SetDescriptor = ____lualib.__TS__SetDescriptor
|
|
4
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
5
|
+
local __TS__New = ____lualib.__TS__New
|
|
6
|
+
local ____exports = {}
|
|
7
|
+
local ____exception = require("exception")
|
|
8
|
+
local UnsupportedOperationException = ____exception.UnsupportedOperationException
|
|
9
|
+
____exports.UnorderedMap = __TS__Class()
|
|
10
|
+
local UnorderedMap = ____exports.UnorderedMap
|
|
11
|
+
UnorderedMap.name = "UnorderedMap"
|
|
12
|
+
function UnorderedMap.prototype.____constructor(self)
|
|
13
|
+
self.v = {}
|
|
14
|
+
self.s = 0
|
|
15
|
+
end
|
|
16
|
+
function UnorderedMap.prototype.get(self, key)
|
|
17
|
+
return self.v[key]
|
|
18
|
+
end
|
|
19
|
+
function UnorderedMap.prototype.getOrPut(self, key, defaultValue)
|
|
20
|
+
local value = self.v[key]
|
|
21
|
+
if value ~= nil then
|
|
22
|
+
return value
|
|
23
|
+
end
|
|
24
|
+
value = defaultValue()
|
|
25
|
+
if value ~= nil then
|
|
26
|
+
self.v[key] = value
|
|
27
|
+
self.s = self.s + 1
|
|
28
|
+
end
|
|
29
|
+
return value
|
|
30
|
+
end
|
|
31
|
+
function UnorderedMap.prototype.put(self, key, value)
|
|
32
|
+
local has = self.v[key] ~= nil
|
|
33
|
+
self.v[key] = value
|
|
34
|
+
if value ~= nil and not has then
|
|
35
|
+
self.s = self.s + 1
|
|
36
|
+
elseif value == nil and has then
|
|
37
|
+
self.s = self.s - 1
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
function UnorderedMap.prototype.remove(self, key)
|
|
41
|
+
if self.v[key] ~= nil then
|
|
42
|
+
self.v[key] = nil
|
|
43
|
+
self.s = self.s - 1
|
|
44
|
+
return true
|
|
45
|
+
end
|
|
46
|
+
return false
|
|
47
|
+
end
|
|
48
|
+
function UnorderedMap.prototype.contains(self, key)
|
|
49
|
+
return self.v[key] ~= nil
|
|
50
|
+
end
|
|
51
|
+
function UnorderedMap.prototype.__len(self)
|
|
52
|
+
return self.s
|
|
53
|
+
end
|
|
54
|
+
function UnorderedMap.prototype.__pairs(self)
|
|
55
|
+
return pairs(self.v)
|
|
56
|
+
end
|
|
57
|
+
__TS__SetDescriptor(
|
|
58
|
+
UnorderedMap.prototype,
|
|
59
|
+
"size",
|
|
60
|
+
{get = function(self)
|
|
61
|
+
return self.s
|
|
62
|
+
end},
|
|
63
|
+
true
|
|
64
|
+
)
|
|
65
|
+
local EmptyUnorderedMap = __TS__Class()
|
|
66
|
+
EmptyUnorderedMap.name = "EmptyUnorderedMap"
|
|
67
|
+
__TS__ClassExtends(EmptyUnorderedMap, ____exports.UnorderedMap)
|
|
68
|
+
function EmptyUnorderedMap.prototype.getOrPut(self)
|
|
69
|
+
error(
|
|
70
|
+
__TS__New(UnsupportedOperationException),
|
|
71
|
+
0
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
function EmptyUnorderedMap.prototype.put(self)
|
|
75
|
+
error(
|
|
76
|
+
__TS__New(UnsupportedOperationException),
|
|
77
|
+
0
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
function EmptyUnorderedMap.prototype.remove(self)
|
|
81
|
+
error(
|
|
82
|
+
__TS__New(UnsupportedOperationException),
|
|
83
|
+
0
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
function EmptyUnorderedMap.prototype.__len(self)
|
|
87
|
+
return 0
|
|
88
|
+
end
|
|
89
|
+
function EmptyUnorderedMap.prototype.__pairs(self)
|
|
90
|
+
return pairs(self.v)
|
|
91
|
+
end
|
|
92
|
+
local EMPTY_UNORDERED_MAP = __TS__New(EmptyUnorderedMap)
|
|
93
|
+
____exports.emptyUnorderedMap = function()
|
|
94
|
+
return EMPTY_UNORDERED_MAP
|
|
95
|
+
end
|
|
96
|
+
____exports.mutableUnorderedMap = function()
|
|
97
|
+
return __TS__New(____exports.UnorderedMap)
|
|
98
|
+
end
|
|
99
|
+
return ____exports
|
|
File without changes
|
|
File without changes
|
/package/engine/object-data/entry/ability-type/{attribute-increase.d.ts → attribute-bonus.d.ts}
RENAMED
|
File without changes
|
/package/engine/object-data/entry/ability-type/{attribute-increase.lua → attribute-bonus.lua}
RENAMED
|
File without changes
|