{"action":"created","issue":{"url":"https://api.github.com/repos/DemoProductions/shmup/issues/112","repository_url":"https://api.github.com/repos/DemoProductions/shmup","labels_url":"https://api.github.com/repos/DemoProductions/shmup/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/DemoProductions/shmup/issues/112/comments","events_url":"https://api.github.com/repos/DemoProductions/shmup/issues/112/events","html_url":"https://github.com/DemoProductions/shmup/issues/112","id":167416441,"number":112,"title":"Set max times a wave can spawn","user":{"login":"flip40","id":10754057,"avatar_url":"https://avatars.githubusercontent.com/u/10754057?v=3","gravatar_id":"","url":"https://api.github.com/users/flip40","html_url":"https://github.com/flip40","followers_url":"https://api.github.com/users/flip40/followers","following_url":"https://api.github.com/users/flip40/following{/other_user}","gists_url":"https://api.github.com/users/flip40/gists{/gist_id}","starred_url":"https://api.github.com/users/flip40/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flip40/subscriptions","organizations_url":"https://api.github.com/users/flip40/orgs","repos_url":"https://api.github.com/users/flip40/repos","events_url":"https://api.github.com/users/flip40/events{/privacy}","received_events_url":"https://api.github.com/users/flip40/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DemoProductions/shmup/labels/code","name":"code","color":"afffff"},{"url":"https://api.github.com/repos/DemoProductions/shmup/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"normundy","id":10818718,"avatar_url":"https://avatars.githubusercontent.com/u/10818718?v=3","gravatar_id":"","url":"https://api.github.com/users/normundy","html_url":"https://github.com/normundy","followers_url":"https://api.github.com/users/normundy/followers","following_url":"https://api.github.com/users/normundy/following{/other_user}","gists_url":"https://api.github.com/users/normundy/gists{/gist_id}","starred_url":"https://api.github.com/users/normundy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normundy/subscriptions","organizations_url":"https://api.github.com/users/normundy/orgs","repos_url":"https://api.github.com/users/normundy/repos","events_url":"https://api.github.com/users/normundy/events{/privacy}","received_events_url":"https://api.github.com/users/normundy/received_events","type":"User","site_admin":false},"assignees":[{"login":"normundy","id":10818718,"avatar_url":"https://avatars.githubusercontent.com/u/10818718?v=3","gravatar_id":"","url":"https://api.github.com/users/normundy","html_url":"https://github.com/normundy","followers_url":"https://api.github.com/users/normundy/followers","following_url":"https://api.github.com/users/normundy/following{/other_user}","gists_url":"https://api.github.com/users/normundy/gists{/gist_id}","starred_url":"https://api.github.com/users/normundy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normundy/subscriptions","organizations_url":"https://api.github.com/users/normundy/orgs","repos_url":"https://api.github.com/users/normundy/repos","events_url":"https://api.github.com/users/normundy/events{/privacy}","received_events_url":"https://api.github.com/users/normundy/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-07-25T17:05:31Z","updated_at":"2016-07-30T20:21:22Z","closed_at":null,"body":"Allow waves to only spawn a maximum number of times per level. With random wave spawning, we don't want to have levels consist entirely of the same wave if luck is bad.\r\n\r\nsee #79 discussions."},"comment":{"url":"https://api.github.com/repos/DemoProductions/shmup/issues/comments/236387955","html_url":"https://github.com/DemoProductions/shmup/issues/112#issuecomment-236387955","issue_url":"https://api.github.com/repos/DemoProductions/shmup/issues/112","id":236387955,"user":{"login":"normundy","id":10818718,"avatar_url":"https://avatars.githubusercontent.com/u/10818718?v=3","gravatar_id":"","url":"https://api.github.com/users/normundy","html_url":"https://github.com/normundy","followers_url":"https://api.github.com/users/normundy/followers","following_url":"https://api.github.com/users/normundy/following{/other_user}","gists_url":"https://api.github.com/users/normundy/gists{/gist_id}","starred_url":"https://api.github.com/users/normundy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normundy/subscriptions","organizations_url":"https://api.github.com/users/normundy/orgs","repos_url":"https://api.github.com/users/normundy/repos","events_url":"https://api.github.com/users/normundy/events{/privacy}","received_events_url":"https://api.github.com/users/normundy/received_events","type":"User","site_admin":false},"created_at":"2016-07-30T20:21:22Z","updated_at":"2016-07-30T20:21:22Z","body":"Created an array to keep track of the number of times a wave instantiated. Get a random wave index, if that wave index is one that cannot be instantiated anymore, add 1 to that index (or start from 0 if at the end of the array). \r\n\r\nWithin a level, if the **number of waves to instantiate** divided by the **maximum times a wave can instantiate** is less than the **number of types of waves to instantiate**, then the parameters set in the level would break things. Maybe can limit the values of the variables numWaves and maxTimesAWaveCanInstantiate so that this does not happen. At the moment, I just put a debug log message for when this happens. Or give some type of message in the level editor \r\n\r\nCases\r\n- numWaves / maxTimesAWaveCanInstantiate < 1 --- maxTimesAWaveCanInstantiate is greater than numWaves\r\n- numWaves / maxTimesAWaveCanInstantiate < WavesLength (number of types of waves in the level) --- Not enough types of waves in the level to handle values in numWaves and maxTimesAWaveCanInstantiate"}}
{"actor":{"display_login":"normundy"}}