Card-Forge / forge

An unofficial rules engine for the world's greatest card game.
GNU General Public License v3.0
890 stars 536 forks source link

Change comma in ChooseCardNameEffect "ChooseFromList" to a semi colin #1108

Closed xanbie closed 1 year ago

xanbie commented 2 years ago

Describe the bug A bug in ChooseFromLIst Is preventing me from adding planeswalkers that have commas in their names into the list. For my silly custom card I made long ago. Nameless, The Chosen One

To Reproduce Steps to reproduce the behavior:

  1. Go to line 107 in ChooseCardNameEffect.java
  2. String [] names = sa.getParam("ChooseFromList").split(",");
  3. change the "," to ";"
  4. update the card scripts that use ChooseFromList to use ";"

Expected behavior We should be able to add planeswakers into the list with ";" card separator. Like this list I made for testing in a game state test file.

HumanCardsInCommand=Ajani Goldmane; Ajani Steadfast; Ajani Unyielding; Ajani Vengeant; Ajani, Adversary of Tyrants; Ajani, Caller of the Pride; Ajani, Inspiring Leader; Ajani, Mentor of Heroes; Ajani, Strength of the Pride; Ajani, Valiant Protector; Ajani, Wise Counselor; Ajani, the Greathearted; Aminatou, the Fateshifter; Angrath, Captain of Chaos; Angrath, Minotaur Pirate; Angrath, the Flame-Chained; Arlinn Kord; Arlinn, Voice of the Pack; Arlinn, the Pack's Hope; Ashiok, Dream Render; Ashiok, Nightmare Muse; Ashiok, Nightmare Weaver; Ashiok, Sculptor of Fears; Basri Ket; Basri, Devoted Paladin; Calix, Destiny's Hand; Caroline, Conjure of Creeps; Caroline, Keeper of Critters; Chandra Ablaze; Chandra Nalaar; Chandra, Acolyte of Flame; Chandra, Awakened Inferno; Chandra, Bold Pyromancer; Chandra, Fire Artisan; Chandra, Flame's Catalyst; Chandra, Flame's Fury; Chandra, Flamecaller; Chandra, Gremlin Wrangler; Chandra, Heart of Fire; Chandra, Novice Pyromancer; Chandra, Pyrogenius; Chandra, Pyromaster; Chandra, Torch of Defiance; Chandra, the Firebrand; Dack Fayden; Dakkon, Shadow Slayer; Daretti, Ingenious Iconoclast; Daretti, Scrap Savant; Davriel, Rogue Shadowmage; Davriel, Soul Broker; Domri Rade; Domri, Anarch of Bolas; Domri, Chaos Bringer; Domri, City Smasher; Dovin Baan; Dovin, Architect of Law; Dovin, Grand Arbiter; Dovin, Hand of Control; Drake Stone; Dungeon Master; Ellywick Tumblestrum; Elspeth Tirel; Elspeth, Knight-Errant; Elspeth, Sun's Champion; Elspeth, Sun's Nemesis; Elspeth, Undaunted Hero; Estrid, the Masked; Freyalise, Llanowar's Fury; Freyalise, Skyshroud Partisan; Garruk Relentless; Garruk Wildspeaker; Garruk the Slayer; Garruk, Apex Predator; Garruk, Caller of Beasts; Garruk, Cursed Huntsman; Garruk, Primal Hunter; Garruk, Savage Herald; Garruk, Unleashed; Geyadrone Dihada; Gideon Blackblade; Gideon Jura; Gideon of the Trials; Gideon, Ally of Zendikar; Gideon, Champion of Justice; Gideon, Martial Paragon; Gideon, the Oathsworn; Grand Master of Flowers; Grist, the Hunger Tide; Huatli, Dinosaur Knight; Huatli, Radiant Champion; Huatli, Warrior Poet; Huatli, the Sun's Heart; Inzerva, Master of Insights; Jace Beleren; Jace, Arcane Strategist; Jace, Architect of Thought; Jace, Cunning Castaway; Jace, Ingenious Mind-Mage; Jace, Memory Adept; Jace, Mirror Mage; Jace, Unraveler of Secrets; Jace, Wielder of Mysteries; Jace, the Living Guildpact; Jace, the Mind Sculptor; Jaya Ballard; Jaya, Venerated Firemage; Jeska, Thrice Reborn; Jiang Yanggu; Karn Liberated; Karn, Scion of Urza; Karn, the Great Creator; Kasmina, Enigma Sage; Kasmina, Enigmatic Mentor; Kaya the Inexorable; Kaya, Bane of the Dead; Kaya, Ghost Assassin; Kaya, Orzhov Usurper; Kiora, Behemoth Beckoner; Kiora, Master of the Depths; Kiora, the Crashing Wave; Kiora, the Tide's Fury; Koth of the Hammer; Liliana Vess; Liliana of the Dark Realms; Liliana of the Veil; Liliana, Death Mage; Liliana, Death Wielder; Liliana, Death's Majesty; Liliana, Dreadhorde General; Liliana, Untouched by Death; Liliana, Waker of the Dead; Liliana, the Last Hope; Liliana, the Necromancer; Lolth, Spider Queen; Lord Windgrace; Lukka, Coppercoat Outcast; Mordenkainen; Mu Yanling; Mu Yanling, Celestial Wind; Mu Yanling, Sky Dancer; Nahiri, Heir of the Ancients; Nahiri, Storm of Stone; Nahiri, the Harbinger; Nahiri, the Lithomancer; Narset Transcendent; Narset of the Ancient Way; Narset, Parter of Veils; Nicol Bolas, Dragon-God; Nicol Bolas, God-Pharaoh; Nicol Bolas, Planeswalker; Nicol Bolas, the Deceiver; Niko Aris; Nissa Revane; Nissa of Shadowed Boughs; Nissa, Genesis Mage; Nissa, Nature's Artisan; Nissa, Steward of Elements; Nissa, Vital Force; Nissa, Voice of Zendikar; Nissa, Who Shakes the World; Nissa, Worldwaker; Ob Nixilis Reignited; Ob Nixilis of the Black Oath; Ob Nixilis, the Hate-Twisted; Oko, Thief of Crowns; Oko, the Trickster; Professor Onyx; Ral Zarek; Ral, Caller of Storms; Ral, Izzet Viceroy; Ral, Storm Conduit; Rowan Kenrith; Rowan, Fearless Sparkmage; Rowan, Scholar of Sparks; Saheeli Rai; Saheeli, Sublime Artificer; Saheeli, the Gifted; Samut, Tyrant Smasher; Samut, the Tested; Sarkhan Unbroken; Sarkhan Vol; Sarkhan the Mad; Sarkhan the Masterless; Sarkhan, Dragonsoul; Sarkhan, Fireblood; Sarkhan, Wanderer to Shiv; Sarkhan, the Dragonspeaker; Serra the Benevolent; Sorin Markov; Sorin, Grim Nemesis; Sorin, Imperious Bloodlord; Sorin, Lord of Innistrad; Sorin, Solemn Visitor; Sorin, Vampire Lord; Sorin, Vengeful Bloodlord; Tamiyo, Collector of Tales; Tamiyo, Field Researcher; Tamiyo, the Moon Sage; Teferi, Hero of Dominaria; Teferi, Master of Time; Teferi, Temporal Archmage; Teferi, Time Raveler; Teferi, Timeless Voyager; Teferi, Who Slows the Sunset; Tevesh Szat, Doom of Fools; Teyo, Aegis Adept; Teyo, the Shieldmage; Tezzeret the Schemer; Tezzeret the Seeker; Tezzeret, Agent of Bolas; Tezzeret, Artifice Master; Tezzeret, Cruel Machinist; Tezzeret, Master of Metal; Tezzeret, Master of the Bridge; The Royal Scions; The Wanderer; Tibalt, Rakish Instigator; Tyvar Kell; Ugin, the Ineffable; Ugin, the Spirit Dragon; Urza, Academy Headmaster; Venser, the Sojourner; Vivien Reid; Vivien of the Arkbow; Vivien, Arkbow Ranger; Vivien, Champion of the Wilds; Vivien, Monsters' Advocate; Vivien, Nature's Avenger; Vraska the Unseen; Vraska, Golgari Queen; Vraska, Regal Gorgon; Vraska, Relic Seeker; Vraska, Scheming Gorgon; Vraska, Swarm's Eminence; Will Kenrith; Wrenn and Seven; Wrenn and Six; Xenagos, the Reveler; Zariel, Archduke of Avernus

Ver 1.6.46

austeregrim commented 2 years ago

So, reviewing the code instead of fixing the files to match your requirement, it says to use the semi-colon instead of a comma in the cardname: image Since your request changes the standard of defining a comma separated lists in the game file of separated lists, I tend to not want to make this change, as the workaround is effective, and already written and defined.

You can do a simple find and replace on your card's list, change all the commas to @, change all the semicolons to commas, then change all the @s to semicolons.

See I would've suggested something more drastic, change all comma separated lists to something like "®" or "├" separated lists