本文整理汇总了Python中hsgame.game_objects.Minion.add_to_board方法的典型用法代码示例。如果您正苦于以下问题:Python Minion.add_to_board方法的具体用法?Python Minion.add_to_board怎么用?Python Minion.add_to_board使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hsgame.game_objects.Minion
的用法示例。
在下文中一共展示了Minion.add_to_board方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: use
# 需要导入模块: from hsgame.game_objects import Minion [as 别名]
# 或者: from hsgame.game_objects.Minion import add_to_board [as 别名]
def use(self, player, game):
class Panther(MinionCard):
def __init__(self):
super().__init__("Panther", 2, CHARACTER_CLASS.DRUID, CARD_RARITY.SPECIAL)
def create_minion(self):
return Minion(3, 2, MINION_TYPE.BEAST)
panther = Minion(3, 2, MINION_TYPE.BEAST)
panther.add_to_board(Panther(), game, player, len(player.minions))
示例2: summon_treant
# 需要导入模块: from hsgame.game_objects import Minion [as 别名]
# 或者: from hsgame.game_objects.Minion import add_to_board [as 别名]
def summon_treant(*args):
class Treant(MinionCard):
def __init__(self):
super().__init__("Treant", 1, CHARACTER_CLASS.DRUID, CARD_RARITY.COMMON)
def create_minion(self):
return Minion(2, 2)
treant = Minion(2, 2)
treant.add_to_board(Treant(), game, player, len(player.minions))
示例3: use
# 需要导入模块: from hsgame.game_objects import Minion [as 别名]
# 或者: from hsgame.game_objects.Minion import add_to_board [as 别名]
def use(self, player, game):
super().use(player, game)
class MirrorImageMinion(MinionCard):
def __init__(self):
super().__init__("Mirror Image", 0, CHARACTER_CLASS.MAGE, CARD_RARITY.SPECIAL, False)
def create_minion(self, player):
minion = Minion(0, 2)
minion.taunt = True
return minion
minion1 = Minion(0, 2)
minion2 = Minion(0, 2)
minion1.taunt = True
minion2.taunt = True
minion1.add_to_board(MirrorImageMinion(), game, player, 0)
minion2.add_to_board(MirrorImageMinion(), game, player, 0)