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)
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)
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)
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))
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
def ability1(self, match, player): options = [effects.AttackPoints(2), effects.BlockPoints(2)] match.effects.add(dialogs.choose(options))
def ability2(self, match, player): options = [effects.AttackPoints(6), effects.BlockPoints(6)] match.effects.add(dialogs.choose(options)) player.woundUnit(self)
def ability1(self, match, player): match.effects.add(effects.AttackPoints(2))
def ability2(self, match, player): match.effects.add(effects.AttackPoints(2, range=AttackRange.range))
def ability2(self, match, player): options = [effects.AttackPoints(4, element=Element.fire), effects.BlockPoints(4, element=Element.fire)] match.effects.add(dialogs.choose(options))
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)
def strongEffect(self, match, player): match.effects.add(effects.AttackPoints(3, range=AttackRange.range))
def strongEffect(self, match, player): match.effects.add(effects.AttackPoints(4))