Merge branch 'wofsauge:master' into master

This commit is contained in:
wakaba (aka. 미카) authored and GitHub committed 2022-06-30 11:16:36 +09:00
commit 5094bda76e
5 files changed
+95 -1

No files matched your search

+31
View File
@@ -893,3 +893,34 @@ EID.descriptions[languageCode].HoldMapHeader = " Result"
EID.descriptions[languageCode].RoomTypeNames = { "Normal Room", "Shop", "I AM ERROR Room", "Treasure Room", "Boss Room", "Miniboss Room", "Secret Room", "Super Secret Room", "Arcade Room", "Curse Room", "Challenge Room", "Library", "Sacrifice Room", "Devil Room", "Angel Room", "Crawlspace Room", "Boss Rush Room", "Isaac's Room", "Barren Room", "Chest Room", "Dice Room", "Black Market", "Exit Room", "Planetarium", "Teleporter Entrance", "Teleporter Exit", "Alt Path Trapdoor", "Blue Key Room", "Ultra Secret Room",
-- Not technically room types but still potentially useful to have localized
[666] = "Angel/Devil Room", [1024] = "Red Room", [1025] = "Special Red Room" }
-- currently used for D1
EID.descriptions[languageCode].PickupNames = {
["5.0"] = "None",
["5.10"] = "{{Heart}} Heart",
["5.10.1"] = "{{Heart}} Heart", ["5.10.2"] = "{{HalfHeart}} Half Heart", ["5.10.3"] = "{{SoulHeart}} Soul Heart", ["5.10.4"] = "{{EternalHeart}} Eternal Heart", ["5.10.5"] = "{{Heart}} Double Heart", ["5.10.6"] = "{{BlackHeart}} Black Heart", ["5.10.7"] = "{{GoldHeart}} Gold Heart", ["5.10.8"] = "{{HalfSoulHeart}} Half Soul Heart", ["5.10.9"] = "{{Heart}} Scared Heart", ["5.10.10"] = "{{BlendedHeart}} Blended Heart", ["5.10.11"] = "{{EmptyBoneHeart}} Bone Heart", ["5.10.12"] = "{{RottenHeart}} Rotten Heart",
["5.20"] = "{{Coin}} Coin",
["5.20.1"] = "{{Crafting8}} Penny", ["5.20.2"] = "{{Crafting9}} Nickel", ["5.20.3"] = "{{Crafting10}} Dime", ["5.20.4"] = "{{Crafting8}} Double Penny", ["5.20.5"] = "{{Crafting11}} Lucky Penny", ["5.20.6"] = "{{Crafting9}} Sticky Nickel", ["5.20.7"] = "{{Crafting26}} Golden Penny",
["5.30"] = "{{Key}} Key",
["5.30.1"] = "{{Crafting12}} Key", ["5.30.2"] = "{{Crafting13}} Golden Key", ["5.30.3"] = "{{Crafting12}} Key Ring", ["5.30.4"] = "{{Crafting14}} Charged Key",
["5.40"] = "{{Bomb}} Bomb",
["5.40.1"] = "{{Crafting15}} Bomb", ["5.40.2"] = "{{Crafting15}} Double Bomb", ["5.40.3"] = "{{Crafting15}} Troll Bomb", ["5.40.4"] = "{{Crafting16}} Golden Bomb", ["5.40.5"] = "{{Crafting15}} Megatroll Bomb", ["5.40.7"] = "{{Crafting17}} Giga Bomb",
["5.90"] = "{{Battery}} Battery",
["5.90.0"] = "{{Crafting19}} Lil' Battery", --AB+ didn't have subtypes for batteries
["5.90.1"] = "{{Crafting19}} Lil' Battery", ["5.90.2"] = "{{Crafting18}} Micro Battery", ["5.90.3"] = "{{Crafting20}} Mega Battery", ["5.90.4"] = "{{Crafting28}} Golden Battery",
["5.50"] = "{{Chest}} Chest", ["5.51"] = "{{BombChest}} Bomb Chest", ["5.52"] = "{{SpikedChest}} Spiked Chest", ["5.53"] = "{{EternalChest}} Eternal Chest", ["5.54"] = "{{MimicChest}} Mimic Chest", ["5.55"] = "{{OldChest}} Old Chest", ["5.56"] = "{{WoodenChest}} Wooden Chest", ["5.57"] = "{{MegaChest}} Mega Chest", ["5.58"] = "{{HauntedChest}} Haunted Chest", ["5.60"] = "{{GoldenChest}} Golden Chest", ["5.360"] = "{{RedChest}} Red Chest",
["5.69"] = "{{GrabBag}} Grab Bag", ["5.69.1"] = "{{GrabBag}} Grab Bag", ["5.69.2"] = "{{BlackSack}} Black Sack",
["5.70"] = "{{Pill}} Pill",
["5.300"] = "{{Card}} Card",
["5.301"] = "{{Rune}} Rune", -- not a real id
["5.350"] = "{{Trinket}} Trinket",
}
+7 -1
View File
@@ -118,7 +118,13 @@ EID.TextReplacementPairs = {
{"{{Hashtag}}", "ǂ"}, -- Hashtag
{"{{CR}}", "{{ColorReset}}"}, -- Shortcut for Color Resetting
{"{{EthernalHeart}}", "{{EternalHeart}}"}, -- fix spelling error
{"{{CONFIG_BoC_Toggle}}", function(_) return EID.ButtonToIconMap[EID.Config["BagOfCraftingToggleKey"]] or "{{ButtonSelect}}" end}, -- fix spelling error
{"{{CONFIG_BoC_Toggle}}", function(_) return EID.ButtonToIconMap[EID.Config["BagOfCraftingToggleKey"]] or "{{ButtonSelect}}" end},
-- more common/official names
{"{{MimicChest}}", "{{TrapChest}}"}, {"{{EternalChest}}", "{{HolyChest}}"}, {"{{BombChest}}", "{{StoneChest}}"},
{"{{OldChest}}", "{{DirtyChest}}"}, {"{{CurseRoom}}", "{{CursedRoom}}"}, {"{{Crawlspace}}", "{{LadderRoom}}"},
{"{{GoldHeart}}", "{{GoldenHeart}}"},
}
local controllerSprites = Sprite()
controllerSprites:Load("gfx/ui/buttons.anm2", true)
+3
View File
@@ -104,6 +104,9 @@ function EID:getHoldMapDescription(player, checkingTwin)
elseif heldActive == 489 then
blacklist["5.100.489"] = true
addObjectDesc(5, 100, EID:CurrentDInfinity(getSeed(489), currentPlayer), "{{Collectible489}}")
elseif heldActive == 476 and EID.Config["ItemReminderShowRNGCheats"] then
blacklist["5.100.476"] = true
append("{{Collectible476}}", EID:getObjectName(5,100,476) .. EID:getDescriptionEntry("HoldMapHeader"), EID:D1Prediction(getSeed(476)))
else
addObjectDesc(5, 100, heldActive)
end
+53
View File
@@ -1,6 +1,7 @@
-- This file is for various functions that are able to calculate the result effect that an item will have
local game = Game()
local variantToName = { [70] = "Pill", [100] = "Collectible", [300] = "Card", [350] = "Trinket" }
-- reimplementation of RNG:Next()
-- Default RNG shift values for many things are 5, 9, 7
function EID:RNGNext(rngNum, shift1, shift2, shift3)
@@ -268,3 +269,55 @@ function EID:VoidRNGCheck(player, isRune)
-- if there were no absorbable pedestals, the "single increase" stats are the same as the "one extra" stats
if count == 0 then eidTable[3] = {table.unpack(increases)} end
end
-- D1 --
local D1blacklist = { [41] = true, [100] = true, [110] = true, [150] = true, [340] = true, [370] = true, [380] = true, [390] = true }
if not REPENTANCE then D1blacklist[54] = true end -- Mimic Chest blacklist in AB+
-- These Variants all duplicate into a Chest in Repentance (and should have their SubType ignored in AB+)
local D1chests = { [50] = true, [51] = true, [52] = true, [53] = true, [54] = true, [55] = true, [56] = true, [57] = true, [58] = true, [60] = true, [360] = true }
-- These Card variants duplicate as themselves in Repentance
local specialCards = {[49] = true, [50] = true, [78] = true}
function EID:D1Prediction(rng)
local poss = {}
for i,v in ipairs(Isaac.FindByType(5,-1,-1)) do
-- Check the blacklist, as well as Rune of Jera in AB+, and empty chests in Rep
if not D1blacklist[v.Variant] and (REPENTANCE or v.Variant ~= 300 or v.SubType ~= 33) and (not REPENTANCE or v:ToPickup():CanReroll()) then
table.insert(poss, v)
end
end
if #poss == 0 then return EID:getDescriptionEntry("PickupNames")["5.0"] end
rng = EID:RNGNext(rng)
local sel = (rng % #poss) + 1
local fullID = "5." .. poss[sel].Variant .. "." .. poss[sel].SubType
if REPENTANCE then
-- in rep, we don't care about subtype...
fullID = "5." .. poss[sel].Variant
if poss[sel].Variant == 300 then
if specialCards[poss[sel].SubType] then
local objName = EID:getObjectName(5, poss[sel].Variant, poss[sel].SubType, poss[sel])
return "{{" .. variantToName[poss[sel].Variant] .. poss[sel].SubType .. "}} " .. objName
elseif EID.runeIDs[poss[sel].SubType] then
fullID = "5.301"
end
end
-- all Chest variants turn into a random Chest
if D1chests[poss[sel].Variant] then fullID = "5.50" end
else
if D1chests[poss[sel].Variant] then fullID = "5." .. poss[sel].Variant
-- display the item name for pills, cards, and trinkets in AB+
elseif poss[sel].Variant == 70 or poss[sel].Variant == 300 or poss[sel].Variant == 350 then
local objName = EID:getObjectName(5, poss[sel].Variant, poss[sel].SubType, poss[sel])
-- don't display the name of unidentified pills!
if poss[sel].Variant == 70 and not EID.Config["ShowUnidentifiedPillDescriptions"] and not game:GetItemPool():IsPillIdentified(poss[sel].SubType) then
objName = EID:getDescriptionEntry("unidentifiedPill")
end
return "{{" .. variantToName[poss[sel].Variant] .. poss[sel].SubType .. "}} " .. objName
end
end
local pickupNames = EID:getDescriptionEntry("PickupNames") or {}
return pickupNames[fullID] or EID.XMLEntityNames[fullID] or fullID
end
+1
View File
@@ -1614,6 +1614,7 @@ if REPENTANCE then
end
function EID:OnUsePill(pillEffectID, player)
player = player or EID.player --AB+ doesn't receive player in callback arguments!
local playerID = EID:getPlayerID(player)
-- Dead Tainted Lazarus exceptions
local pillsTable = EID.PlayerItemInteractions[playerID].pills