{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/113","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/113/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/113/events","html_url":"https://github.com/chrsmith/bwapi/issues/113","id":59188909,"number":113,"title":"proposal on sneaky units","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Type-Enhancement","name":"Type-Enhancement","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-27T04:43:33Z","updated_at":"2015-02-27T04:43:34Z","closed_at":"2015-02-27T04:43:33Z","body":"```\nYou may have noticed, when there is a cloacked enemy unit, it's not quite \ninvisible, but there is a slight background distortion in place. People \neasily localize cloacked units when they are moving, but of course can not \ndestroy them until tecnically \"detected\".\n\nI suggest a new state Unit::isSneaking() which is always true when the \ncloacked unit is moving and turns false as soon as the unit stops or \nuncloakes. When isSneaking()==true you can access the unit's type and all \nmovement/order related properties like position, but cannot access any of \nthe other values like player, and ofcourse, trying to attack it would \nresult in an error.\n\nSome callback will help greatly, like onUnitSneaking.\nWhen the unit stops onUnitCloak will be called again.\n\n```\n\nOriginal issue reported on code.google.com by `goo...@teabix.com` on 18 Nov 2009 at 2:17"},"comment":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/comments/76330302","html_url":"https://github.com/chrsmith/bwapi/issues/113#issuecomment-76330302","issue_url":"https://api.github.com/repos/chrsmith/bwapi/issues/113","id":76330302,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T04:43:34Z","updated_at":"2015-02-27T04:43:34Z","body":"```\nMy bad. I never actually tried the building thing, I was assuming it would at \nleast\nwork with protoss but it obviously doesn't. So yes this obviously should be AI \nonly.\n\nYou CAN see from where a cloaked ghost is attacking, but it's only a few pixels \nfor 2\nframes or so.\nMaybe it is possible to hunt down all those things that cause SC to distort the\nterrain and use a onDistortion(Position pos) or whatever method to notify the \nAI of\nthis, and have the AI figure out what unit it is on its own. Adding size and\ncurrentSpeed (of the distortion, not necessarily the same as unit size) could be\nfairly reasonable too. I have no idea about hacking SC though, so this could be \nkinda\nhard to pull off.\nBut this certainly would allow the AI to \"see\" exactly what the player can see.\n\nBtw, is it possible to notice a Ghost's attack's impact? (I haven't looked into\nsprites in BWAPI yet) It's no bullet, I would guess. Human players also have \nsound\nwhich could be used to deduce that some distortion has to be a ghost, DT or \nwraith.\nHaven't seen any sounds stuff in BWAPI yet. It could be hard to tell the AI in \nwhich\nlocations the sound can be heard without revealing the exact location, though.\n```\n\nOriginal comment by `Heckl.Jo...@googlemail.com` on 20 Nov 2009 at 5:04"}}