fantasy_realms_unofficial_api 0.1.0

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

pub(crate) const WARLOCK_LORD: Card = Card {
    name: Name::WarlockLord,
    suit: Suit::Wizard,
    strength: 25,
    adder: None,
    wild: None,
    modifier: None,
    immunity: None,
    blanks: None,
    bonus: None,
    penalty: Some(warlock_lord_penalty),
};

pub(crate) fn warlock_lord_penalty(hand: &ScoringHand, immunity: &CardCollection) -> i16 {
    let mut penalty: i16 = 0;
    if !immunity.contains(Suit::Army) {
        penalty += 10 * hand.number_of_suit(Suit::Leader)
    }
    if !immunity.contains(Suit::Flame) {
        penalty += 10 * (hand.number_of_suit(Suit::Wizard) - 1);
    }
    penalty
}