Archived
load cards from json
This commit is contained in:
+1
-34
@@ -1,34 +1,4 @@
|
||||
from enum import Enum
|
||||
from model import Serializable
|
||||
|
||||
|
||||
class CardRole(str, Enum):
|
||||
PERSONAL = "personal"
|
||||
MARKET = "market"
|
||||
FIRE_GEM = "fire_gem"
|
||||
|
||||
|
||||
class CardType(str, Enum):
|
||||
"""Playable card types"""
|
||||
|
||||
HERO = "hero"
|
||||
HERO_ABILITY = "hero_ability"
|
||||
CURRENCY = "currency"
|
||||
WEAPON = "weapon"
|
||||
CHAMPION = "champion"
|
||||
ACTION = "action"
|
||||
ITEM = "item"
|
||||
|
||||
|
||||
class CardFaction(str, Enum):
|
||||
"""Playable card factions"""
|
||||
|
||||
BASE = "base"
|
||||
|
||||
BLUE = "blue"
|
||||
RED = "red"
|
||||
GREEN = "green"
|
||||
YELLOW = "yellow"
|
||||
from model import Serializable, CardRole, CardType, CardFaction
|
||||
|
||||
|
||||
class Card(Serializable):
|
||||
@@ -37,7 +7,6 @@ class Card(Serializable):
|
||||
object_type = "card"
|
||||
sprite: str
|
||||
name: str
|
||||
text: str
|
||||
cost: int
|
||||
role: CardRole
|
||||
card_type: CardType
|
||||
@@ -47,7 +16,6 @@ class Card(Serializable):
|
||||
self,
|
||||
sprite: str,
|
||||
name: str,
|
||||
text: str,
|
||||
cost: int,
|
||||
card_type: CardType,
|
||||
faction: CardFaction,
|
||||
@@ -55,7 +23,6 @@ class Card(Serializable):
|
||||
super().__init__()
|
||||
self.sprite = sprite
|
||||
self.name = name
|
||||
self.text = text
|
||||
self.cost = cost
|
||||
self.card_type = card_type
|
||||
self.faction = faction
|
||||
|
||||
Reference in New Issue
Block a user