Misc item reminder updates (#695)

* Change wisp checking

* Change selected item var

* Trinket and wisp checks

* add a simple room counter

* various changes

* update my todo list

* Gulped trinket support

* Reset selected items better

* update todo list

* add poop nuggets to pickup names

* add glyph of balance

* add a helper function for xml names

* overhaul special description modifiers

* Pandora's Box greed

* Pandora's Box tweak

* Pandora's Box overview desc

* let Card Reading Boss portal get modified

* move Strange Key to conditionals

* Update eid_conditionals.lua

* misc helper functions

* whitelists

* small text pos modifier tweaks

* wild card + glowing hourglass + void ab+

* move vurp, add wild card

* move SimpleRound

* add wild card, move simpleround, fix pill icon stuff

* Echo Chamber color

* update todo list

* starting work on The Stars? preview

* remove collectible count check; bad for tainted eden

* Tainted Laz overhaul

* fix 4.5 volt with timed pocket actives

* fix pocket active check functions

* Tainted Laz overhaul + The Stars?

* more conditionals

* Battery and bean synergies
This commit is contained in:
Buurazu authored and GitHub committed 2024-07-14 22:07:10 +02:00
1 parent 24a6a808ba
commit 9703626b71
12 files changed
+985 -383

No files matched your search

+5 -12
View File
@@ -22,13 +22,6 @@ local triggerColors = {
local actions = { [0] = "use_active_item", "add_temporary_effect", "convert_entities", "area_damage", "spawn_entity", "fart" }
local triggers = { [0] = "active", "tear_fire", "enemy_hit", "enemy_kill", "damage_taken", "room_clear", "entity_spawned", "pickup_collected", "chain" }
--simple decimal rounding
local function SimpleRound(num, dp)
dp = dp or 2
local mult = 10^dp
return math.floor(num * mult + 0.5)/mult
end
local function entityToName(Type, Variant, plural)
plural = plural or false
-- -1 is often used as an "any of this type", even if there's only one of that type, so converting it to 0 can help find names
@@ -122,7 +115,7 @@ function EID:CheckGlitchedItemConfig(id)
for i,func in ipairs(getFunctions) do
local val = item[func](item) * statMult[i]
if val ~= 0 then
local s = string.format("%.2g",SimpleRound(val))
local s = string.format("%.2g",EID:SimpleRound(val))
local prefix = "↑ "
if val > 0 then s = "+" .. s else prefix = "↓ " end
attributes = attributes .. prefix .. EID:ReplaceVariableStr(voidNames[i], 1, s) .. "#"
@@ -155,13 +148,13 @@ function EID:CheckGlitchedItemConfig(id)
replacements[1] = "{{ColorGray}}" .. entityToName(effectProp.type, effectProp.variant) .. "{{CR}}"
elseif effectType == "fart" then
--I think the fart scale is strictly visual and therefore useless
--replacements[1] = SimpleRound(effectProp.scale)
replacements[1] = string.format("%.4g",SimpleRound(effectProp.radius))
--replacements[1] = EID:SimpleRound(effectProp.scale)
replacements[1] = string.format("%.4g",EID:SimpleRound(effectProp.radius))
elseif effectType == "area_damage" then
replacements[1] = string.format("%.4g",SimpleRound(effectProp.damage))
replacements[1] = string.format("%.4g",EID:SimpleRound(effectProp.damage))
--Fart scales are all small numbers and seem to be tiles; area damage is huge numbers, but still tiles?
--so area damage is almost always the entire room
replacements[2] = string.format("%.4g",SimpleRound(effectProp.radius))
replacements[2] = string.format("%.4g",EID:SimpleRound(effectProp.radius))
end
if effectTrigger ~= lastEffectTrigger then