isaacscript-common 1.2.134 → 1.2.135
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.
|
@@ -3,6 +3,8 @@ local ____exports = {}
|
|
|
3
3
|
local hasSubscriptions, postRender, postPEffectUpdateReordered, checkWaitingForItemAnimation, postPlayerFatalDamage, preBerserkDeath, playerIsAboutToDie, CustomReviveState, v
|
|
4
4
|
local ____cachedClasses = require("cachedClasses")
|
|
5
5
|
local sfxManager = ____cachedClasses.sfxManager
|
|
6
|
+
local ____runInNFrames = require("features.runInNFrames")
|
|
7
|
+
local runNextGameFrame = ____runInNFrames.runNextGameFrame
|
|
6
8
|
local ____exports = require("features.saveDataManager.exports")
|
|
7
9
|
local saveDataManager = ____exports.saveDataManager
|
|
8
10
|
local ____collectibles = require("functions.collectibles")
|
|
@@ -10,6 +12,7 @@ local removeCollectibleFromItemTracker = ____collectibles.removeCollectibleFromI
|
|
|
10
12
|
local ____familiars = require("functions.familiars")
|
|
11
13
|
local removeAllFamiliars = ____familiars.removeAllFamiliars
|
|
12
14
|
local ____player = require("functions.player")
|
|
15
|
+
local getPlayerFromIndex = ____player.getPlayerFromIndex
|
|
13
16
|
local getPlayerIndex = ____player.getPlayerIndex
|
|
14
17
|
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
15
18
|
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
@@ -83,6 +86,26 @@ function playerIsAboutToDie(self, player)
|
|
|
83
86
|
player:AddCollectible(CollectibleType.COLLECTIBLE_1UP, 0, false)
|
|
84
87
|
removeAllFamiliars(nil, FamiliarVariant.ONE_UP)
|
|
85
88
|
removeCollectibleFromItemTracker(nil, CollectibleType.COLLECTIBLE_1UP)
|
|
89
|
+
local character = player:GetPlayerType()
|
|
90
|
+
if character ~= PlayerType.PLAYER_SAMSON_B then
|
|
91
|
+
return
|
|
92
|
+
end
|
|
93
|
+
local playerIndex = getPlayerIndex(nil, player)
|
|
94
|
+
runNextGameFrame(
|
|
95
|
+
nil,
|
|
96
|
+
function()
|
|
97
|
+
local taintedSamson = getPlayerFromIndex(nil, playerIndex)
|
|
98
|
+
if taintedSamson == nil then
|
|
99
|
+
return
|
|
100
|
+
end
|
|
101
|
+
local effects = player:GetEffects()
|
|
102
|
+
local isBerserk = effects:HasCollectibleEffect(CollectibleType.COLLECTIBLE_BERSERK)
|
|
103
|
+
if not isBerserk then
|
|
104
|
+
return
|
|
105
|
+
end
|
|
106
|
+
effects:RemoveCollectibleEffect(CollectibleType.COLLECTIBLE_BERSERK, -1)
|
|
107
|
+
end
|
|
108
|
+
)
|
|
86
109
|
end
|
|
87
110
|
CustomReviveState = CustomReviveState or ({})
|
|
88
111
|
CustomReviveState.DISABLED = 0
|
|
@@ -17,7 +17,7 @@ export declare function anyPlayerIs(...matchingCharacters: Array<PlayerType | in
|
|
|
17
17
|
/**
|
|
18
18
|
* Helper function to determine if a player will destroy a rock/pot/skull/etc. if they walk over it.
|
|
19
19
|
*
|
|
20
|
-
* The following
|
|
20
|
+
* The following situations allow for this to be true:
|
|
21
21
|
* - the player has Leo (collectible 302)
|
|
22
22
|
* - the player has Thunder Thighs (collectible 314)
|
|
23
23
|
* - the player is under the effects of Mega Mush (collectible 625)
|