The shop sorts cards in the following order when fulfilling orders:
['W', 'U', 'B', 'R', 'G', 'MULTI', 'COLORLESS', 'LAND']
Initially we optimized for Devoid card such as World Breaker, as it does not have a colors array, yet contains a green pip that the shop uses to catalog their physical inventory. Therefore, when we encountered a Devoid card, we fell back to its color_identity rather than its colors.
However the same was true for cards such as Dimir Keyrune, which are colorless by design, yet also have a non-colorless color_identity.
The solution was to check for the keyword of "Devoid" directly.
Now, World Breaker is sorted to green, and Dimir Keyrune is appropriately sorted to colorless.
Summary
The shop sorts cards in the following order when fulfilling orders:
['W', 'U', 'B', 'R', 'G', 'MULTI', 'COLORLESS', 'LAND']
Initially we optimized for Devoid card such as World Breaker, as it does not have a
colors
array, yet contains a green pip that the shop uses to catalog their physical inventory. Therefore, when we encountered a Devoid card, we fell back to itscolor_identity
rather than itscolors
.However the same was true for cards such as
Dimir Keyrune
, which are colorless by design, yet also have a non-colorlesscolor_identity
.The solution was to check for the
keyword
of"Devoid"
directly.Now, World Breaker is sorted to green, and Dimir Keyrune is appropriately sorted to colorless.