Well seems I forgot to share the most recent demo of my Unity project, I’m taking a break on it, but what I managed to accomplish makes me feel all warm and fuzzy.
What I ended up with was a simple Game of Life with rabbits trying to survive. Each rabbit has a growing hunger and thirst which if not addressed will result in death. The population is also broken into male and female rabbits which can reproduce.
Check out a couple minutes of the simulation running at realtime speed:
I’ve been playing a little bit of Hearthstone lately, and heard the Mage is one of the best
I won’t say I did great, but then again it wasn’t terrible.
So I was doing a bit of research on a Diablo III API, and stumbled across this article:
It seems they are still in the early stages, but there is a Character Calculator API, and it is in JSON.
First off we need to load in our Python libraries:
>>> from urllib2 import urlopen >>> from json import loads
We can make our request using common URL methods:
>>> res = urlopen('http://us.battle.net/d3/en/data/calculator/monk').read() >>> monk = loads(res)
Now we are given a simple Python dictionary:
>>> monk.keys() [u'skills', u'traits']
And like most APIs these keys contain a list of objects:
>>> type(monk['skills']) <type 'list'> >>> type(monk['skills']) <type 'dict'> >>> monk['skills'].keys() [u'tooltipParams', u'name', u'runes', u'simpleDescription', u'description', u'primary', u'slug', u'requiredLevel', u'categoryName', u'categorySlug', u'icon']
So far so good, lets go ahead and itter over all our skills and get their names:
>>> for skill in sorted(monk['skills']): ... print skill['name'] ... Blinding Flash Serenity Breath of Heaven Inner Sanctuary Mystic Ally Cyclone Strike Seven-Sided Strike Mantra of Conviction Mantra of Healing Mantra of Retribution Mantra of Evasion Deadly Reach Way of the Hundred Fists Fists of Thunder Crippling Wave Tempest Rush Lashing Tail Kick Wave of Light Dashing Strike Exploding Palm Sweeping Wind
So there you have it, using one of the new Diablo III APIs to get class information.