From 27fad7d0c2d923d3e35b8521d6e2ef75a8da2361 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Mon, 21 Mar 2022 21:24:52 -0400 Subject: [PATCH 1/4] Rep patch: Locked recipes no longer ignore unlock status --- eid_bagofcrafting.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/eid_bagofcrafting.lua b/eid_bagofcrafting.lua index b8743fad..a1128516 100644 --- a/eid_bagofcrafting.lua +++ b/eid_bagofcrafting.lua @@ -358,10 +358,15 @@ function EID:calculateBagOfCrafting(componentsTable) table.sort(components) local componentsAsString = table.concat(components, ",") - -- Check the fixed recipes. Currently, the fixed recipes ignore item unlock status + -- Check the fixed recipes + local fixedRecipeResult = nil local cacheResult = CraftingFixedRecipes[componentsAsString] if cacheResult ~= nil then - return cacheResult, cacheResult + if EID:isCollectibleUnlockedAnyPool(cacheResult) then + return cacheResult, cacheResult + else + fixedRecipeResult = cacheResult + end end -- Check the recipes already calculated for this seed cacheResult = calculatedRecipes[componentsAsString] @@ -453,9 +458,9 @@ function EID:calculateBagOfCrafting(componentsTable) end --When the first crafting result is an achievement locked item, this process gets repeated a second time to choose a new result --That 2nd pick could also be achievement locked but we're ignoring that... - local firstOption = nil + local firstOption = fixedRecipeResult while true do - local t = nextFloat() -- number between 0 and 1 + local t = nextFloat() -- random number between 0 and 1 local target = t * totalWeight -- number between 0 and total weight of possible results for k,v in ipairs(itemWeights) do target = target - v From 914fbbe293f28ae02692e58d4691fd972468329b Mon Sep 17 00:00:00 2001 From: Buurazu Date: Mon, 21 Mar 2022 22:58:07 -0400 Subject: [PATCH 2/4] Shovel crawlspace effect wording --- descriptions/ab+/en_us.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/descriptions/ab+/en_us.lua b/descriptions/ab+/en_us.lua index 694ab82e..ee5356ad 100644 --- a/descriptions/ab+/en_us.lua +++ b/descriptions/ab+/en_us.lua @@ -103,7 +103,7 @@ EID.descriptions[languageCode].collectibles={ {"81", "Dead Cat", "↑ +9 lives#Respawn with 1 HP#↓ Sets your Red Heart containers to 1#Characters that can't have Red Hearts get set to 1 Soul/Black Heart"}, {"82", "Lord of the Pit", "Flight#↑ {{Speed}} +0.3 Speed up"}, {"83", "The Nail", "{{SoulHeart}} +1 Soul Heart#↑ {{Damage}} +0.7 Damage up#↓ {{Speed}} -0.18 Speed down#Deal contact damage#Destroy rocks when walking over them"}, - {"84", "We Need To Go Deeper!", "Spawns a trapdoor to skip the floor#10% chance for crawlspace trapdoor"}, + {"84", "We Need To Go Deeper!", "Spawns a trapdoor to the next floor#10% chance for {{LadderRoom}}crawlspace trapdoor"}, {"85", "Deck of Cards", "{{Card}} Spawns 1 Card"}, {"86", "Monstro's Tooth", "Summon Monstro for one stomp"}, {"87", "Loki's Horns", "25% chance to shoot in 4 directions#{{Luck}} 100% chance at 7 Luck"}, @@ -399,7 +399,7 @@ EID.descriptions[languageCode].collectibles={ {"377", "Bursting Sack", "Spider enemies no longer target or deal contact damage to Isaac"}, {"378", "No. 2", "Firing tears for 3 seconds drops a Butt Bomb"}, {"379", "Pupula Duplex", "Tears get a much larger hitbox#Spectral tears"}, - {"380", "Pay To Play", "+5 coins#You can open doors with coins instead of keys"}, + {"380", "Pay To Play", "+5 coins#You now open single-key doors with coins instead of keys"}, {"381", "Eden's Blessing", "↑ {{Tears}} +0.7 Tears up#Gives you a random item at the start of your next run"}, {"382", "Friendly Ball", "Can be thrown at enemies to capture them#Next usage will re-spawn the same enemy as a friendly companion"}, {"383", "Tear Detonator", "Detonate any tears currently on the screen, causing each one to split into 6 more tears which will spread in a circle"}, @@ -516,7 +516,7 @@ EID.descriptions[languageCode].collectibles={ {"494", "Jacob's Ladder", "Tears spawn 1-2 sparks of electricity on impact#Sparks deal half your damage"}, {"495", "Ghost Pepper", "Chance to shoot a red flame that blocks enemy shots and deals contact damage#The flame stays until it has dealt damage or blocked shots 5 times"}, {"496", "Euthanasia", "3.33% chance to shoot needles#100% chance at 15 Luck#Needles kill normal enemies instantly, bursting them into 10 tears#Needles deal 3x damage against bosses"}, - {"497", "Camo Undies", "Confuse all enemies and camouflage yourself when entering a room until you start shooting"}, + {"497", "Camo Undies", "When you enter a room, camouflage yourself and confuse all enemies until you start shooting"}, {"498", "Duality", "{{DevilChance}} / {{AngelChance}} Spawns Devil AND Angel Room doors#When entering one, the other disappears"}, {"499", "Eucharist", "100% chance to find an {{AngelRoom}}Angel Room"}, {"500", "Sack of Sacks", "Spawns a sack every 5-6 rooms"}, @@ -571,7 +571,7 @@ EID.descriptions[languageCode].collectibles={ {"549", "Brittle Bones", "Replaces all your Red Heart containers with 6 Bone Hearts#Upon losing a Bone Heart:#Fires 8 bone tears in all directions#↑ +0.5 Tears up permanently"}, {"550", "Broken Shovel", "Mom's Foot will constantly attack you#Using it stops Mom's Foot for current room#!!! (Try to beat Boss Rush with it!)"}, {"551", "Broken Shovel", "Second part of a broken shovel#!!! Use the shovel on the hill of dirt in the \"Dark Room\""}, - {"552", "Mom's Shovel", "Spawns trapdoor to next floor#!!! Use the shovel on the hill of dirt in the \"Dark Room\"#!!! Unlocks something cool"}, + {"552", "Mom's Shovel", "Spawns a trapdoor to the next floor#10% chance for {{LadderRoom}}crawlspace trapdoor#!!! Use the shovel on the hill of dirt in the \"Dark Room\"#!!! Unlocks something cool"}, } ---------- Trinkets ---------- @@ -649,7 +649,7 @@ EID.descriptions[languageCode].trinkets={ {"71", "Bob's Bladder", "Bombs leave creep"}, {"72", "Watch Battery", "6.66% chance for the room clear reward to be a battery#+10% chance for random pickups to be a battery#5% chance to add 1 charge to held active item when clearing a room"}, {"73", "Blasting Cap", "10% chance for exploding bombs to drop a bomb pickup"}, - {"74", "Stud Finder", "0.5% chance to reveal a crawlspace when breaking rocks"}, + {"74", "Stud Finder", "0.5% chance to reveal a {{LadderRoom}}crawlspace when breaking rocks"}, {"75", "Error", "Random trinket effect every room"}, {"76", "Poker Chip", "Chests have a 50/50 chance to spawn extra pickups OR an enemy fly"}, {"77", "Blister", "Increases knockback"}, @@ -741,7 +741,7 @@ EID.descriptions[languageCode].cards={ {"31", "Joker", "{{DevilRoom}} / {{AngelRoom}} 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"}, + {"34", "Ehwaz", "Spawns a trapdoor to the next floor#8% chance for {{LadderRoom}}crawlspace trapdoor"}, {"35", "Dagaz", "{{SoulHeart}} +1 Soul Heart#{{CurseCursed}} Removes curse effects"}, {"36", "Ansuz", "Full mapping for this floor"}, {"37", "Perthro", "Reroll all pedestal items"}, @@ -879,4 +879,4 @@ EID.descriptions[languageCode].MCM = { DemoObjectName = "Demo Object Name", DemoObjectTransformation = "Demo Transformation", DemoObjectText = "This text is in english#A very cool and long description to simulate linebreaks caused by EID textbox width!#\1 This is also a cool line#This line loves you {{Heart}}#Markup size preview: #BIG: {{Damage}} {{Tears}} {{Speed}} {{Shotspeed}} {{Luck}} #small: {{DeliriumSmall}} {{CurseDarknessSmall}} {{CurseBlindSmall}}", -} \ No newline at end of file +} From 86ad6de500230b0ce1723f5d88c5fe833fae6937 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Mon, 21 Mar 2022 22:59:29 -0400 Subject: [PATCH 3/4] Rep patch changes --- descriptions/rep/en_us.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/descriptions/rep/en_us.lua b/descriptions/rep/en_us.lua index fefb7586..ab0423d5 100644 --- a/descriptions/rep/en_us.lua +++ b/descriptions/rep/en_us.lua @@ -50,6 +50,7 @@ local repCollectibles={ [79] = {"79", "The Mark", "↑ {{Damage}} +1 Damage up#↑ {{Speed}} +0.2 Speed up# {{BlackHeart}} +1 Black Heart"}, -- The Mark [80] = {"80", "The Pact", "↑ {{Damage}} +0.5 Damage up#↑ {{Tears}} +0.7 Tears up#{{BlackHeart}} +2 Black Hearts"}, -- The Pact [83] = {"83", "The Nail", "{{HalfBlackHeart}} + Half Black Heart#↑ {{Damage}} +2 Damage up#↓ -0.18 Speed down#Deal contact damage#Destroy rocks when walking over them"}, -- The Nail + [84] = {"84", "We Need To Go Deeper!", "Spawns a trapdoor to the next floor#Spawns a {{LadderRoom}}crawlspace if used on a decorative floor tile (grass, small rocks, papers, gems, etc.)"}, [87] = {"87", "Loki's Horns", "25% chance to shoot in 4 directions#{{Luck}} 100% chance at 15 Luck"}, -- Loki's Horns [91] = {"91", "Spelunker Hat", "Reveals the room type of up to 2 adjacent rooms#Can also reveal: #{{SecretRoom}} Secret Rooms# {{SuperSecretRoom}} Super Secret Rooms#{{MiniBoss}} Mini-Boss Rooms#Blocks projectiles falling from above"}, -- Spelunker Hat [98] = {"98", "The Relic", "{{SoulHeart}} Spawns 1 Soul Heart every 7-8 rooms"}, -- The Relic @@ -147,6 +148,7 @@ local repCollectibles={ [354] = {"354", "Crack Jacks", "↑ {{Heart}} +1 Health up#{{Heart}} Heals 1 Red Heart#{{Trinket}} Spawns random trinket on the floor"}, -- Crack Jacks [355] = {"355", "Mom's Pearls", "↑ {{Range}} +0.38 Range up#↑ {{Luck}} +1 Luck up#{{SoulHeart}} +1 Soul Heart"}, -- Mom's Pearls [360] = {"360", "Incubus", "Gain a demonic familiar that shoots the same tears as Isaac#{{Damage}} Deals 75% of your damage#{{Player14}} 100% while playing as Lilith"}, -- Incubus + [365] = {"365", "Lost Fly", "Moves along walls/obstacles in the room#Deals 56 contact damage per second#Nearby enemies will target the Fly"}, [366] = {"366", "Scatter Bombs", "{{Bomb}} +5 bombs#{{Bomb}} Causes your bombs to explode into 4-5 tiny bombs"}, -- Scatter Bombs [368] = {"368", "Epiphora", "↑ {{Tears}} Shooting in one direction gradually increases your fire rate by up to 200%"}, -- Epiphora [369] = {"369", "Continuum", "↑ {{Range}} +3 Range up#Spectral tears#Tears travel through walls and appear out of the opposite wall"}, -- Continuum @@ -154,6 +156,7 @@ local repCollectibles={ [374] = {"374", "Holy Light", "10% chance to shoot Holy tears, which will spawn a beam of light on hit#{{Damage}} The beam deals 3x your damage#{{Luck}} 50% chance at 9 Luck"}, -- Holy Light [375] = {"375", "Host Hat", "Grants explosion immunity#20% chance to block tears#Blocks projectiles falling from above"}, -- Host hat [376] = {"376", "Restock", "Shops instantly restock their items when you buy them#Restocked items slowly increase in price again"}, -- Restock + [380] = {"380", "Pay To Play", "+5 coins#You now open locked doors and chests with coins instead of keys"}, [382] = {"382", "Friendly Ball", "Can be thrown at enemies to capture them#Next usage will respawn the same enemy as a friendly companion#Walking over the ball after capture will instantly recharge the item"}, -- Friendly Ball [384] = {"384", "Lil Gurdy", "Will launch and slide around the room#Deals 5-20 contact damage per hit depending on charge duration"}, -- Lil Gurdy [389] = {"389", "Rune Bag", "{{Rune}} Drops a random rune or Soul Stone every 7-8 rooms"}, -- Rune Bag @@ -197,11 +200,14 @@ local repCollectibles={ [494] = {"494", "Jacob's Ladder", "Tears spawn a spark of electricity on impact#Sparks deal half your damage#Sparks can jump between enemies"}, -- Jacobs Ladder [495] = {"495", "Ghost Pepper", "8% chance to shoot a blue fire that blocks enemy shots and deals contact damage#{{Luck}} 50% chance at 10 Luck#The flame disappears after 2 seconds"}, -- Ghost Pepper [496] = {"496", "Euthanasia", "3.33% chance to shoot needles#{{Luck}} 50% 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/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 [503] = {"503", "Little Horn", "5% chance to shoot tears that summon a Big Horn hand#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"}, [507] = {"507", "Sharp Straw", "{{Damage}} Deals your damage + 10% of the enemy's max health#Affects all enemies in the room#{{HalfHeart}} Chance to drop half hearts when it deals damage"}, + [508] = {"508", "Mom's Razor", "Orbital that causes bleeding, which makes enemies leave creep and take damage when they move#Deals 20% your damage on contact per tick"}, [509] = {"509", "Bloodshot Eye", "Orbital that shoots a tear every 1/3rd second when enemy is nearby#Deals 3.5 damage per tear#Deals 30 contact damage per second"}, -- Bloodshot Eye [517] = {"517", "Fast Bombs", "{{Bomb}} +7 Bombs#Allows you to rapidly place bombs on the ground#Bombs don't knockback each other"}, -- Fast Bombs [523] = {"523", "Moving Box", "When used, stores up to 10 pickups from the current room#Using it again will put them back on the floor again#This allows you to move things between rooms"}, -- Moving Box @@ -210,6 +216,7 @@ local repCollectibles={ [535] = {"535", "Blanket", "{{SoulHeart}} +1 Soul Heart#{{Heart}} Heals 1 Red Heart#{{HolyMantle}} Grants a shield when entering a boss room"}, [543] = {"543", "Hallowed Ground", "Spawn white poop when you get hit#While inside the poop's aura:#↑ {{Damage}} +25% Damage up#↑ {{Tears}} +250% Fire Rate up#Homing tears#Chance to block damage"}, -- Hallowed Ground [549] = {"549", "Brittle Bones", "Replaces all your Red Heart containers with 6 Bone Hearts#When a Bone Heart is lost:#Fires 8 bone tears in all directions#↑ +0.4 Fire Rate up permanently"}, -- Brittle Bones + [552] = {"552", "Mom's Shovel", "Spawns a trapdoor to the next floor#Spawns a {{LadderRoom}}crawlspace if used on a decorative floor tile (grass, small rocks, papers, gems, etc.)"}, [553] = {"553", "Mucormycosis", "25% chance to shoot sticky spore tears#Spores blow up after 2.5 seconds, dealing damage, poisoning nearby enemies and releasing more spores"}, -- Mucormycosis [554] = {"554", "2Spooky", "{{Fear}} Fears enemies in a small radius around you"}, -- 2Spooky [555] = {"555", "Golden Razor", "{{Coin}} Converts 5 coins into {{Damage}} +1.2 Damage up for the current room#Gain 5 coins on pickup"}, -- Golden Razor @@ -256,7 +263,7 @@ local repCollectibles={ [596] = {"596", "Uranus", "{{Freeze}} Shoot ice tears, which slow enemies and freeze monsters they kill#Touching frozen enemies slide away and explode into 6 ice shards"}, -- Uranus [597] = {"597", "Neptunus", "{{Chargeable}} Chargeable (automatic)#Builds a massive tears bonus over 3 seconds while not firing#Shooting again will release stored tears#The tear bonus falls off as you fire"}, -- Neptunus [598] = {"598", "Pluto", "↑ {{Tears}} +0.7 Tears up#Significantly shrinks Isaac, allowing him to squeeze between objects#Projectiles can pass over him"}, -- Pluto - [599] = {"599", "Voodoo Head", "{{CursedRoom}} Spawns an additional Curse Room each floor"}, -- Voodoo Head + [599] = {"599", "Voodoo Head", "{{CursedRoom}} Spawns an additional Curse Room each floor#Improves Curse Room layouts and rewards"}, -- Voodoo Head [600] = {"600", "Eye Drops", "↑ {{Tears}} +30% Fire Rate up for the left eye only#↑ {{Tears}} +20% Fire Rate up for non-tear attacks#First shot in a while is always a double shot#"}, -- Eye Drops [601] = {"601", "Act of Contrition", "↑ +0.7 Tears up#{{EternalHeart}} +1 Eternal Heart#{{DevilChance}} / {{AngelChance}} Allows both Devil and Angel deals to be taken#Taking Red Heart damage doesn't reduce Devil/Angel Room chance as much"}, -- Act of Contrition [602] = {"602", "Member Card", "{{Shop}} Adds a trapdoor to every shop that leads to a second shop with a unique stock"}, -- Member Card @@ -272,7 +279,7 @@ local repCollectibles={ [612] = {"612", "Lost Soul", "Soul familiar that dies in one hit, respawning at the start of the next floor#If it survives an entire floor, it spawns 3 Soul Hearts, 2 Eternal Hearts, or an item"}, -- Lost Soul [613] = {"613", "", ""}, -- Salt Shaker [614] = {"614", "Blood Bombs", "↑ {{Heart}} +1 Health up#{{Heart}} Heals 5 hearts#{{HalfHeart}} If the player has no bombs, one can be placed at the cost of half a heart#{{Bomb}} Bombs leave red creep#"}, -- Blood Bombs - [615] = {"615", "Lil Dumpy", "Dumpy familiar#When it takes damage, pushes, stuns or poisons nearby enemies"}, -- Lil Dumpy + [615] = {"615", "Lil Dumpy", "Dumpy familiar#Right before Isaac would collide with an enemy or projectile, Dumpy farts to deflect them away#After farting, you need to get close to Dumpy to regain him"}, -- Lil Dumpy [616] = {"616", "Bird's Eye", "8% chance to shoot red fires that block enemy shots and deal contact damage#{{Luck}} 50% chance at 10 Luck#Fires can block up to 4 shots and/or deal damage 4 times before being destroyed, and last up to 10 seconds"}, -- Bird's Eye [617] = {"617", "Lodestone", "{{Magnetize}} 17% chance to shoot tears that magnetize enemies#{{Luck}}100% chance at 5 Luck#Magnetized enemies attract nearby pickups, projectiles and enemies"}, -- Lodestone [618] = {"618", "Rotten Tomato", "{{Bait}} 17% chance to shoot tears that mark enemies#{{Luck}} 100% chance at 5 Luck#Marked enemies are attacked by other enemies"}, -- Rotten Tomato @@ -813,6 +820,7 @@ local repCards={ [28] = {"28", "Ace of Diamonds", "{{Coin}} Turns all pickups, chests and non-boss enemies into coins"}, -- Ace of Diamonds [29] = {"29", "Ace of Spades", "{{Key}} Turns all pickups, chests and non-boss enemies into keys"}, -- Ace of Spades [30] = {"30", "Ace of Hearts", "{{Heart}} Turns all pickups, chests and non-boss enemies into hearts"}, -- Ace of Hearts + [34] = {"34", "Ehwaz", "Spawns a trapdoor to the next floor#Spawns a {{LadderRoom}}crawlspace if used on a decorative floor tile (grass, small rocks, papers, gems, etc.)"}, [39] = {"39", "Algiz", "Invincibility for 20 seconds"}, -- Algiz [51] = {"51", "Holy Card", "{{HolyMantle}} Grants the Holy Mantle effect#(Prevents damage once)#Effect lasts until damage is taken"}, -- Holy Card [52] = {"52", "Huge Growth", "↑ {{Damage}} +7 Damage up#↑ {{Range}} +3 Range up#Destroy rocks when walking over them#Size up#Effect lasts for current room"}, -- Huge Growth @@ -839,7 +847,7 @@ local repCards={ [74] = {"74", "XVIII - The Moon?", "{{UltraSecretRoom}} Teleports you to the Ultra Secret Room#Pathway back will be made of red rooms"}, -- XVIII - The Moon? [75] = {"75", "XIX - The Sun?", "For the current floor:#↑ {{Collectible159}} Gain Spirit of the Night#↑ {{Damage}} +1.5 Damage up#{{BoneHearts}} Turns your Red Hearts into Bone Hearts#Applies Curse of Darkness"}, -- XIX - The Sun? [76] = {"76", "XX - Judgement?", "{{RestockMachine}} Spawns a Restock Machine"}, -- XX - Judgement? - [77] = {"77", "XXI - The World?", "Spawns a trap door to a crawlspace"}, -- XXI - The World? + [77] = {"77", "XXI - The World?", "Spawns a trap door to a {{LadderRoom}}crawlspace"}, -- XXI - The World? [78] = {"78", "Cracked Key", "{{Collectible580}} One time use Red Key"}, -- Cracked Key [79] = {"79", "Queen of Hearts", "{{Heart}} Spawns 1-20 Red Hearts"}, -- Queen of Hearts [80] = {"80", "Wild Card", "Copies the effect of the most recently used pill, card, rune, soul stone or activated item"}, -- Wild Card @@ -1073,4 +1081,4 @@ if EID.enableDebug then EID.descriptions[languageCode].repTrinkets = repTrinkets EID.descriptions[languageCode].repCards = repCards EID.descriptions[languageCode].repPills = repPills -end \ No newline at end of file +end From 41d0e721f8713f41225ab7344c1dd36539063333 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Mon, 21 Mar 2022 23:06:21 -0400 Subject: [PATCH 4/4] Don't accept the same locked item result twice --- eid_bagofcrafting.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eid_bagofcrafting.lua b/eid_bagofcrafting.lua index a1128516..20c32a43 100644 --- a/eid_bagofcrafting.lua +++ b/eid_bagofcrafting.lua @@ -465,7 +465,7 @@ function EID:calculateBagOfCrafting(componentsTable) for k,v in ipairs(itemWeights) do target = target - v if target < 0 then - if firstOption then + if firstOption and k ~= firstOption then calculatedRecipes[componentsAsString] = firstOption lockedRecipes[componentsAsString] = k return firstOption, k