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
/***************************************************************************** | |
Defeat the enemy hero in a duel! | |
*****************************************************************************/ | |
var SELF = this; | |
SELF.ATTACK = function (enemy, xE, yE) { | |
if (SELF.distanceTo(enemy) <= 7) { | |
SELF.attack(enemy); | |
} else { | |
if (isApproaching(enemy)) { | |
SELF.shield(); |
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 FARTHEST | |
var enemy; | |
loop { | |
var farthest = null; | |
var maxDistance = 0; | |
var enemyIndex = 0; | |
var enemies = this.findEnemies(); | |
while (enemyIndex < enemies.length) { | |
var target = enemies[enemyIndex]; |
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
/* ////////////////////////////////////////////////////// | |
// STRINGS, NUMBERS, VARIABLES AND LOOPS // | |
//////////////////////////////////////////////////////*/ | |
// 1. Single-line comments start with two slashes. | |
/* Multiline comments start with slash-star, | |
and end with star-slash */ | |
// 2. JavaScript has a number type |
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
{ - shift alt š | |
} - shift alt đ | |
[ - alt š | |
] - alt đ | |
= - shift 0 | |
< - < | |
> - shift < | |
, - , | |
; - shift , | |
. - . |
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
My Hotkeys: | |
CTRL T (in the browser) - opens a new tab | |
CTRL SHIFT T (in the browser) - reopens recently cosed tab | |
CTRL C - copy the text | |
CTRL V - paste the text |
NewerOlder