{"action":"created","issue":{"url":"https://api.github.com/repos/Cardshifter/HTML-Client/issues/61","labels_url":"https://api.github.com/repos/Cardshifter/HTML-Client/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/Cardshifter/HTML-Client/issues/61/comments","events_url":"https://api.github.com/repos/Cardshifter/HTML-Client/issues/61/events","html_url":"https://github.com/Cardshifter/HTML-Client/issues/61","id":102424426,"number":61,"title":"Performing Actions Flow","user":{"login":"Zomis","id":1405379,"avatar_url":"https://avatars.githubusercontent.com/u/1405379?v=3","gravatar_id":"","url":"https://api.github.com/users/Zomis","html_url":"https://github.com/Zomis","followers_url":"https://api.github.com/users/Zomis/followers","following_url":"https://api.github.com/users/Zomis/following{/other_user}","gists_url":"https://api.github.com/users/Zomis/gists{/gist_id}","starred_url":"https://api.github.com/users/Zomis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zomis/subscriptions","organizations_url":"https://api.github.com/users/Zomis/orgs","repos_url":"https://api.github.com/users/Zomis/repos","events_url":"https://api.github.com/users/Zomis/events{/privacy}","received_events_url":"https://api.github.com/users/Zomis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Cardshifter/HTML-Client/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/Cardshifter/HTML-Client/labels/layout","name":"layout","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-21T17:14:17Z","updated_at":"2015-08-22T19:19:22Z","closed_at":null,"body":"This is how I imagine performing actions should work, from a user point of view:\r\n\r\nLet's say that you have the following actions available: (just as an example, some of these actions does not exist yet but may be added at any time in the future, whenever the server feels like it)\r\n\r\n- Play Card A in hand\r\n- Play Card B in hand\r\n- Attack with Card C on battlefield\r\n- Scrap Card C on battlefield\r\n- Activate Hero Power: Deal 1 damage to any target\r\n- End Turn\r\n\r\nCard A and B in hand should be highlighted somehow so that it is clear that they can be played, or they can have a button next to them that says \"Play\"\r\n\r\nCard C should be highlighted so that it is clear that it can attack (or have a button next to it that says \"Attack\")\r\nCard C should also have a button \"Scrap\"\r\n\r\nTwo buttons for the Player-related actions: \"Activate Hero Power\", \"End Turn\".\r\n\r\n---\r\n\r\n**Actions without targets**\r\n\r\n- If you press \"End Turn\", the turn ends directly. No need for any confirmation.\r\n- If you play Card A or B, it gets played directly, no confirmation.\r\n- If you click the button for scrapping Card C, it gets scrapped directly, no confirmation.\r\n\r\nBasically:\r\n\r\n- [x] All actions that does not have targets should be performed directly when their corresponding button is clicked\r\n\r\n**Actions with targets**\r\n\r\n- [ ] If you choose to Attack with Card C on battlefield, or activate the Hero Power, you will request the target ids from the server. The available targets should be highlighted (a bunch of cards and players).\r\n- [ ] There should be a \"Cancel\" button available that cancels the action, as if you never clicked the action in the first place\r\n- [ ] If the action only needs *exactly* one target, click the target and you will perform the action.\r\n\r\n**Actions with more than one target, or *up to* one target (i.e. 0 or 1 targets)**\r\n\r\nWhen you click the button for performing an action, and the action does not require *exactly* one target:\r\n\r\n- [ ] toggle the targets that you want (click once to select, click again to unselect)\r\n- [ ] Selected targets should be highlighted\r\n- [ ] When you are happy with your selection, you click an \"OK\" button (or some button that has that effect)"},"comment":{"url":"https://api.github.com/repos/Cardshifter/HTML-Client/issues/comments/133743208","html_url":"https://github.com/Cardshifter/HTML-Client/issues/61#issuecomment-133743208","issue_url":"https://api.github.com/repos/Cardshifter/HTML-Client/issues/61","id":133743208,"user":{"login":"Zomis","id":1405379,"avatar_url":"https://avatars.githubusercontent.com/u/1405379?v=3","gravatar_id":"","url":"https://api.github.com/users/Zomis","html_url":"https://github.com/Zomis","followers_url":"https://api.github.com/users/Zomis/followers","following_url":"https://api.github.com/users/Zomis/following{/other_user}","gists_url":"https://api.github.com/users/Zomis/gists{/gist_id}","starred_url":"https://api.github.com/users/Zomis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zomis/subscriptions","organizations_url":"https://api.github.com/users/Zomis/orgs","repos_url":"https://api.github.com/users/Zomis/repos","events_url":"https://api.github.com/users/Zomis/events{/privacy}","received_events_url":"https://api.github.com/users/Zomis/received_events","type":"User","site_admin":false},"created_at":"2015-08-22T19:19:22Z","updated_at":"2015-08-22T19:19:22Z","body":"Some actions with targets, such as `Mulligan`, should not *require* a target. (which makes the `targetRequired` boolean slightly confusing, sorry for that). I mean... it should be possible to target 0 cards.\r\n\r\nThe `AvailableTargetsMessage` for the Mulligan action is:\r\n\r\n    AvailableTargetsMessage [entity=115, action=Mulligan, min=0, max=2147483647, targets=[151, 156, 161, 163, 169]]\r\n\r\nNotice the `min=0`, that means that it is okay to target 0 cards."}}