isaacscript-common 1.2.11 → 1.2.15
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/functions/player.d.ts +14 -0
- package/dist/functions/player.lua +61 -16
- package/dist/functions/util.d.ts +1 -0
- package/dist/functions/util.lua +3 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.lua +32 -0
- package/dist/maps/pillEffectClassMap.d.ts +3 -0
- package/dist/maps/pillEffectClassMap.lua +60 -0
- package/dist/maps/pillEffectTypeMap.d.ts +3 -0
- package/dist/maps/pillEffectTypeMap.lua +60 -0
- package/dist/types/PillEffectClass.d.ts +10 -0
- package/dist/types/PillEffectClass.lua +12 -0
- package/dist/types/PillEffectType.d.ts +9 -0
- package/dist/types/PillEffectType.lua +10 -0
- package/package.json +2 -2
|
@@ -59,6 +59,10 @@ export declare function getClosestPlayer(position: Vector): EntityPlayer;
|
|
|
59
59
|
* Tainted Forgotten have a 20 frame death animation (i.e. the "ForgottenDeath" animation).
|
|
60
60
|
*/
|
|
61
61
|
export declare function getDeathAnimationName(player: EntityPlayer): string;
|
|
62
|
+
/**
|
|
63
|
+
* Helper function to return the player with the highest index, according to the
|
|
64
|
+
* `Isaac.GetPlayer()` method.
|
|
65
|
+
*/
|
|
62
66
|
export declare function getFinalPlayer(): EntityPlayer;
|
|
63
67
|
/**
|
|
64
68
|
* Helper function that returns the type of the rightmost heart, not including golden hearts since
|
|
@@ -217,6 +221,12 @@ export declare function canTakeFreeDevilDeals(player: EntityPlayer): boolean;
|
|
|
217
221
|
export declare function isTainted(player: EntityPlayer): boolean;
|
|
218
222
|
/** Helper function for detecting when a player is Tainted Lazarus or Dead Tainted Lazarus. */
|
|
219
223
|
export declare function isTaintedLazarus(player: EntityPlayer): boolean;
|
|
224
|
+
export declare function isModdedCharacter(player: EntityPlayer): boolean;
|
|
225
|
+
export declare function isVanillaCharacter(player: EntityPlayer): boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Helper function to remove a collectible costume from a player. Use this helper function to avoid
|
|
228
|
+
* having to request the collectible from the item config.
|
|
229
|
+
*/
|
|
220
230
|
export declare function removeCollectibleCostume(player: EntityPlayer, collectibleType: CollectibleType | int): void;
|
|
221
231
|
/**
|
|
222
232
|
* Helper function to remove the Dead Eye multiplier from a player.
|
|
@@ -225,6 +235,10 @@ export declare function removeCollectibleCostume(player: EntityPlayer, collectib
|
|
|
225
235
|
* chance of working, so this function calls it 100 times to be safe.
|
|
226
236
|
*/
|
|
227
237
|
export declare function removeDeadEyeMultiplier(player: EntityPlayer): void;
|
|
238
|
+
/**
|
|
239
|
+
* Helper function to remove a trinket costume from a player. Use this helper function to avoid
|
|
240
|
+
* having to request the trinket from the item config.
|
|
241
|
+
*/
|
|
228
242
|
export declare function removeTrinketCostume(player: EntityPlayer, trinketType: TrinketType | int): void;
|
|
229
243
|
/**
|
|
230
244
|
* Helper function to set an active collectible to a particular slot. This has different behavior
|
|
@@ -9,7 +9,7 @@ local __TS__Iterator = ____lualib.__TS__Iterator
|
|
|
9
9
|
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
10
10
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
11
11
|
local ____exports = {}
|
|
12
|
-
local getAdjustedPlayerName, EXCLUDED_CHARACTERS
|
|
12
|
+
local getAdjustedPlayerName, isTaintedModded, EXCLUDED_CHARACTERS
|
|
13
13
|
local ____constants = require("constants")
|
|
14
14
|
local CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART = ____constants.CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART
|
|
15
15
|
local CHARACTERS_WITH_FREE_DEVIL_DEALS = ____constants.CHARACTERS_WITH_FREE_DEVIL_DEALS
|
|
@@ -17,6 +17,7 @@ local CHARACTERS_WITH_NO_RED_HEARTS = ____constants.CHARACTERS_WITH_NO_RED_HEART
|
|
|
17
17
|
local CHARACTERS_WITH_NO_SOUL_HEARTS = ____constants.CHARACTERS_WITH_NO_SOUL_HEARTS
|
|
18
18
|
local LOST_STYLE_PLAYER_TYPES = ____constants.LOST_STYLE_PLAYER_TYPES
|
|
19
19
|
local MAX_PLAYER_HEART_CONTAINERS = ____constants.MAX_PLAYER_HEART_CONTAINERS
|
|
20
|
+
local MAX_VANILLA_CHARACTER = ____constants.MAX_VANILLA_CHARACTER
|
|
20
21
|
local ____HealthType = require("types.HealthType")
|
|
21
22
|
local HealthType = ____HealthType.HealthType
|
|
22
23
|
local ____array = require("functions.array")
|
|
@@ -30,6 +31,7 @@ local ____collectibleSet = require("functions.collectibleSet")
|
|
|
30
31
|
local getCollectibleSet = ____collectibleSet.getCollectibleSet
|
|
31
32
|
local ____util = require("functions.util")
|
|
32
33
|
local ensureAllCases = ____util.ensureAllCases
|
|
34
|
+
local stringContains = ____util.stringContains
|
|
33
35
|
local trimPrefix = ____util.trimPrefix
|
|
34
36
|
function ____exports.getCharacterMaxHeartContainers(self, character)
|
|
35
37
|
if character == PlayerType.PLAYER_KEEPER then
|
|
@@ -83,6 +85,30 @@ function getAdjustedPlayerName(self, player)
|
|
|
83
85
|
return "Lazarus II"
|
|
84
86
|
end
|
|
85
87
|
end
|
|
88
|
+
____cond71 = ____cond71 or ____switch71 == PlayerType.PLAYER_BLACKJUDAS
|
|
89
|
+
if ____cond71 then
|
|
90
|
+
do
|
|
91
|
+
return "Dark Judas"
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
____cond71 = ____cond71 or ____switch71 == PlayerType.PLAYER_JACOB
|
|
95
|
+
if ____cond71 then
|
|
96
|
+
do
|
|
97
|
+
return "Jacob & Esau"
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
____cond71 = ____cond71 or ____switch71 == PlayerType.PLAYER_LAZARUS2_B
|
|
101
|
+
if ____cond71 then
|
|
102
|
+
do
|
|
103
|
+
return "Dead Tainted Lazarus"
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
____cond71 = ____cond71 or ____switch71 == PlayerType.PLAYER_JACOB2_B
|
|
107
|
+
if ____cond71 then
|
|
108
|
+
do
|
|
109
|
+
return "Dead Tainted Jacob"
|
|
110
|
+
end
|
|
111
|
+
end
|
|
86
112
|
do
|
|
87
113
|
do
|
|
88
114
|
return player:GetName()
|
|
@@ -102,18 +128,18 @@ function ____exports.getPlayers(self, performExclusions)
|
|
|
102
128
|
do
|
|
103
129
|
local player = Isaac.GetPlayer(i)
|
|
104
130
|
if player == nil then
|
|
105
|
-
goto
|
|
131
|
+
goto __continue81
|
|
106
132
|
end
|
|
107
133
|
if ____exports.isChildPlayer(nil, player) then
|
|
108
|
-
goto
|
|
134
|
+
goto __continue81
|
|
109
135
|
end
|
|
110
136
|
local character = player:GetPlayerType()
|
|
111
137
|
if performExclusions and EXCLUDED_CHARACTERS:has(character) then
|
|
112
|
-
goto
|
|
138
|
+
goto __continue81
|
|
113
139
|
end
|
|
114
140
|
__TS__ArrayPush(players, player)
|
|
115
141
|
end
|
|
116
|
-
::
|
|
142
|
+
::__continue81::
|
|
117
143
|
i = i + 1
|
|
118
144
|
end
|
|
119
145
|
end
|
|
@@ -124,7 +150,26 @@ function ____exports.isChildPlayer(self, player)
|
|
|
124
150
|
end
|
|
125
151
|
function ____exports.isTainted(self, player)
|
|
126
152
|
local character = player:GetPlayerType()
|
|
127
|
-
|
|
153
|
+
local ____isVanillaCharacter_result_0
|
|
154
|
+
if ____exports.isVanillaCharacter(nil, player) then
|
|
155
|
+
____isVanillaCharacter_result_0 = character >= PlayerType.PLAYER_ISAAC_B
|
|
156
|
+
else
|
|
157
|
+
____isVanillaCharacter_result_0 = isTaintedModded(nil, player)
|
|
158
|
+
end
|
|
159
|
+
return ____isVanillaCharacter_result_0
|
|
160
|
+
end
|
|
161
|
+
function isTaintedModded(self, player)
|
|
162
|
+
local character = player:GetPlayerType()
|
|
163
|
+
local name = player:GetName()
|
|
164
|
+
local taintedCharacter = Isaac.GetPlayerTypeByName(name, true)
|
|
165
|
+
return character == taintedCharacter
|
|
166
|
+
end
|
|
167
|
+
function ____exports.isModdedCharacter(self, player)
|
|
168
|
+
local character = player:GetPlayerType()
|
|
169
|
+
return character > MAX_VANILLA_CHARACTER
|
|
170
|
+
end
|
|
171
|
+
function ____exports.isVanillaCharacter(self, player)
|
|
172
|
+
return not ____exports.isModdedCharacter(nil, player)
|
|
128
173
|
end
|
|
129
174
|
EXCLUDED_CHARACTERS = __TS__New(Set, {PlayerType.PLAYER_ESAU, PlayerType.PLAYER_THESOUL_B})
|
|
130
175
|
function ____exports.addCollectibleCostume(self, player, collectibleType)
|
|
@@ -341,7 +386,7 @@ function ____exports.getPlayerName(self, player)
|
|
|
341
386
|
return adjustedName
|
|
342
387
|
end
|
|
343
388
|
local baseName = trimPrefix(nil, adjustedName, "The ")
|
|
344
|
-
return "Tainted " .. baseName
|
|
389
|
+
return stringContains(nil, baseName, "Tainted") and baseName or "Tainted " .. baseName
|
|
345
390
|
end
|
|
346
391
|
function ____exports.getPlayerNumHitsRemaining(self, player)
|
|
347
392
|
local hearts = player:GetHearts()
|
|
@@ -499,9 +544,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
499
544
|
itemPool:RemoveCollectible(collectibleType)
|
|
500
545
|
end
|
|
501
546
|
repeat
|
|
502
|
-
local
|
|
503
|
-
local
|
|
504
|
-
if
|
|
547
|
+
local ____switch124 = activeSlot
|
|
548
|
+
local ____cond124 = ____switch124 == ActiveSlot.SLOT_PRIMARY
|
|
549
|
+
if ____cond124 then
|
|
505
550
|
do
|
|
506
551
|
if primaryCollectibleType ~= CollectibleType.COLLECTIBLE_NULL then
|
|
507
552
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -510,8 +555,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
510
555
|
break
|
|
511
556
|
end
|
|
512
557
|
end
|
|
513
|
-
|
|
514
|
-
if
|
|
558
|
+
____cond124 = ____cond124 or ____switch124 == ActiveSlot.SLOT_SECONDARY
|
|
559
|
+
if ____cond124 then
|
|
515
560
|
do
|
|
516
561
|
if primaryCollectibleType ~= CollectibleType.COLLECTIBLE_NULL then
|
|
517
562
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -526,16 +571,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
526
571
|
break
|
|
527
572
|
end
|
|
528
573
|
end
|
|
529
|
-
|
|
530
|
-
if
|
|
574
|
+
____cond124 = ____cond124 or ____switch124 == ActiveSlot.SLOT_POCKET
|
|
575
|
+
if ____cond124 then
|
|
531
576
|
do
|
|
532
577
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
533
578
|
player:SetActiveCharge(charge, activeSlot)
|
|
534
579
|
break
|
|
535
580
|
end
|
|
536
581
|
end
|
|
537
|
-
|
|
538
|
-
if
|
|
582
|
+
____cond124 = ____cond124 or ____switch124 == ActiveSlot.SLOT_POCKET2
|
|
583
|
+
if ____cond124 then
|
|
539
584
|
do
|
|
540
585
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
541
586
|
break
|
package/dist/functions/util.d.ts
CHANGED
|
@@ -80,6 +80,7 @@ export declare function onSetSeed(): boolean;
|
|
|
80
80
|
* message (which `Isaac.ConsoleOutput()` does not do by default).
|
|
81
81
|
*/
|
|
82
82
|
export declare function printConsole(msg: string): void;
|
|
83
|
+
export declare function stringContains(string: string, searchString: string): boolean;
|
|
83
84
|
/**
|
|
84
85
|
* In a Map, you can use the `clear` method to delete every element. However, in a LuaTable, the
|
|
85
86
|
* `clear` method does not exist. Use this helper function as a drop-in replacement for this.
|
package/dist/functions/util.lua
CHANGED
|
@@ -67,6 +67,9 @@ end
|
|
|
67
67
|
function ____exports.printConsole(self, msg)
|
|
68
68
|
Isaac.ConsoleOutput(msg .. "\n")
|
|
69
69
|
end
|
|
70
|
+
function ____exports.stringContains(self, ____string, searchString)
|
|
71
|
+
return (string.find(____string, searchString, nil, true) or 0) - 1 ~= -1
|
|
72
|
+
end
|
|
70
73
|
function ____exports.tableClear(self, ____table)
|
|
71
74
|
for key in pairs(____table) do
|
|
72
75
|
____table[key] = nil
|
package/dist/index.d.ts
CHANGED
|
@@ -57,7 +57,9 @@ export * from "./functions/vector";
|
|
|
57
57
|
export * from "./maps/cardNameMap";
|
|
58
58
|
export * from "./maps/collectibleNameMap";
|
|
59
59
|
export * from "./maps/gridEntityXMLMap";
|
|
60
|
+
export * from "./maps/pillEffectClassMap";
|
|
60
61
|
export * from "./maps/pillEffectNameMap";
|
|
62
|
+
export * from "./maps/pillEffectTypeMap";
|
|
61
63
|
export * from "./maps/roomShapeToTopLeftWallGridIndexMap";
|
|
62
64
|
export * from "./maps/transformationMaps";
|
|
63
65
|
export * from "./maps/transformationNameMap";
|
|
@@ -74,6 +76,8 @@ export * from "./types/JSONSpawn";
|
|
|
74
76
|
export * from "./types/ModCallbacksCustom";
|
|
75
77
|
export * from "./types/ModUpgraded";
|
|
76
78
|
export * from "./types/PickingUpItem";
|
|
79
|
+
export * from "./types/PillEffectClass";
|
|
80
|
+
export * from "./types/PillEffectType";
|
|
77
81
|
export * from "./types/PlayerHealth";
|
|
78
82
|
export * from "./types/PocketItemDescription";
|
|
79
83
|
export * from "./types/PocketItemType";
|
package/dist/index.lua
CHANGED
|
@@ -462,6 +462,14 @@ do
|
|
|
462
462
|
end
|
|
463
463
|
end
|
|
464
464
|
end
|
|
465
|
+
do
|
|
466
|
+
local ____export = require("maps.pillEffectClassMap")
|
|
467
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
468
|
+
if ____exportKey ~= "default" then
|
|
469
|
+
____exports[____exportKey] = ____exportValue
|
|
470
|
+
end
|
|
471
|
+
end
|
|
472
|
+
end
|
|
465
473
|
do
|
|
466
474
|
local ____export = require("maps.pillEffectNameMap")
|
|
467
475
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -470,6 +478,14 @@ do
|
|
|
470
478
|
end
|
|
471
479
|
end
|
|
472
480
|
end
|
|
481
|
+
do
|
|
482
|
+
local ____export = require("maps.pillEffectTypeMap")
|
|
483
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
484
|
+
if ____exportKey ~= "default" then
|
|
485
|
+
____exports[____exportKey] = ____exportValue
|
|
486
|
+
end
|
|
487
|
+
end
|
|
488
|
+
end
|
|
473
489
|
do
|
|
474
490
|
local ____export = require("maps.roomShapeToTopLeftWallGridIndexMap")
|
|
475
491
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -534,6 +550,22 @@ do
|
|
|
534
550
|
end
|
|
535
551
|
end
|
|
536
552
|
end
|
|
553
|
+
do
|
|
554
|
+
local ____export = require("types.PillEffectClass")
|
|
555
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
556
|
+
if ____exportKey ~= "default" then
|
|
557
|
+
____exports[____exportKey] = ____exportValue
|
|
558
|
+
end
|
|
559
|
+
end
|
|
560
|
+
end
|
|
561
|
+
do
|
|
562
|
+
local ____export = require("types.PillEffectType")
|
|
563
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
564
|
+
if ____exportKey ~= "default" then
|
|
565
|
+
____exports[____exportKey] = ____exportValue
|
|
566
|
+
end
|
|
567
|
+
end
|
|
568
|
+
end
|
|
537
569
|
do
|
|
538
570
|
local ____export = require("types.PocketItemType")
|
|
539
571
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____lualib = require("lualib_bundle")
|
|
3
|
+
local Map = ____lualib.Map
|
|
4
|
+
local __TS__New = ____lualib.__TS__New
|
|
5
|
+
local ____exports = {}
|
|
6
|
+
local ____PillEffectClass = require("types.PillEffectClass")
|
|
7
|
+
local PillEffectClass = ____PillEffectClass.PillEffectClass
|
|
8
|
+
____exports.PILL_EFFECT_CLASS_MAP = __TS__New(Map, {
|
|
9
|
+
{PillEffect.PILLEFFECT_BAD_GAS, PillEffectClass.MINOR},
|
|
10
|
+
{PillEffect.PILLEFFECT_BAD_TRIP, PillEffectClass.MEDIUM},
|
|
11
|
+
{PillEffect.PILLEFFECT_BALLS_OF_STEEL, PillEffectClass.MEDIUM},
|
|
12
|
+
{PillEffect.PILLEFFECT_BOMBS_ARE_KEYS, PillEffectClass.MEDIUM},
|
|
13
|
+
{PillEffect.PILLEFFECT_EXPLOSIVE_DIARRHEA, PillEffectClass.MINOR},
|
|
14
|
+
{PillEffect.PILLEFFECT_FULL_HEALTH, PillEffectClass.MEDIUM},
|
|
15
|
+
{PillEffect.PILLEFFECT_HEALTH_DOWN, PillEffectClass.MAJOR},
|
|
16
|
+
{PillEffect.PILLEFFECT_HEALTH_UP, PillEffectClass.MAJOR},
|
|
17
|
+
{PillEffect.PILLEFFECT_I_FOUND_PILLS, PillEffectClass.JOKE},
|
|
18
|
+
{PillEffect.PILLEFFECT_PUBERTY, PillEffectClass.JOKE},
|
|
19
|
+
{PillEffect.PILLEFFECT_PRETTY_FLY, PillEffectClass.MEDIUM},
|
|
20
|
+
{PillEffect.PILLEFFECT_RANGE_DOWN, PillEffectClass.MAJOR},
|
|
21
|
+
{PillEffect.PILLEFFECT_RANGE_UP, PillEffectClass.MAJOR},
|
|
22
|
+
{PillEffect.PILLEFFECT_SPEED_DOWN, PillEffectClass.MAJOR},
|
|
23
|
+
{PillEffect.PILLEFFECT_SPEED_UP, PillEffectClass.MAJOR},
|
|
24
|
+
{PillEffect.PILLEFFECT_TEARS_DOWN, PillEffectClass.MAJOR},
|
|
25
|
+
{PillEffect.PILLEFFECT_TEARS_UP, PillEffectClass.MAJOR},
|
|
26
|
+
{PillEffect.PILLEFFECT_LUCK_DOWN, PillEffectClass.MAJOR},
|
|
27
|
+
{PillEffect.PILLEFFECT_LUCK_UP, PillEffectClass.MAJOR},
|
|
28
|
+
{PillEffect.PILLEFFECT_TELEPILLS, PillEffectClass.MAJOR},
|
|
29
|
+
{PillEffect.PILLEFFECT_48HOUR_ENERGY, PillEffectClass.MEDIUM},
|
|
30
|
+
{PillEffect.PILLEFFECT_HEMATEMESIS, PillEffectClass.MEDIUM},
|
|
31
|
+
{PillEffect.PILLEFFECT_PARALYSIS, PillEffectClass.MINOR},
|
|
32
|
+
{PillEffect.PILLEFFECT_SEE_FOREVER, PillEffectClass.MEDIUM},
|
|
33
|
+
{PillEffect.PILLEFFECT_PHEROMONES, PillEffectClass.MINOR},
|
|
34
|
+
{PillEffect.PILLEFFECT_AMNESIA, PillEffectClass.MEDIUM},
|
|
35
|
+
{PillEffect.PILLEFFECT_LEMON_PARTY, PillEffectClass.MINOR},
|
|
36
|
+
{PillEffect.PILLEFFECT_WIZARD, PillEffectClass.MINOR},
|
|
37
|
+
{PillEffect.PILLEFFECT_PERCS, PillEffectClass.MINOR},
|
|
38
|
+
{PillEffect.PILLEFFECT_ADDICTED, PillEffectClass.MINOR},
|
|
39
|
+
{PillEffect.PILLEFFECT_RELAX, PillEffectClass.JOKE},
|
|
40
|
+
{PillEffect.PILLEFFECT_QUESTIONMARK, PillEffectClass.MINOR},
|
|
41
|
+
{PillEffect.PILLEFFECT_LARGER, PillEffectClass.MINOR},
|
|
42
|
+
{PillEffect.PILLEFFECT_SMALLER, PillEffectClass.MINOR},
|
|
43
|
+
{PillEffect.PILLEFFECT_INFESTED_EXCLAMATION, PillEffectClass.MINOR},
|
|
44
|
+
{PillEffect.PILLEFFECT_INFESTED_QUESTION, PillEffectClass.MINOR},
|
|
45
|
+
{PillEffect.PILLEFFECT_POWER, PillEffectClass.MINOR},
|
|
46
|
+
{PillEffect.PILLEFFECT_RETRO_VISION, PillEffectClass.MINOR},
|
|
47
|
+
{PillEffect.PILLEFFECT_FRIENDS_TILL_THE_END, PillEffectClass.MINOR},
|
|
48
|
+
{PillEffect.PILLEFFECT_X_LAX, PillEffectClass.MINOR},
|
|
49
|
+
{PillEffect.PILLEFFECT_SOMETHINGS_WRONG, PillEffectClass.JOKE},
|
|
50
|
+
{PillEffect.PILLEFFECT_IM_DROWSY, PillEffectClass.MINOR},
|
|
51
|
+
{PillEffect.PILLEFFECT_IM_EXCITED, PillEffectClass.MINOR},
|
|
52
|
+
{PillEffect.PILLEFFECT_GULP, PillEffectClass.MEDIUM},
|
|
53
|
+
{PillEffect.PILLEFFECT_HORF, PillEffectClass.JOKE},
|
|
54
|
+
{PillEffect.PILLEFFECT_SUNSHINE, PillEffectClass.MINOR},
|
|
55
|
+
{PillEffect.PILLEFFECT_VURP, PillEffectClass.MEDIUM},
|
|
56
|
+
{PillEffect.PILLEFFECT_SHOT_SPEED_DOWN, PillEffectClass.MAJOR},
|
|
57
|
+
{PillEffect.PILLEFFECT_SHOT_SPEED_UP, PillEffectClass.MAJOR},
|
|
58
|
+
{PillEffect.PILLEFFECT_EXPERIMENTAL, PillEffectClass.MAJOR}
|
|
59
|
+
})
|
|
60
|
+
return ____exports
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____lualib = require("lualib_bundle")
|
|
3
|
+
local Map = ____lualib.Map
|
|
4
|
+
local __TS__New = ____lualib.__TS__New
|
|
5
|
+
local ____exports = {}
|
|
6
|
+
local ____PillEffectType = require("types.PillEffectType")
|
|
7
|
+
local PillEffectType = ____PillEffectType.PillEffectType
|
|
8
|
+
____exports.PILL_EFFECT_TYPE_MAP = __TS__New(Map, {
|
|
9
|
+
{PillEffect.PILLEFFECT_BAD_GAS, PillEffectType.POSITIVE},
|
|
10
|
+
{PillEffect.PILLEFFECT_BAD_TRIP, PillEffectType.NEGATIVE},
|
|
11
|
+
{PillEffect.PILLEFFECT_BALLS_OF_STEEL, PillEffectType.POSITIVE},
|
|
12
|
+
{PillEffect.PILLEFFECT_BOMBS_ARE_KEYS, PillEffectType.NEUTRAL},
|
|
13
|
+
{PillEffect.PILLEFFECT_EXPLOSIVE_DIARRHEA, PillEffectType.NEUTRAL},
|
|
14
|
+
{PillEffect.PILLEFFECT_FULL_HEALTH, PillEffectType.POSITIVE},
|
|
15
|
+
{PillEffect.PILLEFFECT_HEALTH_DOWN, PillEffectType.NEGATIVE},
|
|
16
|
+
{PillEffect.PILLEFFECT_HEALTH_UP, PillEffectType.POSITIVE},
|
|
17
|
+
{PillEffect.PILLEFFECT_I_FOUND_PILLS, PillEffectType.NEUTRAL},
|
|
18
|
+
{PillEffect.PILLEFFECT_PUBERTY, PillEffectType.NEUTRAL},
|
|
19
|
+
{PillEffect.PILLEFFECT_PRETTY_FLY, PillEffectType.POSITIVE},
|
|
20
|
+
{PillEffect.PILLEFFECT_RANGE_DOWN, PillEffectType.NEGATIVE},
|
|
21
|
+
{PillEffect.PILLEFFECT_RANGE_UP, PillEffectType.POSITIVE},
|
|
22
|
+
{PillEffect.PILLEFFECT_SPEED_DOWN, PillEffectType.NEGATIVE},
|
|
23
|
+
{PillEffect.PILLEFFECT_SPEED_UP, PillEffectType.POSITIVE},
|
|
24
|
+
{PillEffect.PILLEFFECT_TEARS_DOWN, PillEffectType.NEGATIVE},
|
|
25
|
+
{PillEffect.PILLEFFECT_TEARS_UP, PillEffectType.POSITIVE},
|
|
26
|
+
{PillEffect.PILLEFFECT_LUCK_DOWN, PillEffectType.NEGATIVE},
|
|
27
|
+
{PillEffect.PILLEFFECT_LUCK_UP, PillEffectType.POSITIVE},
|
|
28
|
+
{PillEffect.PILLEFFECT_TELEPILLS, PillEffectType.NEUTRAL},
|
|
29
|
+
{PillEffect.PILLEFFECT_48HOUR_ENERGY, PillEffectType.POSITIVE},
|
|
30
|
+
{PillEffect.PILLEFFECT_HEMATEMESIS, PillEffectType.NEUTRAL},
|
|
31
|
+
{PillEffect.PILLEFFECT_PARALYSIS, PillEffectType.NEGATIVE},
|
|
32
|
+
{PillEffect.PILLEFFECT_SEE_FOREVER, PillEffectType.POSITIVE},
|
|
33
|
+
{PillEffect.PILLEFFECT_PHEROMONES, PillEffectType.POSITIVE},
|
|
34
|
+
{PillEffect.PILLEFFECT_AMNESIA, PillEffectType.NEGATIVE},
|
|
35
|
+
{PillEffect.PILLEFFECT_LEMON_PARTY, PillEffectType.POSITIVE},
|
|
36
|
+
{PillEffect.PILLEFFECT_WIZARD, PillEffectType.NEGATIVE},
|
|
37
|
+
{PillEffect.PILLEFFECT_PERCS, PillEffectType.POSITIVE},
|
|
38
|
+
{PillEffect.PILLEFFECT_ADDICTED, PillEffectType.NEGATIVE},
|
|
39
|
+
{PillEffect.PILLEFFECT_RELAX, PillEffectType.NEUTRAL},
|
|
40
|
+
{PillEffect.PILLEFFECT_QUESTIONMARK, PillEffectType.NEGATIVE},
|
|
41
|
+
{PillEffect.PILLEFFECT_LARGER, PillEffectType.NEUTRAL},
|
|
42
|
+
{PillEffect.PILLEFFECT_SMALLER, PillEffectType.NEUTRAL},
|
|
43
|
+
{PillEffect.PILLEFFECT_INFESTED_EXCLAMATION, PillEffectType.POSITIVE},
|
|
44
|
+
{PillEffect.PILLEFFECT_INFESTED_QUESTION, PillEffectType.POSITIVE},
|
|
45
|
+
{PillEffect.PILLEFFECT_POWER, PillEffectType.POSITIVE},
|
|
46
|
+
{PillEffect.PILLEFFECT_RETRO_VISION, PillEffectType.NEGATIVE},
|
|
47
|
+
{PillEffect.PILLEFFECT_FRIENDS_TILL_THE_END, PillEffectType.POSITIVE},
|
|
48
|
+
{PillEffect.PILLEFFECT_X_LAX, PillEffectType.NEGATIVE},
|
|
49
|
+
{PillEffect.PILLEFFECT_SOMETHINGS_WRONG, PillEffectType.POSITIVE},
|
|
50
|
+
{PillEffect.PILLEFFECT_IM_DROWSY, PillEffectType.NEUTRAL},
|
|
51
|
+
{PillEffect.PILLEFFECT_IM_EXCITED, PillEffectType.NEUTRAL},
|
|
52
|
+
{PillEffect.PILLEFFECT_GULP, PillEffectType.POSITIVE},
|
|
53
|
+
{PillEffect.PILLEFFECT_HORF, PillEffectType.NEUTRAL},
|
|
54
|
+
{PillEffect.PILLEFFECT_SUNSHINE, PillEffectType.POSITIVE},
|
|
55
|
+
{PillEffect.PILLEFFECT_VURP, PillEffectType.POSITIVE},
|
|
56
|
+
{PillEffect.PILLEFFECT_SHOT_SPEED_DOWN, PillEffectType.NEGATIVE},
|
|
57
|
+
{PillEffect.PILLEFFECT_SHOT_SPEED_UP, PillEffectType.POSITIVE},
|
|
58
|
+
{PillEffect.PILLEFFECT_EXPERIMENTAL, PillEffectType.NEUTRAL}
|
|
59
|
+
})
|
|
60
|
+
return ____exports
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
____exports.PillEffectClass = PillEffectClass or ({})
|
|
4
|
+
____exports.PillEffectClass.JOKE = 0
|
|
5
|
+
____exports.PillEffectClass[____exports.PillEffectClass.JOKE] = "JOKE"
|
|
6
|
+
____exports.PillEffectClass.MINOR = 1
|
|
7
|
+
____exports.PillEffectClass[____exports.PillEffectClass.MINOR] = "MINOR"
|
|
8
|
+
____exports.PillEffectClass.MEDIUM = 2
|
|
9
|
+
____exports.PillEffectClass[____exports.PillEffectClass.MEDIUM] = "MEDIUM"
|
|
10
|
+
____exports.PillEffectClass.MAJOR = 3
|
|
11
|
+
____exports.PillEffectClass[____exports.PillEffectClass.MAJOR] = "MAJOR"
|
|
12
|
+
return ____exports
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Equal to the suffix of the "class" tag in the "pocketitems.xml" file. "+" is equal to `POSITIVE`,
|
|
3
|
+
* "-" is equal to `NEGATIVE`, and no suffix is equal to `NEUTRAL`.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum PillEffectType {
|
|
6
|
+
POSITIVE = 0,
|
|
7
|
+
NEGATIVE = 1,
|
|
8
|
+
NEUTRAL = 2
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
____exports.PillEffectType = PillEffectType or ({})
|
|
4
|
+
____exports.PillEffectType.POSITIVE = 0
|
|
5
|
+
____exports.PillEffectType[____exports.PillEffectType.POSITIVE] = "POSITIVE"
|
|
6
|
+
____exports.PillEffectType.NEGATIVE = 1
|
|
7
|
+
____exports.PillEffectType[____exports.PillEffectType.NEGATIVE] = "NEGATIVE"
|
|
8
|
+
____exports.PillEffectType.NEUTRAL = 2
|
|
9
|
+
____exports.PillEffectType[____exports.PillEffectType.NEUTRAL] = "NEUTRAL"
|
|
10
|
+
return ____exports
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.15",
|
|
4
4
|
"description": "Helper functions for IsaacScript mods",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@zamiell/typescript-to-lua": "^1.4.0",
|
|
29
|
-
"isaac-typescript-definitions": "^1.0.
|
|
29
|
+
"isaac-typescript-definitions": "^1.0.337",
|
|
30
30
|
"isaacscript-lint": "^1.0.79",
|
|
31
31
|
"isaacscript-tsconfig": "^1.1.8",
|
|
32
32
|
"typedoc": "^0.22.11",
|