{"action":"created","issue":{"url":"https://api.github.com/repos/mtgred/netrunner/issues/301","labels_url":"https://api.github.com/repos/mtgred/netrunner/issues/301/labels{/name}","comments_url":"https://api.github.com/repos/mtgred/netrunner/issues/301/comments","events_url":"https://api.github.com/repos/mtgred/netrunner/issues/301/events","html_url":"https://github.com/mtgred/netrunner/issues/301","id":92172377,"number":301,"title":"Sundew grants credits even when running it first click","user":{"login":"nealterrell","id":10083341,"avatar_url":"https://avatars.githubusercontent.com/u/10083341?v=3","gravatar_id":"","url":"https://api.github.com/users/nealterrell","html_url":"https://github.com/nealterrell","followers_url":"https://api.github.com/users/nealterrell/followers","following_url":"https://api.github.com/users/nealterrell/following{/other_user}","gists_url":"https://api.github.com/users/nealterrell/gists{/gist_id}","starred_url":"https://api.github.com/users/nealterrell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nealterrell/subscriptions","organizations_url":"https://api.github.com/users/nealterrell/orgs","repos_url":"https://api.github.com/users/nealterrell/repos","events_url":"https://api.github.com/users/nealterrell/events{/privacy}","received_events_url":"https://api.github.com/users/nealterrell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-30T18:58:38Z","updated_at":"2015-07-02T19:20:01Z","closed_at":null,"body":"Sundew gives the Corp 2 credits when you run it first click. I believe this is because `click-run` calls `pay` to pay the click cost BEFORE initiating the run. That triggers `:runner-spent-click` before the run is initiated; Sundew handles the `:runner-spent-click` event before there is anything in `(:run @state)`, so the attempt to check to see if the run is on Sundew's server fails because there is no run yet. "},"comment":{"url":"https://api.github.com/repos/mtgred/netrunner/issues/comments/118139327","html_url":"https://github.com/mtgred/netrunner/issues/301#issuecomment-118139327","issue_url":"https://api.github.com/repos/mtgred/netrunner/issues/301","id":118139327,"user":{"login":"mtgred","id":284114,"avatar_url":"https://avatars.githubusercontent.com/u/284114?v=3","gravatar_id":"","url":"https://api.github.com/users/mtgred","html_url":"https://github.com/mtgred","followers_url":"https://api.github.com/users/mtgred/followers","following_url":"https://api.github.com/users/mtgred/following{/other_user}","gists_url":"https://api.github.com/users/mtgred/gists{/gist_id}","starred_url":"https://api.github.com/users/mtgred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtgred/subscriptions","organizations_url":"https://api.github.com/users/mtgred/orgs","repos_url":"https://api.github.com/users/mtgred/repos","events_url":"https://api.github.com/users/mtgred/events{/privacy}","received_events_url":"https://api.github.com/users/mtgred/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T19:20:01Z","updated_at":"2015-07-02T19:20:01Z","body":"You are right. `pay` is called to check if the runner can pay for the run or the run ability before `run` is initiated. The condition actually never worked.\r\n\r\nI don't see how this can be worked around with the current code. The `pay` function has to be split into a `can-pay?` function and a simpler `pay` function with no check. It would actually be beneficial for other card as well like Self Modifying Code or Clone Chip to check of the selected card can be installed."}}