Table of Contents
empyreal.engine.card
  Controller class
  Main interface

empyreal.engine.card

Controller class

class empyreal.engine.card.CardController(user_id=None, session=None, server=None)

The controller class for the Card interface used by the clients. This controller is a subclass of empyreal.engine.core.GameController.

Main interface

CardController.get_deck(card_type=None)

Returns a list of Cards within the current users' Deck.

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)

Casts the card for the provided 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.

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()

Returns all expansions, their cost and their availability.

CardController.purchase_booster(expansion, currency)

Purchases a new booster for the current user for the provided currency. The currency can be either gold or faith, raises an AssertionError in case another currency is provided.

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)

Discards the provided religion card and provides the user with the cards discard values.

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)

Returns a list of all cards; in case expansion and/or card_type are provided, the list is filtered by their respective values.

Raises an EmpyrealException in case a non-existing card type or expansion is provided.