{"action":"created","issue":{"url":"https://api.github.com/repos/dragonjet/KC3Kai/issues/602","labels_url":"https://api.github.com/repos/dragonjet/KC3Kai/issues/602/labels{/name}","comments_url":"https://api.github.com/repos/dragonjet/KC3Kai/issues/602/comments","events_url":"https://api.github.com/repos/dragonjet/KC3Kai/issues/602/events","html_url":"https://github.com/dragonjet/KC3Kai/pull/602","id":100608655,"number":602,"title":"update KanColleHelpers API","user":{"login":"Javran","id":1096354,"avatar_url":"https://avatars.githubusercontent.com/u/1096354?v=3","gravatar_id":"","url":"https://api.github.com/users/Javran","html_url":"https://github.com/Javran","followers_url":"https://api.github.com/users/Javran/followers","following_url":"https://api.github.com/users/Javran/following{/other_user}","gists_url":"https://api.github.com/users/Javran/gists{/gist_id}","starred_url":"https://api.github.com/users/Javran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Javran/subscriptions","organizations_url":"https://api.github.com/users/Javran/orgs","repos_url":"https://api.github.com/users/Javran/repos","events_url":"https://api.github.com/users/Javran/events{/privacy}","received_events_url":"https://api.github.com/users/Javran/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-08-12T18:43:39Z","updated_at":"2015-08-13T12:40:44Z","closed_at":"2015-08-13T02:58:25Z","pull_request":{"url":"https://api.github.com/repos/dragonjet/KC3Kai/pulls/602","html_url":"https://github.com/dragonjet/KC3Kai/pull/602","diff_url":"https://github.com/dragonjet/KC3Kai/pull/602.diff","patch_url":"https://github.com/dragonjet/KC3Kai/pull/602.patch"},"body":"Related: #461 #589 #594\r\nnew APIs are added to deal with combined fleet data:\r\n\r\n* `analyzeRawSurfaceTaskForceBattleJS` for dealing with surface task force.\r\n\r\n```javascript\r\n> var PS = require( \"./KanColleHelpersN\" );\r\n> var DA = PS['KanColle.DamageAnalysis'];\r\n> DA.analyzeRawSurfaceTaskForceBattleJS( svdata.api_data )\r\n{ main: \r\n   [ null,\r\n     { currentHp: 53 },\r\n     { currentHp: 47 },\r\n     { currentHp: 48 },\r\n     { currentHp: 56 },\r\n     { currentHp: 81 },\r\n     { currentHp: 92 } ],\r\n  escort: \r\n   [ null,\r\n     { currentHp: 24 },\r\n     { currentHp: 13 },\r\n     { currentHp: 30 },\r\n     { currentHp: 29 },\r\n     { currentHp: 10 },\r\n     { currentHp: 38 } ],\r\n  enemy: \r\n   [ null,\r\n     { currentHp: -165 },\r\n     { currentHp: -326 },\r\n     { currentHp: -9 },\r\n     { currentHp: -79 },\r\n     { currentHp: -94 },\r\n     { currentHp: -10 } ] }\r\n```\r\n\r\n* `analyzeRawCarrierTaskForceBattleJS` for dealing with carrier task force (for both regular battle and air battle)\r\n\r\n    The usage is the same as `analyzeRawSurfaceTaskForceBattleJS`:\r\n\r\n```javascript\r\n> DA.analyzeRawCarrierTaskForceBattleJS( svdata.api_data )\r\n{ main: \r\n   [ null,\r\n     { currentHp: 77 },\r\n     { currentHp: 77 },\r\n     { currentHp: 69 },\r\n     { currentHp: 70 },\r\n     { currentHp: 45 },\r\n     { currentHp: 55 } ],\r\n  escort: \r\n   [ null,\r\n     { currentHp: 37 },\r\n     { currentHp: 31 },\r\n     { currentHp: 44 },\r\n     { currentHp: 82 },\r\n     { currentHp: 43 },\r\n     { currentHp: 39 } ],\r\n  enemy: \r\n   [ null,\r\n     { currentHp: 96 },\r\n     { currentHp: 70 },\r\n     { currentHp: 58 },\r\n     { currentHp: 66 },\r\n     { currentHp: -18 },\r\n     { currentHp: 40 } ] }\r\n\r\n```\r\n\r\n* `analyzeRawNightBattleCombinedJS`\r\n\r\n    The same as `analyzeRawNightBattleJS`, except that now damage is dealt to escort fleets (element#1~6 are escort ships' HPs) instead of main fleets, this API keeps the old ouput format.\r\n\r\n```javascript\r\n> DA.analyzeRawNightBattleCombinedJS( svdata.api_data )\r\n[ null,\r\n  { currentHp: 9 },\r\n  { currentHp: 4 },\r\n  { currentHp: 23 },\r\n  { currentHp: 75 },\r\n  { currentHp: 14 },\r\n  { currentHp: 21 },\r\n  { currentHp: 230 },\r\n  { currentHp: 169 },\r\n  { currentHp: 16 },\r\n  { currentHp: -17 },\r\n  { currentHp: 0 },\r\n  { currentHp: 0 } ]\r\n```\r\n\r\nThis PR is just an API update, for now I don't know how to integrate it with existing code nor could I verify the change (as atm I've not yet got started doing the event). Can someone take over the remaining task? "},"comment":{"url":"https://api.github.com/repos/dragonjet/KC3Kai/issues/comments/130655778","html_url":"https://github.com/dragonjet/KC3Kai/pull/602#issuecomment-130655778","issue_url":"https://api.github.com/repos/dragonjet/KC3Kai/issues/602","id":130655778,"user":{"login":"NicolaosGreene","id":3627763,"avatar_url":"https://avatars.githubusercontent.com/u/3627763?v=3","gravatar_id":"","url":"https://api.github.com/users/NicolaosGreene","html_url":"https://github.com/NicolaosGreene","followers_url":"https://api.github.com/users/NicolaosGreene/followers","following_url":"https://api.github.com/users/NicolaosGreene/following{/other_user}","gists_url":"https://api.github.com/users/NicolaosGreene/gists{/gist_id}","starred_url":"https://api.github.com/users/NicolaosGreene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicolaosGreene/subscriptions","organizations_url":"https://api.github.com/users/NicolaosGreene/orgs","repos_url":"https://api.github.com/users/NicolaosGreene/repos","events_url":"https://api.github.com/users/NicolaosGreene/events{/privacy}","received_events_url":"https://api.github.com/users/NicolaosGreene/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T12:40:44Z","updated_at":"2015-08-13T12:40:44Z","body":"It's no problem, that's why I provided the data"}}