Ace of Coders 2016 Quickstart

Ace of Coders 2016 Quickstart

Ace of Coders 2016 Quickstart The Battle of Sky Span CodeCombat Outline API Reference summon command Basics Unit Overview Wizard Soldier / Archer Griffin Rider / Paladin Knight / Goliath Trapper / Ninja Librarian / Necromancer Cheat Sheet API Reference The hero has access many methods. Understanding what they do and what they return is important. In-game API references are provided underneath the code editor. A sampling of methods available for thangs: I distanceTo(target) returns a number of the distance to target unit. I findByType(stringType[, arrayToSearch]) returns an array of units that have type stringType. If the optional argument arrayToSearch is provided, it filters through the given array. I findEnemies() returns an array of all alive units on the enemy team. I findFriends() returns an array of all alive units on your team. I findNearest(arrayToSearch) returns the nearest unit from a provided array. I findNearestEnemy() returns the nearest alive unit on the enemy team. I findNearestFriend() returns the nearest alive unit on your team. I findEnemyMissiles() returns an array of projectiles fired by enemy units. A sampling of properties available for thangs: I id is the unit identifier and name of a unit. I health is the amount of health a unit currently has. I pos an object of with x and y properties which represents the unit’s position. I target what the unit is currently targeting with an ability or attack or casting. I type the unit’s type. I team which team the unit is on "humans" and "ogres" are the two teams. I maxHealth the max amount of health a unit can have. I attackRange the distance in meters a unit can attack. I attackDamage how much damage a unit deals I rotation is the direction a unit is facing in radians. hero.summon(stringType) The method hero.summon(stringType) will attempt to summon a unit based on what string is passed in. Possible types are: I "soldier" I "archer" I "griffin-rider" I "paladin" I "knight" I "goliath" I "trapper" I "ninja" I "librarian" I "necromancer" Note: Each unit costs a certain amount of gold. Be sure to compare the cost of a unit against the amount of gold the hero has. Attempting to summon a unit will cause the hero to pause until they have the required amount of gold. // Summona soldier if the hero has enough gold to afford one. if(hero.gold >= hero.costOf("soldier")) { hero.summon("soldier"); } hero.command(unit, stringMethodName, arg1, arg2, arg3) Basics hero.command(unit, stringCommand, arg1, arg2, arg3) is used to command a unit. The unit must be on the hero’s team and must be alive. It performs the stringMethodName on target unit and passes arg1, arg2, and arg3 as arguments. I unit should be an alive unit under your control, or you may error out. I stringMethod is a relevant command for the unit to perform. The three commands shared by all units are: I "move" I "attack" I "defend" I arg1, arg2, and arg3 are the first, second, and third arguments to be passed into the unit’s stringMethodName. These are method specific, so each function will be different. // Tell the nearest friend to attack the nearest enemy. var friend= hero.findNearestFriend(); var enemy= hero.findNearestEnemy(); hero.command(friend,"attack", enemy); Unit Overview Wizard Type HP Dmg AtkSpd AtkRng Spd Cost "wizard-thorn" 1834hp — — — 4m/s — This is the hero. Can be red, or blue. Keep yours alive to come out victorious! Be sure to mouse over the APIs below the code area. Unit Overview Soldier / Archer Type HP Dmg AtkSpd AtkRng Spd Cost Type HP Dmg AtkSpd AtkRng Spd Cost "soldier" 200hp 6hp 0.5s 3m 6m/s 20gold "archer" 30hp 13hp 0.5s 25m 9m/s 25gold The humble foot soldier. Do not underestimate his usefulness on the Archers are long-range damage-dealing units. With a proper front line battlefield! With 200 health for 20 gold, the Soldier is great at filling out the established, Archers can tear through the enemy line if left undisturbed. front lines. However, with 30 health, they run the risk of a strong wind knocking them out. Unit Overview Griffin Rider / Paladin Type HP Dmg AtkSpd AtkRng Spd Cost Type HP Dmg AtkSpd AtkRng Spd Cost "griffin-rider" 160hp 20hp 0.5s 20m 20m/s 65gold "paladin" 600hp 20hp 0.4s 3m 8m/s 85gold Griffin Riders are powerful aerial units capable of throwing a spear hard Paladins are defenders of light! High health, high damage units that have enough to knock units around. With their immense speed and high damage, unique utility. They can cast "heal" and use the ability "shield". However, they are great at taking out high-value targets. such benefits are not without cost, and their price in gold is great! "shield" - Reduces incoming damage by 50% while shielding. "heal" - Heals target unit for 200hp. 5s cooldown. 30m range. // Commandinga paladin to heal their nearest friend var friends= hero.findFriends(); var paladin= hero.findNearest(hero.findByType("paladin", friends)); var friend= paladin.findNearest(friends) if(paladin&& friend&& paladin.canCast("heal")) { if(friend.health< friend.maxHealth - 200) { hero.command(paladin,"heal", friend); } } // Shielding against attacking enemies var paladin= hero.findByType("paladin", hero.findFriends())[0]; if(paladin){ var enemy= paladin.findNearestEnemy(); if(enemy.target == paladin){ hero.command(paladin,"shield"); } } Unit Overview Knight / Goliath Type HP Dmg AtkSpd AtkRng Spd Cost Type HP Dmg AtkSpd AtkRng Spd Cost "knight" 800hp 20hp 0.5s 3m 6m/s 100gold "goliath" 600hp 60hp 1s 5m 4m/s 100gold The noble Knight! A true hero with the highest potential health and many The mighty Goliath from the depths of the desert is a capable warrior. Able abilities to help the frontline. Capable of being commanded to: "shield", to use "warcry", "stomp", "hurl" the massive hero can turn the tide of "cleave", and "bash", he is great for anchoring down and preventing all from battle. passing. "warcry" - Nearby units within 10m get +30% haste factor for 5s. "shield" - Reduces incoming damage by 75% while shielding. Movement and attacking increased. 10s cooldown. "cleave" - Deal 65 damage to all enemy units in a 15m radius. 10s "stomp" - A high-knockback AoE attack that damages enemy units. Deals cooldown. up to 75 damage to nearby units in a 15m radius. 10s cooldown. "bash" - Strike a unit for 100 damage, with high knockback. 6s cooldown. "hurl" - Grab, deal 50 damage, and toss a unit behind the Goliath. 5s cooldown. // Commanda knight to bash and cleave when ready: var friends= hero.findFriends(); // Hurl enemiesa lot: var knight= hero.findByType("knight", friends)[0]; var goliaths= hero.findByType("goliath", hero.findFriends()); if(knight){ for(vari = 0;i< goliaths.length;i++) { var enemy= knight.findNearestEnemy(); var goliath= goliaths[i]; if(enemy){ var enemy= goliath.findNearestEnemy(); if(knight.isReady("bash")) { if(enemy&& goliath.isReady("hurl")) { hero.command(knight,"bash", enemy); hero.command(goliath,"hurl", enemy); } else if(knight.isReady("cleave")) { } hero.command(knight,"cleave", enemy); } } else{ hero.command(knight,"attack", enemy); } } } Unit Overview Trapper / Ninja Type HP Dmg AtkSpd AtkRng Spd Cost Type HP Dmg AtkSpd AtkRng Spd Cost "trapper" 250hp 12hp 1s 45m 6m/s 100gold "ninja" 150hp 20hp 0.7s 25m 10m/s 100gold The long range Trapper is a deadly sniper. Capable of dealing damage from The Ninja is a fast, high-damage hero. Employing a dangerous backstabbing incredible distances. But a trapper wouldn’t be a trapper without being able dagger, and bouncy razordiscs she is a terror in the shadows. Be sure to use to build traps! Use "throw", "buildXY","beartrap" , and "scattershot" to "throw", "backstab", and "dash". help on the battlefield. "throw" - Throws a razordisc which damages the first enemy unit it touches. "throw" - Throws an explosive potion which deals area of effect damage to Can bounce off walls. 80m range, deals 200 damage, 5s cooldown. all units in the blast radius. 30m throw range, 35 damage, 7.5s cooldown, "backstab" - A melee attack that does massive damage when behind a unit. 15m blast radius. Deals 500 damage when behind a unit, 5s cooldown. "buildXY" - "beartrap" can trap a unit that steps on it. Takes 4s to build a "dash" - Quickly move towards a target position. 5s cooldown. trap. // Dash ina random direction. "scattershot" - Fires 10 bullets in 45 degree arc towards target unit, var friends= hero.findFriends(); position, or just in front of the trapper. 7.5s cooldown. for(vari = 0;i< friends.length;i++) { // Build lots of bear traps, forever. var friend= friends[i]; hero.summon("trapper"); if(friend.type =="ninja"){ var trapper= hero.findByType("trapper", hero.findFriends()); var xRand = -1 + Math.random() * 2; while(true){ var yRand = -1 + Math.random() * 2; if(trapper){ hero.command(friend,"dash",{x:xRand,y:yRand}); var xPos= trapper.pos.x; } var yPos= trapper.pos.y; } hero.command(trapper,"buildXY","bear-trap", xPos, yPos); } } Unit Overview Librarian / Necromancer Type HP Dmg AtkSpd AtkRng Spd Cost Type HP Dmg AtkSpd AtkRng Spd Cost "librarian" 150hp 8hp 0.5s 30m 7m/s 100gold "necromancer" 100hp 8hp 0.5s 20m 10m/s 100gold The Librarian is a useful support hero capable of buffing heroes and shooting The nefarious Necromancer is a master of the dead. Able to tap into the very massive force-bolts. All of her abilities are spells so be sure to use "cast" life force of units and mangle it in unspeakable ways. Being a caster, all his when commanding her: "grow", "haste", and "force-bolt". abilities must be "cast", such as: "soul-link", "summon-undead", and "sacrifice". "grow" - Increases a unit’s health by 3x, slows their speed down to 1/3 their Spd. 5s duration, 10s cooldown, 30m cast range.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us