{"action":"created","comment":{"url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/comments/189443765","pull_request_review_id":121628334,"id":189443765,"diff_hunk":"@@ -0,0 +1,105 @@\n+import React from 'react';\n+import ExpandableStatisticBox from 'Main/ExpandableStatisticBox';\n+\n+import SPELLS from 'common/SPELLS';\n+import SpellIcon from 'common/SpellIcon';\n+import SpellLink from 'common/SpellLink';\n+import { formatPercentage } from 'common/format';\n+\n+import Analyzer from 'Parser/Core/Analyzer';\n+import SpellUsable from 'Parser/Core/Modules/SpellUsable';\n+import Combatants from 'Parser/Core/Modules/Combatants';\n+\n+class DesperatePrayer extends Analyzer {\n+\n+  static dependencies = {\n+    combatants: Combatants,\n+    spellUsable: SpellUsable,\n+  };\n+\n+  desperatePrayerUsages = [];\n+  currentDesperatePrayerUsage;\n+  deathsWithDPReady = 0;\n+\n+  on_byPlayer_applybuff(event) {\n+    if (event.ability.guid !== SPELLS.DESPERATE_PRAYER.id) {\n+      return;\n+    }\n+    this.currentDesperatePrayerUsage = {\n+      DamageTaken: 0,\n+      HPWhenUsed: 0,\n+      MaxHPWhenUsed: 0,\n+    };\n+  }\n+\n+  on_toPlayer_heal(event) {\n+    if (event.ability.guid !== SPELLS.DESPERATE_PRAYER.id) {\n+      return;\n+    }\n+    this.currentDesperatePrayerUsage.HPWhenUsed = event.hitPoints - event.amount;\n+    this.currentDesperatePrayerUsage.MaxHPWhenUsed = event.maxHitPoints;\n+  }\n+\n+  on_toPlayer_damage(event) {\n+    if(!this.combatants.selected.hasBuff(SPELLS.DESPERATE_PRAYER.id)) {\n+      return;\n+    }\n+    this.currentDesperatePrayerUsage.DamageTaken += event.amount;\n+  }\n+\n+  on_byPlayer_removebuff(event) {\n+    if (event.ability.guid !== SPELLS.DESPERATE_PRAYER.id) {\n+      return;\n+    }\n+    this.desperatePrayerUsages.push(this.currentDesperatePrayerUsage);\n+  }\n+\n+  on_toPlayer_death(event) {\n+    if(!this.spellUsable.isOnCooldown(SPELLS.DESPERATE_PRAYER.id)){\n+      this.deathsWithDPReady++;\n+    }\n+  }\n+\n+  statistic() {\n+    return (\n+      <ExpandableStatisticBox\n+        value={`${this.desperatePrayerUsages.length}`}\n+        label={`Desperate Prayer Usage(s)`}\n+        icon={<SpellIcon id={SPELLS.DESPERATE_PRAYER.id} />}>\n+        <table className=\"table table-condensed\">\n+          <thead>\n+            <tr>\n+              <th>Cast</th>\n+              <th>Damage Taken</th>\n+              <th>Health When Used</th>\n+            </tr>\n+          </thead>\n+          <tbody>\n+            {\n+              this.desperatePrayerUsages\n+                .map((dp, index) => (\n+                  <tr key={index}>\n+                    <th scope=\"row\">{ index + 1 }</th>\n+                    <td>{ formatPercentage(dp.DamageTaken / dp.MaxHPWhenUsed) } %</td>\n+                    <td>{ formatPercentage(dp.HPWhenUsed / dp.MaxHPWhenUsed) } %</td>\n+                  </tr>\n+                ))\n+            }\n+          </tbody>\n+        </table>\n+      </ExpandableStatisticBox>\n+    );\n+  }\n+\n+  suggestions(when) {\n+    when(this.deathsWithDPReady).isGreaterThan(0)\n+      .addSuggestion((suggest, actual, recommended) => {\n+        return suggest(<span>You died with <SpellLink id={SPELLS.DESPERATE_PRAYER.id} /> on cooldown.</span>)","path":"src/Parser/Priest/Shared/Modules/Features/DesperatePrayer.js","position":null,"original_position":97,"commit_id":"816a04506e95a04718e8b76ce804e6495ba3ac36","original_commit_id":"891d8381c75711e0ac2f8204fe14bd9fabc80a80","user":{"login":"MartijnHols","id":4565223,"avatar_url":"https://avatars1.githubusercontent.com/u/4565223?v=4","gravatar_id":"","url":"https://api.github.com/users/MartijnHols","html_url":"https://github.com/MartijnHols","followers_url":"https://api.github.com/users/MartijnHols/followers","following_url":"https://api.github.com/users/MartijnHols/following{/other_user}","gists_url":"https://api.github.com/users/MartijnHols/gists{/gist_id}","starred_url":"https://api.github.com/users/MartijnHols/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartijnHols/subscriptions","organizations_url":"https://api.github.com/users/MartijnHols/orgs","repos_url":"https://api.github.com/users/MartijnHols/repos","events_url":"https://api.github.com/users/MartijnHols/events{/privacy}","received_events_url":"https://api.github.com/users/MartijnHols/received_events","type":"User","site_admin":false},"body":"DeathTracker could reveal this information, it doesn't have to be plain text.","created_at":"2018-05-19T20:12:39Z","updated_at":"2018-05-19T20:12:39Z","html_url":"https://github.com/WoWAnalyzer/WoWAnalyzer/pull/1707#discussion_r189443765","pull_request_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/1707","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/comments/189443765"},"html":{"href":"https://github.com/WoWAnalyzer/WoWAnalyzer/pull/1707#discussion_r189443765"},"pull_request":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/1707"}},"in_reply_to_id":188702618},"pull_request":{"url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/1707","id":188440482,"html_url":"https://github.com/WoWAnalyzer/WoWAnalyzer/pull/1707","diff_url":"https://github.com/WoWAnalyzer/WoWAnalyzer/pull/1707.diff","patch_url":"https://github.com/WoWAnalyzer/WoWAnalyzer/pull/1707.patch","issue_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/issues/1707","number":1707,"state":"open","locked":false,"title":"[Discipline Priest] Desperate Prayer","user":{"login":"karlpralow","id":8739940,"avatar_url":"https://avatars0.githubusercontent.com/u/8739940?v=4","gravatar_id":"","url":"https://api.github.com/users/karlpralow","html_url":"https://github.com/karlpralow","followers_url":"https://api.github.com/users/karlpralow/followers","following_url":"https://api.github.com/users/karlpralow/following{/other_user}","gists_url":"https://api.github.com/users/karlpralow/gists{/gist_id}","starred_url":"https://api.github.com/users/karlpralow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlpralow/subscriptions","organizations_url":"https://api.github.com/users/karlpralow/orgs","repos_url":"https://api.github.com/users/karlpralow/repos","events_url":"https://api.github.com/users/karlpralow/events{/privacy}","received_events_url":"https://api.github.com/users/karlpralow/received_events","type":"User","site_admin":false},"body":"![image](https://user-images.githubusercontent.com/8739940/40120776-0d7e5278-58ee-11e8-951c-b9293397e4d9.png)\r\n","created_at":"2018-05-16T13:52:26Z","updated_at":"2018-05-19T20:12:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6986a959ea900e7869e885e33bb4008c1921bb42","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/1707/commits","review_comments_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/1707/comments","review_comment_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/issues/1707/comments","statuses_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/statuses/816a04506e95a04718e8b76ce804e6495ba3ac36","head":{"label":"karlpralow:DesperatePrayer","ref":"DesperatePrayer","sha":"816a04506e95a04718e8b76ce804e6495ba3ac36","user":{"login":"karlpralow","id":8739940,"avatar_url":"https://avatars0.githubusercontent.com/u/8739940?v=4","gravatar_id":"","url":"https://api.github.com/users/karlpralow","html_url":"https://github.com/karlpralow","followers_url":"https://api.github.com/users/karlpralow/followers","following_url":"https://api.github.com/users/karlpralow/following{/other_user}","gists_url":"https://api.github.com/users/karlpralow/gists{/gist_id}","starred_url":"https://api.github.com/users/karlpralow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlpralow/subscriptions","organizations_url":"https://api.github.com/users/karlpralow/orgs","repos_url":"https://api.github.com/users/karlpralow/repos","events_url":"https://api.github.com/users/karlpralow/events{/privacy}","received_events_url":"https://api.github.com/users/karlpralow/received_events","type":"User","site_admin":false},"repo":{"id":107145171,"name":"WoWAnalyzer","full_name":"karlpralow/WoWAnalyzer","owner":{"login":"karlpralow","id":8739940,"avatar_url":"https://avatars0.githubusercontent.com/u/8739940?v=4","gravatar_id":"","url":"https://api.github.com/users/karlpralow","html_url":"https://github.com/karlpralow","followers_url":"https://api.github.com/users/karlpralow/followers","following_url":"https://api.github.com/users/karlpralow/following{/other_user}","gists_url":"https://api.github.com/users/karlpralow/gists{/gist_id}","starred_url":"https://api.github.com/users/karlpralow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlpralow/subscriptions","organizations_url":"https://api.github.com/users/karlpralow/orgs","repos_url":"https://api.github.com/users/karlpralow/repos","events_url":"https://api.github.com/users/karlpralow/events{/privacy}","received_events_url":"https://api.github.com/users/karlpralow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/karlpralow/WoWAnalyzer","description":"WoW Analyzer is a comprehensive tool for analyzing your performance based on important metrics for your spec using a Warcraft Logs report. Built by community contributors; PRs welcome!","fork":true,"url":"https://api.github.com/repos/karlpralow/WoWAnalyzer","forks_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/forks","keys_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/teams","hooks_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/hooks","issue_events_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/issues/events{/number}","events_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/events","assignees_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/assignees{/user}","branches_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/branches{/branch}","tags_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/tags","blobs_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/git/refs{/sha}","trees_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/statuses/{sha}","languages_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/languages","stargazers_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/stargazers","contributors_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/contributors","subscribers_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/subscribers","subscription_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/subscription","commits_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/commits{/sha}","git_commits_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/git/commits{/sha}","comments_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/comments{/number}","issue_comment_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/issues/comments{/number}","contents_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/contents/{+path}","compare_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/merges","archive_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/downloads","issues_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/issues{/number}","pulls_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/pulls{/number}","milestones_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/milestones{/number}","notifications_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/labels{/name}","releases_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/releases{/id}","deployments_url":"https://api.github.com/repos/karlpralow/WoWAnalyzer/deployments","created_at":"2017-10-16T15:17:07Z","updated_at":"2018-04-23T15:45:11Z","pushed_at":"2018-05-18T17:45:56Z","git_url":"git://github.com/karlpralow/WoWAnalyzer.git","ssh_url":"git@github.com:karlpralow/WoWAnalyzer.git","clone_url":"https://github.com/karlpralow/WoWAnalyzer.git","svn_url":"https://github.com/karlpralow/WoWAnalyzer","homepage":"http://wowanalyzer.com/","size":253038,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"WoWAnalyzer:bfa","ref":"bfa","sha":"865f13393f466f1d057a12ab35931cf89b44fd87","user":{"login":"WoWAnalyzer","id":32273378,"avatar_url":"https://avatars2.githubusercontent.com/u/32273378?v=4","gravatar_id":"","url":"https://api.github.com/users/WoWAnalyzer","html_url":"https://github.com/WoWAnalyzer","followers_url":"https://api.github.com/users/WoWAnalyzer/followers","following_url":"https://api.github.com/users/WoWAnalyzer/following{/other_user}","gists_url":"https://api.github.com/users/WoWAnalyzer/gists{/gist_id}","starred_url":"https://api.github.com/users/WoWAnalyzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WoWAnalyzer/subscriptions","organizations_url":"https://api.github.com/users/WoWAnalyzer/orgs","repos_url":"https://api.github.com/users/WoWAnalyzer/repos","events_url":"https://api.github.com/users/WoWAnalyzer/events{/privacy}","received_events_url":"https://api.github.com/users/WoWAnalyzer/received_events","type":"Organization","site_admin":false},"repo":{"id":80472692,"name":"WoWAnalyzer","full_name":"WoWAnalyzer/WoWAnalyzer","owner":{"login":"WoWAnalyzer","id":32273378,"avatar_url":"https://avatars2.githubusercontent.com/u/32273378?v=4","gravatar_id":"","url":"https://api.github.com/users/WoWAnalyzer","html_url":"https://github.com/WoWAnalyzer","followers_url":"https://api.github.com/users/WoWAnalyzer/followers","following_url":"https://api.github.com/users/WoWAnalyzer/following{/other_user}","gists_url":"https://api.github.com/users/WoWAnalyzer/gists{/gist_id}","starred_url":"https://api.github.com/users/WoWAnalyzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WoWAnalyzer/subscriptions","organizations_url":"https://api.github.com/users/WoWAnalyzer/orgs","repos_url":"https://api.github.com/users/WoWAnalyzer/repos","events_url":"https://api.github.com/users/WoWAnalyzer/events{/privacy}","received_events_url":"https://api.github.com/users/WoWAnalyzer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WoWAnalyzer/WoWAnalyzer","description":"WoWAnalyzer is a comprehensive tool for analyzing your performance based on important metrics for your spec using a Warcraft Logs report.","fork":false,"url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer","forks_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/forks","keys_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/teams","hooks_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/hooks","issue_events_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/issues/events{/number}","events_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/events","assignees_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/assignees{/user}","branches_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/branches{/branch}","tags_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/tags","blobs_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/git/refs{/sha}","trees_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/statuses/{sha}","languages_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/languages","stargazers_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/stargazers","contributors_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/contributors","subscribers_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/subscribers","subscription_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/subscription","commits_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/commits{/sha}","git_commits_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/git/commits{/sha}","comments_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/comments{/number}","issue_comment_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/issues/comments{/number}","contents_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/contents/{+path}","compare_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/merges","archive_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/downloads","issues_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/issues{/number}","pulls_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls{/number}","milestones_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/milestones{/number}","notifications_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/labels{/name}","releases_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/releases{/id}","deployments_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/deployments","created_at":"2017-01-30T23:02:17Z","updated_at":"2018-05-19T13:02:14Z","pushed_at":"2018-05-19T20:06:12Z","git_url":"git://github.com/WoWAnalyzer/WoWAnalyzer.git","ssh_url":"git@github.com:WoWAnalyzer/WoWAnalyzer.git","clone_url":"https://github.com/WoWAnalyzer/WoWAnalyzer.git","svn_url":"https://github.com/WoWAnalyzer/WoWAnalyzer","homepage":"http://wowanalyzer.com/","size":253094,"stargazers_count":129,"watchers_count":129,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":187,"mirror_url":null,"archived":false,"open_issues_count":139,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":187,"open_issues":139,"watchers":129,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/1707"},"html":{"href":"https://github.com/WoWAnalyzer/WoWAnalyzer/pull/1707"},"issue":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/issues/1707"},"comments":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/issues/1707/comments"},"review_comments":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/1707/comments"},"review_comment":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/1707/commits"},"statuses":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/statuses/816a04506e95a04718e8b76ce804e6495ba3ac36"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"MartijnHols"}}