{"action":"created","comment":{"url":"https://api.github.com/repos/crawl/crawl/pulls/comments/30020640","id":30020640,"diff_hunk":"@@ -653,33 +653,56 @@ static void _powered_by_pain(int dam)\n     const int level = player_mutation_level(MUT_POWERED_BY_PAIN);\n \n     if (you.mutation[MUT_POWERED_BY_PAIN]\n-        && (random2(dam) > 4 + div_rand_round(you.experience_level, 4)\n-            || dam >= you.hp_max / 2))\n+        && (one_chance_in(5)\n+            || dam >= you.hp_max / (2 + level)))\n     {\n-        switch (random2(4))\n+        mpr(\"You focus on the pain.\");\n+        bool success = false;\n+        int tries = 0;\n+        do\n         {\n-        case 0:\n-        case 1:\n-        {\n-            if (you.magic_points < you.max_magic_points)\n+            tries++;\n+            switch (random2(4))","path":"crawl-ref/source/ouch.cc","position":20,"original_position":20,"commit_id":"b0cb13af5b70a08a0cc9bbebca899a1cd0004c9b","original_commit_id":"b0cb13af5b70a08a0cc9bbebca899a1cd0004c9b","user":{"login":"alexjurkiewicz","id":379509,"avatar_url":"https://avatars.githubusercontent.com/u/379509?v=3","gravatar_id":"","url":"https://api.github.com/users/alexjurkiewicz","html_url":"https://github.com/alexjurkiewicz","followers_url":"https://api.github.com/users/alexjurkiewicz/followers","following_url":"https://api.github.com/users/alexjurkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/alexjurkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/alexjurkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexjurkiewicz/subscriptions","organizations_url":"https://api.github.com/users/alexjurkiewicz/orgs","repos_url":"https://api.github.com/users/alexjurkiewicz/repos","events_url":"https://api.github.com/users/alexjurkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/alexjurkiewicz/received_events","type":"User","site_admin":false},"body":"not sure if this is the best way to select between code paths here -- it's a bit fragile. Adding another option requires you to remember to increase this integer.","created_at":"2015-05-11T08:31:38Z","updated_at":"2015-05-11T08:31:38Z","html_url":"https://github.com/crawl/crawl/pull/25#discussion_r30020640","pull_request_url":"https://api.github.com/repos/crawl/crawl/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/crawl/crawl/pulls/comments/30020640"},"html":{"href":"https://github.com/crawl/crawl/pull/25#discussion_r30020640"},"pull_request":{"href":"https://api.github.com/repos/crawl/crawl/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/crawl/crawl/pulls/25","id":35078406,"html_url":"https://github.com/crawl/crawl/pull/25","diff_url":"https://github.com/crawl/crawl/pull/25.diff","patch_url":"https://github.com/crawl/crawl/pull/25.patch","issue_url":"https://api.github.com/repos/crawl/crawl/issues/25","number":25,"state":"open","locked":false,"title":"Rework Powered By Pain.","user":{"login":"alexjurkiewicz","id":379509,"avatar_url":"https://avatars.githubusercontent.com/u/379509?v=3","gravatar_id":"","url":"https://api.github.com/users/alexjurkiewicz","html_url":"https://github.com/alexjurkiewicz","followers_url":"https://api.github.com/users/alexjurkiewicz/followers","following_url":"https://api.github.com/users/alexjurkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/alexjurkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/alexjurkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexjurkiewicz/subscriptions","organizations_url":"https://api.github.com/users/alexjurkiewicz/orgs","repos_url":"https://api.github.com/users/alexjurkiewicz/repos","events_url":"https://api.github.com/users/alexjurkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/alexjurkiewicz/received_events","type":"User","site_admin":false},"body":"Similar to my spiny tweak, make the proc rate constant and more frequent. Also ensure every proc does something useful (currently 50% of procs add MP, which is useless on many characters).\r\n\r\nAlso add some more effects to the list.","created_at":"2015-05-10T06:45:28Z","updated_at":"2015-05-11T08:31:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c3125bf8244e8682062478939757a847ea99b82d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crawl/crawl/pulls/25/commits","review_comments_url":"https://api.github.com/repos/crawl/crawl/pulls/25/comments","review_comment_url":"https://api.github.com/repos/crawl/crawl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crawl/crawl/issues/25/comments","statuses_url":"https://api.github.com/repos/crawl/crawl/statuses/b0cb13af5b70a08a0cc9bbebca899a1cd0004c9b","head":{"label":"alexjurkiewicz:pbp-buffs","ref":"pbp-buffs","sha":"b0cb13af5b70a08a0cc9bbebca899a1cd0004c9b","user":{"login":"alexjurkiewicz","id":379509,"avatar_url":"https://avatars.githubusercontent.com/u/379509?v=3","gravatar_id":"","url":"https://api.github.com/users/alexjurkiewicz","html_url":"https://github.com/alexjurkiewicz","followers_url":"https://api.github.com/users/alexjurkiewicz/followers","following_url":"https://api.github.com/users/alexjurkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/alexjurkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/alexjurkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexjurkiewicz/subscriptions","organizations_url":"https://api.github.com/users/alexjurkiewicz/orgs","repos_url":"https://api.github.com/users/alexjurkiewicz/repos","events_url":"https://api.github.com/users/alexjurkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/alexjurkiewicz/received_events","type":"User","site_admin":false},"repo":{"id":33104844,"name":"crawl-ref","full_name":"alexjurkiewicz/crawl-ref","owner":{"login":"alexjurkiewicz","id":379509,"avatar_url":"https://avatars.githubusercontent.com/u/379509?v=3","gravatar_id":"","url":"https://api.github.com/users/alexjurkiewicz","html_url":"https://github.com/alexjurkiewicz","followers_url":"https://api.github.com/users/alexjurkiewicz/followers","following_url":"https://api.github.com/users/alexjurkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/alexjurkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/alexjurkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexjurkiewicz/subscriptions","organizations_url":"https://api.github.com/users/alexjurkiewicz/orgs","repos_url":"https://api.github.com/users/alexjurkiewicz/repos","events_url":"https://api.github.com/users/alexjurkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/alexjurkiewicz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexjurkiewicz/crawl-ref","description":"My development copy of DCSS","fork":true,"url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref","forks_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/forks","keys_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/teams","hooks_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/hooks","issue_events_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/issues/events{/number}","events_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/events","assignees_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/assignees{/user}","branches_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/branches{/branch}","tags_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/tags","blobs_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/statuses/{sha}","languages_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/languages","stargazers_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/stargazers","contributors_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/contributors","subscribers_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/subscribers","subscription_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/subscription","commits_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/contents/{+path}","compare_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/merges","archive_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/downloads","issues_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/issues{/number}","pulls_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/pulls{/number}","milestones_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/milestones{/number}","notifications_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/labels{/name}","releases_url":"https://api.github.com/repos/alexjurkiewicz/crawl-ref/releases{/id}","created_at":"2015-03-30T05:25:38Z","updated_at":"2015-05-08T00:50:58Z","pushed_at":"2015-05-11T08:31:09Z","git_url":"git://github.com/alexjurkiewicz/crawl-ref.git","ssh_url":"git@github.com:alexjurkiewicz/crawl-ref.git","clone_url":"https://github.com/alexjurkiewicz/crawl-ref.git","svn_url":"https://github.com/alexjurkiewicz/crawl-ref","homepage":"","size":122631,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"crawl:master","ref":"master","sha":"15e8808082f572912dd7c82b3a8db7cba71629f7","user":{"login":"crawl","id":8470194,"avatar_url":"https://avatars.githubusercontent.com/u/8470194?v=3","gravatar_id":"","url":"https://api.github.com/users/crawl","html_url":"https://github.com/crawl","followers_url":"https://api.github.com/users/crawl/followers","following_url":"https://api.github.com/users/crawl/following{/other_user}","gists_url":"https://api.github.com/users/crawl/gists{/gist_id}","starred_url":"https://api.github.com/users/crawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crawl/subscriptions","organizations_url":"https://api.github.com/users/crawl/orgs","repos_url":"https://api.github.com/users/crawl/repos","events_url":"https://api.github.com/users/crawl/events{/privacy}","received_events_url":"https://api.github.com/users/crawl/received_events","type":"Organization","site_admin":false},"repo":{"id":23038334,"name":"crawl","full_name":"crawl/crawl","owner":{"login":"crawl","id":8470194,"avatar_url":"https://avatars.githubusercontent.com/u/8470194?v=3","gravatar_id":"","url":"https://api.github.com/users/crawl","html_url":"https://github.com/crawl","followers_url":"https://api.github.com/users/crawl/followers","following_url":"https://api.github.com/users/crawl/following{/other_user}","gists_url":"https://api.github.com/users/crawl/gists{/gist_id}","starred_url":"https://api.github.com/users/crawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crawl/subscriptions","organizations_url":"https://api.github.com/users/crawl/orgs","repos_url":"https://api.github.com/users/crawl/repos","events_url":"https://api.github.com/users/crawl/events{/privacy}","received_events_url":"https://api.github.com/users/crawl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crawl/crawl","description":"Dungeon Crawl: Stone Soup future repo (migrating from gitorious – do not push here!)","fork":false,"url":"https://api.github.com/repos/crawl/crawl","forks_url":"https://api.github.com/repos/crawl/crawl/forks","keys_url":"https://api.github.com/repos/crawl/crawl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crawl/crawl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crawl/crawl/teams","hooks_url":"https://api.github.com/repos/crawl/crawl/hooks","issue_events_url":"https://api.github.com/repos/crawl/crawl/issues/events{/number}","events_url":"https://api.github.com/repos/crawl/crawl/events","assignees_url":"https://api.github.com/repos/crawl/crawl/assignees{/user}","branches_url":"https://api.github.com/repos/crawl/crawl/branches{/branch}","tags_url":"https://api.github.com/repos/crawl/crawl/tags","blobs_url":"https://api.github.com/repos/crawl/crawl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crawl/crawl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crawl/crawl/git/refs{/sha}","trees_url":"https://api.github.com/repos/crawl/crawl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crawl/crawl/statuses/{sha}","languages_url":"https://api.github.com/repos/crawl/crawl/languages","stargazers_url":"https://api.github.com/repos/crawl/crawl/stargazers","contributors_url":"https://api.github.com/repos/crawl/crawl/contributors","subscribers_url":"https://api.github.com/repos/crawl/crawl/subscribers","subscription_url":"https://api.github.com/repos/crawl/crawl/subscription","commits_url":"https://api.github.com/repos/crawl/crawl/commits{/sha}","git_commits_url":"https://api.github.com/repos/crawl/crawl/git/commits{/sha}","comments_url":"https://api.github.com/repos/crawl/crawl/comments{/number}","issue_comment_url":"https://api.github.com/repos/crawl/crawl/issues/comments{/number}","contents_url":"https://api.github.com/repos/crawl/crawl/contents/{+path}","compare_url":"https://api.github.com/repos/crawl/crawl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crawl/crawl/merges","archive_url":"https://api.github.com/repos/crawl/crawl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crawl/crawl/downloads","issues_url":"https://api.github.com/repos/crawl/crawl/issues{/number}","pulls_url":"https://api.github.com/repos/crawl/crawl/pulls{/number}","milestones_url":"https://api.github.com/repos/crawl/crawl/milestones{/number}","notifications_url":"https://api.github.com/repos/crawl/crawl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crawl/crawl/labels{/name}","releases_url":"https://api.github.com/repos/crawl/crawl/releases{/id}","created_at":"2014-08-17T10:39:37Z","updated_at":"2015-05-09T21:16:53Z","pushed_at":"2015-05-11T08:31:10Z","git_url":"git://github.com/crawl/crawl.git","ssh_url":"git@github.com:crawl/crawl.git","clone_url":"https://github.com/crawl/crawl.git","svn_url":"https://github.com/crawl/crawl","homepage":"http://crawl.develz.org/","size":133679,"stargazers_count":26,"watchers_count":26,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":4,"forks":15,"open_issues":4,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crawl/crawl/pulls/25"},"html":{"href":"https://github.com/crawl/crawl/pull/25"},"issue":{"href":"https://api.github.com/repos/crawl/crawl/issues/25"},"comments":{"href":"https://api.github.com/repos/crawl/crawl/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/crawl/crawl/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/crawl/crawl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crawl/crawl/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/crawl/crawl/statuses/b0cb13af5b70a08a0cc9bbebca899a1cd0004c9b"}}}}