{"action":"created","comment":{"url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/pulls/comments/62425082","id":62425082,"diff_hunk":"@@ -143,6 +143,66 @@ module FullScreenPokemon {\n                         this.ObjectMaker.getFunction(\"SightDetector\").prototype.nocollide = false;\n                     }\n                 }\n+            },\n+            {\n+                name: \"Nuzlocke Challenge\",\n+                enabled: false,\n+                events: {\n+                    \"onModEnable\": function (mod: ModAttachr.IModAttachrMod): void {\n+                        return;\n+                    },\n+                    \"onModDisable\": function (mod: ModAttachr.IModAttachrMod): void {\n+                        return;\n+                    },\n+                    \"onBattleComplete\": function (mod: ModAttachr.IModAttachrMod, eventName: string, settings: IBattleInfo): void {\n+                        let grass: IGrass = this.player.grass,\n+                            grassMap: IMap = grass ? <IMap>this.AreaSpawner.getMap(grass.mapName) : undefined,\n+                            grassArea: IArea = grassMap ? <IArea>grassMap.areas[grass.areaName] : undefined,\n+                            opponent: String = settings.opponent.category;\n+\n+                        if (!grassArea || opponent !== \"Wild\") {\n+                            return;\n+                        }\n+\n+                        grassArea.pokemonEncountered = true;\n+                    },\n+                    \"onOpenItemsMenu\": function (mod: ModAttachr.IModAttachrMod, eventName: string, items: any[]): void {\n+                        let grassMap: IMap = this.player.grass ? <IMap>this.AreaSpawner.getMap(this.player.grass.mapName) : undefined,\n+                            grassArea: IArea = grassMap ? <IArea>grassMap.areas[this.player.grass.areaName] : undefined;\n+\n+                        if (!this.BattleMover.getInBattle() || !(grassArea && grassArea.pokemonEncountered)) {\n+                            return;\n+                        }\n+\n+                        for (let i: number = items.length - 1; i > -1; i -= 1) {\n+                            let currentItem: IItemSchema = this.MathDecider.getConstant(\"items\")[items[i].item];\n+                            if (currentItem.category === \"PokeBall\") {\n+                                items.splice(i, 1);\n+                            }\n+                        }\n+                    },\n+                    \"onFaint\": function (mod: ModAttachr.IModAttachrMod, thing: BattleMovr.IActor): void {\n+                        let partyPokemon: BattleMovr.IActor[] = this.ItemsHolder.getItem(\"PokemonInParty\"),\n+                            pcPokemon: BattleMovr.IActor[] = this.ItemsHolder.getItem(\"PokemonInPC\"),\n+                            newParty: BattleMovr.IActor[] = new Array(partyPokemon.length - 1),\n+                            newPC: BattleMovr.IActor[] = new Array(pcPokemon.length + 1);\n+\n+                        for (let i: number = 0; i < partyPokemon.length; i += 1) {\n+                            if (partyPokemon[i] === thing) {\n+                                continue;\n+                            }\n+                            newParty[i] = partyPokemon[i];\n+                        }\n+\n+                        for (let i: number = 0; i < pcPokemon.length; i += 1) {\n+                            newPC[i] = pcPokemon[i];\n+                        }\n+                        newPC[pcPokemon.length - 1] = thing;","path":"Source/settings/mods.ts","position":58,"original_position":58,"commit_id":"82b3f1b2a217d1036e1aceb50cd87d28d835aeed","original_commit_id":"82b3f1b2a217d1036e1aceb50cd87d28d835aeed","user":{"login":"JoshuaKGoldberg","id":3335181,"avatar_url":"https://avatars.githubusercontent.com/u/3335181?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshuaKGoldberg","html_url":"https://github.com/JoshuaKGoldberg","followers_url":"https://api.github.com/users/JoshuaKGoldberg/followers","following_url":"https://api.github.com/users/JoshuaKGoldberg/following{/other_user}","gists_url":"https://api.github.com/users/JoshuaKGoldberg/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshuaKGoldberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshuaKGoldberg/subscriptions","organizations_url":"https://api.github.com/users/JoshuaKGoldberg/orgs","repos_url":"https://api.github.com/users/JoshuaKGoldberg/repos","events_url":"https://api.github.com/users/JoshuaKGoldberg/events{/privacy}","received_events_url":"https://api.github.com/users/JoshuaKGoldberg/received_events","type":"User","site_admin":false},"body":"Use `add`.","created_at":"2016-05-08T01:32:35Z","updated_at":"2016-05-08T01:32:35Z","html_url":"https://github.com/FullScreenShenanigans/FullScreenPokemon/pull/256#discussion_r62425082","pull_request_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/pulls/256","_links":{"self":{"href":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/pulls/comments/62425082"},"html":{"href":"https://github.com/FullScreenShenanigans/FullScreenPokemon/pull/256#discussion_r62425082"},"pull_request":{"href":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/pulls/256"}}},"pull_request":{"url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/pulls/256","id":69255548,"html_url":"https://github.com/FullScreenShenanigans/FullScreenPokemon/pull/256","diff_url":"https://github.com/FullScreenShenanigans/FullScreenPokemon/pull/256.diff","patch_url":"https://github.com/FullScreenShenanigans/FullScreenPokemon/pull/256.patch","issue_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/issues/256","number":256,"state":"open","locked":false,"title":"Added Nuzlocke Challenge","user":{"login":"tsitsop","id":16912318,"avatar_url":"https://avatars.githubusercontent.com/u/16912318?v=3","gravatar_id":"","url":"https://api.github.com/users/tsitsop","html_url":"https://github.com/tsitsop","followers_url":"https://api.github.com/users/tsitsop/followers","following_url":"https://api.github.com/users/tsitsop/following{/other_user}","gists_url":"https://api.github.com/users/tsitsop/gists{/gist_id}","starred_url":"https://api.github.com/users/tsitsop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsitsop/subscriptions","organizations_url":"https://api.github.com/users/tsitsop/orgs","repos_url":"https://api.github.com/users/tsitsop/repos","events_url":"https://api.github.com/users/tsitsop/events{/privacy}","received_events_url":"https://api.github.com/users/tsitsop/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-07T23:05:04Z","updated_at":"2016-05-08T01:32:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"61dad50b3e62711499ecbca29b9482e1ad8d1efc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/pulls/256/commits","review_comments_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/pulls/256/comments","review_comment_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/issues/256/comments","statuses_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/statuses/82b3f1b2a217d1036e1aceb50cd87d28d835aeed","head":{"label":"tsitsop:mods","ref":"mods","sha":"82b3f1b2a217d1036e1aceb50cd87d28d835aeed","user":{"login":"tsitsop","id":16912318,"avatar_url":"https://avatars.githubusercontent.com/u/16912318?v=3","gravatar_id":"","url":"https://api.github.com/users/tsitsop","html_url":"https://github.com/tsitsop","followers_url":"https://api.github.com/users/tsitsop/followers","following_url":"https://api.github.com/users/tsitsop/following{/other_user}","gists_url":"https://api.github.com/users/tsitsop/gists{/gist_id}","starred_url":"https://api.github.com/users/tsitsop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsitsop/subscriptions","organizations_url":"https://api.github.com/users/tsitsop/orgs","repos_url":"https://api.github.com/users/tsitsop/repos","events_url":"https://api.github.com/users/tsitsop/events{/privacy}","received_events_url":"https://api.github.com/users/tsitsop/received_events","type":"User","site_admin":false},"repo":{"id":52184993,"name":"FullScreenPokemon","full_name":"tsitsop/FullScreenPokemon","owner":{"login":"tsitsop","id":16912318,"avatar_url":"https://avatars.githubusercontent.com/u/16912318?v=3","gravatar_id":"","url":"https://api.github.com/users/tsitsop","html_url":"https://github.com/tsitsop","followers_url":"https://api.github.com/users/tsitsop/followers","following_url":"https://api.github.com/users/tsitsop/following{/other_user}","gists_url":"https://api.github.com/users/tsitsop/gists{/gist_id}","starred_url":"https://api.github.com/users/tsitsop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsitsop/subscriptions","organizations_url":"https://api.github.com/users/tsitsop/orgs","repos_url":"https://api.github.com/users/tsitsop/repos","events_url":"https://api.github.com/users/tsitsop/events{/privacy}","received_events_url":"https://api.github.com/users/tsitsop/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tsitsop/FullScreenPokemon","description":"A free HTML5 remake of the original Pokemon, expanded for modern browsing. It will include the original maps, a random map generator, a level editor, and over a dozen custom mods.","fork":true,"url":"https://api.github.com/repos/tsitsop/FullScreenPokemon","forks_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/forks","keys_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/teams","hooks_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/hooks","issue_events_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/issues/events{/number}","events_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/events","assignees_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/assignees{/user}","branches_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/branches{/branch}","tags_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/tags","blobs_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/git/refs{/sha}","trees_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/statuses/{sha}","languages_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/languages","stargazers_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/stargazers","contributors_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/contributors","subscribers_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/subscribers","subscription_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/subscription","commits_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/commits{/sha}","git_commits_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/git/commits{/sha}","comments_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/comments{/number}","issue_comment_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/issues/comments{/number}","contents_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/contents/{+path}","compare_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/merges","archive_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/downloads","issues_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/issues{/number}","pulls_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/pulls{/number}","milestones_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/milestones{/number}","notifications_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/labels{/name}","releases_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/releases{/id}","deployments_url":"https://api.github.com/repos/tsitsop/FullScreenPokemon/deployments","created_at":"2016-02-21T01:21:28Z","updated_at":"2016-02-21T01:21:30Z","pushed_at":"2016-05-08T01:19:36Z","git_url":"git://github.com/tsitsop/FullScreenPokemon.git","ssh_url":"git@github.com:tsitsop/FullScreenPokemon.git","clone_url":"https://github.com/tsitsop/FullScreenPokemon.git","svn_url":"https://github.com/tsitsop/FullScreenPokemon","homepage":"http://www.fullscreenpokemon.com","size":278205,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":"FullScreenShenanigans:mods","ref":"mods","sha":"0bc5a991eae285ba224ef76f7e5e3fd59645961c","user":{"login":"FullScreenShenanigans","id":11371535,"avatar_url":"https://avatars.githubusercontent.com/u/11371535?v=3","gravatar_id":"","url":"https://api.github.com/users/FullScreenShenanigans","html_url":"https://github.com/FullScreenShenanigans","followers_url":"https://api.github.com/users/FullScreenShenanigans/followers","following_url":"https://api.github.com/users/FullScreenShenanigans/following{/other_user}","gists_url":"https://api.github.com/users/FullScreenShenanigans/gists{/gist_id}","starred_url":"https://api.github.com/users/FullScreenShenanigans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FullScreenShenanigans/subscriptions","organizations_url":"https://api.github.com/users/FullScreenShenanigans/orgs","repos_url":"https://api.github.com/users/FullScreenShenanigans/repos","events_url":"https://api.github.com/users/FullScreenShenanigans/events{/privacy}","received_events_url":"https://api.github.com/users/FullScreenShenanigans/received_events","type":"Organization","site_admin":false},"repo":{"id":27313221,"name":"FullScreenPokemon","full_name":"FullScreenShenanigans/FullScreenPokemon","owner":{"login":"FullScreenShenanigans","id":11371535,"avatar_url":"https://avatars.githubusercontent.com/u/11371535?v=3","gravatar_id":"","url":"https://api.github.com/users/FullScreenShenanigans","html_url":"https://github.com/FullScreenShenanigans","followers_url":"https://api.github.com/users/FullScreenShenanigans/followers","following_url":"https://api.github.com/users/FullScreenShenanigans/following{/other_user}","gists_url":"https://api.github.com/users/FullScreenShenanigans/gists{/gist_id}","starred_url":"https://api.github.com/users/FullScreenShenanigans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FullScreenShenanigans/subscriptions","organizations_url":"https://api.github.com/users/FullScreenShenanigans/orgs","repos_url":"https://api.github.com/users/FullScreenShenanigans/repos","events_url":"https://api.github.com/users/FullScreenShenanigans/events{/privacy}","received_events_url":"https://api.github.com/users/FullScreenShenanigans/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FullScreenShenanigans/FullScreenPokemon","description":"A free HTML5 remake of the original Pokemon, expanded for modern browsing. It will include the original maps, a random map generator, a level editor, and over a dozen custom mods.","fork":false,"url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon","forks_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/forks","keys_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/teams","hooks_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/hooks","issue_events_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/issues/events{/number}","events_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/events","assignees_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/assignees{/user}","branches_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/branches{/branch}","tags_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/tags","blobs_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/git/refs{/sha}","trees_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/statuses/{sha}","languages_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/languages","stargazers_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/stargazers","contributors_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/contributors","subscribers_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/subscribers","subscription_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/subscription","commits_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/commits{/sha}","git_commits_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/git/commits{/sha}","comments_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/comments{/number}","issue_comment_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/issues/comments{/number}","contents_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/contents/{+path}","compare_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/merges","archive_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/downloads","issues_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/issues{/number}","pulls_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/pulls{/number}","milestones_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/milestones{/number}","notifications_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/labels{/name}","releases_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/releases{/id}","deployments_url":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/deployments","created_at":"2014-11-29T19:51:14Z","updated_at":"2016-04-19T14:01:55Z","pushed_at":"2016-05-08T01:19:36Z","git_url":"git://github.com/FullScreenShenanigans/FullScreenPokemon.git","ssh_url":"git@github.com:FullScreenShenanigans/FullScreenPokemon.git","clone_url":"https://github.com/FullScreenShenanigans/FullScreenPokemon.git","svn_url":"https://github.com/FullScreenShenanigans/FullScreenPokemon","homepage":"http://www.fullscreenpokemon.com","size":278679,"stargazers_count":40,"watchers_count":40,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":42,"forks":15,"open_issues":42,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/pulls/256"},"html":{"href":"https://github.com/FullScreenShenanigans/FullScreenPokemon/pull/256"},"issue":{"href":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/issues/256"},"comments":{"href":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/issues/256/comments"},"review_comments":{"href":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/pulls/256/comments"},"review_comment":{"href":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/pulls/256/commits"},"statuses":{"href":"https://api.github.com/repos/FullScreenShenanigans/FullScreenPokemon/statuses/82b3f1b2a217d1036e1aceb50cd87d28d835aeed"}}}}