fantasy_realms_unofficial_api 0.1.0

An unofficial API for the Fantasy Realms card game.
Documentation
use super::*;

pub(crate) const SHIELD_OF_KETH: Card = Card {
    name: Name::ShieldOfKeth,
    suit: Suit::Artifact,
    strength: 4,
    adder: None,
    wild: None,
    modifier: None,
    immunity: None,
    blanks: None,
    bonus: Some(shield_of_keth_bonus),
    penalty: None,
};

pub(crate) fn shield_of_keth_bonus(hand: &ScoringHand) -> i16 {
    if hand.number_of_suit(Suit::Leader) > 0 {
        if hand.contains_name(Name::SwordOfKeth) {
            40
        } else {
            15
        }
    } else {
        0
    }
}