Add Book of Belial modifier for Judas' Birthright
This commit is contained in:
1 parent
579e3e258b
commit
19a060f7b0
2 files changed
+65
No files matched your search
@@ -50,6 +50,34 @@ local game = Game()
|
||||
return descObj
|
||||
end
|
||||
EID:addDescriptionModifier("Bingeeater", BingeeaterCondition, BingeeaterCallback)
|
||||
|
||||
|
||||
|
||||
-- Handle Book of Belial description for Judas' Birthright addition
|
||||
local function BookofBelialCondition(descObj)
|
||||
if descObj.ObjType ~= 5 or descObj.ObjVariant ~= PickupVariant.PICKUP_COLLECTIBLE then
|
||||
return false
|
||||
end
|
||||
for i = 0,game:GetNumPlayers() - 1 do
|
||||
local player = Isaac.GetPlayer(i)
|
||||
local playerType = player:GetPlayerType()
|
||||
|
||||
if (playerType == PlayerType.PLAYER_JUDAS or playerType == PlayerType.PLAYER_BLACKJUDAS) and player:HasCollectible(CollectibleType.COLLECTIBLE_BIRTHRIGHT) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local function BookofBelialCallback(descObj)
|
||||
local belialBuff = EID:getDescriptionEntry("bookOfBelialBuffs", descObj.ObjSubType)
|
||||
if belialBuff ~= nil then
|
||||
local iconStr = "#{{Collectible34}} "
|
||||
EID:appendToDescription(descObj, iconStr..belialBuff[3]:gsub("#",iconStr))
|
||||
end
|
||||
return descObj
|
||||
end
|
||||
EID:addDescriptionModifier("BookofBelial", BookofBelialCondition, BookofBelialCallback)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user