{"action":"created","comment":{"url":"https://api.github.com/repos/EternalCode/battle_engine/pulls/comments/155340350","pull_request_review_id":81644392,"id":155340350,"diff_hunk":"@@ -0,0 +1,118 @@\n+#include <pokeagb/pokeagb.h>\n+#include \"../battle_data/pkmn_bank.h\"\n+#include \"../battle_data/pkmn_bank_stats.h\"\n+#include \"../battle_data/battle_state.h\"\n+\n+extern void dprintf(const char * str, ...);\n+\n+struct basepower_threshold_table\n+{\n+    u8 value;\n+    u8 numerator;\n+    u8 denominator;\n+};\n+\n+void acrobatics_on_base_power_move(u8 user, u8 src, u16 move, struct anonymous_callback* acb)\n+{\n+    if (user != src) return;\n+    if (B_GET_ITEM(user) == 0)\n+        B_MOVE_POWER(user) *= 2;\n+}\n+\n+void hex_on_base_power_move(u8 user, u8 src, u16 move, struct anonymous_callback* acb)\n+{\n+    if (user != src) return;\n+    u8 defender = TARGET_OF(user);\n+    if (B_STATUS(defender))\n+        B_MOVE_POWER(user) *= 2;\n+}\n+\n+void facade_on_base_power_move(u8 user, u8 src, u16 move, struct anonymous_callback* acb)\n+{\n+    if (user != src) return;\n+    if (B_STATUS(user))\n+        B_MOVE_POWER(user) *= 2;\n+}\n+\n+void brine_on_base_power_move(u8 user, u8 src, u16 move, struct anonymous_callback* acb)\n+{\n+    if (user != src) return;\n+    u8 defender = TARGET_OF(user);\n+    if ((B_CURRENT_HP(defender) * 2) <= TOTAL_HP(defender))\n+        B_MOVE_POWER(user) *= 2;\n+}\n+\n+#define NO_OF_REVERSAL_THRESHOLDS 6\n+struct basepower_threshold_table reversal_slab[NO_OF_REVERSAL_THRESHOLDS] = {\n+                            {20,    66, 96},\n+                            {40,    34, 96},\n+                            {80,    20, 96},\n+                            {100,   10, 96},\n+                            {150,   4,  96},\n+                            {200,   0,  1},\n+                        };\n+\n+void reversal_on_base_power_move(u8 user, u8 src, u16 move, struct anonymous_callback* acb)\n+{\n+    if (user != src) return;\n+    u16 current_hp = B_CURRENT_HP(user);\n+    u16 total_hp = TOTAL_HP(user);\n+    for (u8 i=0; i<NO_OF_REVERSAL_THRESHOLDS-1; i++)\n+    {\n+        if(current_hp >= ((total_hp * reversal_slab[i].numerator)/ reversal_slab[i].denominator))\n+        {\n+             B_MOVE_POWER(user) = reversal_slab[i].value;\n+             break;\n+        }\n+    }\n+}\n+\n+#define NO_OF_HEAVY_SLAM_THRESHOLDS 5\n+struct basepower_threshold_table heavy_slam_slab[NO_OF_HEAVY_SLAM_THRESHOLDS] = {","path":"src/moves/variable_BP_moves_without_additional_effect.c","position":71,"original_position":71,"commit_id":"b0d5536fa48decb872a8ac5338e3433ba0337e58","original_commit_id":"b0d5536fa48decb872a8ac5338e3433ba0337e58","user":{"login":"KDSKardabox","id":18703318,"avatar_url":"https://avatars1.githubusercontent.com/u/18703318?v=4","gravatar_id":"","url":"https://api.github.com/users/KDSKardabox","html_url":"https://github.com/KDSKardabox","followers_url":"https://api.github.com/users/KDSKardabox/followers","following_url":"https://api.github.com/users/KDSKardabox/following{/other_user}","gists_url":"https://api.github.com/users/KDSKardabox/gists{/gist_id}","starred_url":"https://api.github.com/users/KDSKardabox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KDSKardabox/subscriptions","organizations_url":"https://api.github.com/users/KDSKardabox/orgs","repos_url":"https://api.github.com/users/KDSKardabox/repos","events_url":"https://api.github.com/users/KDSKardabox/events{/privacy}","received_events_url":"https://api.github.com/users/KDSKardabox/received_events","type":"User","site_admin":false},"body":"Same as above","created_at":"2017-12-06T19:42:57Z","updated_at":"2017-12-06T19:42:57Z","html_url":"https://github.com/EternalCode/battle_engine/pull/40#discussion_r155340350","pull_request_url":"https://api.github.com/repos/EternalCode/battle_engine/pulls/40","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/EternalCode/battle_engine/pulls/comments/155340350"},"html":{"href":"https://github.com/EternalCode/battle_engine/pull/40#discussion_r155340350"},"pull_request":{"href":"https://api.github.com/repos/EternalCode/battle_engine/pulls/40"}},"in_reply_to_id":155241317},"pull_request":{"url":"https://api.github.com/repos/EternalCode/battle_engine/pulls/40","id":156707387,"html_url":"https://github.com/EternalCode/battle_engine/pull/40","diff_url":"https://github.com/EternalCode/battle_engine/pull/40.diff","patch_url":"https://github.com/EternalCode/battle_engine/pull/40.patch","issue_url":"https://api.github.com/repos/EternalCode/battle_engine/issues/40","number":40,"state":"open","locked":false,"title":"Some Variable Base Power Moves","user":{"login":"KDSKardabox","id":18703318,"avatar_url":"https://avatars1.githubusercontent.com/u/18703318?v=4","gravatar_id":"","url":"https://api.github.com/users/KDSKardabox","html_url":"https://github.com/KDSKardabox","followers_url":"https://api.github.com/users/KDSKardabox/followers","following_url":"https://api.github.com/users/KDSKardabox/following{/other_user}","gists_url":"https://api.github.com/users/KDSKardabox/gists{/gist_id}","starred_url":"https://api.github.com/users/KDSKardabox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KDSKardabox/subscriptions","organizations_url":"https://api.github.com/users/KDSKardabox/orgs","repos_url":"https://api.github.com/users/KDSKardabox/repos","events_url":"https://api.github.com/users/KDSKardabox/events{/privacy}","received_events_url":"https://api.github.com/users/KDSKardabox/received_events","type":"User","site_admin":false},"body":"Heavy Slam & Low Kick isn't fully complete because the weight fetching logic into the battle structure is yet to be implemented.","created_at":"2017-12-06T11:39:50Z","updated_at":"2017-12-06T19:42:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cac391618c4d60ff382ad13725581eb95221b5ac","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/EternalCode/battle_engine/pulls/40/commits","review_comments_url":"https://api.github.com/repos/EternalCode/battle_engine/pulls/40/comments","review_comment_url":"https://api.github.com/repos/EternalCode/battle_engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EternalCode/battle_engine/issues/40/comments","statuses_url":"https://api.github.com/repos/EternalCode/battle_engine/statuses/b0d5536fa48decb872a8ac5338e3433ba0337e58","head":{"label":"KDSKardabox:master","ref":"master","sha":"b0d5536fa48decb872a8ac5338e3433ba0337e58","user":{"login":"KDSKardabox","id":18703318,"avatar_url":"https://avatars1.githubusercontent.com/u/18703318?v=4","gravatar_id":"","url":"https://api.github.com/users/KDSKardabox","html_url":"https://github.com/KDSKardabox","followers_url":"https://api.github.com/users/KDSKardabox/followers","following_url":"https://api.github.com/users/KDSKardabox/following{/other_user}","gists_url":"https://api.github.com/users/KDSKardabox/gists{/gist_id}","starred_url":"https://api.github.com/users/KDSKardabox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KDSKardabox/subscriptions","organizations_url":"https://api.github.com/users/KDSKardabox/orgs","repos_url":"https://api.github.com/users/KDSKardabox/repos","events_url":"https://api.github.com/users/KDSKardabox/events{/privacy}","received_events_url":"https://api.github.com/users/KDSKardabox/received_events","type":"User","site_admin":false},"repo":{"id":113022723,"name":"battle_engine","full_name":"KDSKardabox/battle_engine","owner":{"login":"KDSKardabox","id":18703318,"avatar_url":"https://avatars1.githubusercontent.com/u/18703318?v=4","gravatar_id":"","url":"https://api.github.com/users/KDSKardabox","html_url":"https://github.com/KDSKardabox","followers_url":"https://api.github.com/users/KDSKardabox/followers","following_url":"https://api.github.com/users/KDSKardabox/following{/other_user}","gists_url":"https://api.github.com/users/KDSKardabox/gists{/gist_id}","starred_url":"https://api.github.com/users/KDSKardabox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KDSKardabox/subscriptions","organizations_url":"https://api.github.com/users/KDSKardabox/orgs","repos_url":"https://api.github.com/users/KDSKardabox/repos","events_url":"https://api.github.com/users/KDSKardabox/events{/privacy}","received_events_url":"https://api.github.com/users/KDSKardabox/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KDSKardabox/battle_engine","description":"A project for Cataclysm, but is now being developed for public use","fork":true,"url":"https://api.github.com/repos/KDSKardabox/battle_engine","forks_url":"https://api.github.com/repos/KDSKardabox/battle_engine/forks","keys_url":"https://api.github.com/repos/KDSKardabox/battle_engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KDSKardabox/battle_engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KDSKardabox/battle_engine/teams","hooks_url":"https://api.github.com/repos/KDSKardabox/battle_engine/hooks","issue_events_url":"https://api.github.com/repos/KDSKardabox/battle_engine/issues/events{/number}","events_url":"https://api.github.com/repos/KDSKardabox/battle_engine/events","assignees_url":"https://api.github.com/repos/KDSKardabox/battle_engine/assignees{/user}","branches_url":"https://api.github.com/repos/KDSKardabox/battle_engine/branches{/branch}","tags_url":"https://api.github.com/repos/KDSKardabox/battle_engine/tags","blobs_url":"https://api.github.com/repos/KDSKardabox/battle_engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KDSKardabox/battle_engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KDSKardabox/battle_engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/KDSKardabox/battle_engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KDSKardabox/battle_engine/statuses/{sha}","languages_url":"https://api.github.com/repos/KDSKardabox/battle_engine/languages","stargazers_url":"https://api.github.com/repos/KDSKardabox/battle_engine/stargazers","contributors_url":"https://api.github.com/repos/KDSKardabox/battle_engine/contributors","subscribers_url":"https://api.github.com/repos/KDSKardabox/battle_engine/subscribers","subscription_url":"https://api.github.com/repos/KDSKardabox/battle_engine/subscription","commits_url":"https://api.github.com/repos/KDSKardabox/battle_engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/KDSKardabox/battle_engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/KDSKardabox/battle_engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/KDSKardabox/battle_engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/KDSKardabox/battle_engine/contents/{+path}","compare_url":"https://api.github.com/repos/KDSKardabox/battle_engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KDSKardabox/battle_engine/merges","archive_url":"https://api.github.com/repos/KDSKardabox/battle_engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KDSKardabox/battle_engine/downloads","issues_url":"https://api.github.com/repos/KDSKardabox/battle_engine/issues{/number}","pulls_url":"https://api.github.com/repos/KDSKardabox/battle_engine/pulls{/number}","milestones_url":"https://api.github.com/repos/KDSKardabox/battle_engine/milestones{/number}","notifications_url":"https://api.github.com/repos/KDSKardabox/battle_engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KDSKardabox/battle_engine/labels{/name}","releases_url":"https://api.github.com/repos/KDSKardabox/battle_engine/releases{/id}","deployments_url":"https://api.github.com/repos/KDSKardabox/battle_engine/deployments","created_at":"2017-12-04T09:30:39Z","updated_at":"2017-12-04T09:30:44Z","pushed_at":"2017-12-06T11:37:24Z","git_url":"git://github.com/KDSKardabox/battle_engine.git","ssh_url":"git@github.com:KDSKardabox/battle_engine.git","clone_url":"https://github.com/KDSKardabox/battle_engine.git","svn_url":"https://github.com/KDSKardabox/battle_engine","homepage":null,"size":28974,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"EternalCode:master","ref":"master","sha":"58a4a5477c74b7d496917a5b5c2a31df62865ca7","user":{"login":"EternalCode","id":6186099,"avatar_url":"https://avatars0.githubusercontent.com/u/6186099?v=4","gravatar_id":"","url":"https://api.github.com/users/EternalCode","html_url":"https://github.com/EternalCode","followers_url":"https://api.github.com/users/EternalCode/followers","following_url":"https://api.github.com/users/EternalCode/following{/other_user}","gists_url":"https://api.github.com/users/EternalCode/gists{/gist_id}","starred_url":"https://api.github.com/users/EternalCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EternalCode/subscriptions","organizations_url":"https://api.github.com/users/EternalCode/orgs","repos_url":"https://api.github.com/users/EternalCode/repos","events_url":"https://api.github.com/users/EternalCode/events{/privacy}","received_events_url":"https://api.github.com/users/EternalCode/received_events","type":"User","site_admin":false},"repo":{"id":92866373,"name":"battle_engine","full_name":"EternalCode/battle_engine","owner":{"login":"EternalCode","id":6186099,"avatar_url":"https://avatars0.githubusercontent.com/u/6186099?v=4","gravatar_id":"","url":"https://api.github.com/users/EternalCode","html_url":"https://github.com/EternalCode","followers_url":"https://api.github.com/users/EternalCode/followers","following_url":"https://api.github.com/users/EternalCode/following{/other_user}","gists_url":"https://api.github.com/users/EternalCode/gists{/gist_id}","starred_url":"https://api.github.com/users/EternalCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EternalCode/subscriptions","organizations_url":"https://api.github.com/users/EternalCode/orgs","repos_url":"https://api.github.com/users/EternalCode/repos","events_url":"https://api.github.com/users/EternalCode/events{/privacy}","received_events_url":"https://api.github.com/users/EternalCode/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EternalCode/battle_engine","description":"A project for Cataclysm, but is now being developed for public use","fork":false,"url":"https://api.github.com/repos/EternalCode/battle_engine","forks_url":"https://api.github.com/repos/EternalCode/battle_engine/forks","keys_url":"https://api.github.com/repos/EternalCode/battle_engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EternalCode/battle_engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EternalCode/battle_engine/teams","hooks_url":"https://api.github.com/repos/EternalCode/battle_engine/hooks","issue_events_url":"https://api.github.com/repos/EternalCode/battle_engine/issues/events{/number}","events_url":"https://api.github.com/repos/EternalCode/battle_engine/events","assignees_url":"https://api.github.com/repos/EternalCode/battle_engine/assignees{/user}","branches_url":"https://api.github.com/repos/EternalCode/battle_engine/branches{/branch}","tags_url":"https://api.github.com/repos/EternalCode/battle_engine/tags","blobs_url":"https://api.github.com/repos/EternalCode/battle_engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EternalCode/battle_engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EternalCode/battle_engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/EternalCode/battle_engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EternalCode/battle_engine/statuses/{sha}","languages_url":"https://api.github.com/repos/EternalCode/battle_engine/languages","stargazers_url":"https://api.github.com/repos/EternalCode/battle_engine/stargazers","contributors_url":"https://api.github.com/repos/EternalCode/battle_engine/contributors","subscribers_url":"https://api.github.com/repos/EternalCode/battle_engine/subscribers","subscription_url":"https://api.github.com/repos/EternalCode/battle_engine/subscription","commits_url":"https://api.github.com/repos/EternalCode/battle_engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/EternalCode/battle_engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/EternalCode/battle_engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/EternalCode/battle_engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/EternalCode/battle_engine/contents/{+path}","compare_url":"https://api.github.com/repos/EternalCode/battle_engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EternalCode/battle_engine/merges","archive_url":"https://api.github.com/repos/EternalCode/battle_engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EternalCode/battle_engine/downloads","issues_url":"https://api.github.com/repos/EternalCode/battle_engine/issues{/number}","pulls_url":"https://api.github.com/repos/EternalCode/battle_engine/pulls{/number}","milestones_url":"https://api.github.com/repos/EternalCode/battle_engine/milestones{/number}","notifications_url":"https://api.github.com/repos/EternalCode/battle_engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EternalCode/battle_engine/labels{/name}","releases_url":"https://api.github.com/repos/EternalCode/battle_engine/releases{/id}","deployments_url":"https://api.github.com/repos/EternalCode/battle_engine/deployments","created_at":"2017-05-30T19:00:03Z","updated_at":"2017-11-26T22:00:56Z","pushed_at":"2017-12-06T17:37:45Z","git_url":"git://github.com/EternalCode/battle_engine.git","ssh_url":"git@github.com:EternalCode/battle_engine.git","clone_url":"https://github.com/EternalCode/battle_engine.git","svn_url":"https://github.com/EternalCode/battle_engine","homepage":null,"size":28997,"stargazers_count":11,"watchers_count":11,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":15,"open_issues":4,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/EternalCode/battle_engine/pulls/40"},"html":{"href":"https://github.com/EternalCode/battle_engine/pull/40"},"issue":{"href":"https://api.github.com/repos/EternalCode/battle_engine/issues/40"},"comments":{"href":"https://api.github.com/repos/EternalCode/battle_engine/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/EternalCode/battle_engine/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/EternalCode/battle_engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EternalCode/battle_engine/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/EternalCode/battle_engine/statuses/b0d5536fa48decb872a8ac5338e3433ba0337e58"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"KDSKardabox"}}