Permalink
Browse files

Implement PlayableCard.cant_play / GameTag.CANT_PLAY

  • Loading branch information...
jleclanche committed Jul 25, 2015
1 parent 249257a commit c673274fc3d6e63e1e3a7251112c104f8850bc75
Showing with 7 additions and 0 deletions.
  1. +5 −0 fireplace/card.py
  2. +1 −0 fireplace/enums.py
  3. +1 −0 fireplace/managers.py
@@ -122,6 +122,7 @@ class PlayableCard(BaseCard):
def __init__(self, id, data):
self.buffs = CardList()
self.cant_play = False
self.has_battlecry = False
self.has_combo = False
self.overload = 0
@@ -179,6 +180,10 @@ def _set_zone(self, zone):
self.clear_buffs()
def action(self):
if self.cant_play:
logging.info("%r play action cannot continue", self)
return
kwargs = {}
if self.target:
kwargs["target"] = self.target
@@ -53,6 +53,7 @@ class GameTag(IntEnum):
SECRET = 219
COMBO = 220
CANT_ATTACK = 227
CANT_PLAY = 231
CANT_DRAW = 232
CANT_BE_DAMAGED = 240
FROZEN = 260
@@ -137,6 +137,7 @@ class PlayableCardManager(Manager):
map = CardManager.map.copy()
map.update({
GameTag.BATTLECRY: "has_battlecry",
GameTag.CANT_PLAY: "cant_play",
GameTag.CARD_TARGET: "target",
GameTag.COMBO: "has_combo",
GameTag.DEFENDING: "defending",

0 comments on commit c673274

Please sign in to comment.