{"action":"closed","number":20,"pull_request":{"url":"https://api.github.com/repos/cryogen/throneteki/pulls/20","id":92957799,"html_url":"https://github.com/cryogen/throneteki/pull/20","diff_url":"https://github.com/cryogen/throneteki/pull/20.diff","patch_url":"https://github.com/cryogen/throneteki/pull/20.patch","issue_url":"https://api.github.com/repos/cryogen/throneteki/issues/20","number":20,"state":"closed","locked":false,"title":"Small power comparison fixes and power claim fix","user":{"login":"DrThyme","id":3647729,"avatar_url":"https://avatars.githubusercontent.com/u/3647729?v=3","gravatar_id":"","url":"https://api.github.com/users/DrThyme","html_url":"https://github.com/DrThyme","followers_url":"https://api.github.com/users/DrThyme/followers","following_url":"https://api.github.com/users/DrThyme/following{/other_user}","gists_url":"https://api.github.com/users/DrThyme/gists{/gist_id}","starred_url":"https://api.github.com/users/DrThyme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DrThyme/subscriptions","organizations_url":"https://api.github.com/users/DrThyme/orgs","repos_url":"https://api.github.com/users/DrThyme/repos","events_url":"https://api.github.com/users/DrThyme/events{/privacy}","received_events_url":"https://api.github.com/users/DrThyme/received_events","type":"User","site_admin":false},"body":"Some small things I noticed while reading through the code, now since my node.js is currently quite rusty these fixes might ruin intended behavior and in that case feel free to ignore this pull request. But I'd thought it good to point them out. :)\r\n\r\nPower comparison fix: All winner.getTotalPower() check for \"> 15\", wouldn't this lead to a player needing 16 power to win?\r\n\r\nPower claim fix: When applying power claim to a losing player the code currently only checks to see if that player has any power (ie. loser.power > 0) and then subtracts the claim from that players power and adds it to the winner. This could lead to a player having negative power/a player getting power that didn't exist. An example would be that the losing player has 1 power and has just lost a power challenge with claim 2. \r\nThis fix is supposed to correct that by taking the claim in steps of one power until there is no power left or no claim left. Might be fancier ways of fixing this problem though.","created_at":"2016-11-09T12:50:29Z","updated_at":"2016-11-09T13:04:36Z","closed_at":"2016-11-09T13:04:36Z","merged_at":"2016-11-09T13:04:36Z","merge_commit_sha":"7ee2d9b47a9d6c6e66def1f6cdcb3745009080ab","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cryogen/throneteki/pulls/20/commits","review_comments_url":"https://api.github.com/repos/cryogen/throneteki/pulls/20/comments","review_comment_url":"https://api.github.com/repos/cryogen/throneteki/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cryogen/throneteki/issues/20/comments","statuses_url":"https://api.github.com/repos/cryogen/throneteki/statuses/e0284458fe831fad91d86e57ffbda186a95d774a","head":{"label":"DrThyme:comparison-fixes","ref":"comparison-fixes","sha":"e0284458fe831fad91d86e57ffbda186a95d774a","user":{"login":"DrThyme","id":3647729,"avatar_url":"https://avatars.githubusercontent.com/u/3647729?v=3","gravatar_id":"","url":"https://api.github.com/users/DrThyme","html_url":"https://github.com/DrThyme","followers_url":"https://api.github.com/users/DrThyme/followers","following_url":"https://api.github.com/users/DrThyme/following{/other_user}","gists_url":"https://api.github.com/users/DrThyme/gists{/gist_id}","starred_url":"https://api.github.com/users/DrThyme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DrThyme/subscriptions","organizations_url":"https://api.github.com/users/DrThyme/orgs","repos_url":"https://api.github.com/users/DrThyme/repos","events_url":"https://api.github.com/users/DrThyme/events{/privacy}","received_events_url":"https://api.github.com/users/DrThyme/received_events","type":"User","site_admin":false},"repo":{"id":73280186,"name":"throneteki-fork","full_name":"DrThyme/throneteki-fork","owner":{"login":"DrThyme","id":3647729,"avatar_url":"https://avatars.githubusercontent.com/u/3647729?v=3","gravatar_id":"","url":"https://api.github.com/users/DrThyme","html_url":"https://github.com/DrThyme","followers_url":"https://api.github.com/users/DrThyme/followers","following_url":"https://api.github.com/users/DrThyme/following{/other_user}","gists_url":"https://api.github.com/users/DrThyme/gists{/gist_id}","starred_url":"https://api.github.com/users/DrThyme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DrThyme/subscriptions","organizations_url":"https://api.github.com/users/DrThyme/orgs","repos_url":"https://api.github.com/users/DrThyme/repos","events_url":"https://api.github.com/users/DrThyme/events{/privacy}","received_events_url":"https://api.github.com/users/DrThyme/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DrThyme/throneteki-fork","description":"Browser based A Game of Thrones LCG 2nd Edition","fork":true,"url":"https://api.github.com/repos/DrThyme/throneteki-fork","forks_url":"https://api.github.com/repos/DrThyme/throneteki-fork/forks","keys_url":"https://api.github.com/repos/DrThyme/throneteki-fork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DrThyme/throneteki-fork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DrThyme/throneteki-fork/teams","hooks_url":"https://api.github.com/repos/DrThyme/throneteki-fork/hooks","issue_events_url":"https://api.github.com/repos/DrThyme/throneteki-fork/issues/events{/number}","events_url":"https://api.github.com/repos/DrThyme/throneteki-fork/events","assignees_url":"https://api.github.com/repos/DrThyme/throneteki-fork/assignees{/user}","branches_url":"https://api.github.com/repos/DrThyme/throneteki-fork/branches{/branch}","tags_url":"https://api.github.com/repos/DrThyme/throneteki-fork/tags","blobs_url":"https://api.github.com/repos/DrThyme/throneteki-fork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DrThyme/throneteki-fork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DrThyme/throneteki-fork/git/refs{/sha}","trees_url":"https://api.github.com/repos/DrThyme/throneteki-fork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DrThyme/throneteki-fork/statuses/{sha}","languages_url":"https://api.github.com/repos/DrThyme/throneteki-fork/languages","stargazers_url":"https://api.github.com/repos/DrThyme/throneteki-fork/stargazers","contributors_url":"https://api.github.com/repos/DrThyme/throneteki-fork/contributors","subscribers_url":"https://api.github.com/repos/DrThyme/throneteki-fork/subscribers","subscription_url":"https://api.github.com/repos/DrThyme/throneteki-fork/subscription","commits_url":"https://api.github.com/repos/DrThyme/throneteki-fork/commits{/sha}","git_commits_url":"https://api.github.com/repos/DrThyme/throneteki-fork/git/commits{/sha}","comments_url":"https://api.github.com/repos/DrThyme/throneteki-fork/comments{/number}","issue_comment_url":"https://api.github.com/repos/DrThyme/throneteki-fork/issues/comments{/number}","contents_url":"https://api.github.com/repos/DrThyme/throneteki-fork/contents/{+path}","compare_url":"https://api.github.com/repos/DrThyme/throneteki-fork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DrThyme/throneteki-fork/merges","archive_url":"https://api.github.com/repos/DrThyme/throneteki-fork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DrThyme/throneteki-fork/downloads","issues_url":"https://api.github.com/repos/DrThyme/throneteki-fork/issues{/number}","pulls_url":"https://api.github.com/repos/DrThyme/throneteki-fork/pulls{/number}","milestones_url":"https://api.github.com/repos/DrThyme/throneteki-fork/milestones{/number}","notifications_url":"https://api.github.com/repos/DrThyme/throneteki-fork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DrThyme/throneteki-fork/labels{/name}","releases_url":"https://api.github.com/repos/DrThyme/throneteki-fork/releases{/id}","deployments_url":"https://api.github.com/repos/DrThyme/throneteki-fork/deployments","created_at":"2016-11-09T11:58:01Z","updated_at":"2016-11-09T12:21:48Z","pushed_at":"2016-11-09T13:02:30Z","git_url":"git://github.com/DrThyme/throneteki-fork.git","ssh_url":"git@github.com:DrThyme/throneteki-fork.git","clone_url":"https://github.com/DrThyme/throneteki-fork.git","svn_url":"https://github.com/DrThyme/throneteki-fork","homepage":"http://theironthrone.net","size":2968,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cryogen:master","ref":"master","sha":"53ec757b7e43c19699effeba7a914350ee50b870","user":{"login":"cryogen","id":1053365,"avatar_url":"https://avatars.githubusercontent.com/u/1053365?v=3","gravatar_id":"","url":"https://api.github.com/users/cryogen","html_url":"https://github.com/cryogen","followers_url":"https://api.github.com/users/cryogen/followers","following_url":"https://api.github.com/users/cryogen/following{/other_user}","gists_url":"https://api.github.com/users/cryogen/gists{/gist_id}","starred_url":"https://api.github.com/users/cryogen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cryogen/subscriptions","organizations_url":"https://api.github.com/users/cryogen/orgs","repos_url":"https://api.github.com/users/cryogen/repos","events_url":"https://api.github.com/users/cryogen/events{/privacy}","received_events_url":"https://api.github.com/users/cryogen/received_events","type":"User","site_admin":false},"repo":{"id":68015558,"name":"throneteki","full_name":"cryogen/throneteki","owner":{"login":"cryogen","id":1053365,"avatar_url":"https://avatars.githubusercontent.com/u/1053365?v=3","gravatar_id":"","url":"https://api.github.com/users/cryogen","html_url":"https://github.com/cryogen","followers_url":"https://api.github.com/users/cryogen/followers","following_url":"https://api.github.com/users/cryogen/following{/other_user}","gists_url":"https://api.github.com/users/cryogen/gists{/gist_id}","starred_url":"https://api.github.com/users/cryogen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cryogen/subscriptions","organizations_url":"https://api.github.com/users/cryogen/orgs","repos_url":"https://api.github.com/users/cryogen/repos","events_url":"https://api.github.com/users/cryogen/events{/privacy}","received_events_url":"https://api.github.com/users/cryogen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cryogen/throneteki","description":"Browser based A Game of Thrones LCG 2nd Edition","fork":false,"url":"https://api.github.com/repos/cryogen/throneteki","forks_url":"https://api.github.com/repos/cryogen/throneteki/forks","keys_url":"https://api.github.com/repos/cryogen/throneteki/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cryogen/throneteki/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cryogen/throneteki/teams","hooks_url":"https://api.github.com/repos/cryogen/throneteki/hooks","issue_events_url":"https://api.github.com/repos/cryogen/throneteki/issues/events{/number}","events_url":"https://api.github.com/repos/cryogen/throneteki/events","assignees_url":"https://api.github.com/repos/cryogen/throneteki/assignees{/user}","branches_url":"https://api.github.com/repos/cryogen/throneteki/branches{/branch}","tags_url":"https://api.github.com/repos/cryogen/throneteki/tags","blobs_url":"https://api.github.com/repos/cryogen/throneteki/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cryogen/throneteki/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cryogen/throneteki/git/refs{/sha}","trees_url":"https://api.github.com/repos/cryogen/throneteki/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cryogen/throneteki/statuses/{sha}","languages_url":"https://api.github.com/repos/cryogen/throneteki/languages","stargazers_url":"https://api.github.com/repos/cryogen/throneteki/stargazers","contributors_url":"https://api.github.com/repos/cryogen/throneteki/contributors","subscribers_url":"https://api.github.com/repos/cryogen/throneteki/subscribers","subscription_url":"https://api.github.com/repos/cryogen/throneteki/subscription","commits_url":"https://api.github.com/repos/cryogen/throneteki/commits{/sha}","git_commits_url":"https://api.github.com/repos/cryogen/throneteki/git/commits{/sha}","comments_url":"https://api.github.com/repos/cryogen/throneteki/comments{/number}","issue_comment_url":"https://api.github.com/repos/cryogen/throneteki/issues/comments{/number}","contents_url":"https://api.github.com/repos/cryogen/throneteki/contents/{+path}","compare_url":"https://api.github.com/repos/cryogen/throneteki/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cryogen/throneteki/merges","archive_url":"https://api.github.com/repos/cryogen/throneteki/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cryogen/throneteki/downloads","issues_url":"https://api.github.com/repos/cryogen/throneteki/issues{/number}","pulls_url":"https://api.github.com/repos/cryogen/throneteki/pulls{/number}","milestones_url":"https://api.github.com/repos/cryogen/throneteki/milestones{/number}","notifications_url":"https://api.github.com/repos/cryogen/throneteki/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cryogen/throneteki/labels{/name}","releases_url":"https://api.github.com/repos/cryogen/throneteki/releases{/id}","deployments_url":"https://api.github.com/repos/cryogen/throneteki/deployments","created_at":"2016-09-12T14:16:21Z","updated_at":"2016-11-08T13:22:11Z","pushed_at":"2016-11-09T13:04:36Z","git_url":"git://github.com/cryogen/throneteki.git","ssh_url":"git@github.com:cryogen/throneteki.git","clone_url":"https://github.com/cryogen/throneteki.git","svn_url":"https://github.com/cryogen/throneteki","homepage":"http://theironthrone.net","size":2969,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":11,"forks":4,"open_issues":11,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cryogen/throneteki/pulls/20"},"html":{"href":"https://github.com/cryogen/throneteki/pull/20"},"issue":{"href":"https://api.github.com/repos/cryogen/throneteki/issues/20"},"comments":{"href":"https://api.github.com/repos/cryogen/throneteki/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/cryogen/throneteki/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/cryogen/throneteki/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cryogen/throneteki/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/cryogen/throneteki/statuses/e0284458fe831fad91d86e57ffbda186a95d774a"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"cryogen","id":1053365,"avatar_url":"https://avatars.githubusercontent.com/u/1053365?v=3","gravatar_id":"","url":"https://api.github.com/users/cryogen","html_url":"https://github.com/cryogen","followers_url":"https://api.github.com/users/cryogen/followers","following_url":"https://api.github.com/users/cryogen/following{/other_user}","gists_url":"https://api.github.com/users/cryogen/gists{/gist_id}","starred_url":"https://api.github.com/users/cryogen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cryogen/subscriptions","organizations_url":"https://api.github.com/users/cryogen/orgs","repos_url":"https://api.github.com/users/cryogen/repos","events_url":"https://api.github.com/users/cryogen/events{/privacy}","received_events_url":"https://api.github.com/users/cryogen/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":3,"additions":15,"deletions":10,"changed_files":1}}
{"actor":{"display_login":"cryogen"}}