Skip to content

Commit

Permalink
chore: drop obsolete CardXML properties
Browse files Browse the repository at this point in the history
EntourageCard, MasterPower and TriggeredPowerHistoryInfo are no longer
present.
  • Loading branch information
beheh committed Apr 12, 2024
1 parent eaaf91c commit d78fdda
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions hearthstone/cardxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ def from_xml(cls, xml):
if t is not None:
self.hero_power = t[0].attrib.get("cardID")

e = xml.findall("MasterPower")
self.master_power = e[0] if e else None

self.entourage = [t.attrib["cardID"] for t in xml.findall("EntourageCard")]
return self

def __init__(self, id, locale="enUS"):
Expand All @@ -114,9 +110,6 @@ def __init__(self, id, locale="enUS"):
self.tags = {}
self.hero_power = None
self.referenced_tags = {}
self.master_power = None
self.entourage = []
self.triggered_power_history_info = []

self.locale = locale

Expand All @@ -143,10 +136,6 @@ def to_xml(self):
if self.version:
ret.attrib["version"] = str(self.version)

if self.master_power:
master_power = ElementTree.SubElement(ret, "MasterPower")
master_power.text = self.master_power

for tag in LOCALIZED_TAGS:
value = self.strings[tag]
if value:
Expand Down Expand Up @@ -175,14 +164,6 @@ def to_xml(self):
for tag, value in sorted(self.referenced_tags.items()):
e = _make_tag_element(ret, "ReferencedTag", tag, value)

for entourage in self.entourage:
ElementTree.SubElement(ret, "EntourageCard", cardID=entourage)

for tphi in self.triggered_power_history_info:
e = ElementTree.SubElement(ret, "TriggeredPowerHistoryInfo")
e.attrib["effectIndex"] = str(tphi["effectIndex"])
e.attrib["showInHistory"] = str(tphi["showInHistory"])

return ret

@property
Expand Down

0 comments on commit d78fdda

Please sign in to comment.