コード例 #1
0
ファイル: cards.py プロジェクト: Stoeoef/mageknight
 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))
コード例 #2
0
ファイル: match.py プロジェクト: Stoeoef/mageknight
 def startInteraction(self):
     if self.state is not State.movement:
         raise InvalidAction("Cannot start interaction now.")
     modifier = self.currentPlayer.reputationModifier
     if modifier is REPUTATION_NONE:
         raise InvalidAction("Nobody wants to interact with you!")
     self.setState(State.interaction)
     if modifier != 0:
         self.effects.add(effects.InfluencePoints(modifier))
コード例 #3
0
ファイル: match.py プロジェクト: Stoeoef/mageknight
 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
コード例 #4
0
ファイル: units.py プロジェクト: Stoeoef/mageknight
 def ability2(self, match, player):
     match.effects.add(effects.InfluencePoints(2))
コード例 #5
0
ファイル: cards.py プロジェクト: Stoeoef/mageknight
 def strongEffect(self, match, player):
     match.effects.add(effects.InfluencePoints(5))
     player.addReputation(-1)
コード例 #6
0
ファイル: cards.py プロジェクト: Stoeoef/mageknight
 def basicEffect(self, match, player):
     match.effects.add(effects.InfluencePoints(2))
コード例 #7
0
ファイル: cards.py プロジェクト: Stoeoef/mageknight
 def strongEffect(self, match, player):
     match.effects.add(effects.InfluencePoints(4))
コード例 #8
0
ファイル: cards.py プロジェクト: Stoeoef/mageknight
 def strongEffect(self, match, player):
     match.effects.add(effects.InfluencePoints(4))
     if match.state is State.interaction:
         player.reputation += 1
         player.fame += 1
コード例 #9
0
ファイル: cards.py プロジェクト: Stoeoef/mageknight
 def basicEffect(self, match, player):
     match.effects.add(effects.InfluencePoints(2))
     if match.state is State.interaction:
         player.fame += 1
コード例 #10
0
ファイル: match.py プロジェクト: Stoeoef/mageknight
 def payInfluencePoints(self, cost):
     if self.effects.influencePoints < cost:
         raise InvalidAction("Not enough influence points")
     if cost > 0:
         self.effects.remove(effects.InfluencePoints(cost))