示例#1
0
 def basicEffect(self, match, player):
     options = [effects.AttackPoints(2),
                effects.BlockPoints(2),
                effects.AttackPoints(1, range=AttackRange.range)
               ]
     effect = dialogs.choose(options)
     match.effects.add(effect)
示例#2
0
 def strongEffect(self, match, player):
     options = [effects.AttackPoints(4),
                effects.BlockPoints(4),
                effects.AttackPoints(3, element=Element.fire),
                effects.BlockPoints(3, element=Element.fire),
                effects.AttackPoints(3, range=AttackRange.range),
                effects.AttackPoints(2, range=AttackRange.siege)
               ]
     effect = dialogs.choose(options)
     match.effects.add(effect)
示例#3
0
    def __init__(self, match):
        super().__init__()
        self.match = match
        import functools
        from mageknight.core import effects
        for pointsType in [
                effects.MovePoints, effects.InfluencePoints,
                effects.BlockPoints, effects.AttackPoints
        ]:
            effect = pointsType(4)
            action = QtWidgets.QAction(effect.title[:2], self)
            action.triggered.connect(
                functools.partial(self._clicked, match.effects.add, effect))
            self.addAction(action)

        effect = effects.AttackPoints(4, range=AttackRange.siege)
        action = QtWidgets.QAction('Si', self)
        action.triggered.connect(
            functools.partial(self._clicked, match.effects.add, effect))
        self.addAction(action)

        action = QtWidgets.QAction('Ma', self)
        action.triggered.connect(
            functools.partial(self._clicked, self._addMana))
        self.addAction(action)

        action = QtWidgets.QAction('Ca', self)
        action.triggered.connect(
            functools.partial(self._clicked,
                              self.match.currentPlayer.drawCards, 1))
        self.addAction(action)
示例#4
0
 def _effect(self, match, player, amount):
     card = dialogs.chooseCard(player)
     player.handCards.remove(card)
     options = [effects.MovePoints(amount),
                effects.InfluencePoints(amount),
                effects.AttackPoints(amount),
                effects.BlockPoints(amount)
               ]
     match.effects.add(dialogs.choose(options))
示例#5
0
 def sidewaysEffects(self):
     """Return all effects that can be achieved by playing a card sideways (might change due to skills).
     """
     options = [effects.MovePoints(1),
                effects.InfluencePoints(1),
                effects.AttackPoints(1),
                effects.BlockPoints(1)
                ]
     return options
示例#6
0
 def ability1(self, match, player):
     options = [effects.AttackPoints(2), effects.BlockPoints(2)]
     match.effects.add(dialogs.choose(options))
示例#7
0
 def ability2(self, match, player):
     options = [effects.AttackPoints(6), effects.BlockPoints(6)]
     match.effects.add(dialogs.choose(options))
     player.woundUnit(self)
示例#8
0
 def ability1(self, match, player):
     match.effects.add(effects.AttackPoints(2))
示例#9
0
 def ability2(self, match, player):
     match.effects.add(effects.AttackPoints(2, range=AttackRange.range))
示例#10
0
 def ability2(self, match, player):
     options = [effects.AttackPoints(4, element=Element.fire),
                effects.BlockPoints(4, element=Element.fire)]
     match.effects.add(dialogs.choose(options))
示例#11
0
 def basicEffect(self, match, player):
     options = [effects.AttackPoints(2, element=Element.ice),
                effects.BlockPoints(3, element=Element.ice),
               ]
     effect = dialogs.choose(options)
     match.effects.add(effect)
示例#12
0
 def strongEffect(self, match, player):
     match.effects.add(effects.AttackPoints(3, range=AttackRange.range))
示例#13
0
 def strongEffect(self, match, player):
     match.effects.add(effects.AttackPoints(4))