CardColorUtils

Utility functions for card color and game mechanics.

Usage:

import { CardColorUtils } from '@devmugi/scryfall-api';

if (CardColorUtils.isMulticolored(card)) {
console.log('Gold card!');
}

Functions

Link copied to clipboard
fun hasColor(card: Card, color: String): Boolean

Returns true if the card contains the specified color (W, U, B, R, G)

Link copied to clipboard
fun hasKeyword(card: Card, keyword: String): Boolean

Returns true if the card has the specified keyword ability

Link copied to clipboard
fun isColorless(card: Card): Boolean

Returns true if the card has no colors (colorless)

Link copied to clipboard
fun isLegalIn(card: Card, format: String): Boolean

Returns true if the card is legal in the specified format

Link copied to clipboard
fun isMulticolored(card: Card): Boolean

Returns true if the card has more than one color