Created
November 21, 2013 19:03
-
-
Save cjsaylor/7587575 to your computer and use it in GitHub Desktop.
Eliminate those pesky flyers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Find a flyer that's at the maximum range | |
var flyer = _.find(roundInfo.getMobs(), function(mob) { | |
return mob.type === 'flyer' && mob.position === 5; | |
}); | |
if (flyer) { | |
commander.target(flyer.id); | |
commander.attackMode('ranged'); | |
return; | |
} | |
// Didn't find a flyer so fallback to the first enemy | |
commander.target(_.first(roundInfo.getMobs()).id); | |
commander.attackMode('power'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment