Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymorph - IndexError: list assignment index out of range #62

Closed
Ragowit opened this issue Dec 17, 2014 · 2 comments
Closed

Polymorph - IndexError: list assignment index out of range #62

Ragowit opened this issue Dec 17, 2014 · 2 comments

Comments

@Ragowit
Copy link
Collaborator

Ragowit commented Dec 17, 2014

Deck 1: Arcane Intellect, Arcane Missiles, Bluegill Warrior, Murloc Tidehunter, Elven Archer, Elven Archer, Mirror Image, Arcane Missiles, Mirror Image, Bluegill Warrior, Arcane Explosion, Arcane Explosion, Frostbolt, Polymorph, Frostbolt, Kobold Geomancer, Arcane Intellect, Sen'jin Shieldmasta, Ogre Magi, Deathlord, Stonetusk Boar, Argent Squire, Haunted Creeper, Frost Elemental, Stormwind Champion, Ironfur Grizzly, Kobold Geomancer, Gelbin Mekkatorque, Silverback Patriarch, Sorcerer's Apprentice

Deck 2: Starfire, Kobold Geomancer, Blingtron 3000, Windfury Harpy, Blood Knight, Spectral Knight, Claw, Baron Rivendare, Stranglethorn Tiger, Razorfen Hunter, Mark of Nature, Echoing Ooze, Ironbeak Owl, Frostwolf Warlord, Frostwolf Warlord, Dark Iron Dwarf, Dark Iron Dwarf, Mind Control Tech, Piloted Shredder, Archmage, Spectral Knight, Loatheb, Mind Control Tech, Deathlord, Ancient of War, Magma Rager, Elite Tauren Chieftain, Stormwind Champion, Young Priestess, Ancient Brewmaster

Traceback (most recent call last):
  File "C:\Users\Ragowit\Documents\GitHub\mcts\hearthbreaker\uct.py", line 165, in DoMove
    self.game.play_card(self.game.current_player.hand[move[3]])
  File "C:\Users\Ragowit\Documents\GitHub\mcts\hearthbreaker\hearthbreaker\game_objects.py", line 2009, in play_card
    card.use(self.current_player, self)
  File "C:\Users\Ragowit\Documents\GitHub\mcts\hearthbreaker\hearthbreaker\cards\spells\mage.py", line 280, in use
    self.target.replace(minion)
  File "C:\Users\Ragowit\Documents\GitHub\mcts\hearthbreaker\hearthbreaker\game_objects.py", line 1165, in replace
    self.player.minions[self.index] = new_minion
IndexError: list assignment index out of range
@danielyule
Copy link
Owner

I'm able to replicate this one, but I don't know the cause. I could treat the symptom (i.e. stop the bug from happening), but I'd rather figure out why, since it should never be occurring. I will spend some time working on it.

@danielyule
Copy link
Owner

I ran these decks over and over again, recording which cards were being played, until I realized that Deathlord was the common factor. The bug was caused by Deathlord summoning its minion to the same index as it was currently sitting at, but on the other side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants