Skip to content

Commit

Permalink
Fix token cards not being filtered out
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Sep 24, 2023
1 parent b970a69 commit 5972b93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rs/src/card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ pub fn selector_filter(set: CardSet, col: u32, element: i8, rarity: i8) -> Vec<u
let cards = cardSetCards(set);
let mut result = Vec::with_capacity(15);
for card in cards.filter(col > 2) {
if (rarity == 4 || card.element == element)
if (card.flag & Flag::token) == 0
&& (rarity == 4 || card.element == element)
&& (rarity == 0 || card.rarity == rarity)
&& match col % 3 {
0 => card.kind == Kind::Creature,
Expand Down
1 change: 1 addition & 0 deletions src/views/Reward.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function getRewardList(reward) {
const result = [];
Cards.Codes.forEach(card => {
if (
!card.token &&
card.upped === upped &&
card.shiny === shiny &&
card.rarity === rarity
Expand Down

0 comments on commit 5972b93

Please sign in to comment.