本文整理汇总了Python中card.Card.toughness方法的典型用法代码示例。如果您正苦于以下问题:Python Card.toughness方法的具体用法?Python Card.toughness怎么用?Python Card.toughness使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类card.Card
的用法示例。
在下文中一共展示了Card.toughness方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Card
# 需要导入模块: from card import Card [as 别名]
# 或者: from card.Card import toughness [as 别名]
for cards in root.findall('cards'):
for card in cards.findall('card'):
temp_card = Card()
temp_card.id = card.find('id').text
temp_card.name = card.find('name').text
temp_card.set = card.find('set').text
temp_card.type = card.find('type').text
temp_card.rarity = card.find('rarity').text
temp_card.manacost = card.find('manacost').text or "Default"
temp_card.converted_manacost = card.find('converted_manacost').text or "Default"
temp_card.power = card.find('power').text or "Default"
temp_card.toughness = card.find('toughness').text or "Default"
temp_card.loyalty = card.find('loyalty').text or "Default"
temp_card.ability = card.find('ability').text or "Default"
#temp_card.flavor = card.find('flavor').text or "Default"
if temp_card.id == 74256:
temp_card.flavor = "Default"
else:
temp_card.flavor = card.find('flavor').text or "Default"
temp_card.variation = card.find('variation').text or "Default"
temp_card.artist = card.find('artist').text or "Default"
temp_card.number = card.find('number').text or "Default"
temp_card.rating = card.find('rating').text or "Default"
temp_card.ruling = card.find('ruling').text or "Default"
temp_card.color = card.find('color').text or "Default"
temp_card.generated_mana = card.find('generated_mana').text or "Default"