mage icon indicating copy to clipboard operation
mage copied to clipboard

CreateTokenEffect needs to be refactored to allow creating multiple types of tokens in one CreateTokenEvent

Open Grath opened this issue 1 year ago • 6 comments

Issue: When multiple tokens of a different type are created such as by [[Trostani's Summoner]], they currently create multiple CreateTokenEvents which cause problems with replacement effects such as [[Queen Allenal of Ruadach]] and [[Peregrin Took]] which add more additional tokens than they should.

Proposed solution:

  • Create a TokenBatch or similar, which can contain a collection of Tokens and CreateTokenCopyTargetEffects (or something else that can specify "Create a token copy that's different" for [[Soul Separator]] support) which are then putOntoTheBattlefield in a single CreateTokenEvent which already supports creating a collection of tokens.
  • Refactor CreateTokenEffect to take a TokenBatch instead of Token, retaining the Token constructors with a "encase the Token in a TokenBatch, then use the TokenBatch constructors" to reduce duplicated code rather than making a separate CreateTokenBatchEffect but not requiring every CreateTokenEffect to be rewritten.
  • Rewrite (or initially write) the following cards (and possibly more) to use TokenBatches to properly create all their multiple tokens in a single CreateTokenEvent: Bestial Menace, Farmer Cotton, Fae Offering, Battle for Bretagard, Forbidden Friendship, Old Rutstein, Somberwald Beastmaster, Song of Earendil, probably Stangg Echo Warrior, Specimen Collector, ~~Soul Separator~~, The Eleventh Hour, Triplicate Titan, Trostani's Summoner, Wurmcoil Engine, Clone Legion, Elminster's Simulacrum, Hate Mirage, Hour of Eternity, Haunting Imitation, Kindred Charge, March of Progress, Mirror March, Mirror-Style Master, Parallel Evolution, Red Sun's Twilight, Rhys the Redeemed, Saheeli the Gifted, Second Harvest, Twinflame, Ocelot Pride

Grath avatar Aug 15 '23 16:08 Grath