diff --git a/descriptions/ab+/en_us.lua b/descriptions/ab+/en_us.lua index b5d81208..370a635e 100644 --- a/descriptions/ab+/en_us.lua +++ b/descriptions/ab+/en_us.lua @@ -473,7 +473,7 @@ EID.descriptions[languageCode].collectibles={ {"449", "Metal Plate", "{{SoulHeart}} +1 Soul Heart#{{Confusion}} Enemy bullets have a 25% chance to be reflected as concussive tears"}, {"450", "Eye of Greed", "Every 20 tears, shoot a coin tear that deals double damage#Hit enemies temporarily turn to gold#Gold enemies drop 1-4 coins if killed#!!! The coin tear costs 1 coin"}, {"451", "Tarot Cloth", "{{Card}} Drops a random card#{{Card}} Doubles the effect of any card used"}, - {"452", "Varicose Veins", "When taking damage, fire 10 tears in a circle around you#The tears deal 125% your damage"}, + {"452", "Varicose Veins", "When taking damage, fire 10 tears in a circle around you#The tears deal your damage + 25"}, {"453", "Compound Fracture", "Bone tears#Tears shatter into 1-3 smaller bone shards upon hitting anything#↑ +1.5 Range up#↑ +1 Tear Height"}, {"454", "Polydactyly", "You can carry two cards, runes or pills#Spawns a card, pill or rune on pickup"}, {"455", "Dad's Lost Coin", "↑ {{Range}} +1.5 Range up#↑ +1 Tear Height#Spawns a lucky penny"}, @@ -771,13 +771,13 @@ EID.descriptions[languageCode].unidentifiedPill = "Unidentified Pill" EID.descriptions[languageCode].pills={ {"0", "Bad Gas", "Spawns a gas cloud"}, - {"1", "Bad Trip", "Deals 1 heart of damage to you"}, + {"1", "Bad Trip", "Deals 1 heart of damage to you#Becomes a Full Health pill if you have 1 heart or less"}, {"2", "Balls of Steel", "{{SoulHeart}} +2 Soul Hearts"}, {"3", "Bombs are Key", "Switches number of bombs with keys"}, {"4", "Explosive Diarrhea", "Spawns 5 bombs over a period of five seconds at your position"}, {"5", "Full Health", "Full health"}, - {"6", "Health Down", "↓ {{Heart}} Health down"}, - {"7", "Health Up", "↑ {{Heart}} Health up"}, + {"6", "Health Down", "↓ {{Heart}} Health down#Becomes a Health Up pill if you have 0 or 1 Heart Containers"}, + {"7", "Health Up", "↑ {{EmptyHeart}} +1 Empty heart container"}, {"8", "I Found Pills", "No effect"}, {"9", "Puberty", "No effect#Eating 3 will give you the Adult transformation (+1 Red Heart)"}, {"10", "Pretty Fly", "Adds 1 fly orbital"}, diff --git a/descriptions/rep/en_us.lua b/descriptions/rep/en_us.lua index 60e8874e..ca6f6acc 100644 --- a/descriptions/rep/en_us.lua +++ b/descriptions/rep/en_us.lua @@ -238,7 +238,7 @@ local repCollectibles={ [566] = {"566", "Dream Catcher", "{{HalfSoulHeart}} +1 half Soul Heart when entering a new floor#In the stage transition nightmare, displays: #{{TreasureRoom}} Upcoming Treasure Room Item#{{BossRoom}} Upcoming Boss"}, -- Dream Catcher [567] = {"567", "Paschal Candle", "↑ {{Tears}} +0.4 Fire Rate up for every room cleared without taking damage#{{Tears}} Up to +2 Fire Rate possible"}, -- Paschal Candle [568] = {"568", "Divine Intervention", "Double tapping a fire key creates a shield#Shield lasts 1 second, pushes enemies away and reflects enemy projectiles and lasers"}, -- Divine Intervention - [569] = {"569", "Blood Oath", "Stabs you at the beginning of each floor, draining all but half a Red Heart#Increases stats for the floor:#↑ {{Damage}} Damage + 0.15 * HeartsLost^2#↑ {{Speed}} Speed + 0.05*HeartsLost"}, -- Blood Oath + [569] = {"569", "Blood Oath", "!!! Drains all your Red Hearts at the start of each floor to give Damage and Speed up for the floor:#↑ {{Damage}} Damage + 0.15 x Hearts Lost x Hearts Lost#↑ {{Speed}} Speed + 0.05 x HeartsLost#Each half heart lost can trigger damage-triggered items"}, -- Blood Oath [570] = {"570", "Playdough Cookie", "Grants multicolored tears with different status effects"}, -- Playdough Cookie [571] = {"571", "Orphan Socks", "Prevents damage from creep and floor spikes#↑ {{Speed}} +0.3 Speed up#↑ {{SoulHeart}} +2 Soul Hearts"}, -- Orphan Socks [572] = {"572", "Eye of the Occult", "Controllable tears#↑ {{Damage}} +1 Damage up#↑ {{Range}} +2 Range up#↓ {{Shotspeed}} -0.16 Shot Speed down"}, -- Eye of the Occult @@ -915,7 +915,6 @@ EID.descriptions[languageCode].tarotClothBuffs = { ---------- Pills ---------- local repPills={ - [2] = {"1", "Bad Trip", "Deals 1 heart of damage to you#Doesn't affect the chance of a deal"}, --Bad Trip [4] = {"3", "Bombs are Key", "Switches number of bombs with keys#Golden bombs and keys are also swapped"}, -- Bombs are Key [12] = {"11", "Range Down", "↓ {{Range}} -0.6 Range down"}, -- Range Down [13] = {"12", "Range Up", "↑ {{Range}} +0.75 Range up"}, -- Range Up @@ -937,13 +936,13 @@ EID:updateDescriptionsViaTable(repPills, EID.descriptions[languageCode].pills) EID.descriptions[languageCode].horsepills={ {"0", "Bad Gas", "{{Poison}} Poisons entire room"}, -- Bad Gas - {"1", "Bad Trip", "Deals 2 hearts of damage to you"}, -- Bad Trip + {"1", "Bad Trip", "Deals 2 hearts of damage to you#Becomes a Full Health horse pill (+3 Soul Hearts) if you have 1 heart or less"}, -- Bad Trip {"2", "Balls of Steel", "{{SoulHeart}} +4 Soul Hearts"}, -- Balls of Steel {"3", "Bombs are Key", "Switches number of bombs with keys#Increases key and bomb count by 50%#Golden bombs and keys are also swapped"}, -- Bombs are Key {"4", "Explosive Diarrhea", "Spawns some mega homing troll bombs at your position"}, -- Explosive Diarrhea - {"5", "Full Health", "Full Health#{{SoulHeart}}+3 Soul Hearts"}, -- Full Health - {"6", "Health Down", "↓ -2 Health down"}, -- Health Down - {"7", "Health Up", "↑ {{EmptyHeart}}+2 empty heart containers"}, -- Health Up + {"5", "Full Health", "Full Health#{{SoulHeart}} +3 Soul Hearts"}, -- Full Health + {"6", "Health Down", "↓ -2 Health down#Becomes a Health Up horse pill if you have 0 or 1 Heart Containers"}, -- Health Down + {"7", "Health Up", "↑ {{EmptyHeart}} +2 Empty heart containers"}, -- Health Up {"8", "I Found Pills", "No effect"}, -- I Found Pills {"9", "Puberty", "No effect"}, -- Puberty {"10", "Pretty Fly", "{{Collectible279}} Adds 1 Big Fan fly orbital#There is no upper limit"}, -- Pretty Fly diff --git a/descriptions/rep/ru.lua b/descriptions/rep/ru.lua index b2a4a169..b639c290 100644 --- a/descriptions/rep/ru.lua +++ b/descriptions/rep/ru.lua @@ -819,7 +819,7 @@ EID.descriptions[languageCode].goldenTrinketEffects = { local repCards={ [2] = {"2", "I - Маг", "В данной комнате даёт: #Самонаводящие слёзы#↑ {{Range}} +3 дальности"}, -- I - The Magician - [4] = {"4", "III - Импepaтpицa", "В данной комнате даёт: #↑ {{Damage}} +2.35 уронаp#↑ {{Speed}} +0.3 скорости"}, + [4] = {"4", "III - Импepaтpицa", "В данной комнате даёт: #↑ {{Damage}} +2.35 урона#↑ {{Speed}} +0.3 скорости"}, [12] = {"12", "XI - Сила", "↑ +1 к здоровью#↑ +0.3 к урону#↑ +50% множитель урона#↑ +1.5 дальность#↑ +0.5 высоты слезы#↑ +0.3 скорости#В пределах комнаты"}, -- XI - Strength [16] = {"16", "XV - Дьявол", "↑ {{Damage}} +2 урона в данной комнате"}, [18] = {"18", "XVII - Звёзды", "Телепортирует в {{TreasureRoom}} Комнату Сокровищ, если она есть на уровне#Если есть {{Planetarium}} Планетарий, то телепортирует в него"}, diff --git a/eid_api.lua b/eid_api.lua index 3f9fac3c..381af3c8 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -428,13 +428,16 @@ function EID:getAdjustedSubtype(Type, Variant, SubType) return SubType - 32768 end elseif tableName == "pills" or tableName == "horsepills" then + -- The effect of a pill varies depending on what player is looking at it in co-op + -- EID.pillPlayer is a way to recheck a pill for what different players will turn it into + local player = EID.pillPlayer or EID.player if REPENTANCE and SubType % PillColor.PILL_GIANT_FLAG == PillColor.PILL_GOLD then return 9999 end local pool = game:GetItemPool() - if REPENTANCE and EID.player:GetPlayerType() == PlayerType.PLAYER_THESOUL_B then - SubType = pool:GetPillEffect(SubType, EID.player:GetOtherTwin() or EID.player) + 1 - else SubType = pool:GetPillEffect(SubType, EID.player) + 1 end + if REPENTANCE and player:GetPlayerType() == PlayerType.PLAYER_THESOUL_B then + SubType = pool:GetPillEffect(SubType, player:GetOtherTwin() or player) + 1 + else SubType = pool:GetPillEffect(SubType, player) + 1 end end return SubType end diff --git a/eid_modifiers.lua b/eid_modifiers.lua index c5d2c053..c504b21b 100644 --- a/eid_modifiers.lua +++ b/eid_modifiers.lua @@ -472,6 +472,29 @@ if REPENTANCE then end return descObj end + + -- Handle co-op players seeing different pill effects + local function CoopPillCallback(descObj) + local printedDescs = { [descObj.Name] = true } + + for i = 1,#EID.coopAllPlayers do + local player = EID.coopAllPlayers[i] + EID.pillPlayer = player + local playerID = player:GetPlayerType() + -- Regrab the pill description object with this player + local pillObj = EID:getDescriptionObjByEntity(descObj.Entity) + + -- only print a given pill description once, even if it affects multiple players + -- if it's 4P co-op and P1 has PHD, and P2/P3/P4 all get same effect, no one wants to see that 3 times + if not printedDescs[pillObj.Name] then + -- new pill effect to print + printedDescs[pillObj.Name] = true + EID:appendToDescription(descObj, "#" .. (EID:getIcon("Player"..playerID) ~= EID.InlineIcons["ERROR"] and "{{Player"..playerID.."}}" or "{{CustomTransformation}}").." {{ColorObjName}}"..pillObj.Name .."{{CR}}#"..pillObj.Description) + end + end + EID.pillPlayer = nil + return descObj + end -- Handle Abyss description addition local function AbyssCallback(descObj) @@ -542,8 +565,11 @@ if REPENTANCE then -- Pill Callbacks elseif descObj.ObjVariant == PickupVariant.PICKUP_PILL then if EID.collectiblesOwned[654] then table.insert(callbacks, FalsePHDCallback) end - if EID.collectiblesOwned[348] then table.insert(callbacks, PlaceboCallback) end + + if EID.pillPlayer == nil and #EID.coopAllPlayers > 1 then + table.insert(callbacks, CoopPillCallback) + end -- Trinket Callbacks elseif descObj.ObjVariant == PickupVariant.PICKUP_TRINKET then -- Golden Trinket / Mom's Box diff --git a/main.lua b/main.lua index fdc53de2..62971557 100644 --- a/main.lua +++ b/main.lua @@ -670,7 +670,7 @@ function EID:printDescription(desc, cachedID) local playerIcon = EID:getIcon("Player"..player.SubType) ~= EID.InlineIcons["ERROR"] and "{{Player"..player.SubType.."}}" or "{{CustomTransformation}}" transformationName = transformationName .. playerIcon end - local numCollected = EID.TransformationProgress[EID:getPlayerID(player)][transform] or 0 + local numCollected = EID.TransformationProgress[EID:getPlayerID(player)] and EID.TransformationProgress[EID:getPlayerID(player)][transform] or 0 local numMax = EID.TransformationData[transform] and EID.TransformationData[transform].NumNeeded or 3 transformationName = transformationName.."("..numCollected.."/"..numMax..") " end