{"action":"created","issue":{"url":"https://api.github.com/repos/oyachai/HearthSim/issues/112","labels_url":"https://api.github.com/repos/oyachai/HearthSim/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/oyachai/HearthSim/issues/112/comments","events_url":"https://api.github.com/repos/oyachai/HearthSim/issues/112/events","html_url":"https://github.com/oyachai/HearthSim/issues/112","id":87424867,"number":112,"title":"Invalid minion indexes","user":{"login":"slaymaker1907","id":12125553,"avatar_url":"https://avatars.githubusercontent.com/u/12125553?v=3","gravatar_id":"","url":"https://api.github.com/users/slaymaker1907","html_url":"https://github.com/slaymaker1907","followers_url":"https://api.github.com/users/slaymaker1907/followers","following_url":"https://api.github.com/users/slaymaker1907/following{/other_user}","gists_url":"https://api.github.com/users/slaymaker1907/gists{/gist_id}","starred_url":"https://api.github.com/users/slaymaker1907/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slaymaker1907/subscriptions","organizations_url":"https://api.github.com/users/slaymaker1907/orgs","repos_url":"https://api.github.com/users/slaymaker1907/repos","events_url":"https://api.github.com/users/slaymaker1907/events{/privacy}","received_events_url":"https://api.github.com/users/slaymaker1907/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-11T17:36:18Z","updated_at":"2015-06-11T19:49:07Z","closed_at":null,"body":"By using randomly generated decks, I've found a very strange bug that occurs very often with a variety of cards, but especially Dark Cultist.  What seems to happen is that it first targets a valid minion, however, somewhere along the line the board state loses this minion so when it tries to find the index again it for some reason returns either an index greater than the size of the lists or -1 (which means it couldn't find it in the player's minion list).\r\n\r\nI'm not entirely sure why this is happening, but I'm going to try and add functionality to the random deck generator (DeckFactory under util) to see if this issue can be isolated to a few cards or whether it is a problem on the part of the AI itself.\r\n\r\nI would appreciate any insight into this because right now this bug is causing about 50% of random deck games to generate an exception."},"comment":{"url":"https://api.github.com/repos/oyachai/HearthSim/issues/comments/111257520","html_url":"https://github.com/oyachai/HearthSim/issues/112#issuecomment-111257520","issue_url":"https://api.github.com/repos/oyachai/HearthSim/issues/112","id":111257520,"user":{"login":"oyachai","id":7936584,"avatar_url":"https://avatars.githubusercontent.com/u/7936584?v=3","gravatar_id":"","url":"https://api.github.com/users/oyachai","html_url":"https://github.com/oyachai","followers_url":"https://api.github.com/users/oyachai/followers","following_url":"https://api.github.com/users/oyachai/following{/other_user}","gists_url":"https://api.github.com/users/oyachai/gists{/gist_id}","starred_url":"https://api.github.com/users/oyachai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oyachai/subscriptions","organizations_url":"https://api.github.com/users/oyachai/orgs","repos_url":"https://api.github.com/users/oyachai/repos","events_url":"https://api.github.com/users/oyachai/events{/privacy}","received_events_url":"https://api.github.com/users/oyachai/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T19:49:07Z","updated_at":"2015-06-11T19:49:07Z","body":"Thanks for spotting the bug.  It looks like a bug in the way deathrattles that target random minions are handled.  I've committed a fix in master, so pls do a pull and let me know how it works."}}