duelyst icon indicating copy to clipboard operation
duelyst copied to clipboard

[P0] Importing a decklist doesnt delete your previous deck/general. Many bugs happen as a result.

Open Ein666 opened this issue 2 years ago • 2 comments

Summary

When creating a new deck with a general and cards in it you can import a deck with a deckcode containing another General and end up 2 Generals and over 40 cards in your deck.

This has multiple knock-on-effects that add game-breaking bugs like having your bloodbound spell triggering in the corner of the screen rather than around your main general since the second one spawns offscreen.

Steps to reproduce

  1. Create a Duelyst Deck with a general (for example Ragnora the Relentless)
  2. Import a decklist with another general of the same faction (for example the decklist below)

MTo0MDEsMjo0MDUsMzo0MTIsMzo0MzMsMjo0MzYsMzo0MzcsMjoxMDk3NSwyOjEwOTgxLDM6MTExMTUsMjoxMTEyMSwzOjE5MDUyLDI6MjAxMTIsMjoyMDExNywyOjIwMTIyLDM6MjAxMjUsMzoyMDE1NywyOjIwMjE4

  1. Congratulations, you now have over 40 cards in your deck including 2 generals and playing the game will result in bizarre problems such as:
  • Rendering the second general offscreen so your opponent cannot win after killing your main one.
  • Replacing a card in your hand with your deck will freeze the client
  • Bloodbound spells will only trigger on your off-screen general

Environment information

  • Operating system: Windows
  • Browser: Brave and Native Windows client

Additional context

Duelyst_ToesBjsS64 Duelyst_hRSN7Zg0SP

Ein666 avatar Jan 13 '23 20:01 Ein666

Let's see if we can simply hide the Import/Export buttons when a deck is being created or edited. I had only tested this from the main collection page 😅

willroberts avatar Jan 13 '23 22:01 willroberts

Relevant buttons: https://github.com/willroberts/duelyst/blob/73299eda0cfa02a18ceaff3c7c6905a6016bf728/app/ui/views2/collection/collection.js#L62L63

Example of hiding the button: https://github.com/willroberts/duelyst/blob/73299eda0cfa02a18ceaff3c7c6905a6016bf728/app/ui/views2/collection/collection.js#L827

willroberts avatar Jan 13 '23 22:01 willroberts