{"action":"created","issue":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/14616","labels_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/14616/labels{/name}","comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/14616/comments","events_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/14616/events","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/14616","id":123906094,"number":14616,"title":"iuse actor heal for jsonized healing items","user":{"login":"Coolthulhu","id":1878860,"avatar_url":"https://avatars.githubusercontent.com/u/1878860?v=3","gravatar_id":"","url":"https://api.github.com/users/Coolthulhu","html_url":"https://github.com/Coolthulhu","followers_url":"https://api.github.com/users/Coolthulhu/followers","following_url":"https://api.github.com/users/Coolthulhu/following{/other_user}","gists_url":"https://api.github.com/users/Coolthulhu/gists{/gist_id}","starred_url":"https://api.github.com/users/Coolthulhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coolthulhu/subscriptions","organizations_url":"https://api.github.com/users/Coolthulhu/orgs","repos_url":"https://api.github.com/users/Coolthulhu/repos","events_url":"https://api.github.com/users/Coolthulhu/events{/privacy}","received_events_url":"https://api.github.com/users/Coolthulhu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-26T03:17:43Z","updated_at":"2016-01-22T22:00:45Z","closed_at":"2015-12-27T06:33:51Z","pull_request":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/14616","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/14616","diff_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/14616.diff","patch_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/14616.patch"},"body":"As promised on forums.\r\n\r\nChanged actions like bandages, disinfectants etc. from hardcoded `iuse`s to a single `iuse_actor`.\r\nIt looks like this:\r\n```\r\n\"use_action\" : {\r\n    \"type\" : \"heal\",\r\n    \"limb_power\" : 3,\r\n    \"head_power\" : 1,\r\n    \"torso_power\" : 4,\r\n    \"bleed\" : 0.9,\r\n    \"move_cost\" : 300,\r\n    \"effects\" : [\r\n        {\r\n            \"id\": \"pkill1\",\r\n            \"duration\": 120\r\n        }\r\n    ]\r\n}\r\n```\r\n\r\nShould be pretty self-descriptive.\r\n\r\nAllows defining a list of effects (in `consume_drug` effect syntax), a side product item (bloody rag) and making using some items a long action.\r\nThere is a test item - chloroform rag (because NPCs show that they are sleeping by having a blue background) that also creates a regular rag on use. Because of curent limitations of this iuse_actor, it needs to be used on a damaged body part.\r\n\r\nLong actions are currently hardcoded to divide `move_cost` by (user's skill + 1), because that was happening to first aid kits. They don't work on NPCs yet - instead they will heal the NPC on first turn and then consume all the moves at once.\r\n\r\nDiffs look quite huge, but most of that is just CTRL+X+V, because I moved the huge healing helper functions from iuse.cpp to iuse_actor.cpp."},"comment":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/comments/174066718","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/14616#issuecomment-174066718","issue_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/14616","id":174066718,"user":{"login":"chaosvolt","id":11582235,"avatar_url":"https://avatars.githubusercontent.com/u/11582235?v=3","gravatar_id":"","url":"https://api.github.com/users/chaosvolt","html_url":"https://github.com/chaosvolt","followers_url":"https://api.github.com/users/chaosvolt/followers","following_url":"https://api.github.com/users/chaosvolt/following{/other_user}","gists_url":"https://api.github.com/users/chaosvolt/gists{/gist_id}","starred_url":"https://api.github.com/users/chaosvolt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaosvolt/subscriptions","organizations_url":"https://api.github.com/users/chaosvolt/orgs","repos_url":"https://api.github.com/users/chaosvolt/repos","events_url":"https://api.github.com/users/chaosvolt/events{/privacy}","received_events_url":"https://api.github.com/users/chaosvolt/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T22:00:45Z","updated_at":"2016-01-22T22:00:45Z","body":"Ah, I see. I'm sorely tempted to change the arcana mod to use this instead of artifact-style healing. Either that, or remove the pain effect as it heals so little (for cost equivalent to 1 essence) that it isn't worth the pain accumulated."}}