{"action":"created","issue":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/14627","labels_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/14627/labels{/name}","comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/14627/comments","events_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/14627/events","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/14627","id":123946458,"number":14627,"title":"[CR] Ensure player::on_dodge is actually called","user":{"login":"mugling","id":12238606,"avatar_url":"https://avatars.githubusercontent.com/u/12238606?v=3","gravatar_id":"","url":"https://api.github.com/users/mugling","html_url":"https://github.com/mugling","followers_url":"https://api.github.com/users/mugling/followers","following_url":"https://api.github.com/users/mugling/following{/other_user}","gists_url":"https://api.github.com/users/mugling/gists{/gist_id}","starred_url":"https://api.github.com/users/mugling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mugling/subscriptions","organizations_url":"https://api.github.com/users/mugling/orgs","repos_url":"https://api.github.com/users/mugling/repos","events_url":"https://api.github.com/users/mugling/events{/privacy}","received_events_url":"https://api.github.com/users/mugling/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-12-26T20:19:40Z","updated_at":"2015-12-27T08:25:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/14627","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/14627","diff_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/14627.diff","patch_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/14627.patch"},"body":"It appears `player::on_dodge` is never called.\r\n\r\n`monster::on_dodge` is called from `monster::deal_melee_attack`. As we don't override `deal_melee_attack` for `player` the base method `creature::deal_melee_attack` is used which does not call `on_dodge`.\r\n\r\nThis PR changes this so that the appropriate `on_dodge` method is called by `player::melee_attack` or `monster::melee_attack` and removes `monster::deal_melee_attack` which becomes unnecessary after this change.\r\n\r\nTraining of the dodging skill is moved from `on_hit` to `on_dodge` so the player now learns from successful dodges as opposed to being beat on the head.\r\n\r\nI'd like to add further logic to `player::on_dodge` but this will be part of a separate PR (#14628) to limit scope."},"comment":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/comments/167392773","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/14627#issuecomment-167392773","issue_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/14627","id":167392773,"user":{"login":"SeanMirrsen","id":6471698,"avatar_url":"https://avatars.githubusercontent.com/u/6471698?v=3","gravatar_id":"","url":"https://api.github.com/users/SeanMirrsen","html_url":"https://github.com/SeanMirrsen","followers_url":"https://api.github.com/users/SeanMirrsen/followers","following_url":"https://api.github.com/users/SeanMirrsen/following{/other_user}","gists_url":"https://api.github.com/users/SeanMirrsen/gists{/gist_id}","starred_url":"https://api.github.com/users/SeanMirrsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeanMirrsen/subscriptions","organizations_url":"https://api.github.com/users/SeanMirrsen/orgs","repos_url":"https://api.github.com/users/SeanMirrsen/repos","events_url":"https://api.github.com/users/SeanMirrsen/events{/privacy}","received_events_url":"https://api.github.com/users/SeanMirrsen/received_events","type":"User","site_admin":false},"created_at":"2015-12-27T08:25:26Z","updated_at":"2015-12-27T08:25:26Z","body":">But it shouldn't give any more xp for voluntarily slowing self down either.\r\n\r\nIn given, specific circumstances - why not? People wear weighted clothing for all kinds of training to add to the resistance they have to overcome and get even better results."}}