{"action":"opened","number":1629,"pull_request":{"url":"https://api.github.com/repos/magarena/magarena/pulls/1629","id":228151060,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4MTUxMDYw","html_url":"https://github.com/magarena/magarena/pull/1629","diff_url":"https://github.com/magarena/magarena/pull/1629.diff","patch_url":"https://github.com/magarena/magarena/pull/1629.patch","issue_url":"https://api.github.com/repos/magarena/magarena/issues/1629","number":1629,"state":"open","locked":false,"title":"Reduced colored costs","user":{"login":"bilbo2","id":684329,"node_id":"MDQ6VXNlcjY4NDMyOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/684329?v=4","gravatar_id":"","url":"https://api.github.com/users/bilbo2","html_url":"https://github.com/bilbo2","followers_url":"https://api.github.com/users/bilbo2/followers","following_url":"https://api.github.com/users/bilbo2/following{/other_user}","gists_url":"https://api.github.com/users/bilbo2/gists{/gist_id}","starred_url":"https://api.github.com/users/bilbo2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bilbo2/subscriptions","organizations_url":"https://api.github.com/users/bilbo2/orgs","repos_url":"https://api.github.com/users/bilbo2/repos","events_url":"https://api.github.com/users/bilbo2/events{/privacy}","received_events_url":"https://api.github.com/users/bilbo2/received_events","type":"User","site_admin":false},"body":"As mentioned in #1628 - the colored discount was not applied to spit/hybrid/phyrexian costs.\r\n\r\nWith this change it is! If the cost includes only one type of split cost (for example {R/W}{R/W}{R/W}), it works flawlessly.\r\n\r\nIf the card contains multiple types of split costs, the algorithm reduces first found matching cost, even if some other combination may be better for the player. So far the only card  (that might trigger the inefficiency issue) that exist with multiple types of split cost in its cost is Reaper King: {2/W}{2/U}{2/B}{2/R}{2/G} - and that one is not implemented in magarena at the moment anyway.\r\n\r\nTested both with extended unit test and in game (Ragemonger is now able to reduce cost of Boros Reckoner from {R/W}{R/W}{R/W} to {R/W}{R/W}).","created_at":"2018-11-04T01:12:55Z","updated_at":"2018-11-04T01:12:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/magarena/magarena/pulls/1629/commits","review_comments_url":"https://api.github.com/repos/magarena/magarena/pulls/1629/comments","review_comment_url":"https://api.github.com/repos/magarena/magarena/pulls/comments{/number}","comments_url":"https://api.github.com/repos/magarena/magarena/issues/1629/comments","statuses_url":"https://api.github.com/repos/magarena/magarena/statuses/d67d5250a7e1766788cfb4ab82fcaf08eb82a770","head":{"label":"bilbo2:discount","ref":"discount","sha":"d67d5250a7e1766788cfb4ab82fcaf08eb82a770","user":{"login":"bilbo2","id":684329,"node_id":"MDQ6VXNlcjY4NDMyOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/684329?v=4","gravatar_id":"","url":"https://api.github.com/users/bilbo2","html_url":"https://github.com/bilbo2","followers_url":"https://api.github.com/users/bilbo2/followers","following_url":"https://api.github.com/users/bilbo2/following{/other_user}","gists_url":"https://api.github.com/users/bilbo2/gists{/gist_id}","starred_url":"https://api.github.com/users/bilbo2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bilbo2/subscriptions","organizations_url":"https://api.github.com/users/bilbo2/orgs","repos_url":"https://api.github.com/users/bilbo2/repos","events_url":"https://api.github.com/users/bilbo2/events{/privacy}","received_events_url":"https://api.github.com/users/bilbo2/received_events","type":"User","site_admin":false},"repo":{"id":35914821,"node_id":"MDEwOlJlcG9zaXRvcnkzNTkxNDgyMQ==","name":"magarena","full_name":"bilbo2/magarena","private":false,"owner":{"login":"bilbo2","id":684329,"node_id":"MDQ6VXNlcjY4NDMyOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/684329?v=4","gravatar_id":"","url":"https://api.github.com/users/bilbo2","html_url":"https://github.com/bilbo2","followers_url":"https://api.github.com/users/bilbo2/followers","following_url":"https://api.github.com/users/bilbo2/following{/other_user}","gists_url":"https://api.github.com/users/bilbo2/gists{/gist_id}","starred_url":"https://api.github.com/users/bilbo2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bilbo2/subscriptions","organizations_url":"https://api.github.com/users/bilbo2/orgs","repos_url":"https://api.github.com/users/bilbo2/repos","events_url":"https://api.github.com/users/bilbo2/events{/privacy}","received_events_url":"https://api.github.com/users/bilbo2/received_events","type":"User","site_admin":false},"html_url":"https://github.com/bilbo2/magarena","description":"Magarena is a single-player fantasy card game played against a computer opponent.","fork":true,"url":"https://api.github.com/repos/bilbo2/magarena","forks_url":"https://api.github.com/repos/bilbo2/magarena/forks","keys_url":"https://api.github.com/repos/bilbo2/magarena/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bilbo2/magarena/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bilbo2/magarena/teams","hooks_url":"https://api.github.com/repos/bilbo2/magarena/hooks","issue_events_url":"https://api.github.com/repos/bilbo2/magarena/issues/events{/number}","events_url":"https://api.github.com/repos/bilbo2/magarena/events","assignees_url":"https://api.github.com/repos/bilbo2/magarena/assignees{/user}","branches_url":"https://api.github.com/repos/bilbo2/magarena/branches{/branch}","tags_url":"https://api.github.com/repos/bilbo2/magarena/tags","blobs_url":"https://api.github.com/repos/bilbo2/magarena/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bilbo2/magarena/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bilbo2/magarena/git/refs{/sha}","trees_url":"https://api.github.com/repos/bilbo2/magarena/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bilbo2/magarena/statuses/{sha}","languages_url":"https://api.github.com/repos/bilbo2/magarena/languages","stargazers_url":"https://api.github.com/repos/bilbo2/magarena/stargazers","contributors_url":"https://api.github.com/repos/bilbo2/magarena/contributors","subscribers_url":"https://api.github.com/repos/bilbo2/magarena/subscribers","subscription_url":"https://api.github.com/repos/bilbo2/magarena/subscription","commits_url":"https://api.github.com/repos/bilbo2/magarena/commits{/sha}","git_commits_url":"https://api.github.com/repos/bilbo2/magarena/git/commits{/sha}","comments_url":"https://api.github.com/repos/bilbo2/magarena/comments{/number}","issue_comment_url":"https://api.github.com/repos/bilbo2/magarena/issues/comments{/number}","contents_url":"https://api.github.com/repos/bilbo2/magarena/contents/{+path}","compare_url":"https://api.github.com/repos/bilbo2/magarena/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bilbo2/magarena/merges","archive_url":"https://api.github.com/repos/bilbo2/magarena/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bilbo2/magarena/downloads","issues_url":"https://api.github.com/repos/bilbo2/magarena/issues{/number}","pulls_url":"https://api.github.com/repos/bilbo2/magarena/pulls{/number}","milestones_url":"https://api.github.com/repos/bilbo2/magarena/milestones{/number}","notifications_url":"https://api.github.com/repos/bilbo2/magarena/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bilbo2/magarena/labels{/name}","releases_url":"https://api.github.com/repos/bilbo2/magarena/releases{/id}","deployments_url":"https://api.github.com/repos/bilbo2/magarena/deployments","created_at":"2015-05-19T23:47:58Z","updated_at":"2018-11-03T00:35:02Z","pushed_at":"2018-11-04T01:02:16Z","git_url":"git://github.com/bilbo2/magarena.git","ssh_url":"git@github.com:bilbo2/magarena.git","clone_url":"https://github.com/bilbo2/magarena.git","svn_url":"https://github.com/bilbo2/magarena","homepage":"http://magarena.github.io","size":391521,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"magarena:master","ref":"master","sha":"aaf678b517d2165f4404d3d237afc0cc37f7dd47","user":{"login":"magarena","id":4891448,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4OTE0NDg=","avatar_url":"https://avatars0.githubusercontent.com/u/4891448?v=4","gravatar_id":"","url":"https://api.github.com/users/magarena","html_url":"https://github.com/magarena","followers_url":"https://api.github.com/users/magarena/followers","following_url":"https://api.github.com/users/magarena/following{/other_user}","gists_url":"https://api.github.com/users/magarena/gists{/gist_id}","starred_url":"https://api.github.com/users/magarena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magarena/subscriptions","organizations_url":"https://api.github.com/users/magarena/orgs","repos_url":"https://api.github.com/users/magarena/repos","events_url":"https://api.github.com/users/magarena/events{/privacy}","received_events_url":"https://api.github.com/users/magarena/received_events","type":"Organization","site_admin":false},"repo":{"id":16251053,"node_id":"MDEwOlJlcG9zaXRvcnkxNjI1MTA1Mw==","name":"magarena","full_name":"magarena/magarena","private":false,"owner":{"login":"magarena","id":4891448,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4OTE0NDg=","avatar_url":"https://avatars0.githubusercontent.com/u/4891448?v=4","gravatar_id":"","url":"https://api.github.com/users/magarena","html_url":"https://github.com/magarena","followers_url":"https://api.github.com/users/magarena/followers","following_url":"https://api.github.com/users/magarena/following{/other_user}","gists_url":"https://api.github.com/users/magarena/gists{/gist_id}","starred_url":"https://api.github.com/users/magarena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magarena/subscriptions","organizations_url":"https://api.github.com/users/magarena/orgs","repos_url":"https://api.github.com/users/magarena/repos","events_url":"https://api.github.com/users/magarena/events{/privacy}","received_events_url":"https://api.github.com/users/magarena/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/magarena/magarena","description":"Magarena is a single-player fantasy card game played against a computer opponent.","fork":false,"url":"https://api.github.com/repos/magarena/magarena","forks_url":"https://api.github.com/repos/magarena/magarena/forks","keys_url":"https://api.github.com/repos/magarena/magarena/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magarena/magarena/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magarena/magarena/teams","hooks_url":"https://api.github.com/repos/magarena/magarena/hooks","issue_events_url":"https://api.github.com/repos/magarena/magarena/issues/events{/number}","events_url":"https://api.github.com/repos/magarena/magarena/events","assignees_url":"https://api.github.com/repos/magarena/magarena/assignees{/user}","branches_url":"https://api.github.com/repos/magarena/magarena/branches{/branch}","tags_url":"https://api.github.com/repos/magarena/magarena/tags","blobs_url":"https://api.github.com/repos/magarena/magarena/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magarena/magarena/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magarena/magarena/git/refs{/sha}","trees_url":"https://api.github.com/repos/magarena/magarena/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magarena/magarena/statuses/{sha}","languages_url":"https://api.github.com/repos/magarena/magarena/languages","stargazers_url":"https://api.github.com/repos/magarena/magarena/stargazers","contributors_url":"https://api.github.com/repos/magarena/magarena/contributors","subscribers_url":"https://api.github.com/repos/magarena/magarena/subscribers","subscription_url":"https://api.github.com/repos/magarena/magarena/subscription","commits_url":"https://api.github.com/repos/magarena/magarena/commits{/sha}","git_commits_url":"https://api.github.com/repos/magarena/magarena/git/commits{/sha}","comments_url":"https://api.github.com/repos/magarena/magarena/comments{/number}","issue_comment_url":"https://api.github.com/repos/magarena/magarena/issues/comments{/number}","contents_url":"https://api.github.com/repos/magarena/magarena/contents/{+path}","compare_url":"https://api.github.com/repos/magarena/magarena/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magarena/magarena/merges","archive_url":"https://api.github.com/repos/magarena/magarena/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magarena/magarena/downloads","issues_url":"https://api.github.com/repos/magarena/magarena/issues{/number}","pulls_url":"https://api.github.com/repos/magarena/magarena/pulls{/number}","milestones_url":"https://api.github.com/repos/magarena/magarena/milestones{/number}","notifications_url":"https://api.github.com/repos/magarena/magarena/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magarena/magarena/labels{/name}","releases_url":"https://api.github.com/repos/magarena/magarena/releases{/id}","deployments_url":"https://api.github.com/repos/magarena/magarena/deployments","created_at":"2014-01-26T10:14:56Z","updated_at":"2018-11-03T11:59:08Z","pushed_at":"2018-11-02T03:55:25Z","git_url":"git://github.com/magarena/magarena.git","ssh_url":"git@github.com:magarena/magarena.git","clone_url":"https://github.com/magarena/magarena.git","svn_url":"https://github.com/magarena/magarena","homepage":"http://magarena.github.io","size":388089,"stargazers_count":218,"watchers_count":218,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"archived":false,"open_issues_count":356,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":65,"open_issues":356,"watchers":218,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/magarena/magarena/pulls/1629"},"html":{"href":"https://github.com/magarena/magarena/pull/1629"},"issue":{"href":"https://api.github.com/repos/magarena/magarena/issues/1629"},"comments":{"href":"https://api.github.com/repos/magarena/magarena/issues/1629/comments"},"review_comments":{"href":"https://api.github.com/repos/magarena/magarena/pulls/1629/comments"},"review_comment":{"href":"https://api.github.com/repos/magarena/magarena/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/magarena/magarena/pulls/1629/commits"},"statuses":{"href":"https://api.github.com/repos/magarena/magarena/statuses/d67d5250a7e1766788cfb4ab82fcaf08eb82a770"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":4,"additions":152,"deletions":67,"changed_files":16}}
{"actor":{"display_login":"bilbo2"}}