{"action":"created","issue":{"url":"https://api.github.com/repos/Cardshifter/Cardshifter/issues/233","labels_url":"https://api.github.com/repos/Cardshifter/Cardshifter/issues/233/labels{/name}","comments_url":"https://api.github.com/repos/Cardshifter/Cardshifter/issues/233/comments","events_url":"https://api.github.com/repos/Cardshifter/Cardshifter/issues/233/events","html_url":"https://github.com/Cardshifter/Cardshifter/issues/233","id":79116398,"number":233,"title":"\"probability\" card effect argument","user":{"login":"Phrancis","id":8539648,"avatar_url":"https://avatars.githubusercontent.com/u/8539648?v=3","gravatar_id":"","url":"https://api.github.com/users/Phrancis","html_url":"https://github.com/Phrancis","followers_url":"https://api.github.com/users/Phrancis/followers","following_url":"https://api.github.com/users/Phrancis/following{/other_user}","gists_url":"https://api.github.com/users/Phrancis/gists{/gist_id}","starred_url":"https://api.github.com/users/Phrancis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Phrancis/subscriptions","organizations_url":"https://api.github.com/users/Phrancis/orgs","repos_url":"https://api.github.com/users/Phrancis/repos","events_url":"https://api.github.com/users/Phrancis/events{/privacy}","received_events_url":"https://api.github.com/users/Phrancis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Cardshifter/Cardshifter/labels/gameplay","name":"gameplay","color":"fbca04"},{"url":"https://api.github.com/repos/Cardshifter/Cardshifter/labels/groovy","name":"groovy","color":"ddf9fd"},{"url":"https://api.github.com/repos/Cardshifter/Cardshifter/labels/mod","name":"mod","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-21T18:44:37Z","updated_at":"2015-05-21T20:02:28Z","closed_at":null,"body":"This is used in many games and we should support this for actions to happen with a certain random probability. Examples (using 0.6 Groovy DSL):\r\n\r\n    whilePresent {\r\n        // 25% chance to gain 1 attack\r\n        change ATTACK by 1 probability 25 withPriority 1 onCards {\r\n            card(this)\r\n        }\r\n    }\r\n\r\nOr...\r\n\r\n    afterPlay {\r\n        // 50% chance to summon Gyrodroid on play\r\n        summon 1 \"Gyrodroid\" probability 50 ownedBy \"you\" zone \"Battlefield\"\r\n    }\r\n"},"comment":{"url":"https://api.github.com/repos/Cardshifter/Cardshifter/issues/comments/104404599","html_url":"https://github.com/Cardshifter/Cardshifter/issues/233#issuecomment-104404599","issue_url":"https://api.github.com/repos/Cardshifter/Cardshifter/issues/233","id":104404599,"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-05-21T20:02:28Z","updated_at":"2015-05-21T20:02:28Z","body":"It can of course work as \r\n\r\n    summon 1 \"Gyrodroid\" probability 0.5 ownedBy \"you\" zone \"Battlefield\"\r\n\r\nI think however that as probabilities is not a common thing to add, that it is better to make it more clear that the probability is present. Just my opinion though, both are very easy to support"}}