Merge pull request #467 from Buurazu/master

Fix co-op active item tracking, smol desc changes
This commit is contained in:
Buurazu authored and GitHub committed 2022-05-20 14:40:24 -04:00
commit 903244cb4b
3 files changed
+26 -17

No files matched your search

+5 -5
View File
@@ -535,7 +535,7 @@ EID.descriptions[languageCode].collectibles={
{"511", "Angry Fly", "Orbits around a random enemy until that enemy dies#Deals 30 contact damage per second to other enemies"},
{"512", "Black Hole", "Throwable black hole, which sucks in everything#Deals 0.4 damage every tick#Destroys nearby rocks#Lasts 6 seconds"},
{"513", "Bozo", "↑ +0.1 Damage up#+1 Soul Heart#Random chance to charm/fear an enemy#Random chance to spawn a rainbow poop upon taking damage"},
{"514", "Broken Modem", "Causes random enemies to 'lag' at random intervals, causing them to shortly freeze#25% chance to double room clear drops"},
{"514", "Broken Modem", "Causes random enemies and projectiles to 'lag' at random intervals, causing them to shortly freeze#25% chance to double room clear drops"},
{"515", "Mystery Gift", "!!! SINGLE USE !!!#Spawns a random item from the current room's item pool#Chance to spawn Lump of Coal or The Poop instead"},
{"516", "Sprinkler", "Spawns a Sprinkler that rotates in a circle, spraying your tears in all directions"},
{"517", "Fast Bombs", "{{Bomb}} +7 Bombs#Allows you to rapidly place bombs on the ground"},
@@ -644,7 +644,7 @@ EID.descriptions[languageCode].trinkets={
{"64", "Rainbow Worm", "Random worm effect every 3 seconds"},
{"65", "Tape Worm", "↑ {{Range}} Doubles your Range#-50% Tear Height"},
{"66", "Lazy Worm", "↓ {{Shotspeed}} -0.4 Shot Speed down#↑ {{Range}} +4 Range up#↑ +2 Tear Height"},
{"67", "Cracked Dice", "When getting hit, 50% chance to use the :#{{Collectible105}} D6#{{Collectible406}} D8#{{Collectible386}} D12 or #{{Collectible166}} D20"},
{"67", "Cracked Dice", "When getting hit, 50% chance to use the:#{{Collectible105}} D6#{{Collectible406}} D8#{{Collectible386}} D12 or #{{Collectible166}} D20"},
{"68", "Super Magnet", "Magnet for pickups and enemies"},
{"69", "Faded Polaroid", "Camouflages the player randomly#Confuses enemies"},
{"70", "Louse", "Chance to spawn 1 spider while in a hostile room"},
@@ -657,7 +657,7 @@ EID.descriptions[languageCode].trinkets={
{"77", "Blister", "Increases knockback"},
{"78", "Second Hand", "2x longer status effects on enemies"},
{"79", "Endless Nameless", "25% chance when using pills/cards to drop a copy of the pill/card"},
{"80", "Black Feather", "↑ {{Damage}} +0.2 Damage up for each {{DevilRoom}} devil item held"},
{"80", "Black Feather", "↑ {{Damage}} +0.2 Damage up for each \"Evil up\" item held"},
{"81", "Blind Rage", "Invincibility lasts 2x longer after getting hit"},
{"82", "Golden Horse Shoe", "{{TreasureRoom}} +15% chance for Treasure Rooms to have two items on future floors#You can only choose one"},
{"83", "Store Key", "{{Shop}} Open Shops for free"},
@@ -724,7 +724,7 @@ EID.descriptions[languageCode].cards={
{"12", "XI - Strength", "For current room grants: #↑ {{Heart}} +1 Health up#↑ {{Damage}} +0.3 Damage up#↑ {{Damage}} +50% Damage#↑ {{Range}} +5.25 Range up#↑ +0.5 Tear Height#↑ {{Speed}} +0.3 Speed up"},
{"13", "XII - The Hanged Man", "Grants flight for current room"},
{"14", "XIII - Death", "Deals 40 damage to all enemies in the room"},
{"15", "XIV - Temperance", "{{DonationMachine}} Spawns a Blood Donation Machine#{{GreedMode}} / {{GreedierMode}} Spawns a Devil Beggar in Greed Mode"},
{"15", "XIV - Temperance", "{{DonationMachine}} Spawns a Blood Donation Machine#{{GreedMode}} Spawns a Devil Beggar in Greed Mode"},
{"16", "XV - The Devil", "↑ {{Damage}} +2 Damage up for current room"},
{"17", "XVI - The Tower", "Spawns 6 troll bombs"},
{"18", "XVII - The Stars", "{{TreasureRoom}} Teleports you to the Treasure Room"},
@@ -740,7 +740,7 @@ EID.descriptions[languageCode].cards={
{"28", "Ace of Diamonds", "{{Coin}} Turns all pickups into coins"},
{"29", "Ace of Spades", "{{Key}} Turns all pickups into keys"},
{"30", "Ace of Hearts", "{{Heart}} Turns all pickups into hearts"},
{"31", "Joker", "{{DevilRoom}} / {{AngelRoom}} Teleports you to the Devil or Angel Room"},
{"31", "Joker", "{{AngelDevilChance}} Teleports you to the Devil or Angel Room"},
{"32", "Hagalaz", "Destroy all rocks in the room"},
{"33", "Jera", "Duplicate all pickups in room"},
{"34", "Ehwaz", "Spawns a trapdoor to the next floor#8% chance for {{LadderRoom}}crawlspace trapdoor"},
+4 -4
View File
@@ -207,7 +207,7 @@ local repCollectibles={
[496] = {"496", "Euthanasia", "3.33% chance to shoot needles#{{Luck}} 25% chance at 15 Luck#Needles kill normal enemies instantly, bursting them into 10 tears#Needles deal 3x damage against bosses"}, -- Euthanasia
[497] = {"497", "Camo Undies", "When you enter a room, camouflage yourself and confuse all enemies until you start shooting#↑ {{Speed}} +0.5 Speed up while cloaked#Upon uncloak, deal damage around you and gain a very brief Fire Rate and Damage up"},
[498] = {"498", "Duality", "{{AngelDevilChance}} Spawns Devil AND Angel Room doors#When entering one, the other disappears"},
[501] = {"501", "Greed's Gullet", "Gain 1 Heart Container for every 25 coins you have#{{Player14}} / {{Player33}}Keeper can gain additional Coin Hearts#{{Collectible416}} Gain 1 Heart Container for every 100 coins you have past 99"}, -- Greed's Gullet
[501] = {"501", "Greed's Gullet", "Gain 1 Heart Container for every 25 coins you have#{{Player14}} Keeper can gain additional Coin Hearts#{{Collectible416}} Gain 1 Heart Container for every 100 coins you have past 99"}, -- Greed's Gullet
[503] = {"503", "Little Horn", "5% chance to shoot tears that summon a Big Horn hand#{{Luck}} 20% chance at 15 Luck#The hand kills enemies instantly and deals damage to bosses#Running into enemies deals 3.5 damage to them"}, -- Little Horn
[504] = {"504", "Brown Nugget", "Spawns a fly turret that shoots at enemies#Each shot deals 3.5 damage"}, -- Brown Nugget
[506] = {"506", "Backstabber", "If tears hit an enemy in the back, they do double damage and cause bleeding, which makes enemies leave creep and take damage when they move"},
@@ -386,7 +386,7 @@ local repCollectibles={
[713] = {"713", "Sumptorium", "Removes half a heart and creates a Clot familiar#Each type of heart generates a Clot with different HP, damage and tear effect"}, -- Sumptorium
[714] = {"714", "Recall", "Retrieves the Forgotten's body from any distance"}, -- Recall
[715] = {"715", "Hold", "Preserves one poop bomb inside that can be used later"}, -- Hold
[716] = {"716", "Keeper's Sack", "Spawns {{Coin}} 3 random coins and {{Key}} 1 key#{{Shop}} Every 3 coins spent when buying items gives one of the following:#↑ {{Damage}} +0.5 Damage up#↑ {{Range}} +0.25 Range up#↑ {{Speed}} +0.03 Damage up"}, -- Keeper's Sack
[716] = {"716", "Keeper's Sack", "Spawns {{Coin}} 3 random coins and {{Key}} 1 key#{{Shop}} Every 3 coins spent when buying items gives one of the following:#↑ {{Damage}} +0.5 Damage up#↑ {{Range}} +0.25 Range up#↑ {{Speed}} +0.03 Speed up"}, -- Keeper's Sack
[717] = {"717", "Keeper's Kin", "Rocks and props spawn 2 blue spiders when destroyed#Rocks can occasionally spawn blue spiders when in a hostile room"}, -- Keeper's Kin
[718] = {"718", "Keeper's Rope (Cut item)", "<Item does not exist>"}, -- Keepers Rope (Cut item)
[719] = {"719", "Keeper's Box", "{{Shop}} Spawns a random shop item/pickup for purchase"}, -- Keeper's Box
@@ -717,7 +717,7 @@ local repTrinkets={
[65] = {"65", "Tape Worm", "↑ {{Range}} +3 Range up"}, -- Tape Worm
[66] = {"66", "Lazy Worm", "↓ {{Shotspeed}} -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", "↑ {{Damage}} +0.5 Damage up for each {{DevilRoom}} devil item held"}, -- Black Feather
[80] = {"80", "Black Feather", "↑ {{Damage}} +0.5 Damage up for each \"Evil up\" item held"}, -- Black Feather
[92] = {"92", "Cracked Crown", "↑ Stat increases of your items are 20% more effective"}, -- Cracked Crown
[96] = {"96", "Ouroboros Worm", "Tears move quickly in a spiral pattern#↑ +0.4 Tears up#↑ {{Range}} +1.5 Range up#Grants spectral tears#Chance for homing tears"}, -- Ouroboros Worm
[98] = {"98", "Nose Goblin", "{{Poison}} 5% chance to shoot homing sticky poison tears#Deals your damage each second#Sticks for 10 seconds"},
@@ -899,7 +899,7 @@ EID.descriptions[languageCode].tarotClothBuffs = {
[17] = "Spawns 12 troll bombs", -- XVI - The Tower
[18] = "If the Treasure Room wasn't entered before, it will have two items to choose from", -- XVII - The Stars
[21] = "Spawns 2 Beggars", -- XX - Judgement
[56] = "Drops all items alongside pickups, including {{Collectible451}} Tarot Cloth", -- 0 - The Fool?
[56] = "Drops your most recent 6 items alongside the pickups", -- 0 - The Fool?
[59] = "↑ {{Heart}} +3 Health up", -- III - The Empress?
[61] = "{{EmptyBoneHeart}} Spawns 3 Bone Hearts", -- V - The Hierophant?
[62] = "{{BrokenHeart}} Adds 2 Broken Hearts and spawns 2 items", -- VI - The Lovers?
+17 -8
View File
@@ -1599,16 +1599,20 @@ function EID:evaluateTransformationProgress(transformation)
end
end
-- Given a transformation identifier, iterate over every player and count the number of items they have which count towards that transformation
-- Watch for a player's queued item (holding an item over their head) to track active item touches
EID.PlayerItemInteractions = {}
local hadQueuedItem = {}
function EID:evaluateQueuedItems()
--initialize the interactions table for all players if it isn't already
for i = 0, game:GetNumPlayers() - 1 do
local player = Isaac.GetPlayer(i)
if not EID.PlayerItemInteractions[i] then
EID.PlayerItemInteractions[i] = {LastTouch = 0, actives = {}, pills = {}, altActives = {}, altPills = {}}
end
end
for i = 0, game:GetNumPlayers() - 1 do
local player = Isaac.GetPlayer(i)
if player.QueuedItem then
if not EID.PlayerItemInteractions[i] then
EID.PlayerItemInteractions[i] = {LastTouch = 0, actives = {}, pills = {}, altActives = {}, altPills = {}}
end
-- Refresh our descriptions upon a queued passive item being added to a player
if not player.QueuedItem.Item and hadQueuedItem[i] then
EID.ForceRefreshCache = true
@@ -1621,16 +1625,21 @@ function EID:evaluateQueuedItems()
end
if not player.QueuedItem.Touched and player.QueuedItem.Item and player.QueuedItem.Item.Type == ItemType.ITEM_ACTIVE then
local itemID = tostring(player.QueuedItem.Item.ID)
-- A new active item was touched; initiate its touch count to 0 for all players
-- (Fixes co-op bugs, compared to only initiating it for the toucher)
for j = 0, game:GetNumPlayers() - 1 do
local player = Isaac.GetPlayer(j)
EID.PlayerItemInteractions[j].actives[itemID] = EID.PlayerItemInteractions[j].actives[itemID] or 0
EID.PlayerItemInteractions[j].altActives[itemID] = EID.PlayerItemInteractions[j].altActives[itemID] or 0
end
-- Dead Tainted Lazarus exceptions
local activesTable = EID.PlayerItemInteractions[i].actives
if player:GetPlayerType() == 38 then
activesTable = EID.PlayerItemInteractions[i].altActives or activesTable
end
EID.ForceRefreshCache = true
local itemID = tostring(player.QueuedItem.Item.ID)
if not activesTable[itemID] then
activesTable[itemID] = 0
end
activesTable[itemID] = activesTable[itemID] + 1
EID.PlayerItemInteractions[i].LastTouch = game:GetFrameCount()
end