Add "Car Battery" modifiers (#584)

This commit is contained in:
Valentin Lamprière authored and GitHub committed 2023-10-09 23:56:57 +02:00
1 parent 1fb5c302c7
commit 85983e7d5e
5 files changed
+96 -3

No files matched your search

+29
View File
@@ -577,6 +577,35 @@ EID.descriptions[languageCode].collectibles={
{"552", "Mom's Shovel", "Spawns a trapdoor to the next floor#10% chance for {{LadderRoom}}crawlspace trapdoor#{{Warning}} Use the shovel on the hill of dirt in the \"Dark Room\""},
}
---------- Modifiers ----------
-- Effect of Car battery on Active Items
EID.descriptions[languageCode].carBattery = {
[58] = "Invincibility last 20s", -- Book of Shadows
[66] = "Effect lasts 16s", -- The Hourglass
[77] = "Invincibility last 12s", -- My Little Unicorn
[93] = "Invincibility last 13s", -- The Gamekid
[111] = "Deal twice the damages", -- The Bean
[124] = "Triggers two effects", -- Dead Sea Scrolls
[145] = "Spawns 4-7 blue flies", -- Guppy's Head
[171] = "Deal 10 additional damage", -- Spider Butt
[293] = "Double lasers damage", -- Head of Krampus
[298] = "Invincibility last 12s", -- Unicorn Stump
[351] = "Deal twice the damages", -- Mega Bean
[383] = "Split splitted tears -> 6x more tears", -- Tear Detonator
[421] = "Deal twice the damages", -- Kidney Bean
[427] = "Spawns two TNT barrels", -- Mine Crafter
[477] = "Activates every absorbed items twice", -- Void
[482] = "Change the character twice and remove two items (Not recommended)", -- Clicker
[485] = "Has 25% chance to quadruple items and consumables, but 75% to remove them!", -- Crooked Penny
[486] = "Triggers on-hit item effects twice", -- Dull Razor
[488] = "Grants two items effect", -- Metronome
[489] = "Triggers two dice effects. The second die can't be predicted", -- D Infinity
[523] = "Swap box contents with room pickpus", -- Moving Box
[550] = "Stops stomps for two waves in Boss Rush and Challenges {{ChallengeRoom}} {{BossRushRoom}}", -- Broken Shovel
}
---------- Trinkets ----------
EID.descriptions[languageCode].trinkets={
{"1", "Swallowed Penny", "{{Coin}} Taking damage spawns 1 coin"},
+33
View File
@@ -574,6 +574,39 @@ EID.descriptions[languageCode].collectibles={
{"552", "", "Spawns a trapdoor that leads to the next floor.#10% chance to lead to a Crawl Space or a Black Market instead. #Crawl Spaces and Black Markets are identified by the ladder in the hole, instead of just a black void. #Use Mom's Shovel on the hill of dirt in the Dark Room to unlock a secret character."},
}
---------- Modifiers ----------
-- Effect of Car battery on Active Items
EID.descriptions[languageCode].carBattery = {
[58] = "Invincibility last 20s", -- Book of Shadows
[66] = "Effect lasts 16s", -- The Hourglass
[77] = "Invincibility last 12s", -- My Little Unicorn
[93] = "Invincibility last 13s", -- The Gamekid
[106] = "No extra effects. Speed up item pools exhaust", -- The D6
[111] = "Deal twice the damages. Doesn't increase poison duration", -- The Bean
[124] = "Triggers two effects", -- Dead Sea Scrolls
[145] = "Spawns 4-7 blue flies instead", -- Guppy's Head
[171] = "Deal 10 additional damage. Doesn't increase slow duration", -- Spider Butt
[283] = "No extra effects. Speed up item pools exhaust. Speed up transformation achievement", -- D100
[284] = "No extra effects. Speed up item pools exhaust. Speed up transformation achievement", -- D4
[293] = "Double lasers damage. Doesn't affect lasers duration", -- Head of Krampus
[298] = "Invincibility last twice as long", -- Unicorn Stump
[351] = "Deal twice the damages. Doesn't increase petrify duration", -- Mega Bean
[383] = "Split splitted tears resulting in 6x more tears than normal", -- Tear Detonator
[421] = "Deal twice the damages. Doesn't increase charm duration", -- Kidney Bean
[427] = "Spawns two TNT barrel", -- Mine Crafter
[437] = "Double summoned enemies, but doesn't double reward (Not recommended)", -- D7
[477] = "Activates every absorbed items twice", -- Void
[482] = "Change the character twice and remove two items (Not recommended)", -- Clicker
[485] = "Has 25% chance to quadruple items and consumables, but 75% to remove them!", -- Crooked Penny
[486] = "Triggers on-hit item effects twice if applicable", -- Dull Razor
[488] = "Grants two items effect", -- Metronome
[489] = "Triggers two dice effects. The second die can't be predicted", -- D Infinity
[523] = "Swap box contents with room pickpus", -- Moving Box
[550] = "Stops stomps for two waves in Boss Rush and Challenges {{ChallengeRoom}} {{BossRushRoom}}", -- Broken Shovel
}
---------- Trinkets ----------
EID.descriptions[languageCode].trinkets={
{"1", "", "Drops 1 penny, nickel or dime upon taking damage. #This effect is not reduced by playing as the Keeper like other similar items are."},
+17
View File
@@ -713,6 +713,23 @@ EID.descriptions[languageCode].abyssSynergies = {
[559] = "Light blue locust with arcs of electricity that deal 0.1 damage per tick", -- 120 Volt
}
-- Effect of Car battery on Active Items
local repCarBattery = {
[323] = "Tears deal double damage", -- Isaac's Tears
--[386] = "Tinyly increase chances for crawlspaces (still very rare)", -- D12
[489] = "Triggers two dice effects. The second die effect never change", -- D Infinity
[523] = "", -- Moving Box
[556] = "Will gives two brimstone, giving extra damage", -- Sulfur
[584] = "Double wisps", -- Book of Virtues
[605] = "Spawn two Peepers. Doesn't gives extra damage", -- The Scooper
[609] = "Chances to delete items are doubled", -- Eternal D6
[625] = "Effect last 60s", -- Mega Mush
[705] = "Shadow effect last 2s", -- Dark Arts
[720] = "Spawns a poop alongside the pickup", -- Everything Jar
[723] = "Decreasing internal ID by two", -- Spindown Dice
}
--EID.descriptions[languageCode].carBattery[284] = nil -- D4
EID:updateDescriptionsViaTable(repCarBattery, EID.descriptions[languageCode].carBattery)
---------- Trinkets ----------
+5 -1
View File
@@ -1123,7 +1123,11 @@ end
function EID:updateDescriptionsViaTable(changeTable, tableToUpdate)
for k,v in pairs(changeTable) do
tableToUpdate[k] = v
if v == "" then
tableToUpdate[k] = nil
else
tableToUpdate[k] = v
end
end
end
+12 -2
View File
@@ -7,7 +7,7 @@ EID.inModifierPreview = false
EID.TabDescThisFrame = false
-- List of collectible IDs for us to check if a player owns them; feel free to add to this in mods that add description modifiers!
EID.collectiblesToCheck = { CollectibleType.COLLECTIBLE_VOID, }
EID.collectiblesToCheck = { CollectibleType.COLLECTIBLE_VOID, CollectibleType.COLLECTIBLE_CAR_BATTERY }
local maxSlot = 1
-- Repentance modifiers
if EID.isRepentance then
@@ -17,7 +17,7 @@ if EID.isRepentance then
CollectibleType.COLLECTIBLE_BINGE_EATER, CollectibleType.COLLECTIBLE_BOOK_OF_VIRTUES, CollectibleType.COLLECTIBLE_SPINDOWN_DICE,
CollectibleType.COLLECTIBLE_TAROT_CLOTH, CollectibleType.COLLECTIBLE_MOMS_BOX, 59, --Birthright Belial
CollectibleType.COLLECTIBLE_BLANK_CARD, CollectibleType.COLLECTIBLE_CLEAR_RUNE, CollectibleType.COLLECTIBLE_PLACEBO,
CollectibleType.COLLECTIBLE_FALSE_PHD, CollectibleType.COLLECTIBLE_ABYSS, CollectibleType.COLLECTIBLE_FLIP,
CollectibleType.COLLECTIBLE_FALSE_PHD, CollectibleType.COLLECTIBLE_ABYSS, CollectibleType.COLLECTIBLE_FLIP, CollectibleType.COLLECTIBLE_CAR_BATTERY
}
end
EID.collectiblesOwned = {}
@@ -227,6 +227,15 @@ local function SacrificeRoomCallback(descObj)
return descObj
end
local function CarBatteryCallback(descObj)
local text = EID:getDescriptionEntry("carBattery", descObj.ObjSubType)
if text ~= nil then
local iconStr = "#{{Collectible356}} {{ColorYellow}}"
EID:appendToDescription(descObj, iconStr..text)
end
return descObj
end
if EID.isRepentance then
-- Handle Birthright
@@ -736,6 +745,7 @@ local function EIDConditionsAB(descObj)
if EID.collectiblesOwned[477] then table.insert(callbacks, VoidCallback) end
if EID.blackRuneOwned then table.insert(callbacks, BlackRuneCallback) end
end
if EID.collectiblesOwned[356] then table.insert(callbacks, CarBatteryCallback) end
end
return callbacks