hello
" to #display
hello
" to an HTML div with the id "display
".
hello
" to the consoleconsole
. Your Javascript code will eventually grow to become the "brains" of your Dragon A.I..
Game.attack()
function to attack enemy Dragons. Observe how your attacks are more accurate and do more damage to nearer targets. And see how your attacks are weaker for farther targets.
Game.moveTo()
function. Move close enough to defeat the enemy Dragon before time runs out.
Game.moveTo()
to get close to an Orb. Use Game.carryOrb()
to pick it up. You can only carry one Orb at a time. Return the Orbs to your floating base.
Game.setClass(unit.id, 'bighorn')
. This transforms your chosen Dragon into a hero Dragon. Hero Dragons have special abilities. "Bighorn" has beefier shields. Its attack is slightly more powerful and it can channel its attack longer before having to cool down. But since it's the biggest Dragon, it is also the slowest.
Game.setClass(unit.id, 'longtail')
. "Longtail" has the most powerful attack in the game as well as the longest range. However, its powerful attack takes longer to charge up and cool down.
Game.setClass(unit.id, 'little-wing')
. "Little Wing" is the fastest and smallest Dragon in the game. Its powerful short-range attack fires in a bursts of 3. Fly on, Little Wing.