class empyreal.engine.card.CardController(user_id=None, session=None, server=None)
CardController.get_deck(card_type=None)
If card_type is given, only Cards of the specified type which are available in the users' Deck are returned. Raises an EmpyrealException in case a non-existing card type is provided.
Raises a UserNotIncarnatedException in case this is called for a user who has not yet been incarnated.
CardController.cast_card(religion_card_id)
Returns a empyreal.lib.models.CardResult.
Raises a UserNotIncarnatedException in case this is called for a user who has not yet been incarnated.
CardController.get_boosters()
CardController.purchase_booster(expansion, currency)
In case the a purchase is executed for a booster pack that is currently unavailable an EmpyrealException is raised.
In case gold is used as currency and the current user does not have enough a ReligionInsufficientCurrencyException is raised. If the currency is set to faith and the user does not have enough a ReligionInsufficientFaithException is raised.
Returns a empyreal.lib.models.CardResult.
CardController.discard_card(religion_card_id)
Raises an EmpyrealException in case the provided religion card does not exist or if the religion card is not owned by the current user.
Raises a UserNotIncarnatedException in case this is called for a user who has not yet been incarnated.
Returns a empyreal.lib.models.CardResult.
CardController.get_all_cards(expansion=None, card_type=None)
Raises an EmpyrealException in case a non-existing card type or expansion is provided.