From 6e7ef1a6618944cbfdb53e54c163e9bf483c417a Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 17 Dec 2021 00:30:20 -0500 Subject: [PATCH 01/14] fix fixed recipes pickup order --- eid_xmldata.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eid_xmldata.lua b/eid_xmldata.lua index a2d8b4b5..d71bcb65 100644 --- a/eid_xmldata.lua +++ b/eid_xmldata.lua @@ -3,7 +3,7 @@ --The highest item ID found EID.XMLMaxItemID = 732 --The fixed recipes, for use in Bag of Crafting -EID.XMLRecipes = {["29,29,29,29,29,29,29,29"] = 36, ["8,8,8,8,8,8,8,8"] = 177, ["1,1,1,1,1,1,1,1"] = 45, ["2,2,2,2,2,2,2,2"] = 686, ["3,3,3,3,3,3,3,3"] = 118, ["12,12,12,12,12,12,12,12"] = 343, ["15,15,15,15,15,15,15,15"] = 37, ["21,21,21,21,21,21,21,21"] = 85, ["5,2,1,4,4,4,4,4"] = 331, ["4,4,4,4,4,4,4,4"] = 182, ["22,22,22,22,22,22,22,22"] = 75, ["3,22,22,22,22,22,22,22"] = 654, ["7,7,1,1,1,1,1,1"] = 639, ["13,13,12,12,12,12,12,12"] = 175, ["17,17,17,17,17,17,17,17"] = 483, ["16,16,15,15,15,15,15,15"] = 483, ["6,6,6,6,6,6,6,6"] = 628, ["24,24,24,24,24,24,24,24"] = 489, ["25,25,25,25,25,25,25,25"] = 580, } +EID.XMLRecipes = {["29,29,29,29,29,29,29,29"] = 36, ["8,8,8,8,8,8,8,8"] = 177, ["1,1,1,1,1,1,1,1"] = 45, ["2,2,2,2,2,2,2,2"] = 686, ["3,3,3,3,3,3,3,3"] = 118, ["12,12,12,12,12,12,12,12"] = 343, ["15,15,15,15,15,15,15,15"] = 37, ["21,21,21,21,21,21,21,21"] = 85, ["1,2,4,4,4,4,4,5"] = 331, ["4,4,4,4,4,4,4,4"] = 182, ["22,22,22,22,22,22,22,22"] = 75, ["3,22,22,22,22,22,22,22"] = 654, ["1,1,1,1,1,1,7,7"] = 639, ["12,12,12,12,12,12,13,13"] = 175, ["17,17,17,17,17,17,17,17"] = 483, ["15,15,15,15,15,15,16,16"] = 483, ["6,6,6,6,6,6,6,6"] = 628, ["24,24,24,24,24,24,24,24"] = 489, ["25,25,25,25,25,25,25,25"] = 580, } --The contents of each item pool, and the item's weight, for use in Bag of Crafting EID.XMLItemPools = {{{1, 1.0}, {2, 1.0}, {3, 1.0}, {4, 1.0}, {5, 1.0}, {6, 1.0}, {7, 1.0}, {8, 1.0}, {10, 1.0}, {12, 0.5}, {13, 1.0}, {14, 1.0}, {15, 1.0}, {17, 0.1}, {19, 1.0}, {36, 1.0}, {37, 1.0}, {38, 1.0}, {39, 1.0}, {40, 1.0}, {41, 1.0}, {42, 1.0}, {44, 1.0}, {45, 1.0}, {46, 1.0}, {47, 1.0}, {48, 1.0}, {49, 1.0}, {52, 1.0}, {53, 1.0}, {55, 1.0}, {56, 1.0}, {57, 1.0}, {58, 1.0}, {62, 1.0}, {65, 1.0}, {66, 1.0}, {67, 1.0}, {68, 1.0}, {69, 1.0}, {71, 1.0}, {72, 1.0}, {75, 1.0}, {76, 1.0}, {77, 1.0}, {78, 1.0}, {85, 1.0}, {86, 1.0}, {87, 1.0}, {88, 1.0}, {89, 1.0}, {91, 1.0}, {92, 1.0}, {93, 1.0}, {94, 1.0}, {95, 1.0}, {96, 1.0}, {97, 1.0}, {98, 0.2}, {99, 1.0}, {100, 1.0}, {101, 0.5}, {102, 1.0}, {103, 1.0}, {104, 1.0}, {105, 1.0}, {106, 1.0}, {107, 1.0}, {108, 1.0}, {109, 1.0}, {110, 1.0}, {111, 1.0}, {113, 1.0}, {114, 0.2}, {115, 1.0}, {117, 1.0}, {120, 1.0}, {121, 1.0}, {123, 1.0}, {124, 1.0}, {125, 1.0}, {127, 1.0}, {128, 1.0}, {129, 1.0}, {131, 1.0}, {136, 1.0}, {137, 1.0}, {138, 1.0}, {140, 1.0}, {142, 1.0}, {143, 1.0}, {144, 1.0}, {146, 1.0}, {148, 1.0}, {149, 1.0}, {150, 1.0}, {151, 1.0}, {152, 1.0}, {153, 1.0}, {154, 1.0}, {155, 1.0}, {157, 1.0}, {160, 1.0}, {161, 1.0}, {162, 1.0}, {163, 1.0}, {166, 1.0}, {167, 1.0}, {169, 1.0}, {170, 1.0}, {171, 1.0}, {172, 1.0}, {173, 1.0}, {174, 1.0}, {175, 1.0}, {176, 1.0}, {178, 1.0}, {180, 1.0}, {186, 1.0}, {188, 1.0}, {189, 1.0}, {190, 0.1}, {191, 1.0}, {192, 1.0}, {200, 1.0}, {201, 1.0}, {202, 1.0}, {206, 1.0}, {209, 1.0}, {210, 1.0}, {211, 1.0}, {213, 1.0}, {214, 1.0}, {217, 1.0}, {220, 1.0}, {221, 1.0}, {222, 1.0}, {223, 0.5}, {224, 1.0}, {225, 1.0}, {227, 1.0}, {228, 1.0}, {229, 1.0}, {231, 1.0}, {233, 1.0}, {234, 1.0}, {236, 1.0}, {237, 0.2}, {240, 1.0}, {242, 1.0}, {244, 1.0}, {245, 1.0}, {256, 1.0}, {257, 1.0}, {261, 1.0}, {264, 1.0}, {265, 1.0}, {266, 1.0}, {267, 1.0}, {268, 1.0}, {269, 1.0}, {270, 1.0}, {271, 1.0}, {272, 1.0}, {273, 1.0}, {274, 1.0}, {275, 1.0}, {276, 1.0}, {277, 1.0}, {278, 1.0}, {279, 1.0}, {280, 1.0}, {281, 1.0}, {282, 1.0}, {283, 1.0}, {284, 1.0}, {285, 1.0}, {287, 1.0}, {288, 1.0}, {291, 1.0}, {292, 1.0}, {294, 1.0}, {295, 1.0}, {298, 1.0}, {299, 1.0}, {300, 1.0}, {301, 1.0}, {302, 1.0}, {303, 1.0}, {304, 1.0}, {305, 1.0}, {306, 1.0}, {307, 1.0}, {308, 1.0}, {309, 1.0}, {310, 1.0}, {312, 1.0}, {313, 0.2}, {314, 1.0}, {315, 1.0}, {316, 1.0}, {317, 1.0}, {318, 1.0}, {319, 1.0}, {320, 1.0}, {321, 1.0}, {322, 1.0}, {323, 1.0}, {324, 1.0}, {325, 1.0}, {329, 1.0}, {330, 1.0}, {332, 1.0}, {333, 0.2}, {334, 0.2}, {335, 0.2}, {336, 1.0}, {350, 1.0}, {351, 1.0}, {352, 1.0}, {353, 1.0}, {358, 1.0}, {359, 1.0}, {361, 1.0}, {362, 1.0}, {364, 1.0}, {365, 1.0}, {366, 1.0}, {367, 1.0}, {368, 1.0}, {369, 1.0}, {371, 1.0}, {373, 1.0}, {374, 0.2}, {375, 1.0}, {377, 1.0}, {378, 1.0}, {379, 1.0}, {381, 1.0}, {382, 1.0}, {384, 1.0}, {385, 1.0}, {386, 1.0}, {388, 1.0}, {389, 1.0}, {390, 1.0}, {391, 1.0}, {392, 1.0}, {393, 1.0}, {394, 1.0}, {395, 1.0}, {397, 1.0}, {398, 1.0}, {401, 1.0}, {404, 1.0}, {405, 1.0}, {406, 1.0}, {407, 1.0}, {410, 1.0}, {411, 1.0}, {418, 1.0}, {419, 1.0}, {421, 1.0}, {422, 1.0}, {426, 1.0}, {427, 1.0}, {430, 1.0}, {431, 1.0}, {432, 1.0}, {435, 1.0}, {436, 1.0}, {437, 1.0}, {440, 1.0}, {443, 1.0}, {444, 1.0}, {445, 1.0}, {446, 1.0}, {447, 1.0}, {448, 1.0}, {449, 1.0}, {452, 1.0}, {453, 1.0}, {454, 1.0}, {457, 1.0}, {458, 1.0}, {459, 1.0}, {460, 1.0}, {461, 1.0}, {463, 1.0}, {465, 1.0}, {466, 1.0}, {467, 1.0}, {469, 1.0}, {470, 1.0}, {471, 1.0}, {473, 1.0}, {476, 1.0}, {478, 1.0}, {481, 1.0}, {482, 1.0}, {485, 1.0}, {488, 1.0}, {491, 1.0}, {492, 1.0}, {493, 1.0}, {494, 1.0}, {495, 1.0}, {496, 1.0}, {497, 1.0}, {502, 1.0}, {504, 1.0}, {506, 1.0}, {507, 1.0}, {508, 1.0}, {509, 1.0}, {511, 1.0}, {512, 1.0}, {513, 1.0}, {516, 1.0}, {517, 1.0}, {522, 1.0}, {524, 1.0}, {525, 1.0}, {529, 1.0}, {531, 1.0}, {532, 1.0}, {537, 1.0}, {539, 1.0}, {540, 1.0}, {542, 1.0}, {543, 1.0}, {544, 1.0}, {545, 1.0}, {548, 1.0}, {549, 1.0}, {553, 1.0}, {555, 1.0}, {557, 1.0}, {558, 1.0}, {559, 1.0}, {560, 1.0}, {561, 1.0}, {563, 1.0}, {565, 1.0}, {570, 1.0}, {575, 1.0}, {576, 1.0}, {578, 1.0}, {581, 1.0}, {583, 1.0}, {605, 1.0}, {607, 1.0}, {608, 1.0}, {609, 0.5}, {610, 1.0}, {611, 1.0}, {612, 1.0}, {614, 1.0}, {615, 1.0}, {616, 1.0}, {617, 1.0}, {618, 1.0}, {625, 0.1}, {629, 1.0}, {631, 1.0}, {635, 1.0}, {637, 1.0}, {639, 1.0}, {641, 1.0}, {645, 1.0}, {649, 1.0}, {650, 0.5}, {652, 1.0}, {655, 1.0}, {657, 1.0}, {658, 1.0}, {661, 1.0}, {663, 1.0}, {671, 1.0}, {675, 1.0}, {676, 1.0}, {677, 0.2}, {678, 1.0}, {680, 1.0}, {681, 1.0}, {682, 1.0}, {683, 1.0}, {687, 1.0}, {690, 1.0}, {693, 1.0}, {695, 1.0}, {703, 0.5}, {709, 1.0}, {710, 1.0}, {713, 1.0}, {717, 1.0}, {720, 1.0}, {722, 1.0}, {723, 0.1}, {724, 1.0}, {725, 1.0}, {726, 1.0}, {727, 1.0}, {728, 0.5}, {729, 1.0}}, -- treasure From 10ce89cd7fb1b3f96713bcf8fc70abc814a58afa Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 17 Dec 2021 00:31:08 -0500 Subject: [PATCH 02/14] Fix 1-frame obstruction flaws for real this time --- main.lua | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/main.lua b/main.lua index a5133500..2693b7e0 100644 --- a/main.lua +++ b/main.lua @@ -563,6 +563,7 @@ EID.lastDescriptionEntity = nil EID.lastDist = 0 EID.pathCheckerEntity = nil EID.hasValidWalkingpath = true +EID.pathfindingTo = nil function EID:onGameUpdate() EID:setPlayer() @@ -573,7 +574,7 @@ function EID:onGameUpdate() local pos = entity.Position for _, otherPos in ipairs(curPositions) do if pos:Distance(otherPos[2]) == 0 then - entity.Position = entity.Position + Vector(1,0) + --entity.Position = entity.Position + Vector(1,0) entity:GetData()["EID_RenderOffset"] = Vector(10,0) otherPos[1]:GetData()["EID_RenderOffset"] = Vector(-10,0) end @@ -598,6 +599,7 @@ function EID:onGameUpdate() EID.pathCheckerEntity = nil EID.hasValidWalkingpath = true end + EID.pathfindingTo = EID.lastDescriptionEntity return end if EID.pathCheckerEntity == nil then @@ -609,16 +611,24 @@ function EID:onGameUpdate() EID.hasValidWalkingpath = false elseif not EID.pathCheckerEntity:Exists() then EID.pathCheckerEntity = nil - EID.hasValidWalkingpath = false else EID.pathCheckerEntity.Position = EID.player.Position EID.hasValidWalkingpath = EID.pathCheckerEntity:ToNPC().Pathfinder:HasPathToPos ( EID.lastDescriptionEntity.Position, false ) + EID.pathfindingTo = EID.lastDescriptionEntity end end end EID:AddCallback(ModCallbacks.MC_POST_UPDATE, EID.onGameUpdate) +-- this can be called when moving between two different pickups +function EID:updatePathfinding() + if not EID.pathCheckerEntity or not EID.lastDescriptionEntity then return end + EID.pathCheckerEntity.Position = EID.player.Position + EID.hasValidWalkingpath = EID.pathCheckerEntity:ToNPC().Pathfinder:HasPathToPos ( EID.lastDescriptionEntity.Position, false ) + EID.pathfindingTo = EID.lastDescriptionEntity +end + local hasShownAchievementWarning = false local function renderAchievementInfo() @@ -815,6 +825,8 @@ local function onRender(t) end end + if EID.pathfindingTo and EID.pathfindingTo.Index ~= closest.Index then EID:updatePathfinding() end + if closest.Variant == PickupVariant.PICKUP_TRINKET then --Handle Trinkets local trinketID = closest.SubType @@ -833,7 +845,8 @@ local function onRender(t) EID:printDescription(descriptionObj) elseif closest.Variant == PickupVariant.PICKUP_TAROTCARD then --Handle Cards & Runes - if ( not EID.Config["DisplayObstructedCardInfo"] or not EID.Config["DisplayObstructedSoulstoneInfo"]) and closest.FrameCount < 3 then + if (not EID.Config["DisplayObstructedCardInfo"] or not EID.Config["DisplayObstructedSoulstoneInfo"]) and + (closest.FrameCount < 3 or EID.pathfindingTo == nil) then -- small delay when having obstruction enabled & entering the room to prevent spoilers return end @@ -851,13 +864,16 @@ local function onRender(t) EID:printDescription(descriptionObj) elseif closest.Variant == PickupVariant.PICKUP_PILL then --Handle Pills - if not EID.Config["DisplayObstructedPillInfo"] and closest.FrameCount < 3 then + if not EID.Config["DisplayObstructedPillInfo"] and + (closest.FrameCount < 3 or EID.pathfindingTo == nil) then -- small delay when having obstruction enabled & entering the room to prevent spoilers return end if EID:getEntityData(closest, "EID_DontHide") ~= true then + local hideinShop = closest:ToPickup():IsShopItem() and not EID.Config["DisplayPillInfoShop"] local isOptionsSpawn = REPENTANCE and not EID.Config["DisplayPillInfoOptions?"] and closest:ToPickup().OptionsPickupIndex > 0 - if isOptionsSpawn or (closest:ToPickup():IsShopItem() and not EID.Config["DisplayPillInfoShop"]) or (not EID.Config["DisplayObstructedPillInfo"] and not EID.hasValidWalkingpath) then + local obstructed = not EID.Config["DisplayObstructedPillInfo"] and not EID.hasValidWalkingpath + if isOptionsSpawn or hideinShop or obstructed then EID:renderQuestionMark() return end From 255b759bca1696a5fb3cb192429687776930fb99 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 17 Dec 2021 02:03:23 -0500 Subject: [PATCH 03/14] remove Tape Worm tear height --- eid_data.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eid_data.lua b/eid_data.lua index d1c01d22..5e932172 100644 --- a/eid_data.lua +++ b/eid_data.lua @@ -397,7 +397,7 @@ EID.GoldenTrinketData = { -- Cancer, Lucky Toe (just the Luck Up), Isaac's Fork (heart heal amount), A Missing Page (damage + necronomicon multiplier), Tick (the biggest pain) [39] = 1, [42] = 1, [46] = {findReplace = true}, [48] = {t={2, 80},mults={1.5,2}}, [53] = {fullReplace = true}, -- Maggy's Faith, Rainbow Worm, Tape Worm, Lazy Worm, Louse, Watch Battery (just the charge amount), Exploding Cap, Stud Finder - [55] = 1, [64] = {append = true}, [65] = {t={3,2}}, [66] = 0.5, [70] = 1, [72] = 1, [73] = 10, [74] = {t={0.5}, mult=2}, + [55] = 1, [64] = {append = true}, [65] = 3, [66] = 0.5, [70] = 1, [72] = 1, [73] = 10, [74] = {t={0.5}, mult=2}, -- Error (same as Rainbow Worm), Second Hand (max 2x -> 3x), Black Feather, Blind Rage, Golden Horse Shoe, Karma, Lil Larva [75] = {append = true}, [78] = {t={2}, mult=1.5}, [80] = 0.5, [81] = 2, [82] = {t={15}, mult=2}, [85] = {t={1,1,1}}, [86] = {t={1}, mult=2}, -- NO!, Brown Cap, Cracked Crown, Ouroboros Worm, Broken Syringe, Teardrop Charm, Beth's Faith (possibly tripleable, but max 8 wisps in its ring) From 9b3168c915ed3b71e7721e76035caed651af9fe1 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 17 Dec 2021 02:03:47 -0500 Subject: [PATCH 04/14] remove tear height entirely --- descriptions/rep/en_us.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/descriptions/rep/en_us.lua b/descriptions/rep/en_us.lua index 1172a22d..753cc5bb 100644 --- a/descriptions/rep/en_us.lua +++ b/descriptions/rep/en_us.lua @@ -13,7 +13,7 @@ local repCollectibles={ [2] = {"2", "The Inner Eye", "Triple shot#↓ -49% Fire Rate down"}, [5] = {"5", "My Reflection", "Gives tears a boomerang effect#↑ +1.5 Range up#↑ +60% additional Range up#↑ +0.6 Shot Speed up#"}, -- My Reflection - [6] = {"6", "Number One", "↑ +1.5 Tears up#↓ -1.5 Range down#↓ -20% additional Range down#↓ -75% Tear Height"}, -- Number One + [6] = {"6", "Number One", "↑ +1.5 Tears up#↓ -1.5 Range down#↓ -20% additional Range down"}, -- Number One [12] = {"12", "Magic Mushroom", "↑ +1 Health up#Full health#↑ +0.3 Damage up#↑ +50% Damage Multiplier#↑ +1.5 Range up#↑ +0.3 Speed up#Size up"}, -- Magic Mushroom [13] = {"13", "The Virus", "Poison touch#↑ +0.2 Speed up"}, -- The Virus [14] = {"14", "Roid Rage", "↑ +0.3 Speed up#↑ +1.5 Range up"}, -- Roid Rage @@ -498,7 +498,7 @@ local repTrinkets={ [49] = {"49", "Bloody Penny", "25% chance to drop half a heart when picking up coins"}, -- Bloody Penny [50] = {"50", "Burnt Penny", "25% chance to drop a bomb when picking up coins"}, -- Burnt Penny [51] = {"51", "Flat Penny", "25% chance to drop a key when picking up coins"}, -- Flat Penny - [65] = {"65", "Tape Worm", "↑ +3 Range up#↑ 2x Tear Height"}, -- Tape Worm + [65] = {"65", "Tape Worm", "↑ +3 Range up"}, -- Tape Worm [66] = {"66", "Lazy Worm", "↓ -0.5 Shot Speed down"}, -- Lazy Worm [69] = {"69", "Faded Polaroid", "Camouflages the player randomly#Confuses enemies#Can be used to open the door to the \"Home\" floor"}, -- Faded Polaroid [80] = {"80", "Black Feather", "↑ +0.5 Damage up for each evil item held"}, -- Black Feather From 5ee0e66e85e0b1a452f0f711059db0d586e629e3 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 17 Dec 2021 02:05:19 -0500 Subject: [PATCH 05/14] prevent bag during cantripped --- eid_bagofcrafting.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/eid_bagofcrafting.lua b/eid_bagofcrafting.lua index 649aeb5f..5f7e5472 100644 --- a/eid_bagofcrafting.lua +++ b/eid_bagofcrafting.lua @@ -1,3 +1,4 @@ +local game = Game() local pickupValues = { 0x00000000, -- 0 None -- Hearts @@ -83,7 +84,7 @@ local pickupIDLookup = { local function IsTaintedCain() --no clue how the display works for co-op, as far as I can tell we're only caring about player 1 --this check is necessary for some ingredient tracking now that Bag of Crafting is usable by everyone - return Game():GetPlayer(0):GetPlayerType() == 23 + return game:GetPlayer(0):GetPlayerType() == 23 end local componentShifts = { @@ -694,7 +695,7 @@ local function getFloorItemsString(showPreviews, roomItems) end function EID:handleBagOfCraftingRendering() - local curSeed = Game():GetSeeds():GetStartSeed() + local curSeed = game:GetSeeds():GetStartSeed() --reset our calculated recipes when the game seed changes if (curSeed ~= lastSeedUsed) then calculatedRecipes = {} @@ -726,7 +727,7 @@ function EID:handleBagOfCraftingRendering() end --determine if we should display anything at all, display item preview if applicable, and figure out our room/floor's pickup contents - if EID.isHidden or craftingIsHidden then + if EID.isHidden or craftingIsHidden or game.Challenge == Challenge.CHALLENGE_CANTRIPPED then return elseif EID.Config["BagOfCraftingHideInBattle"] then if Isaac.CountBosses() > 0 or Isaac.CountEnemies() > 0 then @@ -740,7 +741,7 @@ function EID:handleBagOfCraftingRendering() if EID.Config["DisplayBagOfCrafting"] == "hold" and not string.find(EID.player:GetSprite():GetAnimation(), "PickupWalk") then return false end - if Game():GetRoom():GetFrameCount() < 2 then + if game:GetRoom():GetFrameCount() < 2 then return false end @@ -762,7 +763,7 @@ function EID:handleBagOfCraftingRendering() --if we're in Preview Only mode, then we have nothing more to do if (EID.Config["BagOfCraftingDisplayMode"] == "Preview Only") then return false end - local curRoomIndex = Game():GetLevel():GetCurrentRoomDesc().SafeGridIndex + local curRoomIndex = game:GetLevel():GetCurrentRoomDesc().SafeGridIndex local results = {} local roomItems = {} From 00b9346c7f0e2f0ba9a776192957694b824f547d Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 17 Dec 2021 02:22:28 -0500 Subject: [PATCH 06/14] Delete itempools.xml --- content/itempools.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 content/itempools.xml diff --git a/content/itempools.xml b/content/itempools.xml deleted file mode 100644 index cbf83bee..00000000 --- a/content/itempools.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From efca551ec98baa4894528c1c874d1f3dbc68993f Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 17 Dec 2021 02:51:52 -0500 Subject: [PATCH 07/14] revert position change for mega chests --- main.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.lua b/main.lua index 2693b7e0..e44c1cdc 100644 --- a/main.lua +++ b/main.lua @@ -574,7 +574,8 @@ function EID:onGameUpdate() local pos = entity.Position for _, otherPos in ipairs(curPositions) do if pos:Distance(otherPos[2]) == 0 then - --entity.Position = entity.Position + Vector(1,0) + -- adjust the position so Mega Chests can have both descriptions viewable + entity.Position = entity.Position + Vector(1,0) entity:GetData()["EID_RenderOffset"] = Vector(10,0) otherPos[1]:GetData()["EID_RenderOffset"] = Vector(-10,0) end From 68896a939d3b44fc0b9799ae0f4b30c5de0ab67b Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 17 Dec 2021 03:24:14 -0500 Subject: [PATCH 08/14] Use render offset instead of shifting Mega Chest pedestal --- main.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.lua b/main.lua index e44c1cdc..fddfd0ca 100644 --- a/main.lua +++ b/main.lua @@ -574,8 +574,7 @@ function EID:onGameUpdate() local pos = entity.Position for _, otherPos in ipairs(curPositions) do if pos:Distance(otherPos[2]) == 0 then - -- adjust the position so Mega Chests can have both descriptions viewable - entity.Position = entity.Position + Vector(1,0) + --entity.Position = entity.Position + Vector(1,0) entity:GetData()["EID_RenderOffset"] = Vector(10,0) otherPos[1]:GetData()["EID_RenderOffset"] = Vector(-10,0) end @@ -750,6 +749,10 @@ local function onRender(t) for i, entity in ipairs(entitySearch) do if EID:hasDescription(entity) and entity.FrameCount > 0 then local diff = entity.Position:__sub(sourcePos) + -- break ties with the render offset (for Mega Chest double collectibles) + if diff:Length() == EID.lastDist and entity:GetData()["EID_RenderOffset"] then + diff = diff + entity:GetData()["EID_RenderOffset"] + end if diff:Length() < EID.lastDist then EID.lastDescriptionEntity = entity EID.lastDist = diff:Length() From cbc31b8ea8e49d5ed136120b15224fd92c819951 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 17 Dec 2021 12:52:45 -0500 Subject: [PATCH 09/14] fix Tainted Forgotten pill effects --- eid_api.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eid_api.lua b/eid_api.lua index 4a0b5c5c..edad0989 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -375,7 +375,9 @@ function EID:getAdjustedSubtype(Type, Variant, SubType) return 9999 end local pool = game:GetItemPool() - SubType = pool:GetPillEffect(SubType, EID.player) + 1 + if REPENTANCE and EID.player.SubType == PlayerType.PLAYER_THESOUL_B then + SubType = pool:GetPillEffect(SubType, EID.player:GetOtherTwin()) + 1 + else SubType = pool:GetPillEffect(SubType, EID.player) + 1 end end return SubType end From cf99778d5fc747ca4c37c6264052adce047badf8 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 17 Dec 2021 13:56:44 -0500 Subject: [PATCH 10/14] force Golden Pills to be identified --- main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/main.lua b/main.lua index fddfd0ca..be5fc207 100644 --- a/main.lua +++ b/main.lua @@ -886,6 +886,7 @@ local function onRender(t) local pillColor = closest.SubType local pool = game:GetItemPool() local identified = pool:IsPillIdentified(pillColor) + if REPENTANCE and pillColor % PillColor.PILL_GIANT_FLAG == PillColor.PILL_GOLD then identified = true end if (identified or EID.Config["ShowUnidentifiedPillDescriptions"]) then local descEntry = EID:getDescriptionObj(closest.Type, closest.Variant, pillColor) EID:printDescription(descEntry) From 58cf71bafc860b009d242517953be49a2bb4c3c1 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 17 Dec 2021 13:57:46 -0500 Subject: [PATCH 11/14] fix Golden Pill issues --- eid_api.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eid_api.lua b/eid_api.lua index edad0989..988d239b 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -371,7 +371,7 @@ function EID:getAdjustedSubtype(Type, Variant, SubType) return SubType - 32768 end elseif tableName == "pills" or tableName == "horsepills" then - if SubType == 14 then + if SubType % PillColor.PILL_GIANT_FLAG == PillColor.PILL_GOLD then return 9999 end local pool = game:GetItemPool() @@ -451,7 +451,11 @@ function EID:getObjectName(Type, Variant, SubType) return name or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en_us"][tableName][SubType][2] or vanillaName elseif tableName == "pills" or tableName == "horsepills" then local adjustedSubtype = EID:getAdjustedSubtype(Type, Variant, SubType) - local vanillaName = EID.itemConfig:GetPillEffect(adjustedSubtype - 1).Name + local vanillaName = nil + -- fix Gold Pill bug + if EID.itemConfig:GetPillEffect(adjustedSubtype - 1) then + vanillaName = EID.itemConfig:GetPillEffect(adjustedSubtype - 1).Name + end name = name or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en_us"][tableName][adjustedSubtype][2] or vanillaName return string.gsub(name,"I'm Excited!!!","I'm Excited!!") -- prevent markup trigger elseif tableName == "sacrifice" then From ae74bd61f6e92fa9400850d740e376551d026099 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 17 Dec 2021 13:58:17 -0500 Subject: [PATCH 12/14] False PHD update --- descriptions/rep/en_us.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/descriptions/rep/en_us.lua b/descriptions/rep/en_us.lua index 753cc5bb..ee06131a 100644 --- a/descriptions/rep/en_us.lua +++ b/descriptions/rep/en_us.lua @@ -888,7 +888,7 @@ local repPills={ [48] = {"47", "Shot Speed Down", "↓ -0.15 Shot Speed down"}, -- Shot Speed Down [49] = {"48", "Shot Speed Up", "↑ +0.15 Shot Speed up"}, -- Shot Speed Up - [50] = {"49", "Experimental Pill", "↑ Increases 1 random stat#↓ Decreases 1 random other stat#Will not decrease with PHD"}, -- Experimental Pill + [50] = {"49", "Experimental Pill", "↑ Increases 1 random stat#↓ Decreases 1 random other stat#Will not decrease with {{Collectible75}}PHD#Will not increase with {{Collectible654}}False PHD"}, -- Experimental Pill [9999] = {"", "Golden Pill", "Random pill effect#Destroys itself after a few uses"}, -- golden Pill } EID:updateDescriptionsViaTable(repPills, EID.descriptions["en_us"].pills) @@ -943,7 +943,7 @@ EID.descriptions["en_us"].horsepills={ {"46", "Vurp!", "Spawns last used pill as a horse pill"}, -- Vurp! {"47", "Shot Speed Down", "↓ -0.3 Shot Speed down"}, -- Shot Speed Down {"48", "Shot Speed Up", "↑ +0.3 Shot Speed up"}, -- Shot Speed Up - {"49", "Experimental Pill", "↑ Increases 1 random stat two times#↓ Decreases 1 random other stat two times#Will not decrease with PHD"}, -- Experimental Pill + {"49", "Experimental Pill", "↑ Increases 1 random stat two times#↓ Decreases 1 random other stat two times#Will not decrease with {{Collectible75}}PHD#Will not increase with {{Collectible654}}False PHD"}, -- Experimental Pill [9999] = {"", "Golden Pill", "Random horse pill effect#Destroys itself after a few uses"}, -- Golden Pill } @@ -966,6 +966,10 @@ EID.descriptions["en_us"].BlankCardQCard = "Teleport to I Am Error Room#Blank Ca EID.descriptions["en_us"].ClearRuneCharge = "Clear Rune charge:" EID.descriptions["en_us"].PlaceboCharge = "Placebo charge:" +EID.descriptions["en_us"].FalsePHDHeart = "Spawns 1 Black Heart" +EID.descriptions["en_us"].FalsePHDDamage = "+0.6 Damage up" +EID.descriptions["en_us"].FalsePHDHorseDamage = "+1.2 Damage up" + EID.descriptions["en_us"].AchievementWarningTitle = "{{ColorYellow}}!!! WARNING !!!" EID.descriptions["en_us"].AchievementWarningText = "Achievements are disabled!#In order to enable progression and achievements, you first need to kill Mom (Depths II) without any mods enabled.#(If you've defeated Mom, this message is a bug and can be ignored)#(This warning can be disabled in the config)" From 1a1f5297d9daeaf9a3c4b35538366b3d981cae60 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 17 Dec 2021 13:59:36 -0500 Subject: [PATCH 13/14] False PHD modifier --- eid_modifiers.lua | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/eid_modifiers.lua b/eid_modifiers.lua index 1b14a03e..ba0f5ec9 100644 --- a/eid_modifiers.lua +++ b/eid_modifiers.lua @@ -374,6 +374,40 @@ local game = Game() return descObj end EID:addDescriptionModifier("Placebo", PlaceboCondition, PlaceboCallback) + + -- Handle False PHD description addition + local function FalsePHDCondition(descObj) + if not REPENTANCE or descObj.ObjType ~= 5 or descObj.ObjVariant ~= PickupVariant.PICKUP_PILL then + return false + end + for i = 0, game:GetNumPlayers() - 1 do + local player = Isaac.GetPlayer(i) + if player:HasCollectible(CollectibleType.COLLECTIBLE_FALSE_PHD) then + return true + end + end + return false + end + + local function FalsePHDCallback(descObj) + local adjustedID = EID:getAdjustedSubtype(descObj.ObjType, descObj.ObjVariant, descObj.ObjSubType) + local horse = descObj.ObjSubType > 2048 + local data = EID.pillMetadata[adjustedID-1] + if data ~= nil then + local damageUp = string.find(data.class,"3") and (string.find(data.class,"-") or adjustedID-1 == PillEffect.PILLEFFECT_EXPERIMENTAL) + local blackHeart = (string.find(data.class,"2") or string.find(data.class,"1")) and string.find(data.class,"-") + local text = "" + if damageUp and horse then text = EID:getDescriptionEntry("FalsePHDHorseDamage") + elseif damageUp then text = EID:getDescriptionEntry("FalsePHDDamage") + elseif blackHeart then text = EID:getDescriptionEntry("FalsePHDHeart") end + if text ~= "" then + local iconStr = "#{{Collectible654}} " + EID:appendToDescription(descObj, iconStr..text) + end + end + return descObj + end + EID:addDescriptionModifier("False PHD", FalsePHDCondition, FalsePHDCallback) -- Handle Abyss description addition From 447c4fafbae7da8965b9f3f694ed53dfd1b9cd9d Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 17 Dec 2021 14:17:32 -0500 Subject: [PATCH 14/14] I'm Excited spawns a black heart as well --- eid_modifiers.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eid_modifiers.lua b/eid_modifiers.lua index ba0f5ec9..6f5bd673 100644 --- a/eid_modifiers.lua +++ b/eid_modifiers.lua @@ -395,7 +395,8 @@ local game = Game() local data = EID.pillMetadata[adjustedID-1] if data ~= nil then local damageUp = string.find(data.class,"3") and (string.find(data.class,"-") or adjustedID-1 == PillEffect.PILLEFFECT_EXPERIMENTAL) - local blackHeart = (string.find(data.class,"2") or string.find(data.class,"1")) and string.find(data.class,"-") + -- why doesn't I'm Excited have a - in the xml data yet spawn a black heart... + local blackHeart = (string.find(data.class,"2") or string.find(data.class,"1")) and (string.find(data.class,"-") or adjustedID-1 == PillEffect.PILLEFFECT_IM_EXCITED) local text = "" if damageUp and horse then text = EID:getDescriptionEntry("FalsePHDHorseDamage") elseif damageUp then text = EID:getDescriptionEntry("FalsePHDDamage")