More override/overridden conditionals (#692)
* Add layers and unique ID checks * a bunch more overrides * some overridey conditions * shorten spirit sword, some conditions * brimstone mom's knife * reorganize + mom's knife brimstone
This commit is contained in:
1 parent
3b0c1165c0
commit
8ff9f7a262
4 files changed
+87
-36
No files matched your search
@@ -1263,6 +1263,13 @@ EID.descriptions[languageCode].ConditionalDescs = {
|
|||||||
["Proptosis Anti-Gravity"] = "Tears don't lose damage until they start moving",
|
["Proptosis Anti-Gravity"] = "Tears don't lose damage until they start moving",
|
||||||
["Epic Fetus Soy Milk"] = "Crosshair time is not shortened, but missile damage is drastically reduced",
|
["Epic Fetus Soy Milk"] = "Crosshair time is not shortened, but missile damage is drastically reduced",
|
||||||
["Eye of Belial Dr. Fetus"] = "Bombs pierce, but don't home or do additional damage",
|
["Eye of Belial Dr. Fetus"] = "Bombs pierce, but don't home or do additional damage",
|
||||||
|
["Epic Fetus Brimstone"] = "{1} has priority#Rockets shoot out 10 beams",
|
||||||
|
["Epic Fetus Mom's Knife"] = "{1} has priority#Rockets shoot out 10 knives",
|
||||||
|
["Brimstone Mom's Knife"] = "{1} has priority#A barrage of knives shoot out based on charge amount",
|
||||||
|
["Ludovico Ipecac"] = "The tear gets +4 damage but doesn't explode or poison",
|
||||||
|
["Technology Ipecac"] = "The laser gets +4 damage and poisons targets",
|
||||||
|
["Chocolate Milk Overrides"] = "↑ {{Tears}} x1.25 Tears multiplier",
|
||||||
|
["Chocolate Milk Marked"] = "Isaac automatically charges based on distance from the crosshair",
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ local repCollectibles={
|
|||||||
[576] = {"576", "Dirty Mind", "All Dip (small poop) enemies are friendly#Destroying poop spawns 1-4 Dips#Dip type depends on the poop type#Rocks may be replaced with poop"}, -- Dirty Mind
|
[576] = {"576", "Dirty Mind", "All Dip (small poop) enemies are friendly#Destroying poop spawns 1-4 Dips#Dip type depends on the poop type#Rocks may be replaced with poop"}, -- Dirty Mind
|
||||||
[577] = {"577", "Damocles", "{{Warning}} SINGLE USE {{Warning}}#Hangs a sword above Isaac's head, which doubles all pedestal items#Does not double items that have a price or come from chests#{{Warning}} After taking any damage, the sword has an extremely low chance to instantly kill Isaac every frame#Invincibility effects can prevent the death"}, -- Damocles
|
[577] = {"577", "Damocles", "{{Warning}} SINGLE USE {{Warning}}#Hangs a sword above Isaac's head, which doubles all pedestal items#Does not double items that have a price or come from chests#{{Warning}} After taking any damage, the sword has an extremely low chance to instantly kill Isaac every frame#Invincibility effects can prevent the death"}, -- Damocles
|
||||||
[578] = {"578", "Free Lemonade", "Creates a large pool of yellow creep#The creep deals 24 damage per second"}, -- Free Lemonade
|
[578] = {"578", "Free Lemonade", "Creates a large pool of yellow creep#The creep deals 24 damage per second"}, -- Free Lemonade
|
||||||
[579] = {"579", "Spirit Sword", "Instead of shooting tears, Isaac swings a sword#{{Damage}} The sword deals 3x Isaac's damage +3.5 and swings as fast as the fire button is tapped#{{Chargeable}} Charging does a spin attack + projectile shot#Shoots projectiles with normal swings at full health#{{Tears}} Tears effect the charge time and how often a projectile is shot at full health"}, -- Spirit Sword
|
[579] = {"579", "Spirit Sword", "Instead of shooting tears, swing a sword#{{Damage}} The sword deals 3x Isaac's damage +3.5 and swings as fast as the fire button is tapped#{{Chargeable}} Charging does a spin attack + projectile shot#Shoots projectiles with swings at full health"}, -- Spirit Sword
|
||||||
[580] = {"580", "Red Key", "Creates a red room adjacent to a regular room, indicated by a door outline#Red Rooms can be special rooms#{{ErrorRoom}} Entering a room outside the 13x13 floor map teleports Isaac to the I AM ERROR room"}, -- Red Key
|
[580] = {"580", "Red Key", "Creates a red room adjacent to a regular room, indicated by a door outline#Red Rooms can be special rooms#{{ErrorRoom}} Entering a room outside the 13x13 floor map teleports Isaac to the I AM ERROR room"}, -- Red Key
|
||||||
[581] = {"581", "Psy Fly", "Chases and deflects enemy projectiles#Deals 15 contact damage per second"}, -- Psy Fly
|
[581] = {"581", "Psy Fly", "Chases and deflects enemy projectiles#Deals 15 contact damage per second"}, -- Psy Fly
|
||||||
[582] = {"582", "Wavy Cap", "↑ {{Tears}} +0.75 Fire rate#↓ {{Speed}} -0.03 Speed#Distorts the screen#Takes longer to recharge each use#Leaving or clearing rooms reduces the effects"}, -- Wavy Cap
|
[582] = {"582", "Wavy Cap", "↑ {{Tears}} +0.75 Fire rate#↓ {{Speed}} -0.03 Speed#Distorts the screen#Takes longer to recharge each use#Leaving or clearing rooms reduces the effects"}, -- Wavy Cap
|
||||||
@@ -1412,6 +1412,12 @@ local repConditions = {
|
|||||||
["Brimstone Ipecac"] = "The laser gets +2 damage and explodes on enemies and obstacles",
|
["Brimstone Ipecac"] = "The laser gets +2 damage and explodes on enemies and obstacles",
|
||||||
["Brimstone Pop!"] = "Shorter beam that shoots {1} tears at the end",
|
["Brimstone Pop!"] = "Shorter beam that shoots {1} tears at the end",
|
||||||
["Eye of Belial Dr. Fetus"] = "Bombs pierce, doing 2.5x damage, but don't home or do additional blast damage",
|
["Eye of Belial Dr. Fetus"] = "Bombs pierce, doing 2.5x damage, but don't home or do additional blast damage",
|
||||||
|
["Spirit Sword C Section"] = "{1} has priority#Fetuses hold swords and do spin attacks",
|
||||||
|
["Spirit Sword Mom's Knife"] = "{1} has priority#The spin attack throws the sword forward",
|
||||||
|
["Spirit Sword Technology"] = "The sword becomes a lightsaber that can reflect enemy shots",
|
||||||
|
["Ludovico Ipecac"] = "The tear gets +2 damage but doesn't explode or poison",
|
||||||
|
["Technology Ipecac"] = "The laser gets +2 damage and explodes on targets",
|
||||||
|
["Eye of the Occult Beam"] = "Isaac automatically shoots with a crosshair that alters the beam's path",
|
||||||
|
|
||||||
}
|
}
|
||||||
EID:updateDescriptionsViaTable(repConditions, EID.descriptions[languageCode].ConditionalDescs)
|
EID:updateDescriptionsViaTable(repConditions, EID.descriptions[languageCode].ConditionalDescs)
|
||||||
|
|||||||
@@ -27,11 +27,11 @@ EID:AddItemConditional("5.100", 356, EID.CheckForCarBattery, {locTable = "carBat
|
|||||||
EID:AddConditional(356, EID.CheckActivesForCarBattery, "No Effect") -- "No effect" text for Car Battery pedestal
|
EID:AddConditional(356, EID.CheckActivesForCarBattery, "No Effect") -- "No effect" text for Car Battery pedestal
|
||||||
|
|
||||||
-- BFFS! / Hive Mind
|
-- BFFS! / Hive Mind
|
||||||
EID:AddItemConditional({"5.100","5.350.54","5.350.57"}, 247, EID.CheckForBFFS, {locTable = "BFFSSynergies", replaceColor = "BlinkPink", noFallback = false})
|
EID:AddItemConditional({"5.100","5.350.54","5.350.57"}, 247, EID.CheckForBFFS, {locTable = "BFFSSynergies", replaceColor = "BlinkPink", noFallback = false, uniqueID = "BFFS"})
|
||||||
EID:AddConditional(247, EID.CheckFamiliarsForBFFS, "No Effect") -- "No effect" text for BFFS pedestal
|
EID:AddConditional(247, EID.CheckFamiliarsForBFFS, "No Effect") -- "No effect" text for BFFS pedestal
|
||||||
if EID.isRepentance then
|
if EID.isRepentance then
|
||||||
EID:AddItemConditional({"5.300.96", "5.350.142", "5.350.176", "5.350.182", "5.350.186"}, 247, EID.CheckForBFFS, {locTable = "BFFSSynergies", replaceColor = "BlinkPink", noFallback = false}) -- BFFS! Repentance soulstone/trinkets
|
EID:AddItemConditional({"5.300.96", "5.350.142", "5.350.176", "5.350.182", "5.350.186"}, 247, EID.CheckForBFFS, {locTable = "BFFSSynergies", replaceColor = "BlinkPink", noFallback = false}) -- BFFS! Repentance soulstone/trinkets
|
||||||
EID:AddItemConditional("5.100", 248, EID.CheckForHiveMind, {locTable = "BFFSSynergies", replaceColor = "BlinkBlue", noFallback = false}) -- Hive Mind
|
EID:AddItemConditional("5.100", 248, EID.CheckForHiveMind, {locTable = "BFFSSynergies", replaceColor = "BlinkBlue", noFallback = false, uniqueID = "BFFS"}) -- Hive Mind
|
||||||
EID:AddSynergyConditional(247, 248, "No Effect (Familiars)") -- Already having Hive Mind / BFFS!
|
EID:AddSynergyConditional(247, 248, "No Effect (Familiars)") -- Already having Hive Mind / BFFS!
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -131,24 +131,60 @@ end
|
|||||||
|
|
||||||
|
|
||||||
------ OVERRIDES / OVERRIDDEN BY -----
|
------ OVERRIDES / OVERRIDDEN BY -----
|
||||||
-- huge TODO here, a lot of AB+ only ones too
|
-- TODO: Check Azazel and Forgotten's effects with these items, especially Brimstone overrides
|
||||||
|
-- Monstro's Lung might be worthy of this list too?
|
||||||
|
-- Is the layer order correct here? Would I be better off making a new function for adding these overrides that has its own pre-defined layer numbers for the problematic items, to clean up this mess some?
|
||||||
|
EID:AddSynergyConditional({52, 69, 104, 132, 222, 224, 233, 316, 329, 369, 379, 397, 401, 410, 440, 444, 453, 459, 461, 462, 494, 524, 532, 533, 540, }, 168, "Overridden", "Overrides", {layer = 900, checkLayers = true}) -- Epic Fetus
|
||||||
|
EID:AddOneSidedSynergyConditional(168, 118, "Epic Fetus Brimstone", {layer = 900, checkLayers = true})
|
||||||
|
EID:AddOneSidedSynergyConditional(168, 114, "Epic Fetus Mom's Knife", {layer = 900, checkLayers = true})
|
||||||
|
EID:AddOneSidedSynergyConditional(168, 330, "Epic Fetus Soy Milk", {layer = 900, checkLayers = true})
|
||||||
|
|
||||||
|
EID:AddSynergyConditional({69, 132, 222, 316, 369, 379, 410, 440, 453, 459, 461, 494, 524, 532, 533, }, 52, "Overridden", "Overrides", {layer = 800, checkLayers = true}) -- Dr. Fetus
|
||||||
|
EID:AddSynergyConditional(462, 52, "Eye of Belial Dr. Fetus", nil, {layer = 800, checkLayers = true})
|
||||||
|
|
||||||
|
EID:AddSynergyConditional({5, 69, 132, 221, 224, 316, 379, 401, 410, 459, 461, 462, 529, 532, 533, }, 114, "Overridden", "Overrides", {layer = 700, checkLayers = true}) -- Mom's Knife
|
||||||
|
EID:AddOneSidedSynergyConditional(114, 118, "Brimstone Mom's Knife", {layer = 700, checkLayers = true})
|
||||||
|
|
||||||
|
EID:AddSynergyConditional({316, 379, 410, 440, 453, 461, 462, 524, 533, 540, }, 118, "Overridden", "Overrides", {layer = 666, checkLayers = true}) -- Brimstone
|
||||||
|
EID:AddSynergyConditional(118, 149, "Brimstone Ipecac", nil, {layer = 666, checkLayers = true})
|
||||||
|
|
||||||
|
EID:AddSynergyConditional({5, 69, 104, 233, 316, 329, 379, 397, 410, 453, 461, 524, 529, 532, 533, 540, "5.350.26"}, 395, "Overridden", "Overrides", {layer = 600, checkLayers = true}) -- Tech X
|
||||||
|
EID:AddSynergyConditional(149, 395, "Technology Ipecac", nil, {layer = 600, checkLayers = true}) -- Tech X + Ipecac
|
||||||
|
|
||||||
|
EID:AddSynergyConditional({410, 462, 524, 533, 540}, 68, "Overridden", "Overrides", {layer = 400, checkLayers = true}) -- Technology
|
||||||
|
EID:AddSynergyConditional(149, 68, "Technology Ipecac", nil, {layer = 400, checkLayers = true}) -- Technology + Ipecac
|
||||||
|
|
||||||
|
EID:AddSynergyConditional({69, 222, 224, 316, 394, 397, 410, 532}, 329, "Overridden", "Overrides", {layer = 300, checkLayers = true}) -- Ludovico
|
||||||
|
EID:AddSynergyConditional(149, 329, "Ludovico Ipecac", nil, {layer = 300, checkLayers = true}) -- Ludovico + Ipecac
|
||||||
|
|
||||||
-- TODO: add azazel to epic fetus list... and what about the brimstone list with him?
|
|
||||||
-- and of course, Mom's Knife, Tech X, Spirit Sword...
|
|
||||||
EID:AddSynergyConditional({52, 69, 104, 222, 224, 233, 316, 329, 369, 379, 397, 401, 410, 440, 444, 453, 459, 461, 462, 494, 524, 532, 533, 540, }, 168, "Overridden", "Overrides") -- Epic Fetus
|
|
||||||
EID:AddSynergyConditional({69, 222, 316, 369, 379, 410, 440, 453, 459, 461, 494, 524, 532, 533, }, 52, "Overridden", "Overrides") -- Dr. Fetus
|
|
||||||
EID:AddSynergyConditional({316, 379, 410, 440, 453, 461, 462, 524, 533, 540, }, 118, "Overridden", "Overrides") -- Brimstone
|
|
||||||
if not EID.isRepentance then
|
if not EID.isRepentance then
|
||||||
EID:AddSynergyConditional({374, 429, }, 168, "Overridden", "Overrides") -- Epic Fetus
|
EID:AddSynergyConditional({374, 429, }, 168, "Overridden", "Overrides", {layer = 900, checkLayers = true}) -- Epic Fetus
|
||||||
EID:AddSynergyConditional({374, 401, 429, 444, 461}, 52, "Overridden", "Overrides") -- Dr. Fetus
|
EID:AddSynergyConditional({374, 401, 429, 444, 461}, 52, "Overridden", "Overrides", {layer = 800, checkLayers = true}) -- Dr. Fetus
|
||||||
EID:AddSynergyConditional({104, 224, 369, 374, 394, 401, 429, 444, 459, 463, 494, 532, }, 118, "Overridden", "Overrides") -- Brimstone
|
EID:AddSynergyConditional({104, 150, 374, 394, 443, 453, 463, 494, 496, 503, }, 114, "Overridden", "Overrides", {layer = 700, checkLayers = true}) -- Mom's Knife
|
||||||
|
EID:AddSynergyConditional({104, 224, 369, 374, 394, 401, 429, 444, 459, 463, 494, 532, }, 118, "Overridden", "Overrides", {layer = 666, checkLayers = true}) -- Brimstone
|
||||||
|
EID:AddSynergyConditional({55, 87, 150, 221, 374, 394, 401, 429, 443, 444, 463, 494, 496, 503, "5.350.96"}, 395, "Overridden", "Overrides", {layer = 600, checkLayers = true}) -- Tech X
|
||||||
|
EID:AddSynergyConditional({69, 104, 222, 224, 245, 316, 369, 374, 394, 429, 494, }, 68, "Overridden", "Overrides", {layer = 400, checkLayers = true}) -- Technology
|
||||||
|
|
||||||
|
EID:AddSynergyConditional({52, 68, 114, 118, 168, 329, 395}, 69, "Chocolate Milk Overrides", nil, {uniqueID = "choccy"}) -- Chocolate Milk providing fire rate (the override/overridden line happens too)
|
||||||
end
|
end
|
||||||
|
|
||||||
if EID.isRepentance then
|
if EID.isRepentance then
|
||||||
EID:AddSynergyConditional({168}, 579, "Overridden", "Overrides") -- Spirit Sword
|
EID:AddOneSidedSynergyConditional(678, 579, "Spirit Sword C Section", {layer = 1001, checkLayers = true}) -- C Section + Spirit Sword
|
||||||
EID:AddSynergyConditional({553, 572, 678, "5.350.144"}, 168, "Overridden", "Overrides") -- Epic Fetus
|
EID:AddSynergyConditional({52, 69, 118, 168, 229, 316, 329, 379, 394, 395, 397, 440, 556, 597, }, 579, "Overridden", "Overrides", {layer = 1000, checkLayers = true}) -- Spirit Sword
|
||||||
EID:AddSynergyConditional({68, 118, 572, 597, 637, "5.350.144"}, 52, "Overridden", "Overrides") -- Dr. Fetus
|
EID:AddOneSidedSynergyConditional(579, 114, "Spirit Sword Mom's Knife", {layer = 1000, checkLayers = true}) -- Spirit Sword + Mom's Knife
|
||||||
EID:AddSynergyConditional({597}, 118, "Overridden", "Overrides") -- Brimstone
|
EID:AddOneSidedSynergyConditional(579, 68, "Spirit Sword Technology", {layer = 1000, checkLayers = true}) -- Spirit Sword + Technology
|
||||||
EID:AddSynergyConditional({69, 229, 316, 329, 397, 410, 533, 572, 597, }, 678, "Overridden", "Overrides") -- C Section
|
|
||||||
|
EID:AddSynergyConditional({553, 572, 678, "5.350.144"}, 168, "Overridden", "Overrides", {layer = 900, checkLayers = true}) -- Epic Fetus
|
||||||
|
EID:AddOneSidedSynergyConditional(561, 168, "Epic Fetus Soy Milk", {layer = 900, checkLayers = true}) -- Epic Fetus + Almond Milk
|
||||||
|
EID:AddSynergyConditional({69, 229, 316, 329, 397, 410, 533, 572, 597, }, 678, "Overridden", "Overrides", {layer = 850, checkLayers = true}) -- C Section
|
||||||
|
EID:AddSynergyConditional({68, 118, 572, 597, 637, "5.350.144"}, 52, "Overridden", "Overrides", {layer = 800, checkLayers = true}) -- Dr. Fetus
|
||||||
|
EID:AddSynergyConditional({52, 572, 597}, 114, "Overridden", "Overrides", {layer = 700, checkLayers = true}) -- Mom's Knife
|
||||||
|
EID:AddSynergyConditional({597}, 118, "Overridden", "Overrides", {layer = 666, checkLayers = true}) -- Brimstone
|
||||||
|
EID:AddOneSidedSynergyConditional({529, 532}, 118, "Brimstone Pop!", {layer = 666, checkLayers = true}) -- Brimstone + Pop!/Lachryphagy
|
||||||
|
EID:AddSynergyConditional(572, 118, "Eye of the Occult Beam", nil, {layer = 666}) -- Brimstone + Eye of the Occult
|
||||||
|
EID:AddSynergyConditional({572, 597, "5.350.144"}, 395, "Overridden", "Overrides", {layer = 600, checkLayers = true}) -- Tech X
|
||||||
|
EID:AddSynergyConditional({597}, 68, "Overridden", "Overrides", {layer = 400, checkLayers = true}) -- Technology
|
||||||
|
EID:AddSynergyConditional(572, 68, "Eye of the Occult Beam", nil, {layer = 400}) -- Technology + Eye of the Occult
|
||||||
|
|
||||||
EID:AddSynergyConditional(330, 561, "Overridden", "Overrides") -- Soy Milk + Almond Milk
|
EID:AddSynergyConditional(330, 561, "Overridden", "Overrides") -- Soy Milk + Almond Milk
|
||||||
end
|
end
|
||||||
@@ -227,10 +263,8 @@ EID:AddItemConditional("5.70.28", 358) -- Wizard pill + The Wiz
|
|||||||
EID:AddItemConditional(523, 477) -- Moving Box is a passive to Void
|
EID:AddItemConditional(523, 477) -- Moving Box is a passive to Void
|
||||||
EID:AddItemConditional({8, 113, 163, 167, 99, 100, 174, 95, 268, 67}, 322, "Mongo Babies") -- Mongo Baby + Copiable familiars
|
EID:AddItemConditional({8, 113, 163, 167, 99, 100, 174, 95, 268, 67}, 322, "Mongo Babies") -- Mongo Baby + Copiable familiars
|
||||||
if EID.isRepentance then EID:AddItemConditional(608, 322, "Mongo Babies") end
|
if EID.isRepentance then EID:AddItemConditional(608, 322, "Mongo Babies") end
|
||||||
EID:AddSynergyConditional(118, 149, "Brimstone Ipecac")
|
|
||||||
EID:AddSynergyConditional(261, 222, "Proptosis Anti-Gravity")
|
EID:AddSynergyConditional(261, 222, "Proptosis Anti-Gravity")
|
||||||
EID:AddSynergyConditional(330, 168, "Epic Fetus Soy Milk")
|
EID:AddSynergyConditional(394, 69, "Chocolate Milk Marked")
|
||||||
EID:AddSynergyConditional(462, 52, "Eye of Belial Dr. Fetus")
|
|
||||||
|
|
||||||
-- AB+ only misc conditionals
|
-- AB+ only misc conditionals
|
||||||
if not EID.isRepentance then
|
if not EID.isRepentance then
|
||||||
@@ -241,7 +275,6 @@ end
|
|||||||
-- Rep only misc conditionals
|
-- Rep only misc conditionals
|
||||||
if EID.isRepentance then
|
if EID.isRepentance then
|
||||||
-- Co-op friendly items
|
-- Co-op friendly items
|
||||||
-- todo: what items have a cool co-op synergy?
|
|
||||||
EID:AddConditional({45, "5.350.125"}, EID.MultiplePlayerCharacters) -- Yum Heart, Extension Cord
|
EID:AddConditional({45, "5.350.125"}, EID.MultiplePlayerCharacters) -- Yum Heart, Extension Cord
|
||||||
EID:AddConditional({"1000.76.0", "1000.76.5"}, EID.MultiplePlayerCharacters) -- Dice Room 1 and 6
|
EID:AddConditional({"1000.76.0", "1000.76.5"}, EID.MultiplePlayerCharacters) -- Dice Room 1 and 6
|
||||||
|
|
||||||
@@ -254,8 +287,6 @@ if EID.isRepentance then
|
|||||||
EID:AddPlayerConditional(596, 27, "Ice Tears") -- Uranus + Tainted Samson
|
EID:AddPlayerConditional(596, 27, "Ice Tears") -- Uranus + Tainted Samson
|
||||||
EID:AddSynergyConditional(495, 616, "Both Peppers") -- Ghost Pepper + Bird's Eye
|
EID:AddSynergyConditional(495, 616, "Both Peppers") -- Ghost Pepper + Bird's Eye
|
||||||
EID:AddSynergyConditional(726, {408, 646, 293, 679, 275, 399, 680, 441, 49, 533}, "Hemoptysis") -- Hemoptysis + Brimstone effects
|
EID:AddSynergyConditional(726, {408, 646, 293, 679, 275, 399, 680, 441, 49, 533}, "Hemoptysis") -- Hemoptysis + Brimstone effects
|
||||||
EID:AddOneSidedSynergyConditional({529, 532}, 118, "Brimstone Pop!") -- Brimstone + Pop!/Lachryphagy
|
|
||||||
EID:AddSynergyConditional(561, 168, "Epic Fetus Soy Milk") -- Epic Fetus + Almond Milk
|
|
||||||
|
|
||||||
-- eye drops + chargeable passives like brimstone could go here but there's a lot of them
|
-- eye drops + chargeable passives like brimstone could go here but there's a lot of them
|
||||||
EID:AddPlayerConditional(600, {2, 7, 13, 16}) -- Eye Drops + Cain, Azazel, Lilith, Forgotten
|
EID:AddPlayerConditional(600, {2, 7, 13, 16}) -- Eye Drops + Cain, Azazel, Lilith, Forgotten
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ function EID:addBFFSCondition(ID, text, numberToDouble, newNumber, language)
|
|||||||
if type(ID) ~= "string" then ID = "5.100." .. ID
|
if type(ID) ~= "string" then ID = "5.100." .. ID
|
||||||
else
|
else
|
||||||
-- We don't have to add a new condition for collectibles, because they're checked with a "5.100" condition
|
-- We don't have to add a new condition for collectibles, because they're checked with a "5.100" condition
|
||||||
EID:AddItemConditional(ID, 247, EID.CheckForBFFS, {locTable = "BFFSSynergies", replaceColor = "BlinkPink", noFallback = false})
|
EID:AddItemConditional(ID, 247, EID.CheckForBFFS, {locTable = "BFFSSynergies", replaceColor = "BlinkPink", noFallback = false, uniqueID = "BFFS"})
|
||||||
end
|
end
|
||||||
EID.descriptions[language].BFFSSynergies[ID] = text
|
EID.descriptions[language].BFFSSynergies[ID] = text
|
||||||
end
|
end
|
||||||
@@ -97,7 +97,7 @@ function EID:addHiveMindCondition(ID, text, numberToDouble, newNumber, language,
|
|||||||
if type(ID) ~= "string" then ID = "5.100." .. ID
|
if type(ID) ~= "string" then ID = "5.100." .. ID
|
||||||
else
|
else
|
||||||
-- We don't have to add a new condition for collectibles, because they're checked with a "5.100" condition
|
-- We don't have to add a new condition for collectibles, because they're checked with a "5.100" condition
|
||||||
EID:AddItemConditional(ID, 248, EID.CheckForHiveMind, {locTable = "BFFSSynergies", replaceColor = "BlinkBlue", noFallback = false})
|
EID:AddItemConditional(ID, 248, EID.CheckForHiveMind, {locTable = "BFFSSynergies", replaceColor = "BlinkBlue", noFallback = false, uniqueID = "BFFS"})
|
||||||
end
|
end
|
||||||
EID.descriptions[language].BFFSSynergies[ID] = text
|
EID.descriptions[language].BFFSSynergies[ID] = text
|
||||||
end
|
end
|
||||||
@@ -129,18 +129,21 @@ end
|
|||||||
bulletpoint: Appended lines will begin with this bulletpoint
|
bulletpoint: Appended lines will begin with this bulletpoint
|
||||||
noFallback: Don't fallback to English if this isn't localized; by default, conditionals don't fallback, to avoid printing English text in unupdated languages
|
noFallback: Don't fallback to English if this isn't localized; by default, conditionals don't fallback, to avoid printing English text in unupdated languages
|
||||||
usePedestalName: If true, display the pedestal item's name in place of {1}
|
usePedestalName: If true, display the pedestal item's name in place of {1}
|
||||||
|
layer: A number used in determining the order that conditionals should be checked in, default -1
|
||||||
Argument 5 (very optional): The position in the table to insert this new condition, in case mods want to insert modifiers before our base ones
|
checkLayers: If true, don't print this condition if a higher layer condition was applied already
|
||||||
|
uniqueID: Only one conditional with the given unique ID will be printed
|
||||||
]]
|
]]
|
||||||
local function CopyTable(t1)
|
local function CopyTable(t1)
|
||||||
local newTable = {}; for k, v in pairs(t1) do newTable[k] = v end
|
local newTable = {}; for k, v in pairs(t1) do newTable[k] = v end
|
||||||
return newTable
|
return newTable
|
||||||
end
|
end
|
||||||
function EID:AddConditional(IDs, funcText, modText, extraTable, insertPoint)
|
-- Every single add conditional function ends up calling this function eventually. This is THE place to define variables every condition MUST have.
|
||||||
|
function EID:AddConditional(IDs, funcText, modText, extraTable)
|
||||||
if type(IDs) ~= "table" then IDs = { IDs } end
|
if type(IDs) ~= "table" then IDs = { IDs } end
|
||||||
if modText == "" then modText = nil end
|
if modText == "" then modText = nil end
|
||||||
extraTable = extraTable or {}
|
extraTable = extraTable or {}
|
||||||
if extraTable.noFallback == nil then extraTable.noFallback = true end
|
if extraTable.noFallback == nil then extraTable.noFallback = true end
|
||||||
|
extraTable.layer = extraTable.layer or -1
|
||||||
for _, id in ipairs(IDs) do
|
for _, id in ipairs(IDs) do
|
||||||
if type(id) ~= "string" then id = "5.100." .. id end
|
if type(id) ~= "string" then id = "5.100." .. id end
|
||||||
EID.DescriptionConditions[id] = EID.DescriptionConditions[id] or {}
|
EID.DescriptionConditions[id] = EID.DescriptionConditions[id] or {}
|
||||||
@@ -151,13 +154,8 @@ function EID:AddConditional(IDs, funcText, modText, extraTable, insertPoint)
|
|||||||
if newTable.usePedestalName then
|
if newTable.usePedestalName then
|
||||||
newTable.variableText = "{{NameOnly" .. id .. "}}"
|
newTable.variableText = "{{NameOnly" .. id .. "}}"
|
||||||
end
|
end
|
||||||
|
|
||||||
if insertPoint then
|
|
||||||
table.insert(EID.DescriptionConditions[id], insertPoint, newTable)
|
|
||||||
else
|
|
||||||
table.insert(EID.DescriptionConditions[id], newTable)
|
table.insert(EID.DescriptionConditions[id], newTable)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Easy to use functions for conditionals that rely on having a specific item/character
|
-- Easy to use functions for conditionals that rely on having a specific item/character
|
||||||
@@ -425,13 +423,19 @@ function EID:applyConditionals(descObj)
|
|||||||
local adjustedSubtype = EID:getAdjustedSubtype(descObj.ObjType, descObj.ObjVariant, descObj.ObjSubType)
|
local adjustedSubtype = EID:getAdjustedSubtype(descObj.ObjType, descObj.ObjVariant, descObj.ObjSubType)
|
||||||
local typeVar = descObj.ObjType.."."..descObj.ObjVariant -- for general conditions (Tarot Cloth, Book of Virtues)
|
local typeVar = descObj.ObjType.."."..descObj.ObjVariant -- for general conditions (Tarot Cloth, Book of Virtues)
|
||||||
local typeVarSub = descObj.ObjType.."."..descObj.ObjVariant.."."..adjustedSubtype -- for specific conditions
|
local typeVarSub = descObj.ObjType.."."..descObj.ObjVariant.."."..adjustedSubtype -- for specific conditions
|
||||||
|
local highestLayer = -999
|
||||||
|
local printedDescs = {}
|
||||||
|
|
||||||
-- Combine specific+generic conditions into one table (in that order)
|
-- Combine specific+generic conditions into one table (in that order)
|
||||||
local conds = {}
|
local conds = {}
|
||||||
if EID.DescriptionConditions[typeVarSub] then TableConcat(conds, EID.DescriptionConditions[typeVarSub]) end
|
if EID.DescriptionConditions[typeVarSub] then TableConcat(conds, EID.DescriptionConditions[typeVarSub]) end
|
||||||
if EID.DescriptionConditions[typeVar] then TableConcat(conds, EID.DescriptionConditions[typeVar]) end
|
if EID.DescriptionConditions[typeVar] then TableConcat(conds, EID.DescriptionConditions[typeVar]) end
|
||||||
|
table.sort(conds, function(a, b) return a.layer > b.layer end)
|
||||||
-- Check every condition we need to check for this item
|
-- Check every condition we need to check for this item
|
||||||
for _, cond in ipairs(conds) do
|
for _, cond in ipairs(conds) do
|
||||||
|
if not cond.checkLayers or highestLayer <= cond.layer then
|
||||||
|
local result = cond.func(EID, descObj)
|
||||||
|
if result then
|
||||||
-- Search for the localization string; "S" (for generals) or "T.V.S" or "T.V.S (Modifier)" or "Modifier"
|
-- Search for the localization string; "S" (for generals) or "T.V.S" or "T.V.S (Modifier)" or "Modifier"
|
||||||
local locTable = cond.locTable or "ConditionalDescs"
|
local locTable = cond.locTable or "ConditionalDescs"
|
||||||
local text = nil
|
local text = nil
|
||||||
@@ -450,9 +454,10 @@ function EID:applyConditionals(descObj)
|
|||||||
if text == nil then text = EID:getDescriptionEntry(locTable, descObj.ObjSubType, cond.noFallback) end
|
if text == nil then text = EID:getDescriptionEntry(locTable, descObj.ObjSubType, cond.noFallback) end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- If we find the localization string for this condition, and it passes the test, modify the description text
|
-- If we find the localization string for this condition, it passed the condition's test, and the layer is ok, modify the description text
|
||||||
local result = cond.func(EID, descObj)
|
if text ~= nil and (not cond.uniqueID or printedDescs[cond.uniqueID] == nil) then
|
||||||
if text ~= nil and result then
|
if cond.layer > highestLayer then highestLayer = cond.layer end
|
||||||
|
if cond.uniqueID then printedDescs[cond.uniqueID] = true end
|
||||||
local variableText, bulletpoint
|
local variableText, bulletpoint
|
||||||
-- If the condition returned a value, use that value
|
-- If the condition returned a value, use that value
|
||||||
if result ~= true then
|
if result ~= true then
|
||||||
@@ -511,6 +516,8 @@ function EID:applyConditionals(descObj)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return descObj
|
return descObj
|
||||||
end
|
end
|
||||||
Reference in new issue
Block a user