1. Alexander Schremmer
  2. domination
Issue #40 new

'Goons' object has no attribute 'defends_check'

Anonymous created an issue

self = <domination.gameengine.DominationGame object at 0x131ea86c>, starting_from_checkpoint = False

def play_game(self, starting_from_checkpoint):
    if not starting_from_checkpoint:
        self.deal_cards()
        for player in self.players:
            player.prepare_hand(self.cards_to_draw)
    while True:
        yield Checkpoint(self)
        self.round += 1
        gen = self.play_round()
      generator_forward_ex(gen, [PlayerKickedException])

gameengine.py:500:


self = <domination.gameengine.DominationGame object at 0x131ea86c>

def play_round(self):
    self.pending_round_players = players = self.players[:]
    while players:
        player = players.pop(0)
        self.finished_round_players.append(player)
        with player:
            try:
                # duration actions from last round
                for card in player.duration_cards:
                    duration_func = card.duration_action
                    card.durationaction_activated = False
                    gen = duration_func(self, player)
                    generator_forward(gen)
                player.aux_cards.extend(player.duration_cards)
                if player.duration_cards:
                    for other_player in self.participants:
                        if other_player is not player:
                            yield InfoRequest(self, other_player,
                                    _("%s had duration cards:", (player.name, )), player.duration_cards)
                player.duration_cards = []

                gen = self.fire_hook("on_start_of_turn", self, player)
                generator_forward(gen)

                # action
                while player.remaining_actions and [c for c in player.hand
                        if isinstance(c, ActionCard)]:
                    action_cards = (yield SelectActionCard(self, player,
                        _("Which action card do you want to play? (%i actions left)", (player.remaining_actions, ))))
                    if action_cards is None:
                        break
                    player.remaining_actions -= 1
                    card = action_cards[0]
                    player.hand.remove(card)
                    if card.trash_after_playing:
                        self.trash_pile.append(card)
                    else:
                        player.aux_cards.append(card)
                    gen = self.play_action_card(player, card)
                  generator_forward(gen)

gameengine.py:437:


self = <domination.gameengine.DominationGame object at 0x131ea86c>, player = <Player 'CPU0'>, card = <domination.cards.prosperity.Goons object at 0x131fe42c>

def play_action_card(self, player, card):
    for other_player in self.participants:
        if other_player is not player:
            yield InfoRequest(self, other_player,
                    _("%s plays:", (player.name, )), [card])

    player.activated_cards.append(card)
    gen = card.activate_action(self, player)
  generator_forward(gen)

gameengine.py:383:


self = <domination.cards.prosperity.Goons object at 0x131fe42c>, game = <domination.gameengine.DominationGame object at 0x131ea86c>, player = <Player 'CPU0'>

def activate_action(self, game, player):
    player.remaining_deals += 1
    player.virtual_money += 2
    for other_player in game.following_players(player):
        try:
          handle_defense(self, game, other_player)

E AttributeError: 'Goons' object has no attribute 'defends_check'

cards/prosperity.py:442: AttributeError

Comments (0)

  1. Log in to comment