{"action":"created","comment":{"url":"https://api.github.com/repos/tgstation/-tg-station/pulls/comments/27106319","id":27106319,"diff_hunk":"@@ -0,0 +1,89 @@\n+/obj/effect/proc_holder/spell/targeted/lightning\n+\tname = \"Lightning Bolt\"\n+\tdesc = \"Throws a lightning bolt at the nearby enemy. Classic.\"\n+\tcharge_type = \"recharge\"\n+\tcharge_max\t= 300\n+\tclothes_req = 1\n+\tinvocation = \"UN'LTD P'WAH!\"\n+\tinvocation_type = \"shout\"\n+\trange = 7\n+\tcooldown_min = 30\n+\tselection_type = \"view\"\n+\trandom_target = 1\n+\tvar/energy = 0\n+\tvar/ready = 0\n+\n+/obj/effect/bolt\n+\tname = \"Lightning bolt\"\n+\ticon = 'icons/effects/effects.dmi'\n+\ticon_state = \"lightning\"\n+\tluminosity = 3\n+\n+/obj/effect/proc_holder/spell/targeted/lightning/Click()\n+\tif(!ready)\n+\t\tif(cast_check())\n+\t\t\tStartChargeup()\n+\telse\n+\t\tif(cast_check(skipcharge=1))\n+\t\t\tchoose_targets()\n+\treturn 1\n+\n+/obj/effect/proc_holder/spell/targeted/lightning/proc/StartChargeup(mob/user = usr)\n+\tready = 1\n+\tuser << \"<span class='notice'>You start gathering the power.</span>\"\n+\t//TODO: Add visual indictaor of charging\n+\tspawn(0)\n+\t\twhile(ready)\n+\t\t\tsleep(1)\n+\t\t\tenergy++\n+\t\t\tif(energy >= 100 && ready)\n+\t\t\t\tDischarge()\n+\n+/obj/effect/proc_holder/spell/targeted/lightning/proc/Discharge(mob/user = usr)\n+\tvar/mob/living/M = user\n+\tM.electrocute_act(25,\"Lightning Bolt\")\n+\tM << \"<span class='danger'>You lose control over the spell.</span>\"\n+\tenergy = 0\n+\tready = 0\n+\tstart_recharge()\n+\n+\n+/obj/effect/proc_holder/spell/targeted/lightning/cast(list/targets, mob/user = usr)\n+\tif(!targets.len)\n+\t\tuser << \"<span class='notice'>No target found in range.</span>\"\n+\t\treturn\n+\n+\tvar/mob/living/carbon/target = targets[1]","path":"code/datums/spells/lightning.dm","position":56,"original_position":56,"commit_id":"c7a93d2e6eba8f8d886bb1b8c9d5e70d45570525","original_commit_id":"c7a93d2e6eba8f8d886bb1b8c9d5e70d45570525","user":{"login":"RemieRichards","id":4043781,"avatar_url":"https://avatars.githubusercontent.com/u/4043781?v=3","gravatar_id":"","url":"https://api.github.com/users/RemieRichards","html_url":"https://github.com/RemieRichards","followers_url":"https://api.github.com/users/RemieRichards/followers","following_url":"https://api.github.com/users/RemieRichards/following{/other_user}","gists_url":"https://api.github.com/users/RemieRichards/gists{/gist_id}","starred_url":"https://api.github.com/users/RemieRichards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RemieRichards/subscriptions","organizations_url":"https://api.github.com/users/RemieRichards/orgs","repos_url":"https://api.github.com/users/RemieRichards/repos","events_url":"https://api.github.com/users/RemieRichards/events{/privacy}","received_events_url":"https://api.github.com/users/RemieRichards/received_events","type":"User","site_admin":false},"body":"It's random, since ```random_target``` was also added (and set on this spell) in this PR.\r\n\r\nAlso yeah closest target should work.\r\n```\r\nvar/mob/living/carbon/target\r\nfor(var/mob/living/L in targets)\r\n    if(target && (get_dist(user,L) < get_dist(user,target)))\r\n        target = L\r\n    else\r\n        target = L\r\n```\r\n\r\n","created_at":"2015-03-25T09:52:30Z","updated_at":"2015-03-25T09:52:30Z","html_url":"https://github.com/tgstation/-tg-station/pull/8524#discussion_r27106319","pull_request_url":"https://api.github.com/repos/tgstation/-tg-station/pulls/8524","_links":{"self":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/comments/27106319"},"html":{"href":"https://github.com/tgstation/-tg-station/pull/8524#discussion_r27106319"},"pull_request":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/8524"}}},"pull_request":{"url":"https://api.github.com/repos/tgstation/-tg-station/pulls/8524","id":31871012,"html_url":"https://github.com/tgstation/-tg-station/pull/8524","diff_url":"https://github.com/tgstation/-tg-station/pull/8524.diff","patch_url":"https://github.com/tgstation/-tg-station/pull/8524.patch","issue_url":"https://api.github.com/repos/tgstation/-tg-station/issues/8524","number":8524,"state":"open","locked":false,"title":"Adds Lightning Bolt spell","user":{"login":"AnturK","id":4047233,"avatar_url":"https://avatars.githubusercontent.com/u/4047233?v=3","gravatar_id":"","url":"https://api.github.com/users/AnturK","html_url":"https://github.com/AnturK","followers_url":"https://api.github.com/users/AnturK/followers","following_url":"https://api.github.com/users/AnturK/following{/other_user}","gists_url":"https://api.github.com/users/AnturK/gists{/gist_id}","starred_url":"https://api.github.com/users/AnturK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnturK/subscriptions","organizations_url":"https://api.github.com/users/AnturK/orgs","repos_url":"https://api.github.com/users/AnturK/repos","events_url":"https://api.github.com/users/AnturK/events{/privacy}","received_events_url":"https://api.github.com/users/AnturK/received_events","type":"User","site_admin":false},"body":"### Lightning Bolt\r\nDefault Cooldown : 30s\r\nTap once to start charging\r\nTap second time to release lightning\r\nDepending on how long you charged different results :\r\n\r\nCharge Time | Effect\r\n------------ | -------------\r\n0-2.5s | Minor shock 10 burn + usual electrocution stun\r\n2.5-7.5s | Major shock 25 burn + usual electrocution stun\r\n7.5-10s | Chain lightning bouncing up to 6 times dealing the 25 burn and stun\r\n10s+ | Electrocutes caster for 25 burn damage and the stun\r\n \r\n![bolt](https://cloud.githubusercontent.com/assets/4047233/6813039/c977679a-d272-11e4-919a-944591dc2ee1.png)\r\n\r\nBecause i enjoy murder wizards. Tried to make the beam code use transform and animate but either there's some unstated restrictions on them i'm not aware of or they are bugged.\r\n","created_at":"2015-03-24T21:18:44Z","updated_at":"2015-03-25T09:52:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c9efe8aa6cc04af9a5b07dcceead2baa1f38a567","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tgstation/-tg-station/pulls/8524/commits","review_comments_url":"https://api.github.com/repos/tgstation/-tg-station/pulls/8524/comments","review_comment_url":"https://api.github.com/repos/tgstation/-tg-station/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tgstation/-tg-station/issues/8524/comments","statuses_url":"https://api.github.com/repos/tgstation/-tg-station/statuses/c7a93d2e6eba8f8d886bb1b8c9d5e70d45570525","head":{"label":"AnturK:bzzt","ref":"bzzt","sha":"c7a93d2e6eba8f8d886bb1b8c9d5e70d45570525","user":{"login":"AnturK","id":4047233,"avatar_url":"https://avatars.githubusercontent.com/u/4047233?v=3","gravatar_id":"","url":"https://api.github.com/users/AnturK","html_url":"https://github.com/AnturK","followers_url":"https://api.github.com/users/AnturK/followers","following_url":"https://api.github.com/users/AnturK/following{/other_user}","gists_url":"https://api.github.com/users/AnturK/gists{/gist_id}","starred_url":"https://api.github.com/users/AnturK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnturK/subscriptions","organizations_url":"https://api.github.com/users/AnturK/orgs","repos_url":"https://api.github.com/users/AnturK/repos","events_url":"https://api.github.com/users/AnturK/events{/privacy}","received_events_url":"https://api.github.com/users/AnturK/received_events","type":"User","site_admin":false},"repo":{"id":10646667,"name":"-tg-station","full_name":"AnturK/-tg-station","owner":{"login":"AnturK","id":4047233,"avatar_url":"https://avatars.githubusercontent.com/u/4047233?v=3","gravatar_id":"","url":"https://api.github.com/users/AnturK","html_url":"https://github.com/AnturK","followers_url":"https://api.github.com/users/AnturK/followers","following_url":"https://api.github.com/users/AnturK/following{/other_user}","gists_url":"https://api.github.com/users/AnturK/gists{/gist_id}","starred_url":"https://api.github.com/users/AnturK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnturK/subscriptions","organizations_url":"https://api.github.com/users/AnturK/orgs","repos_url":"https://api.github.com/users/AnturK/repos","events_url":"https://api.github.com/users/AnturK/events{/privacy}","received_events_url":"https://api.github.com/users/AnturK/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AnturK/-tg-station","description":"/tg/'s SS13 branch","fork":true,"url":"https://api.github.com/repos/AnturK/-tg-station","forks_url":"https://api.github.com/repos/AnturK/-tg-station/forks","keys_url":"https://api.github.com/repos/AnturK/-tg-station/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnturK/-tg-station/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnturK/-tg-station/teams","hooks_url":"https://api.github.com/repos/AnturK/-tg-station/hooks","issue_events_url":"https://api.github.com/repos/AnturK/-tg-station/issues/events{/number}","events_url":"https://api.github.com/repos/AnturK/-tg-station/events","assignees_url":"https://api.github.com/repos/AnturK/-tg-station/assignees{/user}","branches_url":"https://api.github.com/repos/AnturK/-tg-station/branches{/branch}","tags_url":"https://api.github.com/repos/AnturK/-tg-station/tags","blobs_url":"https://api.github.com/repos/AnturK/-tg-station/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnturK/-tg-station/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnturK/-tg-station/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnturK/-tg-station/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnturK/-tg-station/statuses/{sha}","languages_url":"https://api.github.com/repos/AnturK/-tg-station/languages","stargazers_url":"https://api.github.com/repos/AnturK/-tg-station/stargazers","contributors_url":"https://api.github.com/repos/AnturK/-tg-station/contributors","subscribers_url":"https://api.github.com/repos/AnturK/-tg-station/subscribers","subscription_url":"https://api.github.com/repos/AnturK/-tg-station/subscription","commits_url":"https://api.github.com/repos/AnturK/-tg-station/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnturK/-tg-station/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnturK/-tg-station/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnturK/-tg-station/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnturK/-tg-station/contents/{+path}","compare_url":"https://api.github.com/repos/AnturK/-tg-station/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnturK/-tg-station/merges","archive_url":"https://api.github.com/repos/AnturK/-tg-station/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnturK/-tg-station/downloads","issues_url":"https://api.github.com/repos/AnturK/-tg-station/issues{/number}","pulls_url":"https://api.github.com/repos/AnturK/-tg-station/pulls{/number}","milestones_url":"https://api.github.com/repos/AnturK/-tg-station/milestones{/number}","notifications_url":"https://api.github.com/repos/AnturK/-tg-station/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnturK/-tg-station/labels{/name}","releases_url":"https://api.github.com/repos/AnturK/-tg-station/releases{/id}","created_at":"2013-06-12T16:12:51Z","updated_at":"2015-03-14T21:42:56Z","pushed_at":"2015-03-24T21:15:49Z","git_url":"git://github.com/AnturK/-tg-station.git","ssh_url":"git@github.com:AnturK/-tg-station.git","clone_url":"https://github.com/AnturK/-tg-station.git","svn_url":"https://github.com/AnturK/-tg-station","homepage":"","size":455328,"stargazers_count":0,"watchers_count":0,"language":"DM","has_issues":true,"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":"tgstation:master","ref":"master","sha":"6f85623174a3b4f46ac9d0529a59237c4c406958","user":{"login":"tgstation","id":1363778,"avatar_url":"https://avatars.githubusercontent.com/u/1363778?v=3","gravatar_id":"","url":"https://api.github.com/users/tgstation","html_url":"https://github.com/tgstation","followers_url":"https://api.github.com/users/tgstation/followers","following_url":"https://api.github.com/users/tgstation/following{/other_user}","gists_url":"https://api.github.com/users/tgstation/gists{/gist_id}","starred_url":"https://api.github.com/users/tgstation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgstation/subscriptions","organizations_url":"https://api.github.com/users/tgstation/orgs","repos_url":"https://api.github.com/users/tgstation/repos","events_url":"https://api.github.com/users/tgstation/events{/privacy}","received_events_url":"https://api.github.com/users/tgstation/received_events","type":"Organization","site_admin":false},"repo":{"id":3234987,"name":"-tg-station","full_name":"tgstation/-tg-station","owner":{"login":"tgstation","id":1363778,"avatar_url":"https://avatars.githubusercontent.com/u/1363778?v=3","gravatar_id":"","url":"https://api.github.com/users/tgstation","html_url":"https://github.com/tgstation","followers_url":"https://api.github.com/users/tgstation/followers","following_url":"https://api.github.com/users/tgstation/following{/other_user}","gists_url":"https://api.github.com/users/tgstation/gists{/gist_id}","starred_url":"https://api.github.com/users/tgstation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgstation/subscriptions","organizations_url":"https://api.github.com/users/tgstation/orgs","repos_url":"https://api.github.com/users/tgstation/repos","events_url":"https://api.github.com/users/tgstation/events{/privacy}","received_events_url":"https://api.github.com/users/tgstation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tgstation/-tg-station","description":"/tg/'s SS13 branch","fork":false,"url":"https://api.github.com/repos/tgstation/-tg-station","forks_url":"https://api.github.com/repos/tgstation/-tg-station/forks","keys_url":"https://api.github.com/repos/tgstation/-tg-station/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tgstation/-tg-station/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tgstation/-tg-station/teams","hooks_url":"https://api.github.com/repos/tgstation/-tg-station/hooks","issue_events_url":"https://api.github.com/repos/tgstation/-tg-station/issues/events{/number}","events_url":"https://api.github.com/repos/tgstation/-tg-station/events","assignees_url":"https://api.github.com/repos/tgstation/-tg-station/assignees{/user}","branches_url":"https://api.github.com/repos/tgstation/-tg-station/branches{/branch}","tags_url":"https://api.github.com/repos/tgstation/-tg-station/tags","blobs_url":"https://api.github.com/repos/tgstation/-tg-station/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tgstation/-tg-station/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tgstation/-tg-station/git/refs{/sha}","trees_url":"https://api.github.com/repos/tgstation/-tg-station/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tgstation/-tg-station/statuses/{sha}","languages_url":"https://api.github.com/repos/tgstation/-tg-station/languages","stargazers_url":"https://api.github.com/repos/tgstation/-tg-station/stargazers","contributors_url":"https://api.github.com/repos/tgstation/-tg-station/contributors","subscribers_url":"https://api.github.com/repos/tgstation/-tg-station/subscribers","subscription_url":"https://api.github.com/repos/tgstation/-tg-station/subscription","commits_url":"https://api.github.com/repos/tgstation/-tg-station/commits{/sha}","git_commits_url":"https://api.github.com/repos/tgstation/-tg-station/git/commits{/sha}","comments_url":"https://api.github.com/repos/tgstation/-tg-station/comments{/number}","issue_comment_url":"https://api.github.com/repos/tgstation/-tg-station/issues/comments{/number}","contents_url":"https://api.github.com/repos/tgstation/-tg-station/contents/{+path}","compare_url":"https://api.github.com/repos/tgstation/-tg-station/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tgstation/-tg-station/merges","archive_url":"https://api.github.com/repos/tgstation/-tg-station/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tgstation/-tg-station/downloads","issues_url":"https://api.github.com/repos/tgstation/-tg-station/issues{/number}","pulls_url":"https://api.github.com/repos/tgstation/-tg-station/pulls{/number}","milestones_url":"https://api.github.com/repos/tgstation/-tg-station/milestones{/number}","notifications_url":"https://api.github.com/repos/tgstation/-tg-station/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tgstation/-tg-station/labels{/name}","releases_url":"https://api.github.com/repos/tgstation/-tg-station/releases{/id}","created_at":"2012-01-21T17:32:47Z","updated_at":"2015-03-25T05:40:15Z","pushed_at":"2015-03-25T08:50:21Z","git_url":"git://github.com/tgstation/-tg-station.git","ssh_url":"git@github.com:tgstation/-tg-station.git","clone_url":"https://github.com/tgstation/-tg-station.git","svn_url":"https://github.com/tgstation/-tg-station","homepage":"http://www.tgstation13.org/","size":629422,"stargazers_count":193,"watchers_count":193,"language":"DM","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":697,"mirror_url":null,"open_issues_count":798,"forks":697,"open_issues":798,"watchers":193,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/8524"},"html":{"href":"https://github.com/tgstation/-tg-station/pull/8524"},"issue":{"href":"https://api.github.com/repos/tgstation/-tg-station/issues/8524"},"comments":{"href":"https://api.github.com/repos/tgstation/-tg-station/issues/8524/comments"},"review_comments":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/8524/comments"},"review_comment":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/8524/commits"},"statuses":{"href":"https://api.github.com/repos/tgstation/-tg-station/statuses/c7a93d2e6eba8f8d886bb1b8c9d5e70d45570525"}}}}