Combined Code
frame 1 {
function munculkanTombol() {
load_txt.text = 'PLAY';
play_btn._visible = true;
play_btn.onRelease = function () {
play();
};
clearInterval(summaryTombol);
}
stop();
fscommand('showmenu', false);
fscommand('allowscale', false);
fscommand('trapallkeys', true);
_urlStart = _url.indexOf('://') + 3;
_urlEnd = _url.indexOf('/', _urlStart);
domain = _url.substring(_urlStart, _urlEnd);
LastDot = domain.lastIndexOf('.') - 1;
domEnd = domain.lastIndexOf('.', LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain == 'playhub.com' || domain == 'addictinggames.com' || domain == 'agame.com' || domain == 'freeonlinegames.com' || domain == 'kongregate.com' || domain == 'nextplay.com') {
trace('domain for ads filtered');
} else {
var CPMStarContentSpotID = '3302QD35F5D7B';
System.security.allowDomain('server.cpmstar.com');
adBox.loadMovie('http://server.cpmstar.com/adviewas2.swf?contentspotid=' + CPMStarContentSpotID);
}
sponsor_btn.onRelease = function () {
getURL('http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=squadron_auriga&utm_source=ingame&utm_content=ingame&logo=2', '_blank');
};
funever_btn.onRelease = function () {
getURL('http://www.funevergames.com/', '_blank');
};
play_btn._visible = false;
preload = true;
this.onEnterFrame = function () {
if (preload == true) {
now = getBytesLoaded();
tot = getBytesTotal();
persen = Math.round((now / tot) * 100);
load_txt.text = 'Loading.. ' + persen + '%';
preloaderBar_mc._xscale = persen;
if (persen == 100) {
var v1 = setInterval(munculkanTombol, 5000);
preload = false;
}
}
};
var rightClick = new ContextMenu();
rightClick.hideBuiltInItems();
_root.menu = rightClick;
}
movieClip 11 {
}
// unknown tag 88 length 133
movieClip 15 {
}
movieClip 17 {
}
movieClip 18 {
}
movieClip 20 {
}
movieClip 22 {
}
movieClip 24 {
}
movieClip 26 {
}
movieClip 29 {
}
movieClip 30 {
frame 1 {
gotoAndPlay(random(40) + 2);
}
}
movieClip 32 {
frame 1 {
stop();
this._alpha = 0;
}
}
movieClip 33 {
}
movieClip 36 {
}
frame 2 {
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = '__mochibot__';
mbc = 'mochibot.com';
g = _global ? _global : _level0._root;
if (g[mb + swfid]) {
return g[mb + swfid];
}
s = System.security;
x = mc._root.getSWFVersion;
fv = x ? mc.getSWFVersion() : (_global ? 6 : 5);
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == 'localWithFile') {
return null;
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = (fv == 5) ? /:$version : System.capabilities.version;
u = 'http://' + mbc + '/my/core.swf?mv=8&fv=' + fv + '&v=' + escape(pv) + '&swfid=' + escape(swfid) + '&l=' + lv + '&f=' + mc + (sb ? '&sb=' + sb : '') + (trk ? '&t=1' : '');
lv = fv > 6 ? mc.getNextHighestDepth() : (g[mb + 'level'] ? g[mb + 'level'] + 1 : lv);
g[mb + 'level'] = lv;
if (fv == 5) {
res = '_level' + lv;
if (!eval(res)) {
loadMovieNum(u, lv);
}
return res;
}
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
return res;
}
stop();
removeMovieClip(adBox);
__com_mochibot__('74d84e71', this, 10301, true);
_urlStart = _url.indexOf('://') + 3;
_urlEnd = _url.indexOf('/', _urlStart);
domain = _url.substring(_urlStart, _urlEnd);
LastDot = domain.lastIndexOf('.') - 1;
domEnd = domain.lastIndexOf('.', LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain == 'funevergames.com') {
gotoAndStop('logo');
} else {
stop();
gotoAndStop('logo');
}
}
// unknown tag 88 length 306
frame 3 {
gotoAndStop(_currentframe - 1);
}
movieClip 44 {
}
movieClip 48 Strategy_notifAbove {
}
movieClip 51 Cursor_target {
}
movieClip 56 {
}
movieClip 57 Benteng2 {
}
movieClip 62 {
}
movieClip 63 Benteng1 {
}
movieClip 68 {
}
movieClip 69 Benteng3 {
}
movieClip 79 Benteng4 {
}
movieClip 82 BG_back1 {
}
movieClip 85 BG_back2 {
}
movieClip 88 {
}
movieClip 91 BG_plate2 {
}
movieClip 93 BG_plate1 {
}
movieClip 96 BG_back3 {
}
movieClip 99 BG_plate3 {
}
movieClip 102 BG_back4 {
}
movieClip 105 BG_plate4 {
}
movieClip 108 Benteng6 {
}
movieClip 111 BG_back5 {
}
movieClip 116 {
}
movieClip 119 Benteng5 {
}
movieClip 122 BG_plate5 {
}
movieClip 125 BG_back6 {
}
movieClip 128 BG_plate6 {
}
movieClip 131 BG_back7 {
}
movieClip 134 BG_back8 {
}
movieClip 137 BG_back9 {
}
movieClip 140 BG_back10 {
}
movieClip 143 BG_back11 {
}
movieClip 146 BG_back12 {
}
movieClip 149 BG_plate7 {
}
movieClip 152 BG_plate8 {
}
movieClip 155 BG_plate9 {
}
movieClip 158 BG_plate11 {
}
movieClip 161 BG_plate10 {
}
movieClip 164 BG_plate12front {
}
movieClip 167 blood1_1 {
}
movieClip 170 blood2_1 {
}
movieClip 183 Debu {
frame 7 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 204 Explossion1 {
frame 18 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 215 {
}
movieClip 234 {
}
movieClip 237 {
}
movieClip 254 {
}
movieClip 266 {
}
movieClip 269 {
}
movieClip 280 {
}
movieClip 284 {
}
movieClip 287 {
}
movieClip 329 {
}
movieClip 334 {
}
movieClip 336 {
}
// unknown tag 88 length 64
movieClip 344 {
}
movieClip 348 {
}
movieClip 349 {
}
movieClip 350 {
}
button 358 {
on (release) {
getURL('http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=squadron_auriga&utm_source=ingame&utm_content=ingame&logo=2', '_blank');
}
}
movieClip 359 Interface {
}
movieClip 360 {
}
movieClip 361 Lifebar_unit {
}
movieClip 364 minimapUnit2 {
}
movieClip 367 minimapUnit1 {
}
movieClip 382 Musuh1_1 {
}
movieClip 389 Musuh1_2 {
}
movieClip 394 Musuh1_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 10 {
_parent.damaging = true;
}
frame 12 {
_parent.damaging = false;
}
frame 15 {
stop();
_parent.sasaran = undefined;
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 399 Musuh1_4 {
frame 1 {
_parent.isAttacking = true;
}
frame 10 {
_parent.damaging = true;
}
frame 12 {
_parent.damaging = false;
}
frame 15 {
stop();
_parent.sasaran = undefined;
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 401 Musuh1_part1 {
}
movieClip 403 Musuh1_part2 {
}
movieClip 405 Musuh1_part3 {
}
movieClip 407 Musuh1_part4 {
}
movieClip 408 Musuh1_part5 {
}
movieClip 410 Musuh1_part6 {
}
movieClip 424 Musuh2_1 {
}
movieClip 431 Musuh2_2 {
}
movieClip 466 Musuh2_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 100 {
_parent.damaging = true;
}
frame 101 {
_parent.damaging = false;
}
frame 131 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 469 Nest1 {
}
movieClip 487 Pasukan1_1 {
}
movieClip 494 Pasukan1_2 {
}
movieClip 502 {
}
movieClip 507 Pasukan7_1 {
}
movieClip 512 {
}
movieClip 513 Pasukan7_2 {
}
movieClip 516 Peluru1 {
}
movieClip 519 Peluru2 {
}
movieClip 522 Peluru4 {
}
movieClip 529 rollover_effect1 {
frame 6 {
stop();
this.deskripsi.text = this.des;
}
}
movieClip 531 {
}
movieClip 532 spark {
frame 16 {
this.removeMovieClip();
}
}
movieClip 533 spark2 {
frame 16 {
this.removeMovieClip();
}
}
movieClip 551 Benteng_belakang {
}
movieClip 554 Benteng7 {
}
movieClip 557 Benteng8 {
}
movieClip 560 Benteng9 {
}
movieClip 563 Benteng0 {
}
movieClip 565 {
}
movieClip 567 {
frame 1 {
stop();
}
}
// unknown tag 88 length 133
movieClip 574 {
}
movieClip 597 {
}
movieClip 621 {
}
movieClip 624 {
}
movieClip 625 Strategy_info {
frame 1 {
stop();
}
}
movieClip 635 Musuh3_1 {
}
movieClip 642 Musuh3_2 {
}
movieClip 648 Musuh3_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 28 {
_parent.damaging = true;
}
frame 30 {
_parent.damaging = false;
}
frame 32 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 704 Musuh3_4 {
frame 1 {
_parent.isAttacking = true;
}
frame 10 {
_parent.damaging = true;
}
frame 20 {
_parent.damaging = false;
}
frame 50 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 707 Peluru3 {
}
movieClip 719 Pasukan2_1 {
}
movieClip 726 Pasukan2_2 {
}
movieClip 744 Pasukan3_1 {
}
movieClip 751 Pasukan3_2 {
}
movieClip 770 Peluru5 {
frame 28 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 794 Musuh1_6 {
frame 91 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 815 Musuh2_6 {
frame 1 {
_parent.damaging = false;
}
frame 81 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 831 Musuh3_6 {
frame 1 {
_parent.damaging = false;
}
frame 72 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 843 Pasukan1_6 {
frame 1 {
_parent.damaging = false;
}
frame 50 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 853 Pasukan2_6 {
frame 1 {
_parent.damaging = false;
}
frame 41 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 865 Pasukan3_6 {
frame 1 {
_parent.damaging = false;
}
frame 36 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 886 Pasukan7_6 {
frame 1 {
_parent.damaging = false;
}
frame 27 {
_root.addExplosionHoax(_parent, 1);
}
frame 87 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 897 Pasukan4_1 {
}
movieClip 904 Pasukan4_2 {
}
movieClip 917 Pasukan4_6 {
frame 1 {
_parent.damaging = false;
}
frame 56 {
_root.addExplosionHoax(_parent, 2);
}
frame 114 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 935 Pasukan5_1 {
}
movieClip 943 Pasukan5_2 {
}
movieClip 949 Pasukan5_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 10 {
_parent.damaging = true;
}
frame 12 {
_parent.damaging = false;
}
frame 21 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 956 Pasukan5_4 {
frame 1 {
_parent.isAttacking = true;
}
frame 10 {
_parent.damaging = true;
}
frame 12 {
_parent.damaging = false;
}
frame 20 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 961 Pasukan5_6 {
frame 1 {
_parent.damaging = false;
}
frame 16 {
_root.addExplosionHoax(_parent, 2);
}
frame 83 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 970 Pasukan6_1 {
}
movieClip 975 Pasukan6_2 {
}
movieClip 981 Pasukan6_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 4 {
_parent.damaging = true;
}
frame 35 {
_parent.damaging = false;
}
frame 62 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 998 Pasukan6_6 {
frame 1 {
_parent.damaging = false;
}
frame 28 {
stop();
_root.addExplosionHoax(_parent, 2);
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 1007 Peluru6 {
}
movieClip 1013 {
}
movieClip 1015 Cursor_strategy {
}
movieClip 1019 Strategy_info_rollover {
}
movieClip 1034 {
}
movieClip 1039 Musuh4_1 {
}
movieClip 1052 Musuh4_2 {
}
movieClip 1064 Musuh4_6 {
frame 1 {
_parent.damaging = false;
}
frame 39 {
stop();
_parent.explode();
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 1080 Musuh5_1 {
}
movieClip 1087 Musuh5_2 {
}
movieClip 1095 Musuh5_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 26 {
_parent.damaging = true;
}
frame 29 {
_parent.damaging = false;
}
frame 45 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1111 Musuh5_4 {
frame 1 {
_parent.isAttacking = true;
}
frame 10 {
_parent.damaging = true;
}
frame 12 {
_parent.damaging = false;
}
frame 17 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1138 Musuh5_6 {
frame 84 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 1156 Strategy_attackfrom {
}
movieClip 1158 Musuh5_part1 {
}
movieClip 1160 Musuh5_part2 {
}
movieClip 1162 Musuh5_part3 {
}
movieClip 1164 Musuh5_part4 {
}
movieClip 1166 Musuh5_part5 {
}
movieClip 1168 Musuh5_part6 {
}
movieClip 1182 Musuh6_1 {
}
movieClip 1189 Musuh6_2 {
}
movieClip 1197 Musuh6_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 20 {
_parent.damaging = true;
}
frame 23 {
_parent.damaging = false;
}
frame 35 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1201 Musuh6_4 {
frame 1 {
_parent.isAttacking = true;
}
frame 20 {
_parent.damaging = true;
}
frame 23 {
_parent.damaging = false;
}
frame 35 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1226 Musuh6_6 {
frame 67 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 1228 Strategy_notifUnlock {
}
movieClip 1242 Musuh7_1 {
}
movieClip 1249 Musuh7_2 {
}
movieClip 1262 Musuh7_6 {
frame 59 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 1279 Musuh7_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 20 {
_parent.damaging = true;
}
frame 22 {
_parent.damaging = false;
}
frame 34 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1281 Peluru7 {
}
movieClip 1283 Musuh7_part1 {
}
movieClip 1285 Musuh7_part2 {
}
movieClip 1287 Musuh7_part3 {
}
movieClip 1289 Musuh7_part4 {
}
movieClip 1305 {
}
movieClip 1313 Musuh8_1 {
}
movieClip 1320 Musuh8_2 {
}
movieClip 1328 Musuh8_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 21 {
_parent.damaging = true;
}
frame 26 {
_parent.damaging = false;
}
frame 29 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1344 Musuh8_6 {
frame 53 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 1347 {
}
movieClip 1348 Peluru8 {
}
movieClip 1350 Musuh8_part1 {
}
movieClip 1351 Musuh8_part2 {
}
movieClip 1353 Musuh8_part3 {
}
movieClip 1355 Musuh8_part4 {
}
movieClip 1357 Musuh8_part5 {
}
movieClip 1359 Musuh8_part6 {
}
movieClip 1367 Parachute_bomb {
}
movieClip 1370 Cursor_target2 {
}
movieClip 1374 Supply_drop {
}
movieClip 1377 Cursor_supply {
}
movieClip 1384 {
}
movieClip 1385 Reinforcement_jet {
}
movieClip 1387 Reinforcement_bomb {
}
movieClip 1390 Frozzen_bomb {
}
movieClip 1407 ExplossionIce {
frame 19 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 1409 healingLasser {
}
movieClip 1419 Pasukan2_4 {
frame 1 {
_parent.isAttacking = true;
}
frame 12 {
_parent.damaging = true;
}
frame 15 {
_parent.damaging = false;
}
frame 28 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 1438 Pasukan4_4 {
frame 1 {
_parent.isAttacking = true;
}
frame 13 {
_parent.damaging = true;
}
frame 15 {
_parent.damaging = false;
}
frame 27 {
_parent.damaging = true;
}
frame 34 {
_parent.damaging = false;
}
frame 52 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 1440 Pasukan1_part1 {
}
movieClip 1442 Pasukan1_part2 {
}
movieClip 1444 Pasukan1_part3 {
}
movieClip 1451 Musuh1_5 {
frame 1 {
_parent.isAttacking = true;
}
frame 21 {
_parent.damaging = true;
}
frame 25 {
_parent.damaging = false;
}
frame 38 {
_parent.isAttacking = false;
}
frame 39 {
stop();
_parent.timerSpecial = 0;
_parent.isSpecial = false;
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1466 Musuh6_5 {
frame 1 {
_parent.isAttacking = true;
}
frame 30 {
_parent.damaging = true;
}
frame 52 {
_parent.damaging = false;
}
frame 61 {
stop();
_parent.timerSpecial = 0;
_parent.isSpecial = false;
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1475 Pasukan1_3_1 {
frame 1 {
_parent.isAttacking = true;
}
frame 23 {
_parent.damaging = true;
}
frame 30 {
_parent.damaging = false;
}
frame 39 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 1479 Pasukan1_3_2 {
frame 1 {
_parent.isAttacking = true;
}
frame 23 {
_parent.damaging = true;
}
frame 30 {
_parent.damaging = false;
}
frame 39 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 1484 Pasukan1_3_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 23 {
_parent.damaging = true;
}
frame 30 {
_parent.damaging = false;
}
frame 39 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 1489 Pasukan1_5_2 {
frame 1 {
_parent.isAttacking = true;
}
frame 23 {
_parent.damaging = true;
}
frame 25 {
_parent.damaging = false;
}
frame 33 {
stop();
_parent.timerSpecial = 0;
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 1492 Pasukan1_5_1 {
frame 1 {
_parent.isAttacking = true;
}
frame 23 {
_parent.damaging = true;
}
frame 25 {
_parent.damaging = false;
}
frame 33 {
stop();
_parent.timerSpecial = 0;
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 1496 Pasukan1_5_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 23 {
_parent.damaging = true;
}
frame 25 {
_parent.damaging = false;
}
frame 33 {
stop();
_parent.timerSpecial = 0;
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 1499 Peluru2_2 {
}
movieClip 1507 Pasukan1_4_1 {
frame 1 {
_parent.isAttacking = true;
}
frame 16 {
_parent.damaging = true;
}
frame 19 {
_parent.damaging = false;
}
frame 27 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 1514 Pasukan1_4_2 {
frame 1 {
_parent.isAttacking = true;
}
frame 8 {
_parent.damaging = true;
}
frame 11 {
_parent.damaging = false;
}
frame 27 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 1529 rage {
}
movieClip 1537 Musuh3_5 {
frame 1 {
_parent.isAttacking = true;
}
frame 33 {
_parent.damaging = true;
}
frame 35 {
_parent.damaging = false;
}
frame 66 {
stop();
_parent.timerSpecial = 0;
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1539 Pasukan2_part1 {
}
movieClip 1541 Pasukan2_part2 {
}
movieClip 1543 Pasukan2_part3 {
}
movieClip 1552 Pasukan2_3_1 {
frame 1 {
_parent.isAttacking = true;
}
frame 33 {
_parent.damaging = true;
}
frame 35 {
_parent.damaging = false;
}
frame 48 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1556 Pasukan2_3_2 {
frame 1 {
_parent.isAttacking = true;
}
frame 33 {
_parent.damaging = true;
}
frame 35 {
_parent.damaging = false;
}
frame 48 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1564 Pasukan2_3_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 33 {
_parent.damaging = true;
}
frame 35 {
_parent.damaging = false;
}
frame 48 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1566 Pasukan3_part1 {
}
movieClip 1568 Pasukan3_part2 {
}
movieClip 1570 Pasukan3_part3 {
}
movieClip 1581 Peluru9 {
frame 18 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 1587 Pasukan3_3_1 {
frame 1 {
_parent.isAttacking = true;
}
frame 22 {
_parent.damaging = true;
}
frame 38 {
_parent.damaging = false;
}
frame 53 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1590 Pasukan3_3_2 {
frame 1 {
_parent.isAttacking = true;
}
frame 22 {
_parent.damaging = true;
}
frame 38 {
_parent.damaging = false;
}
frame 53 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1593 Pasukan3_3_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 22 {
_parent.damaging = true;
}
frame 38 {
_parent.damaging = false;
}
frame 53 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1598 {
}
movieClip 1599 {
}
movieClip 1600 Interface_minimap1 {
}
movieClip 1603 Interface_minimap2 {
}
movieClip 1606 Interface_minimap3 {
}
movieClip 1608 Interface_minimap_frame1 {
}
movieClip 1610 Interface_minimap_frame2 {
}
movieClip 1612 Interface_minimap_frame3 {
}
movieClip 1614 Interface_minimap_frame4 {
}
movieClip 1616 Interface_minimap_frame5 {
}
movieClip 1618 Interface_minimap_frame6 {
}
movieClip 1620 Interface_minimap_frame7 {
}
movieClip 1622 Interface_minimap_frame8 {
}
movieClip 1624 Interface_minimap_frame9 {
}
movieClip 1626 Interface_minimap_frame10 {
}
movieClip 1628 Interface_minimap_frame11 {
}
movieClip 1630 Interface_minimap_frame12 {
}
movieClip 1645 Pasukan4_3_1 {
frame 1 {
_parent.isAttacking = true;
}
frame 15 {
_parent.damaging = true;
}
frame 45 {
_parent.damaging = false;
}
frame 74 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1653 Pasukan4_3_2 {
frame 1 {
_parent.isAttacking = true;
}
frame 15 {
_parent.damaging = true;
}
frame 45 {
_parent.damaging = false;
}
frame 74 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1664 Pasukan4_3_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 15 {
_parent.damaging = true;
}
frame 45 {
_parent.damaging = false;
}
frame 74 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1671 Strategy_enemyAttack {
}
movieClip 1675 Peluru10 {
}
movieClip 1694 Pasukan7_5 {
frame 1 {
_parent.isAttacking = true;
}
frame 32 {
_parent.damaging = true;
}
frame 33 {
_parent.damaging = false;
}
frame 62 {
stop();
_parent.timerSpecial = 0;
_parent.isSpecial = false;
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1701 Pasukan4_5 {
frame 1 {
_parent.isAttacking = true;
}
frame 19 {
_parent.damaging = true;
}
frame 20 {
_parent.damaging = false;
}
frame 44 {
stop();
_parent.timerSpecial = 0;
_parent.isSpecial = false;
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1710 Popup_result {
}
movieClip 1713 Peluru6_particle {
}
movieClip 1716 smoke1 {
}
movieClip 1719 BG_plate1front {
}
movieClip 1722 BG_plate2front {
}
movieClip 1736 Pasukan5_5 {
frame 1 {
_parent.isAttacking = true;
}
frame 3 {
_parent.damaging = true;
}
frame 18 {
_parent.damaging = false;
}
frame 20 {
stop();
_parent.timerSpecial = 0;
_parent.isSpecial = false;
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1741 Pasukan7_3_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 25 {
_parent.damaging = true;
}
frame 26 {
_parent.damaging = false;
}
frame 40 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1745 Pasukan7_3_2 {
frame 1 {
_parent.isAttacking = true;
}
frame 25 {
_parent.damaging = true;
}
frame 26 {
_parent.damaging = false;
}
frame 40 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1750 Pasukan7_3_1 {
frame 1 {
_parent.isAttacking = true;
}
frame 25 {
_parent.damaging = true;
}
frame 26 {
_parent.damaging = false;
}
frame 40 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1752 {
}
movieClip 1753 particle1 {
}
movieClip 1764 api_mc1 {
}
movieClip 1767 BG_plate3front {
}
movieClip 1768 Pasukan5_shade {
}
movieClip 1771 BG_plate4front {
}
movieClip 1774 BG_plate5front {
}
movieClip 1777 BG_plate6front {
}
movieClip 1780 BG_plate7front {
}
movieClip 1783 BG_plate8front {
}
movieClip 1786 BG_plate9front {
}
movieClip 1789 BG_plate10front {
}
movieClip 1792 BG_plate11front {
}
movieClip 1805 Musuh9_1 {
}
movieClip 1806 Musuh9_2 {
}
movieClip 1814 Musuh9_6 {
frame 1 {
_parent.damaging = false;
}
frame 39 {
stop();
_parent.explode();
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 1830 Musuh10_1 {
}
movieClip 1837 Musuh10_2 {
}
movieClip 1842 Musuh10_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 14 {
_parent.damaging = true;
}
frame 17 {
_parent.damaging = false;
}
frame 29 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1846 Musuh10_4 {
frame 1 {
_parent.isAttacking = true;
}
frame 16 {
_parent.damaging = true;
}
frame 19 {
_parent.damaging = false;
}
frame 21 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1856 Musuh10_5 {
frame 1 {
_parent.isAttacking = true;
}
frame 30 {
_parent.damaging = true;
}
frame 32 {
_parent.damaging = false;
}
frame 66 {
stop();
_parent.timerSpecial = 0;
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1869 Musuh10_6 {
frame 60 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 1887 Musuh11_1 {
}
movieClip 1894 Musuh11_2 {
}
movieClip 1903 Musuh11_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 9 {
_parent.damaging = true;
}
frame 14 {
_parent.damaging = false;
}
frame 26 {
_parent.damaging = true;
}
frame 30 {
_parent.damaging = false;
}
frame 53 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1921 Musuh11_5 {
frame 1 {
_parent.isAttacking = true;
}
frame 29 {
_parent.damaging = true;
}
frame 31 {
_parent.damaging = false;
}
frame 42 {
stop();
_parent.timerSpecial = 0;
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1942 Musuh11_6 {
frame 75 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 1950 pointer_mc {
frame 56 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 1976 Musuh12_1 {
}
movieClip 1977 Musuh12_2 {
}
movieClip 1983 Musuh12_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 21 {
_parent.damaging = true;
}
frame 35 {
_parent.damaging = false;
}
frame 46 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 1999 Musuh12_6 {
frame 60 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 2027 Musuh12_5 {
frame 1 {
_parent.isAttacking = true;
}
frame 41 {
_parent.goingJump((_parent.sasaran._x - _parent._x) / 15 + random(5));
_parent.jumping = true;
}
frame 46 {
stop();
}
frame 55 {
_parent.jumping = false;
}
frame 86 {
_parent.damaging = true;
}
frame 106 {
_parent.damaging = false;
}
frame 120 {
_parent.isSpecial = false;
}
frame 121 {
stop();
_parent.timerSpecial = 0;
_parent.isSpecial = false;
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 2030 BG_plate12 {
}
movieClip 2035 {
}
movieClip 2049 {
}
movieClip 2050 {
frame 6 {
stop();
}
}
// unknown tag 88 length 313
movieClip 2053 Dialog_bar {
}
movieClip 2056 rollover_mc_battle {
}
movieClip 2062 popup_battle {
}
movieClip 2078 Pasukan8_1 {
}
movieClip 2085 Pasukan8_2 {
}
movieClip 2093 Pasukan8_3_1 {
frame 1 {
_parent.isAttacking = true;
}
frame 15 {
_parent.damaging = true;
}
frame 18 {
_parent.damaging = false;
}
frame 34 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 2099 Pasukan8_3_2 {
frame 1 {
_parent.isAttacking = true;
}
frame 18 {
_parent.damaging = true;
}
frame 22 {
_parent.damaging = false;
}
frame 26 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 2108 Pasukan8_5 {
frame 1 {
_parent.isAttacking = true;
}
frame 35 {
_parent.damaging = true;
}
frame 37 {
_parent.damaging = false;
}
frame 47 {
stop();
_parent.timerSpecial = 0;
_parent.isSpecial = false;
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 2117 Pasukan8_6 {
frame 1 {
_parent.damaging = false;
}
frame 25 {
_root.addExplosionHoax(_parent, 1);
}
frame 80 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 2123 Pasukan8_3_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 20 {
_parent.damaging = true;
}
frame 24 {
_parent.damaging = false;
}
frame 29 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 2141 Musuh13_1 {
}
movieClip 2148 Musuh13_2 {
}
movieClip 2153 Musuh13_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 17 {
_parent.damaging = true;
}
frame 18 {
_parent.damaging = false;
}
frame 20 {
stop();
_parent.sasaran = undefined;
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 2169 Musuh13_6 {
frame 30 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 2182 Musuh14_1 {
}
movieClip 2189 Musuh14_2 {
}
movieClip 2193 Musuh14_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 13 {
_parent.damaging = true;
}
frame 15 {
_parent.damaging = false;
}
frame 23 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 2211 Musuh14_6 {
frame 26 {
_parent.summonChildren();
}
frame 27 {
_parent.summonChildren();
}
frame 28 {
_parent.summonChildren();
}
frame 35 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 2215 Musuh14b_1 {
}
movieClip 2222 Musuh14b_2 {
}
movieClip 2226 Musuh14b_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 13 {
_parent.damaging = true;
}
frame 16 {
_parent.damaging = false;
}
frame 23 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 2233 Musuh14b_6 {
frame 35 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 2243 Musuh15_1 {
}
movieClip 2251 Musuh15_2 {
}
movieClip 2260 Musuh15_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 25 {
_parent.damaging = true;
}
frame 27 {
_parent.damaging = false;
}
frame 36 {
stop();
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 2274 Musuh15_6 {
frame 1 {
_parent.damaging = false;
}
frame 40 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 2280 endturn_mc {
frame 16 {
turn_txt.text = this.turn;
}
frame 91 {
stop();
_root.enemyTurn = false;
++_root.turn;
_root.refreshBase();
_root.menu_btn.enabled = true;
_root.endturn_btn.enabled = true;
_root.mouseLook = true;
_root.changeCursor('Cursor_strategy');
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 2283 {
}
movieClip 2286 {
}
movieClip 2287 {
}
movieClip 2307 {
}
movieClip 2310 {
}
movieClip 2311 option_mc {
}
movieClip 2315 resign_mc {
}
movieClip 2330 Explossion2 {
frame 14 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 2343 Explossion3 {
frame 13 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 2356 Explossion4 {
frame 11 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 2359 timer_mc {
}
movieClip 2370 api_mc2 {
}
movieClip 2381 {
}
movieClip 2392 {
}
movieClip 2393 apiMusuh1 {
}
movieClip 2394 apiMusuh2 {
}
movieClip 2395 apiMusuh3 {
}
movieClip 2396 apiMusuh4 {
}
movieClip 2397 apiMusuh5 {
}
movieClip 2398 apiMusuh6 {
}
movieClip 2399 apiMusuh7 {
}
movieClip 2400 apiMusuh8 {
}
movieClip 2401 apiMusuh9 {
}
movieClip 2402 apiMusuh10 {
}
movieClip 2403 apiMusuh11 {
}
movieClip 2404 apiMusuh12 {
}
movieClip 2406 blood3_1 {
frame 6 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 2409 smoke2 {
}
movieClip 2412 smoke3 {
}
movieClip 2415 Peluru11 {
}
movieClip 2418 Peluru11_particle {
}
movieClip 2421 blood1_2 {
}
movieClip 2424 blood1_3 {
}
movieClip 2427 blood2_2 {
}
movieClip 2430 blood2_3 {
}
movieClip 2432 blood3_2 {
frame 8 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 2434 blood3_3 {
frame 11 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 2437 Musuh13_5 {
frame 1 {
_parent.isAttacking = true;
}
frame 26 {
_parent.damaging = true;
}
frame 28 {
_parent.damaging = false;
}
frame 31 {
stop();
_parent.timerSpecial = 0;
_parent.isSpecial = false;
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 2453 Pasukan9_1 {
}
movieClip 2460 Pasukan9_2 {
}
movieClip 2465 Pasukan9_3_1 {
frame 1 {
_parent.isAttacking = true;
}
frame 60 {
_parent.damaging = true;
}
frame 61 {
_parent.damaging = false;
}
frame 78 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 2468 Pasukan9_3_2 {
frame 1 {
_parent.isAttacking = true;
}
frame 60 {
_parent.damaging = true;
}
frame 61 {
_parent.damaging = false;
}
frame 78 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 2471 Pasukan9_3_3 {
frame 1 {
_parent.isAttacking = true;
}
frame 60 {
_parent.damaging = true;
}
frame 61 {
_parent.damaging = false;
}
frame 78 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 2479 Pasukan9_6 {
frame 1 {
_parent.damaging = false;
}
frame 46 {
stop();
_root.showPopResult(2);
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 2493 Pasukan10_1 {
}
movieClip 2500 Pasukan10_2 {
}
movieClip 2508 Pasukan10_6 {
frame 1 {
_parent.damaging = false;
}
frame 48 {
stop();
_root.showPopResult(2);
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 2539 key_mapping {
}
movieClip 2553 Musuh16_1 {
}
movieClip 2560 Musuh16_2 {
}
movieClip 2584 Musuh16_6 {
frame 1 {
_parent.damaging = false;
}
frame 53 {
stop();
_root.showPopResult(1);
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 2611 Pasukan11_1 {
}
movieClip 2618 Pasukan11_2 {
}
movieClip 2628 Pasukan11_3_1 {
frame 1 {
_parent.isAttacking = true;
}
frame 15 {
_parent.damaging = true;
}
frame 20 {
_parent.damaging = false;
}
frame 28 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 2640 Pasukan11_3_2 {
frame 1 {
_parent.isAttacking = true;
}
frame 13 {
_parent.damaging = true;
}
frame 19 {
_parent.damaging = false;
}
frame 25 {
stop();
_parent.isAttacking = false;
_parent.setStance(1);
}
}
movieClip 2652 Pasukan11_5 {
frame 1 {
_parent.isAttacking = true;
}
frame 14 {
_parent.damaging = true;
}
frame 20 {
_parent.damaging = false;
}
frame 26 {
stop();
_parent.timerSpecial = 0;
_parent.isSpecial = false;
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 2660 Pasukan11_6 {
frame 1 {
_parent.damaging = false;
}
frame 30 {
stop();
_root.drawMayat(this);
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 2661 Benteng11 {
}
movieClip 2664 Pesawat_rusak {
}
movieClip 2673 Strategy_menu {
}
movieClip 2674 apiMusuh13 {
}
movieClip 2675 apiMusuh14 {
}
movieClip 2676 apiMusuh15 {
}
movieClip 2688 {
}
movieClip 2690 Pasukan12_1 {
}
movieClip 2695 Pasukan12_2 {
}
movieClip 2701 Pasukan12_3 {
frame 1 {
_parent.isAttacking = true;
_parent.damaging = true;
}
frame 8 {
stop();
_parent.damaging = false;
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 2707 Pasukan12_5 {
frame 1 {
_parent.isAttacking = true;
}
frame 14 {
_parent.damaging = true;
}
frame 15 {
_parent.damaging = false;
}
frame 20 {
stop();
_parent.timerSpecial = 0;
_parent.isSpecial = false;
_parent.isAttacking = false;
_parent.sasaran = undefined;
_parent.setStance(1);
}
}
movieClip 2709 laser {
frame 10 {
stop();
this._parent.removeMovieClip();
}
}
movieClip 2713 Achievement {
}
movieClip 2716 Heal_effect {
frame 32 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 2719 {
}
movieClip 2720 StoryAwal {
}
movieClip 2766 {
}
frame 4 {
stop();
logo.onRelease = function () {
getURL('http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=squadron_auriga&utm_source=ingame&utm_content=ingame&logo=2', '_blank');
};
}
movieClip 2769 {
frame 176 {
stop();
_root.play();
}
}
frame 5 {
function soundFX(idSound) {
sEffect = new Sound(_root.slevel1);
sEffect.attachSound(idSound);
sEffect.start(0, 0);
sEffect.setVolume(_root.volFX);
}
function soundBGM(idSound) {
posisiBGM = 0;
stopAllSounds();
sBGM = new Sound(_root.slevel2);
sBGM.attachSound(idSound);
sBGM.start(0, 999);
sBGM.setVolume(_root.volBGM);
}
stop();
var medalsList = 0;
var achievementsList = [0, false, false, false, false, false, false, false, false, false];
var TotalBattleDuration = 0;
var TotalBattlePlayed = 0;
var TotalBattleWin = 0;
var TotalBattleLose = 0;
var TotalEnergyCollected = 0;
var TotalUnitCreated = 0;
var TotalReinforcementUsed = 0;
var TotalUnitsKilled = 0;
var TotalMonstersKilled = 0;
var TotalMonstersSpawned = 0;
var TotalBaseGet = 0;
var TotalBaseLost = 0;
logo.onRelease = function () {
getURL('http://www.funevergames.com/', '_blank');
};
var volBGM = 100;
var volFX = 80;
_root.createEmptyMovieClip('slevel1', 6908);
_root.createEmptyMovieClip('slevel2', 6909);
var posisiBGM = 0;
}
movieClip 2816 {
frame 152 {
stop();
_root.play();
}
}
frame 6 {
function newMedals(num) {
if (medalsList < num) {
attachMovie('Achievement', 'achievement_mc', 2001);
achievement_mc._x = 30;
achievement_mc._y = 30;
achievement_mc.teks.text = medalsName[num];
achievement_mc.onEnterFrame = function () {
if (this.timer > 0) {
--this.timer;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
medalsList = num;
}
saveAchievementData();
}
function newAchievement(num) {
if (!achievementsList[num]) {
attachMovie('Achievement', 'achievement_mc', 2001);
achievement_mc._x = 30;
achievement_mc._y = 30;
achievement_mc.teks.text = achievementsName[num];
achievement_mc.timer = 100;
achievement_mc.onEnterFrame = function () {
if (this.timer > 0) {
--this.timer;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
achievementsList[num] = true;
}
saveAchievementData();
}
function saveAchievementData() {
Cookies = SharedObject.getLocal('SquadronAuriga', '/');
Cookies.data.achievementsList = achievementsList;
Cookies.data.medalsList = medalsList;
Cookies.data.TotalBattleDuration = TotalBattleDuration;
Cookies.data.TotalBattlePlayed = TotalBattlePlayed;
Cookies.data.TotalBattleWin = TotalBattleWin;
Cookies.data.TotalBattleLose = TotalBattleLose;
Cookies.data.TotalEnergyCollected = TotalEnergyCollected;
Cookies.data.TotalUnitCreated = TotalUnitCreated;
Cookies.data.TotalReinforcementUsed = TotalReinforcementUsed;
Cookies.data.TotalUnitsKilled = TotalUnitsKilled;
Cookies.data.TotalMonstersKilled = TotalMonstersKilled;
Cookies.data.TotalMonstersSpawned = TotalMonstersSpawned;
Cookies.flush();
}
function resetAchievementData() {
Cookies = SharedObject.getLocal('SquadronAuriga', '/');
delete Cookies.data.achievementsList;
delete Cookies.data.medalsList;
Cookies.flush();
}
function loadAchievementData() {
Cookies = SharedObject.getLocal('SquadronAuriga', '/');
if (Cookies.data.achievementsList != undefined) {
achievementsList = Cookies.data.achievementsList;
medalsList = Cookies.data.medalsList;
}
if (Cookies.data.TotalBattleDuration != undefined) {
TotalBattleDuration = Cookies.data.TotalBattleDuration;
TotalBattlePlayed = Cookies.data.TotalBattlePlayed;
TotalBattleWin = Cookies.data.TotalBattleWin;
TotalBattleLose = Cookies.data.TotalBattleLose;
TotalEnergyCollected = Cookies.data.TotalEnergyCollected;
TotalUnitCreated = Cookies.data.TotalUnitCreated;
TotalReinforcementUsed = Cookies.data.TotalReinforcementUsed;
TotalUnitsKilled = Cookies.data.TotalUnitsKilled;
TotalMonstersKilled = Cookies.data.TotalMonstersKilled;
TotalMonstersSpawned = Cookies.data.TotalMonstersSpawned;
} else {
TotalBattleDuration = 0;
TotalBattlePlayed = 0;
TotalBattleWin = 0;
TotalBattleLose = 0;
TotalEnergyCollected = 0;
TotalUnitCreated = 0;
TotalReinforcementUsed = 0;
TotalUnitsKilled = 0;
TotalMonstersKilled = 0;
TotalMonstersSpawned = 0;
}
Cookies.flush();
}
function resetStatistics() {
Cookies = SharedObject.getLocal('SquadronAuriga', '/');
delete Cookies.data.TotalBattleDuration;
delete Cookies.data.TotalBattlePlayed;
delete Cookies.data.TotalBattleWin;
delete Cookies.data.TotalBattleLose;
delete Cookies.data.TotalEnergyCollected;
delete Cookies.data.TotalUnitCreated;
delete Cookies.data.TotalReinforcementUsed;
delete Cookies.data.TotalUnitsKilled;
delete Cookies.data.TotalMonstersKilled;
delete Cookies.data.TotalMonstersSpawned;
TotalBattleDuration = 0;
TotalBattlePlayed = 0;
TotalBattleWin = 0;
TotalBattleLose = 0;
TotalEnergyCollected = 0;
TotalUnitCreated = 0;
TotalReinforcementUsed = 0;
TotalUnitsKilled = 0;
TotalMonstersKilled = 0;
TotalMonstersSpawned = 0;
Cookies.flush();
}
function saveCampaign() {
Cookies = SharedObject.getLocal('SquadronAuriga', '/');
Cookies.data.campaignSaved = campaignSaved;
Cookies.flush();
}
function loadCampaign() {
Cookies = SharedObject.getLocal('SquadronAuriga', '/');
if (Cookies.data.campaignSaved != undefined) {
campaignSaved = Cookies.data.campaignSaved;
}
Cookies.flush();
}
function cekLoadCampaign() {
Cookies = SharedObject.getLocal('SquadronAuriga', '/');
if (Cookies.data.campaignSaved != undefined) {
return true;
} else {
return false;
}
Cookies.flush();
}
function saveDomination() {
Cookies = SharedObject.getLocal('SquadronAuriga', '/');
Cookies.data.baseData = baseData;
Cookies.data.energy = energy;
Cookies.data.turn = turn;
Cookies.flush();
}
function loadDomination() {
Cookies = SharedObject.getLocal('SquadronAuriga', '/');
if (Cookies.data.baseData != undefined) {
baseData = Cookies.data.baseData;
energy = Cookies.data.energy;
turn = Cookies.data.turn;
}
Cookies.flush();
}
function resetMenuButton() {
menu_mc.stop();
menu_mc.campaign_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.campaign_btn.onRelease = function () {
soundFX('clickButton');
menu_mc.gotoAndStop('campaign');
menu_mc.new_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.new_btn.onRelease = function () {
soundFX('clickButton');
campaignMode = 1;
selectCampaign = campaignSaved;
newMedals(1);
_root.gotoAndStop('story');
storyAwal();
};
menu_mc.continue_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.continue_btn.onRelease = function () {
soundFX('clickButton');
if (cekLoadCampaign()) {
loadCampaign();
selectCampaign = campaignSaved;
_root.gotoAndStop('campaignmenu');
} else {
tampilNotifAbove('No saved data found!');
}
};
menu_mc.back_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.back_btn.onRelease = function () {
soundFX('clickButton');
menu_mc.gotoAndStop('awal');
resetMenuButton();
};
};
menu_mc.domination_btn.onRollOver = function () {
soundFX('rolloverButton');
};
if (medalsList >= 2) {
menu_mc.gembok_mc._visible = false;
menu_mc.domination_btn.onRelease = function () {
soundFX('clickButton');
menu_mc.gotoAndStop('domination');
menu_mc.new_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.new_btn.onRelease = function () {
soundFX('clickButton');
_root.gotoAndStop('strategy');
};
menu_mc.continue_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.continue_btn.onRelease = function () {
soundFX('clickButton');
newDomination = false;
loadDomination();
_root.gotoAndStop('strategy');
};
menu_mc.back_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.back_btn.onRelease = function () {
soundFX('clickButton');
menu_mc.gotoAndStop('awal');
resetMenuButton();
};
};
} else {
menu_mc.gembok_mc._visible = true;
menu_mc.domination_btn.onRelease = function () {
soundFX('clickButton');
tampilNotifAbove('You need to have Lieutenant Medal to play Domination');
};
}
menu_mc.statistics_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.statistics_btn.onRelease = function () {
soundFX('clickButton');
_root.gotoAndStop('statistics');
};
menu_mc.extras_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.extras_btn.onRelease = function () {
soundFX('clickButton');
menu_mc.gotoAndStop('extras');
menu_mc.walkthrough_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.walkthrough_btn.onRelease = function () {
soundFX('clickButton');
getURL('http://www.playhub.com/shooting-games/6469/Squadron-Auriga-Walkthrough.html?utm_medium=brandedgames_external&utm_campaign=squadron_auriga_wt&utm_source=ingame&utm_content=ingame&logo=2', '_blank');
};
menu_mc.trailler_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.trailler_btn.onRelease = function () {
soundFX('clickButton');
getURL('http://www.youtube.com/watch?v=o9ZWHgcMjHc', '_blank');
};
menu_mc.soundtrack_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.soundtrack_btn.onRelease = function () {
soundFX('clickButton');
getURL('http://www.funevergames.com/fun/?p=197', '_blank');
};
menu_mc.option_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.option_btn.onRelease = function () {
soundFX('clickButton');
tampilOption();
};
menu_mc.back_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.back_btn.onRelease = function () {
soundFX('clickButton');
menu_mc.gotoAndStop('awal');
resetMenuButton();
};
};
menu_mc.credits_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.credits_btn.onRelease = function () {
soundFX('clickButton');
_root.gotoAndStop('credits');
};
menu_mc.achievements_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.achievements_btn.onRelease = function () {
soundFX('clickButton');
_root.gotoAndStop('achievements');
};
menu_mc.more_btn.onRollOver = function () {
soundFX('rolloverButton');
};
menu_mc.more_btn.onRelease = function () {
soundFX('clickButton');
getURL('http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=squadron_auriga&utm_source=ingame&utm_content=ingame&logo=2', '_blank');
};
}
function acceptProperty(from, to) {
for (var v3 in from) {
to[v3] = from[v3];
}
}
function convertTimer(_value) {
var v2 = new Object();
var v1 = 30;
if (Math.floor(Math.floor(_value / v1) % 60) >= 10) {
v2.detik = Math.floor(Math.floor(_value / v1) % 60);
} else {
v2.detik = '0' + Math.floor(Math.floor(_value / v1) % 60);
}
if (Math.floor(_value / v1 * 60) >= 10) {
v2.menit = Math.floor(_value / v1 * 60);
} else {
v2.menit = '0' + Math.floor(_value / v1 * 60);
}
if (Math.floor(_value / v1 * 1800) >= 10) {
v2.jam = Math.floor(_value / v1 * 1800);
return v2;
}
v2.jam = '0' + Math.floor(_value / v1 * 1800);
return v2;
}
function changeCursor(_what) {
Mouse.hide();
attachMovie(_what, 'mycursor_mc', 10001);
mycursor_mc._x = _xmouse;
mycursor_mc._y = _ymouse;
mycursor_mc.onEnterFrame = function () {
this._x = _xmouse;
this._y = _ymouse;
this.xpos.text = 'X ' + Math.abs(Math.round(peta_mc._x));
this.ypos.text = 'Y ' + Math.abs(Math.round(peta_mc._y));
};
}
function defaultCursor() {
Mouse.show();
delete mycursor_mc.onMouseMove;
mycursor_mc.removeMovieClip();
}
function tampilNotifAbove(_text) {
soundFX('unlockUnit');
_root.attachMovie('Strategy_notifAbove', 'above_mc', 10101);
_root.above_mc._x = 400;
_root.above_mc._y = 210;
_root.above_mc.des.text = _text;
_root.above_mc.onRollOver = function () {};
_root.above_mc.onRelease = function () {
above_mc.removeMovieClip();
};
_root.above_mc.useHandCursor = false;
}
function optionFunction() {
interface_mc.properties_mc.option_btn.enabled = false;
interface_mc.properties_mc.resign_btn.enabled = false;
menu_mc.walkthrough_btn.enabled = false;
menu_mc.trailler_btn.enabled = false;
menu_mc.soundtrack_btn.enabled = false;
menu_mc.option_btn.enabled = false;
menu_mc.back_btn.enabled = false;
option.bgm_slider.tombol._x = _root.volBGM * _root.option.bgm_slider.bar._width / 100;
option.bgm_slider.barColor._width = option.bgm_slider.tombol._x;
option.bgm_slider.tombol.onPress = function () {
startDrag(this, true, 0, 0, _root.option.bgm_slider.bar._width, 0);
this.onEnterFrame = function () {
_root.volBGM = (this._x / _root.option.fx_slider.bar._width) * 100;
option.bgm_slider.barColor._width = this._x;
sBGM.setVolume(_root.volBGM);
};
};
option.bgm_slider.tombol.onReleaseOutside = function () {
this.stopDrag();
delete this.onEnterFrame;
};
option.bgm_slider.tombol.onRelease = option.bgm_slider.tombol.onReleaseOutside;
option.fx_slider.tombol._x = _root.volFX * _root.option.fx_slider.bar._width / 100;
option.fx_slider.barColor._width = option.fx_slider.tombol._x;
option.fx_slider.tombol.onPress = function () {
startDrag(this, true, 0, 0, _root.option.fx_slider.bar._width, 0);
this.onEnterFrame = function () {
_root.volFX = (this._x / _root.option.fx_slider.bar._width) * 100;
option.fx_slider.barColor._width = this._x;
};
};
option.fx_slider.tombol.onReleaseOutside = function () {
this.stopDrag();
delete this.onEnterFrame;
};
option.fx_slider.tombol.onRelease = option.fx_slider.tombol.onReleaseOutside;
option.shortcut_btn.onRelease = function () {
_root.attachMovie('key_mapping', 'option', 9999);
option.walkthrough_btn.onRelease = function () {
getURL('http://www.playhub.com/shooting-games/6469/Squadron-Auriga-Walkthrough.html?utm_medium=brandedgames_external&utm_campaign=squadron_auriga_wt&utm_source=ingame&utm_content=ingame&logo=2', '_blank');
};
option.back_btn.onRelease = function () {
tampilOption();
};
};
option.grapich_btn.onRelease = optionGraphicFunction;
option.cancel_btn.onRelease = function () {
isPaused = false;
interface_mc.properties_mc.option_btn.enabled = true;
interface_mc.properties_mc.resign_btn.enabled = true;
playAllChar();
refreshBase();
menu_mc.walkthrough_btn.enabled = true;
menu_mc.trailler_btn.enabled = true;
menu_mc.soundtrack_btn.enabled = true;
menu_mc.option_btn.enabled = true;
menu_mc.back_btn.enabled = true;
mouseLook = true;
menu_btn.enabled = true;
endturn_btn.enabled = true;
this._parent.removeMovieClip();
};
}
function optionGraphicFunction() {
option.gotoAndStop('grapich');
var i = 1;
while (i <= 3) {
option.qualityOption['tombol' + i].i = i;
option.qualityOption['q' + i + '_btn']._visible = false;
option.qualityOption['q' + grapichQuality + '_btn']._visible = true;
option.qualityOption['tombol' + i].onRelease = function () {
_quality = grapichDatabase[this.i];
grapichQuality = this.i;
optionGraphicFunction();
};
++i;
}
var j = 0;
while (j <= 1) {
option.particle['tombol' + j].j = j;
option.particle['btn' + j]._visible = false;
option.particle['btn' + grapichParticle]._visible = true;
option.particle['tombol' + j].onRelease = function () {
grapichParticle = this.j;
optionGraphicFunction();
};
option.blood['tombol' + j].j = j;
option.blood['btn' + j]._visible = false;
option.blood['btn' + grapichBlood]._visible = true;
option.blood['tombol' + j].onRelease = function () {
grapichBlood = this.j;
optionGraphicFunction();
};
option.corpse['tombol' + j].j = j;
option.corpse['btn' + j]._visible = false;
option.corpse['btn' + grapichCorpse]._visible = true;
option.corpse.tombol1.onRelease = function () {
taruhTempatMayat();
grapichCorpse = this.j;
optionGraphicFunction();
};
option.corpse.tombol0.onRelease = function () {
hapusTempatMayat();
grapichCorpse = this.j;
optionGraphicFunction();
};
++j;
}
option.back_btn.onRelease = function () {
option.gotoAndStop('awal');
optionFunction();
};
}
function tampilOption() {
isPaused = true;
lockBaseButton();
_root.attachMovie('option_mc', 'option', 9999);
option.gotoAndStop('awal');
option._x = 400;
option._y = 210;
optionFunction();
}
function removeOption() {
option.removeMovieClip();
}
function tambahKata(_namaDialog) {
aktifTombol = false;
++dialogBar.awalAmbil;
var v1 = _namaDialog[dialogBar.teksNomor][1].substr(0, dialogBar.awalAmbil);
dialogBar.dialog.text = v1;
if (dialogBar.awalAmbil + 1 >= _namaDialog[dialogBar.teksNomor][1].length) {
dialogBar.awalAmbil = _namaDialog[dialogBar.teksNomor][1].length - 1;
}
des.removeMovieClip();
}
function tampilDialog(_namaDialog, _isStory) {
clearInterval(dialogBar.tampil);
delete dialogBar.onMouseDown;
dialogBar.removeMovieClip();
isPaused = true;
stopAllChar();
_root.attachMovie('Dialog_bar', 'dialogBar', 10017);
dialogBar.awalAmbil = 0;
dialogBar.teksNomor = 1;
dialogBar.nama.text = namaTokoh[_namaDialog[dialogBar.teksNomor][0]];
dialogBar.char_mc.char.gotoAndStop(_namaDialog[dialogBar.teksNomor][0]);
dialogBar.char_mc.gotoAndPlay(1);
var charTemp = _namaDialog[dialogBar.teksNomor][0];
dialogBar.tampil = setInterval(tambahKata, 15, _namaDialog);
dialogBar.onMouseDown = function () {
if (dialogBar.awalAmbil + 1 >= _namaDialog[dialogBar.teksNomor][1].length) {
++dialogBar.teksNomor;
dialogBar.awalAmbil = 0;
} else {
dialogBar.awalAmbil = _namaDialog[dialogBar.teksNomor][1].length;
}
if (dialogBar.teksNomor >= _namaDialog.length) {
refreshBase();
mouseLook = true;
isPaused = false;
playAllChar();
clearInterval(dialogBar.tampil);
delete dialogBar.onMouseDown;
dialogBar.removeMovieClip();
if (_isStory) {
gotoAndStop('preload');
}
if (isTamat) {
gotoAndStop('coverMenu');
}
}
dialogBar.nama.text = namaTokoh[_namaDialog[dialogBar.teksNomor][0]];
dialogBar.char_mc.char.gotoAndStop(_namaDialog[dialogBar.teksNomor][0]);
if (charTemp != _namaDialog[dialogBar.teksNomor][0]) {
dialogBar.char_mc.gotoAndPlay(1);
}
charTemp = _namaDialog[dialogBar.teksNomor][0];
};
dialogBar.dialogScreen.useHandCursor = false;
dialogBar.dialogScreen.onRelease = function () {};
dialogBar.skip_btn.onRelease = function () {
refreshBase();
mouseLook = true;
isPaused = false;
playAllChar();
clearInterval(dialogBar.tampil);
delete dialogBar.onMouseDown;
dialogBar.removeMovieClip();
if (_isStory) {
gotoAndStop('preload');
}
if (isTamat) {
gotoAndStop('coverMenu');
}
};
}
function storyAwal() {
var _clip = attachMovie('StoryAwal', 'story_mc', this.getNextHighestDepth());
_clip.skip_btn.onRelease = function () {
_clip.teks_mc._y -= 2000;
};
_clip.onEnterFrame = function () {
this.teks_mc._y -= 0.3;
if (this.teks_mc._y < -408) {
delete this.onEnterFrame;
this.onEnterFrame = function () {
if (this._alpha > 0) {
this._alpha -= 5;
} else {
delete this.onEnterFrame;
tampilDialog(dialogStory1, true);
this.removeMovieClip();
}
};
}
};
}
stop();
var energy = 5000;
var turn = 1;
var enemyTurn = false;
var campaignMode = 0;
var campaignSaved = 1;
var selectCampaign = 1;
var newDomination = true;
var afterWar = false;
var isTamat = false;
var judulScene = new Array();
judulScene[1] = 'Defense Tutorial';
judulScene[2] = 'Attacking Tutorial';
judulScene[3] = 'Trouble Comes';
judulScene[4] = 'Shield and sword';
judulScene[5] = 'Big Threat';
judulScene[6] = 'One Shot, one kill';
judulScene[7] = 'Tidal Waves';
judulScene[8] = 'Regain Our Base';
judulScene[9] = 'Get On Your Feet';
judulScene[10] = 'Saving the VIP';
judulScene[11] = 'Old Brothers';
judulScene[12] = 'Guardian of the Cave';
var deskripsiScene = new Array();
deskripsiScene[1] = 'Learn how to defend using turrets and know the enemy\'s types. Enemies will come in a couple of waves, you just need to defend the base as long as possible till the enemy’s waves is finished.';
deskripsiScene[2] = 'Learn how to create units from barrack, and command them to attack the enemy’s building. There will be a couple of enemy spawn units guarding their base.';
deskripsiScene[3] = 'The enemies are coming to attack our base. Now that you already know how to control buildings and units, you have to defend our base from their attack. The enemies will come in around 4 minutes.';
deskripsiScene[4] = 'You have to counter the enemy’s attack and re-take our base. Try to defend our base and, in a same time, attack the enemy’s base. Don’t forget to use any reinforcements from Command Center when you need it';
deskripsiScene[5] = 'Our Intel has found that the enemy’s commander is settled in one of our bases. This time we will destroy all of them. Use your units wisely, sometimes you will need to retreat and get the back up to your turrets.';
deskripsiScene[6] = 'Now is the time for sneaking from behind, and get our fish. Use your sniper to hit the enemy’s commander. Don\'t attract too much attentions, because we need to stay invisible.';
deskripsiScene[7] = 'Enemy are going reckless, they send a really huge wave to attack our base. You need to defend our base at all cost. Use every units, resources, and reinforcements to defend our base';
deskripsiScene[8] = 'The enemies are decreasing, its time to regain our power and prepare a counter attack. Try to defend our base and collect any supply dropped by our ally.';
deskripsiScene[9] = 'It’s time to counter the enemy’s attack, and show them what you\'ve got.';
deskripsiScene[10] = 'One of our intel is crushed in enemy’s base, you need to save her and take her to our base. The pilot have a very important message to deliver, and we are running out of time.';
deskripsiScene[11] = 'We are running out of armies. We have to push the enemies back before they grow up and attack us again. To do that, we need to hire some mercenaries.';
deskripsiScene[12] = 'The enemies are hiding in their cave, we had pushed them to the edge. This is the final battle. Use all armies left to destroy all the enemy’s nests. Defend our base for some waves to get Super Tank reinforcement.';
var medalsName = new Array();
medalsName[1] = 'Cadet';
medalsName[2] = 'Lieutenant';
medalsName[3] = 'Captain';
medalsName[4] = 'Squadron Leader';
medalsName[5] = 'Marshal';
var medalsDes = new Array();
medalsDes[1] = 'Start new campaign';
medalsDes[2] = 'Finished campaign level 3';
medalsDes[3] = 'Finished campaign level 5';
medalsDes[4] = 'Finished campaign level 9';
medalsDes[5] = 'Finish all campaign levels';
var achievementsName = new Array();
achievementsName[1] = 'First Blood';
achievementsName[2] = 'Private';
achievementsName[3] = 'The pin point shooter';
achievementsName[4] = 'Legendary armies';
achievementsName[5] = 'Mission Accomplished';
achievementsName[6] = 'Accountant';
achievementsName[7] = 'Merchant';
achievementsName[8] = 'Bank robber';
achievementsName[9] = 'Dominator';
var achievementsDes = new Array();
achievementsDes[1] = 'Kills a monster for the first time';
achievementsDes[2] = 'Completed level 1 and level 2 campaign tutorial';
achievementsDes[3] = 'Finished campaign level 6';
achievementsDes[4] = 'Finished campaign level 11';
achievementsDes[5] = 'Finished all campaign levels';
achievementsDes[6] = 'Earn total 10000 Energy in domination mode';
achievementsDes[7] = 'Earn total 30000 Energy in domination mode';
achievementsDes[8] = 'Earn total 50000 Energy in domination mode';
achievementsDes[9] = 'Dominate more than 6 base';
loadAchievementData();
resetMenuButton();
var buildingData = new Object();
buildingData.buildingTemplate = new Object();
buildingData.buildingTemplate.ID = 0;
buildingData.buildingTemplate.nama = 'Building-Name';
buildingData.buildingTemplate.deskripsi = 'Ini adalah deskripsi bangunan super';
buildingData.buildingTemplate.lifeAwal = 200;
buildingData.buildingTemplate.life = 200;
buildingData.buildingTemplate.attack = 5;
buildingData.buildingTemplate.defense = 3;
buildingData.building0 = new Object();
acceptProperty(buildingData.buildingTemplate, buildingData.building0);
buildingData.building0.ID = 0;
buildingData.building0.nama = 'Base';
buildingData.building0.deskripsi = 'Base is where building can be placed. This place also role as a base of defense. If this place destroyed, the game is over.';
buildingData.building0.lifeAwal = 200;
buildingData.building0.life = 200;
buildingData.building1 = new Object();
acceptProperty(buildingData.buildingTemplate, buildingData.building1);
buildingData.building1.ID = 1;
buildingData.building1.nama = 'Barrack';
buildingData.building1.deskripsi = 'Barrack is a place for soldiers in army to train. This place also used to call them to battle.';
buildingData.building2 = new Object();
acceptProperty(buildingData.buildingTemplate, buildingData.building2);
buildingData.building2.ID = 2;
buildingData.building2.nama = 'Machine Gun';
buildingData.building2.deskripsi = 'A tower which have a big machine gun on top of it. The machine gun can be used as an automatic or manual turret in battle.';
buildingData.building2.attack = 4;
buildingData.building2.range = 1000;
buildingData.building3 = new Object();
acceptProperty(buildingData.buildingTemplate, buildingData.building3);
buildingData.building3.ID = 3;
buildingData.building3.nama = 'Tesla Tower';
buildingData.building3.deskripsi = 'A tower that can shot an electricity-like wave to the enemy. This gun can be used as a turret both automatically and manual way.';
buildingData.building3.attack = 20;
buildingData.building4 = new Object();
acceptProperty(buildingData.buildingTemplate, buildingData.building4);
buildingData.building4.ID = 4;
buildingData.building4.nama = 'Catapult';
buildingData.building4.deskripsi = 'A big weapon that can throw a napalm bomb to the enemy. After the napalm blowed, the fire is still remain and can burn the enemy who passed it. This weapon can be used as an automatic and manual turret.';
buildingData.building4.attack = 30;
buildingData.building5 = new Object();
acceptProperty(buildingData.buildingTemplate, buildingData.building5);
buildingData.building5.ID = 5;
buildingData.building5.nama = 'Flame Thrower';
buildingData.building5.deskripsi = 'Like the name, flame thrower is a weapon that can throw the flame to the enemy. Like the others, it also can be used as an automatic and manual turret.';
buildingData.building5.attack = 3;
buildingData.building6 = new Object();
acceptProperty(buildingData.buildingTemplate, buildingData.building6);
buildingData.building6.ID = 6;
buildingData.building6.nama = 'Radar';
buildingData.building6.deskripsi = 'Radar is an important device to track down the enemy’s position. It can display the minimap of a certain area.';
buildingData.building7 = new Object();
acceptProperty(buildingData.buildingTemplate, buildingData.building7);
buildingData.building7.ID = 7;
buildingData.building7.nama = 'Command Center';
buildingData.building7.deskripsi = 'This is where the reinforcement came from to support the battle in many way, include in attack, defense, and life support.';
buildingData.building8 = new Object();
acceptProperty(buildingData.buildingTemplate, buildingData.building8);
buildingData.building8.ID = 8;
buildingData.building8.nama = 'Energy Mine';
buildingData.building8.deskripsi = 'In every end of turn, player can upgrade his buildings. This place is where he can generate the buildings.';
buildingData.building9 = new Object();
acceptProperty(buildingData.buildingTemplate, buildingData.building9);
buildingData.building9.ID = 9;
buildingData.building9.nama = 'Power Plant';
buildingData.building9.deskripsi = 'Power Plant is a place where player can upgrade his unit maximum number. With this building, player can add more unit in a few of time.';
buildingData.building11 = new Object();
acceptProperty(buildingData.buildingTemplate, buildingData.building11);
buildingData.building11.ID = 11;
buildingData.building11.nama = 'Mercenary Barrack';
buildingData.building11.deskripsi = 'Special barrack that used to train the mercenary and call them for battle. There is a price to pay for calling them.';
var armyPrice = new Array();
armyPrice[1] = 30;
armyPrice[2] = 50;
armyPrice[3] = 60;
armyPrice[4] = 120;
armyPrice[5] = 200;
armyPrice[6] = 100;
armyPrice[7] = 250;
armyPrice[8] = 280;
armyPrice[9] = 99999;
armyPrice[10] = 99999;
armyPrice[11] = 400;
var armyData = new Object();
armyData.armyTemplate = new Object();
armyData.armyTemplate.ID = 0;
armyData.armyTemplate.nama = 'Army-Name';
armyData.armyTemplate.deskripsi = 'Ini adalah deskripsi bangunan super';
armyData.armyTemplate.syarat = 'Beli es krim 1 galon';
armyData.armyTemplate.attack = 5;
armyData.armyTemplate.defense = 3;
armyData.armyTemplate.speed = 3.5;
armyData.armyTemplate.lifeAwal = 200;
armyData.armyTemplate.life = 200;
armyData.army1 = new Object();
acceptProperty(armyData.buildingTemplate, armyData.army1);
armyData.army1.ID = 1;
armyData.army1.nama = 'Rifleman';
armyData.army1.deskripsi = 'Rifleman is a rifle user which also can use a grenade launcher as his special weapon. If they move as a group, they can become a very useful attacking or defending support.';
armyData.army1.syarat = '- Build a barrack level 1';
armyData.army1.attack = 5;
armyData.army1.defense = 3;
armyData.army1.speed = 3.5;
armyData.army1.lifeAwal = 80;
armyData.army1.life = 80;
armyData.army2 = new Object();
acceptProperty(armyData.buildingTemplate, armyData.army2);
armyData.army2.ID = 2;
armyData.army2.nama = 'Bazooka Soldier';
armyData.army2.deskripsi = 'Like his name, bazooka soldier is a soldier who use a bazooka as his main weapon. Carrying such a heavy and powerful weapon, made him one of the most powerful unit, and also one of the slowest unit.';
armyData.army2.syarat = '- Barrack level 2\n- Catapult Tower level 1';
armyData.army2.attack = 16;
armyData.army2.defense = 3;
armyData.army2.speed = 2.5;
armyData.army2.lifeAwal = 80;
armyData.army2.life = 80;
armyData.army3 = new Object();
acceptProperty(armyData.buildingTemplate, armyData.army3);
armyData.army3.ID = 3;
armyData.army3.nama = 'Flame Soldier';
armyData.army3.deskripsi = 'Having a flame thrower as a main weapon, Flame Thrower is a short range attacker who can sporadically burn the enemy, make them totally turn to the ashes.';
armyData.army3.syarat = '- Barrack level 3\n- Flame Tower level 1';
armyData.army3.attack = 4;
armyData.army3.defense = 3;
armyData.army3.speed = 3;
armyData.army3.lifeAwal = 80;
armyData.army3.life = 80;
armyData.army4 = new Object();
acceptProperty(armyData.buildingTemplate, armyData.army4);
armyData.army4.ID = 4;
armyData.army4.nama = 'Human Robot';
armyData.army4.deskripsi = 'Human Robot, actually, is a robot-like armor, that have a human, controlling it from the inside. It have a machine gun attached in its right hand, and a rocket launcher in the other hand.';
armyData.army4.syarat = '- Barrack level 4\n- Catapult Tower level 2\n- Command Center level 1';
armyData.army4.attack = 8;
armyData.army4.defense = 5;
armyData.army4.speed = 2.2;
armyData.army4.lifeAwal = 200;
armyData.army4.life = 200;
armyData.army5 = new Object();
acceptProperty(armyData.buildingTemplate, armyData.army5);
armyData.army5.ID = 5;
armyData.army5.nama = 'Beast Robot';
armyData.army5.deskripsi = 'A beast-like robot that use its claws and fangs to crush the enemy. It also have a godspeed technique which is very useful to make a sudden attack and instantly kill the enemy.';
armyData.army5.syarat = '- Barrack level 6\n- Command Center level 3\n- Radar level 1';
armyData.army5.attack = 9;
armyData.army5.defense = 5;
armyData.army5.speed = 7;
armyData.army5.lifeAwal = 180;
armyData.army5.life = 180;
armyData.army6 = new Object();
acceptProperty(armyData.buildingTemplate, armyData.army6);
armyData.army6.ID = 6;
armyData.army6.nama = 'Chopper Turret';
armyData.army6.deskripsi = 'Chopper Turret is a flying turret that attack enemy from the sky. It can give a good support to run and gun tactic.';
armyData.army6.syarat = '- Barrack level 7\n- Command Center level 4\n- Radar level 3';
armyData.army6.attack = 4;
armyData.army6.defense = 2;
armyData.army6.speed = 5;
armyData.army6.lifeAwal = 125;
armyData.army6.life = 125;
armyData.army7 = new Object();
acceptProperty(armyData.buildingTemplate, armyData.army7);
armyData.army7.ID = 7;
armyData.army7.nama = 'Armadillo Tank';
armyData.army7.deskripsi = 'Armadillo tank is a hard armored vehicle which can move in a hard and harsh terrain. Beside its canon as a main weapon, it can also launch a sky attack that can blast the aerial enemy.';
armyData.army7.syarat = '- Barrack level 8\n- Command Center level 5\n- Radar level 3\n- Power Plant level 3';
armyData.army7.attack = 20;
armyData.army7.defense = 8;
armyData.army7.speed = 2.5;
armyData.army7.lifeAwal = 250;
armyData.army7.life = 250;
armyData.army8 = new Object();
acceptProperty(armyData.buildingTemplate, armyData.army8);
armyData.army8.ID = 8;
armyData.army8.nama = 'Juggernaut';
armyData.army8.deskripsi = 'A big robot that crush the enemy using its strong arm and foot. Juggernaut can also instantly crush the enemy using its “earthquake†technique.';
armyData.army8.syarat = '- Barrack level 9\n- Command Center level 7\n- Radar level 5\n- Power Plant level 5';
armyData.army8.attack = 28;
armyData.army8.defense = 10;
armyData.army8.speed = 2.3;
armyData.army8.lifeAwal = 400;
armyData.army8.life = 400;
armyData.army9 = new Object();
acceptProperty(armyData.buildingTemplate, armyData.army9);
armyData.army9.ID = 9;
armyData.army9.nama = 'Sniper';
armyData.army9.deskripsi = 'Sniper is a special ops who can give a deadly, straight, long ranged attack. One sniper can immediately sweep all the enemy out before they get closed enough to attack.';
armyData.army9.syarat = 'Only available on campaign mode';
armyData.army9.attack = 80;
armyData.army9.defense = 4;
armyData.army9.speed = 2;
armyData.army9.lifeAwal = 200;
armyData.army9.life = 200;
armyData.army10 = new Object();
acceptProperty(armyData.buildingTemplate, armyData.army10);
armyData.army10.ID = 10;
armyData.army10.nama = 'VIP Pilot';
armyData.army10.deskripsi = 'VIP pilot that crush on the battlefield';
armyData.army10.syarat = 'Only available on campaign mode';
armyData.army10.attack = 0;
armyData.army10.defense = 4;
armyData.army10.speed = 1;
armyData.army10.lifeAwal = 100;
armyData.army10.life = 100;
armyData.army11 = new Object();
acceptProperty(armyData.buildingTemplate, armyData.army11);
armyData.army11.ID = 11;
armyData.army11.nama = 'Mercenary';
armyData.army11.deskripsi = 'Army of freedom, they will fight for the right price';
armyData.army11.syarat = 'Only available on campaign mode';
armyData.army11.attack = 18;
armyData.army11.defense = 7;
armyData.army11.speed = 4;
armyData.army11.lifeAwal = 250;
armyData.army11.life = 250;
armyData.army12 = new Object();
acceptProperty(armyData.buildingTemplate, armyData.army12);
armyData.army12.ID = 12;
armyData.army12.nama = 'Super Tank';
armyData.army12.deskripsi = 'Super Tank is a SUPER!!';
armyData.army12.syarat = 'Only available on campaign mode';
armyData.army12.attack = 50;
armyData.army12.defense = 30;
armyData.army12.speed = 1.5;
armyData.army12.lifeAwal = 30000;
armyData.army12.life = 30000;
var reinforcementPrice = new Array();
reinforcementPrice[1] = 250;
reinforcementPrice[2] = 500;
reinforcementPrice[3] = 800;
reinforcementPrice[4] = 50;
reinforcementPrice[5] = 1250;
reinforcementPrice[6] = 2500;
var reinforcementData = new Object();
reinforcementData.reinforcementTemplate = new Object();
reinforcementData.reinforcementTemplate.ID = 0;
reinforcementData.reinforcementTemplate.nama = 'Reinforcement-Name';
reinforcementData.reinforcementTemplate.deskripsi = 'Ini adalah deskripsi reinforcement super';
reinforcementData.reinforcementTemplate.syarat = 'Beli balsem caplang 1 galon';
reinforcementData.reinforcement1 = new Object();
acceptProperty(reinforcementData.reinforcementTemplate, reinforcementData.reinforcement1);
reinforcementData.reinforcement1.ID = 1;
reinforcementData.reinforcement1.nama = 'Sniper Strike';
reinforcementData.reinforcement1.deskripsi = 'A pinpoint shot that deals huge damage on one enemy.';
reinforcementData.reinforcement1.syarat = '- Command Center level 1';
reinforcementData.reinforcement2 = new Object();
acceptProperty(reinforcementData.reinforcementTemplate, reinforcementData.reinforcement2);
reinforcementData.reinforcement2.ID = 2;
reinforcementData.reinforcement2.nama = 'Parachuter Bomb';
reinforcementData.reinforcement2.deskripsi = 'A group of bombs attached in a parachute that released from a plane. This reinforcement can destroy a large number of enemies.';
reinforcementData.reinforcement2.syarat = '- Command Center level 2\n- Radar level 1';
reinforcementData.reinforcement3 = new Object();
acceptProperty(reinforcementData.reinforcementTemplate, reinforcementData.reinforcement3);
reinforcementData.reinforcement3.ID = 3;
reinforcementData.reinforcement3.nama = 'Healing Lasser';
reinforcementData.reinforcement3.deskripsi = 'A lasser technology that used not as a weapon, but as a healer. The lasser can heal all units in the battlefield.';
reinforcementData.reinforcement3.syarat = '- Command Center level 3\n- Power Plant level 3';
reinforcementData.reinforcement4 = new Object();
acceptProperty(reinforcementData.reinforcementTemplate, reinforcementData.reinforcement4);
reinforcementData.reinforcement4.ID = 4;
reinforcementData.reinforcement4.nama = 'Supply Drop Zone';
reinforcementData.reinforcement4.deskripsi = 'This is an energy supply reinforcement to build more units.';
reinforcementData.reinforcement4.syarat = '- Command Center level 4\n- Radar level 3\n- Energy Mine level 3';
reinforcementData.reinforcement5 = new Object();
acceptProperty(reinforcementData.reinforcementTemplate, reinforcementData.reinforcement5);
reinforcementData.reinforcement5.ID = 5;
reinforcementData.reinforcement5.nama = 'Frozzen Bomb';
reinforcementData.reinforcement5.deskripsi = 'The bomb that can freeze and paralyse a number of enemies for a few seconds.';
reinforcementData.reinforcement5.syarat = '- Command Center level 5\n- Radar level 5\n- Tesla Tower level 5';
reinforcementData.reinforcement6 = new Object();
acceptProperty(reinforcementData.reinforcementTemplate, reinforcementData.reinforcement6);
reinforcementData.reinforcement6.ID = 6;
reinforcementData.reinforcement6.nama = 'Air Strike';
reinforcementData.reinforcement6.deskripsi = 'A group of bomber plane that destroy everything on its way.';
reinforcementData.reinforcement6.syarat = '- Command Center level 9\n- Power Plant level 9\n- Radar level 9';
var buildingUpgradePrice = new Array();
buildingUpgradePrice[0] = 1000;
buildingUpgradePrice[1] = 1200;
buildingUpgradePrice[2] = 1700;
buildingUpgradePrice[3] = 2000;
buildingUpgradePrice[4] = 1500;
buildingUpgradePrice[5] = 1500;
buildingUpgradePrice[6] = 1500;
buildingUpgradePrice[7] = 2000;
buildingUpgradePrice[8] = 1000;
buildingUpgradePrice[9] = 1000;
var baseData = new Object();
baseData.baseTemplate = new Object();
baseData.baseTemplate.ID = 0;
baseData.baseTemplate.nama = 'BaseName';
baseData.baseTemplate.ally = 1;
baseData.baseTemplate.lifeAwal = 1000;
baseData.baseTemplate.life = 1000;
baseData.baseTemplate.energyIncome = 100;
baseData.baseTemplate.building0 = 1;
baseData.baseTemplate.building1 = 0;
baseData.baseTemplate.building2 = 0;
baseData.baseTemplate.building3 = 0;
baseData.baseTemplate.building4 = 0;
baseData.baseTemplate.building5 = 0;
baseData.baseTemplate.building6 = 0;
baseData.baseTemplate.building7 = 0;
baseData.baseTemplate.building8 = 0;
baseData.baseTemplate.building9 = 0;
baseData.baseTemplate.building11 = 0;
baseData.baseTemplate.army1 = 0;
baseData.baseTemplate.army2 = 0;
baseData.baseTemplate.army3 = 0;
baseData.baseTemplate.army4 = 0;
baseData.baseTemplate.army5 = 0;
baseData.baseTemplate.army6 = 0;
baseData.baseTemplate.army7 = 0;
baseData.baseTemplate.army8 = 0;
baseData.baseTemplate.army9 = 0;
baseData.baseTemplate.reinforcement1 = 0;
baseData.baseTemplate.reinforcement2 = 0;
baseData.baseTemplate.reinforcement3 = 0;
baseData.baseTemplate.reinforcement4 = 0;
baseData.baseTemplate.reinforcement5 = 0;
baseData.baseTemplate.reinforcement6 = 0;
baseData.baseTemplate.basePower = 100;
baseData.baseTemplate.around = ['base0_0'];
baseData.baseTemplate.coordinate = [0, 0];
var i = 1;
while (i <= 3) {
var j = 1;
while (j <= 3) {
baseData['base' + i + '_' + j] = new Object();
acceptProperty(baseData.baseTemplate, baseData['base' + i + '_' + j]);
++j;
}
++i;
}
baseData.base1_1.ID = 1;
baseData.base1_1.codeName = 'base1_1';
baseData.base1_1.nama = 'Capella';
baseData.base1_1.ally = 1;
baseData.base1_1.building0 = 5;
baseData.base1_1.building1 = 3;
baseData.base1_1.building2 = 2;
baseData.base1_1.building3 = 0;
baseData.base1_1.building4 = 3;
baseData.base1_1.building5 = 0;
baseData.base1_1.building6 = 3;
baseData.base1_1.building7 = 5;
baseData.base1_1.building8 = 2;
baseData.base1_1.building9 = 5;
baseData.base1_1.army1 = 1;
baseData.base1_1.army2 = 1;
baseData.base1_1.army3 = 0;
baseData.base1_1.army4 = 0;
baseData.base1_1.army5 = 0;
baseData.base1_1.army6 = 0;
baseData.base1_1.army7 = 0;
baseData.base1_1.army8 = 0;
baseData.base1_1.reinforcement1 = 1;
baseData.base1_1.reinforcement2 = 1;
baseData.base1_1.reinforcement3 = 1;
baseData.base1_1.reinforcement4 = 0;
baseData.base1_1.reinforcement5 = 0;
baseData.base1_1.reinforcement6 = 0;
baseData.base1_1.around = ['base1_2', 'base2_1'];
baseData.base1_1.coordinate = [-200, 0];
baseData.base1_2.ID = 2;
baseData.base1_2.codeName = 'base1_2';
baseData.base1_2.nama = 'Menkalinan';
baseData.base1_2.ally = 1;
baseData.base1_2.building0 = 3;
baseData.base1_2.building1 = 1;
baseData.base1_2.building2 = 1;
baseData.base1_2.building3 = 0;
baseData.base1_2.building4 = 1;
baseData.base1_2.building5 = 0;
baseData.base1_2.building6 = 0;
baseData.base1_2.building7 = 2;
baseData.base1_2.building8 = 1;
baseData.base1_2.building9 = 2;
baseData.base1_2.army1 = 1;
baseData.base1_2.army2 = 1;
baseData.base1_2.army3 = 0;
baseData.base1_2.army4 = 0;
baseData.base1_2.army5 = 0;
baseData.base1_2.army6 = 0;
baseData.base1_2.army7 = 0;
baseData.base1_2.army8 = 0;
baseData.base1_2.reinforcement1 = 1;
baseData.base1_2.reinforcement2 = 0;
baseData.base1_2.reinforcement3 = 0;
baseData.base1_2.reinforcement4 = 0;
baseData.base1_2.reinforcement5 = 0;
baseData.base1_2.reinforcement6 = 0;
baseData.base1_2.around = ['base1_1', 'base2_2', 'base1_3'];
baseData.base1_2.coordinate = [-400, -50];
baseData.base1_3.ID = 3;
baseData.base1_3.codeName = 'base1_3';
baseData.base1_3.nama = 'El Nath';
baseData.base1_3.ally = 2;
baseData.base1_3.around = ['base1_2', 'base2_3'];
baseData.base1_3.coordinate = [-400, -250];
baseData.base2_1.ID = 4;
baseData.base2_1.codeName = 'base2_1';
baseData.base2_1.nama = 'Saclateni';
baseData.base2_1.ally = 1;
baseData.base2_1.building0 = 3;
baseData.base2_1.building1 = 1;
baseData.base2_1.building2 = 1;
baseData.base2_1.building3 = 0;
baseData.base2_1.building4 = 1;
baseData.base2_1.building5 = 0;
baseData.base2_1.building6 = 0;
baseData.base2_1.building7 = 2;
baseData.base2_1.building8 = 1;
baseData.base2_1.building9 = 2;
baseData.base2_1.army1 = 1;
baseData.base2_1.army2 = 1;
baseData.base2_1.army3 = 0;
baseData.base2_1.army4 = 0;
baseData.base2_1.army5 = 0;
baseData.base2_1.army6 = 0;
baseData.base2_1.army7 = 0;
baseData.base2_1.army8 = 0;
baseData.base2_1.reinforcement1 = 1;
baseData.base2_1.reinforcement2 = 0;
baseData.base2_1.reinforcement3 = 0;
baseData.base2_1.reinforcement4 = 0;
baseData.base2_1.reinforcement5 = 0;
baseData.base2_1.reinforcement6 = 0;
baseData.base2_1.around = ['base1_1', 'base2_2', 'base3_1'];
baseData.base2_1.coordinate = [0, -100];
baseData.base2_2.ID = 5;
baseData.base2_2.codeName = 'base2_2';
baseData.base2_2.nama = 'Praja';
baseData.base2_2.ally = 2;
baseData.base2_2.around = ['base1_2', 'base2_1', 'base2_3', 'base3_2'];
baseData.base2_2.coordinate = [-250, -200];
baseData.base2_3.ID = 6;
baseData.base2_3.codeName = 'base2_3';
baseData.base2_3.nama = 'Manus';
baseData.base2_3.ally = 2;
baseData.base2_3.around = ['base1_3', 'base2_2', 'base3_3'];
baseData.base2_3.coordinate = [-400, -420];
baseData.base3_1.ID = 7;
baseData.base3_1.codeName = 'base3_1';
baseData.base3_1.nama = 'Hoedus';
baseData.base3_1.ally = 2;
baseData.base3_1.around = ['base2_1', 'base3_2'];
baseData.base3_1.coordinate = [0, -200];
baseData.base3_2.ID = 8;
baseData.base3_2.codeName = 'base3_2';
baseData.base3_2.nama = 'Hasseleh';
baseData.base3_2.ally = 2;
baseData.base3_2.around = ['base2_2', 'base3_1', 'base3_3'];
baseData.base3_2.coordinate = [0, -420];
baseData.base3_3.ID = 9;
baseData.base3_3.codeName = 'base3_3';
baseData.base3_3.nama = 'Al Hurr';
baseData.base3_3.ally = 2;
baseData.base3_3.around = ['base2_3', 'base3_2'];
baseData.base3_3.coordinate = [-200, -420];
var grapichDatabase = ['BEST', 'BEST', 'MEDIUM', 'LOW'];
var grapichQuality = 1;
var grapichParticle = 1;
var grapichBlood = 1;
var grapichCorpse = 1;
var namaTokoh = new Array();
namaTokoh[1] = 'Commander Jonathan';
namaTokoh[2] = 'Soldier';
namaTokoh[3] = 'Lieutenant Yui';
namaTokoh[4] = 'General Egher';
namaTokoh[5] = 'Merchenary';
namaTokoh[6] = 'Pilot Jasmine';
namaTokoh[9] = '';
var dialogStory1 = new Array();
dialogStory1[1] = [3, 'General Egher, all the other bases have already been occupied by the aliens. They’ve got the commanders of all our armed forces. The situation is extremely critical. Our forces really needs a leader. '];
dialogStory1[2] = [3, 'It has come to my thought to resurge Commander Jonathan from his hibernation capsule.'];
dialogStory1[3] = [4, 'That’s too risky, Lieutenant Yui. Commander Jonathan has been deactivated for such a long time. Sending him to the battlefield will only bring more harm and loss to our forces.'];
dialogStory1[4] = [3, 'That’s the only thing we can do, General. You could see it yourself how our forces got scattered as we let them move under no one’s command. There’s no other way.'];
dialogStory1[5] = [4, 'But we can’t take the risk that he repeats the same fatal mistake as he did in the past.'];
dialogStory1[6] = [3, 'But General, Commander Jonathan is the only person who has ever faced this kind of situation. He’s experienced and credible to handle this problem.'];
dialogStory1[7] = [3, 'Don’t let our squads get more scattered. He’s one of the best commanders Squadron Auriga has ever had!'];
dialogStory1[8] = [4, 'Still it carries too much risk, Lieutenant. I won’t let him repeat the same fatal mistake he did in the past.'];
dialogStory1[9] = [3, 'Whatever the risk might prevail, it seems to be the only thing to do, otherwise we will only die in vain! This is a case of life and death, General.'];
dialogStory1[10] = [3, 'Having him lead the squads, we will have better chance to defend from the aliens’ attack.'];
dialogStory1[11] = [4, 'This is such a crazy idea…'];
dialogStory1[12] = [3, 'General, we’ve got to do it now! There’s no much time left!'];
dialogStory1[13] = [4, 'Alright! Now go and activate Jonathan. Get him here!'];
dialogStory1[14] = [9, 'Yui operate the system to re-activate Jonathan\'s Hibernation Capsule'];
dialogStory1[15] = [3, 'Commander Jonathan, this is quite a sudden thing, but the situation gets so damn crazy and Auriga Squadron really needs your skill.'];
dialogStory1[16] = [3, 'Wear your armor and get prepared. Now, go and meet General Egher!'];
dialogStory1[17] = [9, 'inside the main command center'];
dialogStory1[18] = [4, 'Yui, tell him what to do now and guide him to use our recent warfare technology. Don’t let him bring us all to death!'];
dialogStory1[19] = [3, 'Yes, Sir!'];
var dialogStory2 = new Array();
dialogStory2[1] = [4, 'Commander Jonathan.'];
dialogStory2[2] = [1, 'Yes, General.'];
dialogStory2[3] = [4, 'You have done excellent job in defending our base. But that is still far from our mission’s goal. Keep in mind that we’re still besieged by those vile insects!'];
dialogStory2[4] = [1, 'That’s right, General. I think—'];
dialogStory2[5] = [4, 'Don’t cut my words! Put in your mind that you will act according to my instructions. Do not take any foolish actions which will only endanger us.'];
dialogStory2[6] = [4, 'Your task now is to lead our main squad to counter-attack the aliens. Don’t let any of them alive. Understood?'];
dialogStory2[7] = [1, 'Yes, Sir.'];
dialogStory2[8] = [4, 'Good. Now, go.'];
dialogStory2[9] = [9, 'Jonathan left the main command center'];
dialogStory2[10] = [4, 'There’s still some doubt left in me, watching him leading the squad…'];
dialogStory2[11] = [4, 'What’s worse, I doubt he will obey my order.'];
dialogStory2[12] = [3, 'Keep calm, General. I guess we can count on him. He was proven bold and firm under various critical situations.'];
dialogStory2[13] = [4, 'Hmm, you may be right, Yui. For now, I trust you, but never let anything out of control happen. I order you to always keep an eye on him.'];
dialogStory2[14] = [3, 'Roger that, Sir.'];
var dialogStory3 = new Array();
dialogStory3[1] = [1, 'We’ve got serious damage here, Lieutenant. We must focus on puling with our military defense. Once it’s done, we can think of giving them a deadly attack.'];
dialogStory3[2] = [3, 'Great. I must inform that some of our control towers and guard posts have already been shot to pieces, Commander.'];
dialogStory3[3] = [3, 'Unless we handle it immediately, the aliens will easily break through our base. Fortunately, the other infrastructures are still in good condition. '];
dialogStory3[4] = [1, 'Indeed. It’s lucky for us to have our defense still well-protected. Anyway, what about the effort in making contact with the other bases, have we got any response?'];
dialogStory3[5] = [3, 'No single response is received, Commander. Let’s hope some of them are still able to hold from the aliens’ attack.'];
dialogStory3[6] = [1, 'Let’s start fixing this base’s condition, then. Better be fast before the aliens come rushing in and have us entangled!'];
dialogStory3[7] = [2, 'Commander! The aliens have come abruptly in a greater number!'];
dialogStory3[8] = [1, 'Damn it! How could they move so fast?!'];
dialogStory3[9] = [1, 'OK. Get the squads fall in right now! Post some personnel to guard our base! The rest of you, now go follow me! Let’s try hitting their lair once again!'];
dialogStory3[10] = [1, 'Lieutenant Yui, keep trying to make contact with the other bases! We might luckily get some help from them!'];
dialogStory3[11] = [3, 'Yes, Commander!'];
var dialogStory4 = new Array();
dialogStory4[1] = [1, 'General Egher, our squadron managed to beat the aliens back, and I have sent a number of teams to patrol around the base.'];
dialogStory4[2] = [4, 'Good. Has any base given some response?'];
dialogStory4[3] = [3, 'Unfortunately we still haven’t got any response yet, General. But we’ll keep on contacting them until we get some.'];
dialogStory4[4] = [4, 'Our bases start to get back to normal condition, and our defense system has also begun to function completely. It’s time to give the aliens a deadly counterattack!'];
dialogStory4[5] = [3, 'General Egher, I think we’d better assign some squadrons to observe the situation and spy on them in order to find out the hideaway location of the mother alien.'];
dialogStory4[6] = [3, 'We might thus discover how great their strength is as well as know the appropriate action to take.'];
dialogStory4[7] = [1, 'Hmm… '];
dialogStory4[8] = [1, 'I don’t think it’s the best time for us to perform some counterattack towards the mother alien.'];
dialogStory4[9] = [1, 'With our minimum strength now, I’m afraid it’s going to be sending our own squadrons to a horrible killing field.'];
dialogStory4[10] = [4, 'Hmm. I got your point, Commander'];
dialogStory4[11] = [4, 'Alright, send a scout team to find out the hideaway. But we should hold on before attacking them.'];
dialogStory4[12] = [4, 'As a matter of fact, we are to attack the nearest bases to save the remaining squads as well as gain more power on our side.'];
dialogStory4[13] = [1, 'Yes, Sir, understood. I’ll assign our best personnel to spy on the aliens’ lair and lead the others to attack those bases.'];
dialogStory4[14] = [4, 'Yui, the scouts will directly send you the report. Prepare yourself to gather the information and report it to Jonathan.'];
dialogStory4[15] = [3, 'I’m ready, Sir!'];
var dialogStory5 = new Array();
dialogStory5[1] = [3, 'General Egher, Commander Jonathan, I must inform that our scouts have found the hideaway of one of the mother aliens.'];
dialogStory5[2] = [4, 'Tell us the complete information, Lieutenant.'];
dialogStory5[3] = [3, 'Our scouts managed to find the mother alien’s hideaway in one of our damaged bases.'];
dialogStory5[4] = [3, 'The mother alien has a great number of troops, but it seems that they are way too far from making any action at the moment.'];
dialogStory5[5] = [1, 'This is an excellent chance! We’ve got to blow them now, right before they have any chance to attack us.'];
dialogStory5[6] = [3, 'Based on the scout’s information, our forces is now reliable to stand up against the aliens. Now we are even stronger than before and might beat them back, General Egher!'];
dialogStory5[7] = [1, 'Give me half of the main forces and additional squads from the bases we already retake. I’ll destroy those bastards, General!'];
dialogStory5[8] = [4, 'OK, Jonathan. I trust you this time. But keep in your mind not to repeat the same old mistake you did in the past.'];
dialogStory5[9] = [1, 'I’ll assure that I’m not that stupid, General. This time, you can take my words.'];
var dialogStory6 = new Array();
dialogStory6[1] = [1, 'Did you call me, General Egher?'];
dialogStory6[2] = [4, 'Yes, Commander Jonathan. You’ve done a good job on killing the mother alien and ruining her lair.'];
dialogStory6[3] = [4, 'But we still haven’t got significant progress here. Our situation doesn’t get much better.'];
dialogStory6[4] = [4, 'Lieutenant Yui has just received an information that an Alien Commander was seen milling around our headquarter. Give your complete report, Yui.'];
dialogStory6[5] = [3, 'Alright, Sir. Our scouts spotted an Alien Commander, not far from our headquarter. Until now, they haven’t stepped aside from their position.'];
dialogStory6[6] = [3, 'Considering the number of troops they’ve got, I suppose they have planned on performing a great assault towards us.'];
dialogStory6[7] = [1, 'Alien Commander? So, is that the creature who’s been controlling the attacks on our military bases all this time?'];
dialogStory6[8] = [3, 'Yes, Commander.'];
dialogStory6[9] = [3, 'The Alien Commander possesses higher level of intelligence than the common ones who have attacked our bases. He’s able to quickly perceive our tactics and strategies.'];
dialogStory6[10] = [3, 'He has also managed to learn our situation and discovered our weaknesses. It was also him who plotted and set the aggression strategy.'];
dialogStory6[11] = [3, 'The mother alien might appear as the alien’s “Mommyâ€, but it is the Alien Commander who possesses special ability in planning war strategies.'];
dialogStory6[12] = [1, 'We must then kill the Alien Commander, General. I will gather our forces soon and attack them!'];
dialogStory6[13] = [4, 'Wait, Commander. This time, let me lead the squads. You will act upon my instructions. Got it?'];
dialogStory6[14] = [1, 'But, General, I suppose we’d better—'];
dialogStory6[15] = [4, 'YOU GOT MY POINT, COMMANDER?!'];
dialogStory6[16] = [1, '—Sir… Yes, Sir…'];
dialogStory6[17] = [4, 'Good. Let’s move now.'];
var dialogStory7 = new Array();
dialogStory7[1] = [3, 'General, the aliens come and attack us again! This is the fourth attack they have performed this day!'];
dialogStory7[2] = [4, 'Hmm… It seems that our success in knocking down the Alien Commander has made them a lot more brutal. Get me Commander Jonathan.'];
dialogStory7[3] = [3, 'Yes, Sir!'];
dialogStory7[4] = [4, 'Jonathan, report the latest situation.'];
dialogStory7[5] = [1, 'Up until now, our squads are still able to cope with the aliens’ attack, but their attack’s interval is getting more frequent as they get more troops.'];
dialogStory7[6] = [4, 'Hmm… I see.'];
dialogStory7[7] = [4, 'Yui, what about the reserve energy left for us?'];
dialogStory7[8] = [3, 'We’ve still got adequate amount of the energy, General.'];
dialogStory7[9] = [3, 'Yet, if the aliens don’t stop attacking us, I guess our supply can no longer fulfill our needs, especially to re-build all bases and conduct the counterattack.'];
dialogStory7[10] = [2, 'Sir, we got red allert here!'];
dialogStory7[11] = [1, 'Alright, lets get back to the battlefield'];
var dialogStory8 = new Array();
dialogStory8[1] = [1, 'General, the aliens are still rushing in! Our combat troops are getting overwhelmed! We need more energy to handle their attack!'];
dialogStory8[2] = [4, 'Yui, have we got any help from the other bases?!'];
dialogStory8[3] = [3, 'Yes, General! I’ve managed to get response from several bases. They have already sent us more gold energy supply, but I guess it would take some time until the aid reaches us!'];
dialogStory8[4] = [1, 'It seems that we must yet stand with what’s left here, General.'];
dialogStory8[5] = [4, 'I guess so, Commander.'];
dialogStory8[6] = [4, 'You’d better go back to the battlefield and lead the troops hold back from the attack as long as they can, while I strive for getting more gold energy as soon as possible.'];
dialogStory8[7] = [1, 'Yes, Sir! Understood!'];
dialogStory8[8] = [3, 'General Egher, the aid finally reached!'];
dialogStory8[9] = [4, 'Good! Call aside our pilots!'];
dialogStory8[10] = [6, 'Jasmine Khan’s ready here, General!'];
dialogStory8[11] = [4, 'Jasmine, deliver these goods to the battlefield onboard! We can’t take the risk going through overland. They might easily smash our trucks while we no longer have enough guard troops!'];
dialogStory8[12] = [4, 'Do it now!'];
dialogStory8[13] = [6, 'Roger that, Sir!'];
dialogStory8[14] = [4, 'Yui, connect me to Commander Jonathan.'];
dialogStory8[15] = [3, 'Sure, General.'];
dialogStory8[16] = [1, 'Commander Jonathan here!'];
dialogStory8[17] = [4, 'Jonathan, I’ve already sent the pilots to deliver the aid right to the battlefield. Go get them and use them to beat those vile aliens! Understood?!'];
dialogStory8[18] = [1, 'Yes, Sir!'];
var dialogStory9 = new Array();
dialogStory9[1] = [1, 'General, the remaining supply of gold energy we’ve got here is still enough to rebuild our army quarter!'];
dialogStory9[2] = [4, 'Great. So, how’s the recent condition on the battlefield, Commander?'];
dialogStory9[3] = [1, 'After we managed to restrain the aliens’ assault, apparently they’re running down their strength. Some of their attacks were even very poorly conducted.'];
dialogStory9[4] = [1, 'I just needed to loosen half our strength and managed to strike them long before they reached our headquarter.'];
dialogStory9[5] = [3, 'I received the same report from our squads at the battlefield, General.'];
dialogStory9[6] = [1, 'With our position now, I’m sure we could easily wipe out those aliens, General. Only then we could repair our entire bases.'];
dialogStory9[7] = [4, 'I agree with you, Commander.'];
dialogStory9[8] = [4, 'OK. Get our troops gathered and prepare for performing a deadly counterattack. Don’t give any slight chance for them to recover and turn against us.'];
dialogStory9[9] = [4, 'Yui, prepare the Standard Infantry to start the headquarter maintenance. Once Commander Jonathan manages to perform the attack, we will start the maintenance!'];
dialogStory9[10] = [1, 'Yes, Sir!'];
dialogStory9[11] = [3, 'Right-away, Sir!'];
var dialogStory10 = new Array();
dialogStory10[1] = [3, 'Oh, no!'];
dialogStory10[2] = [3, 'One of our supplier aircrafts falls! They got shot by the aliens!'];
dialogStory10[3] = [4, 'What? How’s the condition of the pilots and the co-pilots?'];
dialogStory10[4] = [3, 'Pilot Jasmine Khan dan her co-pilot are still alive, General. But they got hurt and are now having troubles in defending themselves from the aliens’ attack.'];
dialogStory10[5] = [1, 'We must rescue them right now, General! We can’t lose any of our soldiers now. Not after we have lost so many.'];
dialogStory10[6] = [1, 'Besides, Jasmine Khan is one of our most reliable pilots!'];
dialogStory10[7] = [4, 'What do you intend to do, Commander?'];
dialogStory10[8] = [1, 'Let me lead the rescue operation. I’ll go take and bring them back here to the headquarter.'];
dialogStory10[9] = [4, 'Alright, Commander. You may select the best personnel and bring the pilots here!'];
dialogStory10[10] = [4, 'I will try to send any reinforcement gradualy'];
dialogStory10[11] = [1, 'Thank you, Sir.'];
var dialogStory11 = new Array();
dialogStory11[1] = [1, 'General Egher, Jasmine Khan has apparently gathered important information concerning the aliens.'];
dialogStory11[2] = [4, 'Give me the complete report, then, Jasmine.'];
dialogStory11[3] = [6, 'Right before my cargo plane got shot, I had got the chance to spot the aliens’ lair, General. I saw so many aliens from various types and they seemed to be horribly powerful.'];
dialogStory11[4] = [4, 'Did you locate their exact position?'];
dialogStory11[5] = [6, 'They are located on the coordinate of T01-H50, General.'];
dialogStory11[6] = [4, 'Yui, now go and check the location on the map!'];
dialogStory11[7] = [3, 'Done it, General! The location is quite far from our headquarter. The route is quite hard for our forces to get through.'];
dialogStory11[8] = [1, 'Those aliens must have anticipated our upcoming attacks once they shot down Jasmine’s plane. If we want to destroy their lair, we’ll need full power from the entire forces.'];
dialogStory11[9] = [4, 'Right, Commander. Even with all the forces we’ve got, I’m sure this is going to be a fierce and furious battle.'];
dialogStory11[10] = [3, 'Indeed, General. Besides, our main forces has been spread out too thin with the many personnel sent to guard the other bases.'];
dialogStory11[11] = [3, 'If we attack them using the prevailing strength now, we might only end up slaughtered on the battlefield.'];
dialogStory11[12] = [4, 'How long will it take to send for all the forces assigned to the other bases?'];
dialogStory11[13] = [3, 'It will take at least two days, General.'];
dialogStory11[14] = [4, 'Damn it! That’s just way too long!'];
dialogStory11[15] = [4, 'Besides, if we let the other bases left under no protection, the aliens might just use the chance to retake the bases.'];
dialogStory11[16] = [3, 'We need extra personnel, General! But, how do we get them? We don’t have any reserve forces and it’s impossible for us to call for help from any.'];
dialogStory11[17] = [1, 'Actually, there’s still another choice for that…'];
dialogStory11[18] = [4, 'What do you mean, Commander?'];
dialogStory11[19] = [1, 'The veterans.'];
dialogStory11[20] = [1, 'They have been exiling themselves for more than 15 years on this planet.'];
dialogStory11[21] = [3, 'But they no longer have any obligation to us. What’s more, we barely know where their allegiance lies!'];
dialogStory11[22] = [1, 'But we really need their ability and experience! As veterans who had once gone through hundreds of battles and used to come out as the winner, their ability is far beyond our forces.'];
dialogStory11[23] = [1, 'We really need their help!'];
dialogStory11[24] = [4, 'But they are now living in Insectus as mercenaries. Their loyalty is only for money! They don’t buy nationalism or any idealism to fight on a war…'];
dialogStory11[25] = [1, 'If that’s what it takes to make them fight for us, then let’s give them what they want! We must do any possible ways to defend our forces on this planet, don’t we?'];
dialogStory11[26] = [4, 'Hmm. Alright. I got your point, Jonathan.'];
dialogStory11[27] = [4, 'Well, I think here’s the strategy we can tale.'];
dialogStory11[28] = [4, 'Commander Jonathan will go and meet the mercenaries and persuade them to fight on our side. Meanwhile, I’ll lead our main forces to move towards the alien’s lair.'];
dialogStory11[29] = [4, 'As for Yui, you go send our scouts to observe the aliens’ movement. Don’t let those bastards hit any of the bases without us noticing it. Understood?'];
dialogStory11[30] = [3, 'Aye, Sir!'];
dialogStory11[31] = [1, 'Roger that!'];
var dialogStory12 = new Array();
dialogStory12[1] = [3, 'General Egher, the alien’s lair is in sight!'];
dialogStory12[2] = [4, 'Copy that.'];
dialogStory12[3] = [4, 'Jonathan, how’s the preparation of our armed forces? Are they ready to move?'];
dialogStory12[4] = [1, 'Everything’s under control, General. The infantry, the artillery, and the armored vehicles are ready to move. The Mercenaries are ready to move at call.'];
dialogStory12[5] = [1, 'We’ve also got the reserve troops here with us. There’s no problem with the supply of gold energy either.'];
dialogStory12[6] = [3, 'It seems that all the insects on this planet have gathered there and make a solid . I see a lot of aliens with the ability as the Alien Commander.'];
dialogStory12[7] = [1, 'I knew it from the very first time, this ain’t gonna be easy.'];
dialogStory12[8] = [3, 'We haven’t got any sign that those insects will attack us. They might wait for us to attack first.'];
dialogStory12[9] = [4, 'Alright. Commander Jonathan, you lead the main forces! Launch a full-scale assault and keep casualties at minimum.'];
dialogStory12[10] = [1, 'Yes, Sir!'];
var duitGakCukup = new Array();
duitGakCukup[1] = [3, 'Insufficient fund'];
var maximumLevel = new Array();
maximumLevel[1] = [3, 'This building has reached maximum level'];
var gakPunyaBarrack = new Array();
gakPunyaBarrack[1] = [3, 'You need to build at least a barrack on this base to defend'];
var awalDomination1 = new Array();
awalDomination1[1] = [3, 'Commander, General Egher has entrusted the entire command of the Auriga Squadron to you.'];
awalDomination1[2] = [3, 'You are now permitted to use your full authorization to lead our squadron. '];
awalDomination1[3] = [3, 'You are to annihilate the remaining aliens which still inhabit this planet, as well as to retake all of our bases.'];
awalDomination1[4] = [3, 'In order to do that, we need to prepare each of our base, defend from enemy\'s attack, and try to take over enemy\'s base'];
awalDomination1[5] = [3, 'As you can see behind me, there are some base and route'];
awalDomination1[6] = [3, 'To prepare and upgrade your base, click on any of our base you wish to upgrade'];
awalDomination1[7] = [3, 'You can try it now..'];
var awalDomination2 = new Array();
awalDomination2[1] = [3, 'See..'];
awalDomination2[2] = [3, 'When you click on one of our base, it will open a windows that shows the base statistics.'];
awalDomination2[3] = [3, 'On the left side on the top of the window, you can see Upgrade Tab'];
awalDomination2[4] = [3, 'Now, click on that tab to show the base upgrades'];
var awalDomination3 = new Array();
awalDomination3[1] = [3, 'That\'s it.'];
awalDomination3[2] = [3, 'The Upgrade tab menu shows any buildings upgrade available for your base'];
awalDomination3[3] = [3, 'It also shows any units and reinforcements available on that base'];
awalDomination3[4] = [3, 'You may have known that each bulding have different function on the battlefield'];
awalDomination3[5] = [3, 'But in domination mode, it also will affect the units and reinforcements available in that base'];
awalDomination3[6] = [3, 'For more information, you can roll-over your mouse to see each buildings upgrade, reinforcements, and units requirement'];
awalDomination3[7] = [3, 'Now, I will explain how to attack enemy\'s bases'];
awalDomination3[8] = [3, 'Close the upgrade window, and then select one of enemy\'s base'];
var awalDomination4 = new Array();
awalDomination4[1] = [3, 'Good.'];
awalDomination4[2] = [3, 'When you click on enemy\'s base, it also shows the base\'s statistics'];
awalDomination4[3] = [3, 'You can check the enemy\'s power there before you decide to attack'];
awalDomination4[4] = [3, 'If you ready to attack, click on the Attack button on the bottom of the base statistics'];
awalDomination4[5] = [3, 'But you have to make sure that the base has a route to at least one of our base'];
awalDomination4[6] = [3, 'I guess thats all you need to know, you will learn any trick as you play'];
awalDomination4[7] = [3, 'Good luck, Commander!'];
var awalDomination2salah = new Array();
awalDomination2salah[1] = [3, 'That\'s the enemy\'s base..'];
awalDomination2salah[2] = [3, 'You need to click on our base to open upgrade menu'];
var akhirDomination = new Array();
akhirDomination[1] = [3, 'Congratulation Commander!'];
akhirDomination[2] = [3, 'Commander, you managed to perform all your duties perfectly.'];
akhirDomination[3] = [3, 'All of our military bases are now under control and the aliens can no longer cause any disturbances to us.'];
akhirDomination[4] = [3, 'You’ve done a great job! Once again, Congratulations!'];
var tutorialDefense1 = new Array();
tutorialDefense1[1] = [3, 'Greeting commander!'];
tutorialDefense1[2] = [3, 'It\'s been a long time since your last battle'];
tutorialDefense1[3] = [3, 'I guess you maybe a little confused about our new system'];
tutorialDefense1[4] = [3, 'Let me help you to understand how it works'];
tutorialDefense1[5] = [3, 'Please follow exactly to what I will say'];
tutorialDefense1[6] = [3, 'You can look around the battlefield by pointing your cursor to each edge of the battlefield'];
tutorialDefense1[7] = [3, 'You can also use Arrow (Directional) Key on your keyboard to do so..'];
tutorialDefense1[8] = [3, 'But it\'s recommended to use A S D W so that you gain a better access onto another hotkey'];
tutorialDefense1[9] = [3, 'As you can see, there are some buildings on the left side of the battlefield behind me'];
tutorialDefense1[10] = [3, 'Each buildings have its own function, you can get more information by roll-over your mouse to the building'];
tutorialDefense1[11] = [3, 'To get access for each buildings, just click on it and the properties bar will show you the building\'s statistics and functions'];
tutorialDefense1[12] = [3, 'Now, you can try to roll-over to get some informations about those buldings, then click on the building to access its properties'];
var tutorialDefense2 = new Array();
tutorialDefense2[1] = [3, 'Good job!'];
tutorialDefense2[2] = [3, 'See, that will work for all of those buildings'];
tutorialDefense2[3] = [3, 'You can also select buildings using shortcut on your keyboard'];
tutorialDefense2[4] = [3, 'The shortcut list can be seen on option menu on Shortcut List section'];
tutorialDefense2[5] = [3, 'Like I said before, each building have its own properties and functions'];
tutorialDefense2[6] = [3, 'You sure will understand as you play later'];
tutorialDefense2[7] = [3, 'To unselect buildings or units, simply press SPACE key from your keyboard'];
tutorialDefense2[8] = [3, 'Now press SPACE to clear your selection, then try to select on that machine gun tower..'];
var tutorialDefense3 = new Array();
tutorialDefense3[1] = [3, 'Great..'];
tutorialDefense3[2] = [3, 'By default, towers are firing automatically on closest enemy between its range'];
tutorialDefense3[3] = [3, 'You can control the towers manually by selecting it, just like you did'];
tutorialDefense3[4] = [3, 'Now try to control them by pointing it with your cursor, and click to fire'];
tutorialDefense3[5] = [3, 'Each tower have different fire rate and reload speed'];
tutorialDefense3[6] = [3, 'Now\'s a time for you to try on your own'];
tutorialDefense3[7] = [3, 'Try to defend our base from the enemy\'s monster until the time is up..'];
var tutorialDefense4 = new Array();
tutorialDefense4[1] = [3, 'Well done commander!'];
tutorialDefense4[2] = [3, 'See you on the main base'];
tutorialDefense4[3] = [3, 'General Egher is waiting for you'];
var tutorialAttack1 = new Array();
tutorialAttack1[1] = [3, 'Ready for the mission, Commander?'];
tutorialAttack1[2] = [3, 'This time, we are going to learn how to create units and control them'];
tutorialAttack1[3] = [3, 'Please follow my instructions..'];
tutorialAttack1[4] = [3, 'On the left side, on our base behind me, you can see box shaped building, that\'s our Barrack'];
tutorialAttack1[5] = [3, 'Now click on that building..'];
var tutorialAttack2 = new Array();
tutorialAttack2[1] = [3, 'Good Job..'];
tutorialAttack2[2] = [3, 'Like I said, when you click on a building, the property bar will show the building\'s properties to you'];
tutorialAttack2[3] = [3, 'Barrack can produce units to help our defense, and also our attack'];
tutorialAttack2[4] = [3, 'When you click the unit\'s icon on the barrack properties, the unit will be produced one by one as queued'];
tutorialAttack2[5] = [3, 'You can see the queued units on the middle of Barrack\'s property bar'];
tutorialAttack2[6] = [3, 'To cancel unit production, just simply click on the queued unit you wish to cancel'];
tutorialAttack2[7] = [3, 'Now, try to produce 3 units'];
var tutorialAttack3 = new Array();
tutorialAttack3[1] = [3, 'Nicely done!'];
tutorialAttack3[2] = [3, 'Each unit have different abilities and statistics..'];
tutorialAttack3[3] = [3, 'To select and control the units, you need to clear your control of any buildings first'];
tutorialAttack3[4] = [3, 'Press SPACE BAR button on your keyboard to clear any control'];
tutorialAttack3[5] = [3, 'Then click and drag your mouse to create selection area, select the unit you wish to control'];
tutorialAttack3[6] = [3, 'You can try it now..'];
var tutorialAttack4 = new Array();
tutorialAttack4[1] = [3, 'Good..'];
tutorialAttack4[2] = [3, 'If you feel too lazy, you could also use Z Button on your keyboard as a shortcut to select all of your unit on the battlefield'];
tutorialAttack4[3] = [3, 'To control your units, after the selection, just click everywhere on the map to command them to go there'];
tutorialAttack4[4] = [3, 'You may also click on the enemy to command your units to attack it'];
tutorialAttack4[5] = [3, 'Now command our unit to attack the enemy\'s base'];
var tutorialAttack5 = new Array();
tutorialAttack5[1] = [3, 'That\'s it..'];
tutorialAttack5[2] = [3, 'You may notice that some units have Special Ability'];
tutorialAttack5[3] = [3, 'When a unit\'s special energy bar is full, they will automatically strike their special skill'];
tutorialAttack5[4] = [3, 'As an example, the Rifleman can shoot a grenade launcher as their special ability..'];
tutorialAttack5[5] = [3, 'The Beast Robot can run and slash the enemy\'s monsters'];
tutorialAttack5[6] = [3, 'You may learn each unit\'s ability later'];
tutorialAttack5[7] = [3, 'Now break that enemy\'s building down, we will wait for you at the main base'];
tutorialAttack5[8] = [3, 'Good luck, Commander!'];
var campaign3Dialog1 = new Array();
campaign3Dialog1[1] = [3, 'Commander, the enemy is attacking our base!'];
campaign3Dialog1[2] = [3, 'I have tried to contact our main base to send a reinforcement'];
campaign3Dialog1[3] = [3, 'Our pilot, Jasmine Khan will be here in any minutes'];
campaign3Dialog1[4] = [3, 'We need to defend our base until our main reinforcement arrived'];
campaign3Dialog1[5] = [3, 'You can call any support from Command Center'];
campaign3Dialog1[6] = [3, 'To do that, you can click on the Command Center Building on our base'];
campaign3Dialog1[7] = [3, 'Then click on the Reinforcement you wish to call'];
campaign3Dialog1[8] = [3, 'Once you request an reinforcement, we will try to progress it as soon as possible'];
campaign3Dialog1[9] = [3, 'After the progress finished, you may call the support'];
campaign3Dialog1[10] = [3, 'I guess thats all you need to know, you will learn any tricks on your own as you play later'];
campaign3Dialog1[11] = [3, 'Good luck, Commander!'];
var campaign3Dialog2 = new Array();
campaign3Dialog2[1] = [6, 'Sir, the reinforcement is ready to engage!'];
campaign3Dialog2[2] = [1, 'You are clear to engage'];
campaign3Dialog2[3] = [6, 'Roger that, sir!'];
campaign3Dialog2[4] = [3, 'This is going to be huge!'];
var campaign6Dialog1 = new Array();
campaign6Dialog1[1] = [3, 'Commander Jonathan, do you read me? Copy!'];
campaign6Dialog1[2] = [1, 'Yes, I heard you, Lieutenant Yui!'];
campaign6Dialog1[3] = [3, 'General Egher has just informed me that he is now engaged in such a brutal combat with the Alien Commander and it\'s armies of insects'];
campaign6Dialog1[4] = [3, 'You are ordered to kill the Alien Commander straight away.'];
campaign6Dialog1[5] = [3, 'Use sniper to do this task. The Alien Commander’s equipped with such a sturdy armor that only a sniper weapon can strictly blow him.'];
campaign6Dialog1[6] = [1, 'Copy that, Yui. Thanks.'];
campaign6Dialog1[7] = [3, 'The sniper is already on position..'];
campaign6Dialog1[8] = [3, 'But there is still no sight of enemy\'s leader, we should defend and support the sniper until the leader come out'];
campaign6Dialog1[9] = [3, 'Beware with hard skinned enemy, you should kill them first before it get to the sniper'];
campaign6Dialog1[10] = [3, 'Our mission will fail if our sniper get killed, so be very carefull..'];
campaign6Dialog1[11] = [3, 'Good luck, Commander!'];
var campaign6Dialog2 = new Array();
campaign6Dialog2[1] = [3, 'Commander, the enemy\'s leader have been sighted!'];
campaign6Dialog2[2] = [3, 'The enemy wave is also seems to be decreased'];
campaign6Dialog2[3] = [3, 'Order the sniper to kill it!'];
var campaign7Dialog1 = new Array();
campaign7Dialog1[1] = [1, 'General Egher, the aliens keep rushing in! I need additional squads to help me here, Sir!'];
campaign7Dialog1[2] = [1, 'I also need extra weapons and more energy! Our personnel seem to be really tired out and we’re also running out of ammunition!'];
campaign7Dialog1[3] = [1, 'In this condition, we can barely do anything!'];
campaign7Dialog1[4] = [4, 'I see. I’ll send some additional squads there. Right away.'];
campaign7Dialog1[5] = [4, 'Yui, tell all the other squad leaders to join Commander Jonathan, then contact the other bases we’ve managed to take over to come support us! Now!'];
campaign7Dialog1[6] = [3, 'Alright, Sir!'];
var campaign8Dialog1 = new Array();
campaign8Dialog1[1] = [3, 'Commander, we got clear answer about our latest request! energy supply reinforcement has arrived!'];
campaign8Dialog1[2] = [3, 'We need to defend while collecting the supply'];
campaign8Dialog1[3] = [3, 'Don\'t forget to order our unit to pick the supply box'];
campaign8Dialog1[4] = [3, 'Collect at least 30.000 point of energy for our next mission'];
campaign8Dialog1[5] = [3, 'Good luck Commander!'];
var campaign10Dialog1 = new Array();
campaign10Dialog1[1] = [3, 'Sir, our troops are very limited. We can only support a little reinforcement gradualy.'];
campaign10Dialog1[2] = [1, 'That\'s fine, I will try to push until I get our pilot, and then we will pull back to the main base'];
campaign10Dialog1[3] = [3, 'Alright, Sir. To help our pilot, first we need to get close enough to the crushed ship on the right side of the battlefield'];
campaign10Dialog1[4] = [3, 'Then after our pilots appear, you need to protect them at all cost, and return them to our base on the left side of the battlefield'];
campaign10Dialog1[5] = [3, 'Remmember that if our pilots get killed, our mission will be failed'];
campaign10Dialog1[6] = [3, 'Becarefull, Commander! and good luck!'];
var campaign10Dialog2 = new Array();
campaign10Dialog2[1] = [1, 'Pilot Jasmine, can you walk?'];
campaign10Dialog2[2] = [6, 'I broke my leg, but I will try to move as fast as I can.'];
campaign10Dialog2[3] = [1, 'We have to, since more enemy are coming more and more.'];
campaign10Dialog2[4] = [1, 'Lets get back to the main base! Pull back!'];
var campaign11Dialog1 = new Array();
campaign11Dialog1[1] = [1, 'Sir, I’m Commander Jonathan Power from Auriga Squadron.'];
campaign11Dialog1[2] = [5, 'I know who you are. We had fought together once, back in the old times.'];
campaign11Dialog1[3] = [1, 'I guess so, Captain.'];
campaign11Dialog1[4] = [1, 'OK. I’ll get straight to the point. Our armed forces really needs the help from the Mercenaries to destroy the aliens’ lair. '];
campaign11Dialog1[5] = [1, 'We can’t do it on our own relying on the main forces. We’ve got so widely spread out that our power starts to reduce. Will you the Mercenaries help us?'];
campaign11Dialog1[6] = [5, 'We’re Mercenaries, Commander Jonathan. We don’t get involved in any fights without getting any profit.'];
campaign11Dialog1[7] = [1, 'Yes, I did consider that myself. So, what do you want from me as your payment?'];
campaign11Dialog1[8] = [5, 'We want some of the supply of gold energy given to us regularly after the war is over.'];
campaign11Dialog1[9] = [5, 'If you can assure and guarantee that we have our demand fulfilled, we’ll help you exterminate the aliens.'];
campaign11Dialog1[10] = [1, 'Well, then I guess it’s a deal.'];
campaign11Dialog1[11] = [5, 'Don’t even think of denying this agreement. You know what we are capable of.'];
campaign11Dialog1[12] = [1, 'Sure. I won’t, Captain. Let’s move now.'];
var tamatOke = new Array();
tamatOke[1] = [3, 'Commander, General Egher has entrusted the entire command of the Auriga Squadron to you.'];
tamatOke[2] = [3, 'You are now permitted to use your full authorization to lead our squadron. '];
tamatOke[3] = [3, 'You are to annihilate the remaining aliens which still inhabit this planet, as well as to retake all of our bases.'];
stopAllSounds();
sBGM = new Sound(_root.slevel2);
sBGM.attachSound('coverBGM');
sBGM.start(posisiBGM / 1000, 999);
sBGM.setVolume(_root.volBGM);
}
movieClip 2826 {
}
movieClip 2836 {
}
frame 7 {
stop();
back_btn.onRollOver = function () {
soundFX('rolloverButton');
};
back_btn.onRelease = function () {
soundFX('clickButton');
posisiBGM = sBGM.position;
gotoAndStop('coverMenu');
};
}
movieClip 2844 {
}
frame 8 {
stop();
back_btn.onRollOver = function () {
soundFX('rolloverButton');
};
back_btn.onRelease = function () {
soundFX('clickButton');
posisiBGM = sBGM.position;
gotoAndStop('coverMenu');
};
var i = 1;
while (i <= 5) {
_root['medals' + i].i = i;
_root['medals' + i].gotoAndStop(i);
_root['medals' + i].onRollOver = function () {
judul_txt.text = medalsName[this.i];
des_txt.text = medalsDes[this.i];
};
_root['medals' + i].onRollOut = function () {
judul_txt.text = '';
des_txt.text = 'rollover to view description';
};
++i;
}
var k = 1;
while (k <= medalsList) {
_root['medals' + k].locked_mc._visible = false;
++k;
}
var j = 1;
while (j <= 9) {
_root['achievement' + j].j = j;
_root['achievement' + j].gotoAndStop(j);
_root['achievement' + j].onRollOver = function () {
judul_txt.text = achievementsName[this.j];
des_txt.text = achievementsDes[this.j];
};
_root['achievement' + j].onRollOut = function () {
judul_txt.text = '';
des_txt.text = 'rollover to view description';
};
if (achievementsList[j]) {
_root['achievement' + j].locked_mc._visible = false;
}
++j;
}
judul_txt.text = '';
des_txt.text = 'rollover to view description';
}
movieClip 2872 {
}
movieClip 2891 {
}
frame 9 {
stop();
var namaStatistik = new Array();
namaStatistik[1] = 'Total Battle Duration';
namaStatistik[2] = 'Total Battle Played';
namaStatistik[3] = 'Total Battle Win';
namaStatistik[4] = 'Total Battle Lose';
namaStatistik[5] = 'Total Energy Collected';
namaStatistik[6] = 'Total Unit Created';
namaStatistik[7] = 'Total Reinforcement Used';
namaStatistik[8] = 'Total Units Killed';
namaStatistik[9] = 'Total Monsters Killed';
namaStatistik[10] = 'Total Monsters Spawned';
namaStatistik[11] = 'Total Base Get';
namaStatistik[12] = 'Total Base Lost';
var dataStatistik = new Array();
dataStatistik[1] = TotalBattleDuration;
dataStatistik[2] = TotalBattlePlayed;
dataStatistik[3] = TotalBattleWin;
dataStatistik[4] = TotalBattleLose;
dataStatistik[5] = TotalEnergyCollected;
dataStatistik[6] = TotalUnitCreated;
dataStatistik[7] = TotalReinforcementUsed;
dataStatistik[8] = TotalUnitsKilled;
dataStatistik[9] = TotalMonstersKilled;
dataStatistik[10] = TotalMonstersSpawned;
dataStatistik[11] = TotalBaseGet;
dataStatistik[12] = TotalBaseLost;
for (var i in dataStatistik) {
_root['stat' + i].text1.text = namaStatistik[i];
_root['stat' + i].text2.text = dataStatistik[i];
}
stat1.text2.text = (convertTimer(TotalBattleDuration)).jam + ':' + (convertTimer(TotalBattleDuration)).menit + ':' + (convertTimer(TotalBattleDuration)).detik;
back_btn.onRollOver = function () {
soundFX('rolloverButton');
};
back_btn.onRelease = function () {
soundFX('clickButton');
posisiBGM = sBGM.position;
gotoAndStop('coverMenu');
};
reset_btn.onRollOver = function () {
soundFX('rolloverButton');
};
reset_btn.onRelease = function () {
resetStatistics();
soundFX('clickButton');
posisiBGM = sBGM.position;
gotoAndStop('coverMenu');
};
}
movieClip 2898 {
}
frame 10 {
soundBGM('story1');
}
frame 11 {
function countBase(_ally) {
var v3 = 0;
var v2 = 1;
while (v2 <= 3) {
var v1 = 1;
while (v1 <= 3) {
if (baseData['base' + v2 + '_' + v1].ally == _ally) {
++v3;
}
++v1;
}
++v2;
}
return v3;
}
function detectAround(_who) {
var v4 = new Array();
var v2 = 1;
while (v2 <= 3) {
var v1 = 1;
while (v1 <= 3) {
for (var v6 in baseData['base' + v2 + '_' + v1].around) {
var v3 = baseData[baseData['base' + v2 + '_' + v1].around[v6]];
if (v3.ID == _who.ID) {
if (baseData['base' + v2 + '_' + v1].ally == 1) {
v4.push(baseData['base' + v2 + '_' + v1]);
}
}
}
++v1;
}
++v2;
}
return v4;
}
function tampilNotifUnlock(_text, _type, _frame) {
soundFX('unlockUnit');
_root.attachMovie('Strategy_notifUnlock', 'unlock_mc', 999);
_root.unlock_mc._x = 400;
_root.unlock_mc._y = 210;
_root.unlock_mc.des.text = _text;
_root.unlock_mc.photo1_mc._visible = false;
_root.unlock_mc.photo2_mc._visible = false;
_root.unlock_mc['photo' + _type + '_mc'].locked_mc._visible = false;
_root.unlock_mc['photo' + _type + '_mc']._visible = true;
_root.unlock_mc['photo' + _type + '_mc'].gotoAndStop(_frame);
_root.unlock_mc.onRollOver = function () {};
_root.unlock_mc.onRelease = function () {
unlock_mc.removeMovieClip();
cekUnlockArmy(_root, kotaDipilih);
cekUnlockReinforcement(_root, kotaDipilih);
};
_root.unlock_mc.useHandCursor = false;
}
function cekUnlockArmy(container, _who) {
if (baseData['base' + _who.j + '_' + _who.k].building1 >= 1) {
if (baseData['base' + _who.j + '_' + _who.k].army1 == 0) {
baseData['base' + _who.j + '_' + _who.k].army1 = 1;
tampilNotifUnlock('You have unlocked ' + armyData.army1.nama, 1, 1);
return true;
}
}
if (baseData['base' + _who.j + '_' + _who.k].building1 >= 2 && baseData['base' + _who.j + '_' + _who.k].building4 >= 1) {
if (baseData['base' + _who.j + '_' + _who.k].army2 == 0) {
baseData['base' + _who.j + '_' + _who.k].army2 = 1;
tampilNotifUnlock('You have unlocked ' + armyData.army2.nama, 1, 2);
return true;
}
}
if (baseData['base' + _who.j + '_' + _who.k].building1 >= 3 && baseData['base' + _who.j + '_' + _who.k].building5 >= 1) {
if (baseData['base' + _who.j + '_' + _who.k].army3 == 0) {
baseData['base' + _who.j + '_' + _who.k].army3 = 1;
tampilNotifUnlock('You have unlocked ' + armyData.army3.nama, 1, 3);
return true;
}
}
if (baseData['base' + _who.j + '_' + _who.k].building1 >= 4 && baseData['base' + _who.j + '_' + _who.k].building4 >= 2 && baseData['base' + _who.j + '_' + _who.k].building7 >= 1) {
if (baseData['base' + _who.j + '_' + _who.k].army4 == 0) {
baseData['base' + _who.j + '_' + _who.k].army4 = 1;
tampilNotifUnlock('You have unlocked ' + armyData.army4.nama, 1, 4);
return true;
}
}
if (baseData['base' + _who.j + '_' + _who.k].building1 >= 6 && baseData['base' + _who.j + '_' + _who.k].building7 >= 3 && baseData['base' + _who.j + '_' + _who.k].building6 >= 1) {
if (baseData['base' + _who.j + '_' + _who.k].army5 == 0) {
baseData['base' + _who.j + '_' + _who.k].army5 = 1;
tampilNotifUnlock('You have unlocked ' + armyData.army5.nama, 1, 5);
return true;
}
}
if (baseData['base' + _who.j + '_' + _who.k].building1 >= 7 && baseData['base' + _who.j + '_' + _who.k].building7 >= 4 && baseData['base' + _who.j + '_' + _who.k].building6 >= 3) {
if (baseData['base' + _who.j + '_' + _who.k].army6 == 0) {
baseData['base' + _who.j + '_' + _who.k].army6 = 1;
tampilNotifUnlock('You have unlocked ' + armyData.army6.nama, 1, 6);
return true;
}
}
if (baseData['base' + _who.j + '_' + _who.k].building1 >= 8 && baseData['base' + _who.j + '_' + _who.k].building7 >= 5 && baseData['base' + _who.j + '_' + _who.k].building6 >= 3 && baseData['base' + _who.j + '_' + _who.k].building9 >= 3) {
if (baseData['base' + _who.j + '_' + _who.k].army7 == 0) {
baseData['base' + _who.j + '_' + _who.k].army7 = 1;
tampilNotifUnlock('You have unlocked ' + armyData.army7.nama, 1, 7);
return true;
}
}
if (baseData['base' + _who.j + '_' + _who.k].building1 >= 9 && baseData['base' + _who.j + '_' + _who.k].building7 >= 7 && baseData['base' + _who.j + '_' + _who.k].building6 >= 5 && baseData['base' + _who.j + '_' + _who.k].building9 >= 5) {
if (baseData['base' + _who.j + '_' + _who.k].army8 == 0) {
baseData['base' + _who.j + '_' + _who.k].army8 = 1;
tampilNotifUnlock('You have unlocked ' + armyData.army8.nama, 1, 8);
return true;
}
}
var j = 1;
while (j <= 8) {
container.info_mc['army' + j].j = j;
container.info_mc['army' + j].gotoAndStop(j);
if (baseData['base' + _who.j + '_' + _who.k]['army' + j] > 0) {
container.info_mc['army' + j].locked_mc._visible = false;
container.info_mc['army' + j].onRollOver = function () {
tampilRollover2(_root, _xmouse, _ymouse, true, armyData['army' + this.j].nama, armyData['army' + this.j].deskripsi + '\n' + '\nLifePoint: ' + armyData['army' + this.j].lifeAwal + '\nAttack: ' + armyData['army' + this.j].attack + '\nDefense: ' + armyData['army' + this.j].defense + '\nSpeed: ' + armyData['army' + this.j].speed);
};
} else {
container.info_mc['army' + j].onRollOver = function () {
tampilRollover2(_root, _xmouse, _ymouse, true, armyData['army' + this.j].nama, armyData['army' + this.j].deskripsi + '\n\nUnlock Requirement:\n' + armyData['army' + this.j].syarat);
};
}
container.info_mc['army' + j].onRollOut = function () {
removeRollover(_root);
};
++j;
}
}
function cekUnlockReinforcement(container, _who) {
if (baseData['base' + _who.j + '_' + _who.k].building7 >= 1) {
if (baseData['base' + _who.j + '_' + _who.k].reinforcement1 == 0) {
baseData['base' + _who.j + '_' + _who.k].reinforcement1 = 1;
tampilNotifUnlock('You have unlocked Sniper Strike', 2, 1);
return true;
}
}
if (baseData['base' + _who.j + '_' + _who.k].building7 >= 2 && baseData['base' + _who.j + '_' + _who.k].building6 >= 1) {
if (baseData['base' + _who.j + '_' + _who.k].reinforcement2 == 0) {
baseData['base' + _who.j + '_' + _who.k].reinforcement2 = 1;
tampilNotifUnlock('You have unlocked Parachuter Bomb', 2, 2);
return true;
}
}
if (baseData['base' + _who.j + '_' + _who.k].building7 >= 3 && baseData['base' + _who.j + '_' + _who.k].building9 >= 3) {
if (baseData['base' + _who.j + '_' + _who.k].reinforcement3 == 0) {
baseData['base' + _who.j + '_' + _who.k].reinforcement3 = 1;
tampilNotifUnlock('You have unlocked Healing Lasser', 2, 3);
return true;
}
}
if (baseData['base' + _who.j + '_' + _who.k].building7 >= 4 && baseData['base' + _who.j + '_' + _who.k].building6 >= 3 && baseData['base' + _who.j + '_' + _who.k].building8 >= 3) {
if (baseData['base' + _who.j + '_' + _who.k].reinforcement4 == 0) {
baseData['base' + _who.j + '_' + _who.k].reinforcement4 = 1;
tampilNotifUnlock('You have unlocked Supply Drop Zone', 2, 4);
return true;
}
}
if (baseData['base' + _who.j + '_' + _who.k].building7 >= 5 && baseData['base' + _who.j + '_' + _who.k].building6 >= 5 && baseData['base' + _who.j + '_' + _who.k].building3 >= 5) {
if (baseData['base' + _who.j + '_' + _who.k].reinforcement5 == 0) {
baseData['base' + _who.j + '_' + _who.k].reinforcement5 = 1;
tampilNotifUnlock('You have unlocked Frozzen Bomb', 2, 5);
return true;
}
}
if (baseData['base' + _who.j + '_' + _who.k].building7 >= 9 && baseData['base' + _who.j + '_' + _who.k].building6 >= 9 && baseData['base' + _who.j + '_' + _who.k].building9 >= 9) {
if (baseData['base' + _who.j + '_' + _who.k].reinforcement6 == 0) {
baseData['base' + _who.j + '_' + _who.k].reinforcement6 = 1;
tampilNotifUnlock('You have unlocked Air Strike', 2, 6);
return true;
}
}
var k = 1;
while (k <= 6) {
container.info_mc['reinf' + k].k = k;
container.info_mc['reinf' + k].gotoAndStop(k);
if (baseData['base' + _who.j + '_' + _who.k]['reinforcement' + k] > 0) {
container.info_mc['reinf' + k].locked_mc._visible = false;
container.info_mc['reinf' + k].onRollOver = function () {
tampilRollover2(_root, _xmouse, _ymouse, true, reinforcementData['reinforcement' + this.k].nama, reinforcementData['reinforcement' + this.k].deskripsi);
};
} else {
container.info_mc['reinf' + k].onRollOver = function () {
tampilRollover2(_root, _xmouse, _ymouse, true, reinforcementData['reinforcement' + this.k].nama, reinforcementData['reinforcement' + this.k].deskripsi + '\n\nUnlock Requirement:\n' + reinforcementData['reinforcement' + this.k].syarat);
};
}
container.info_mc['reinf' + k].onRollOut = function () {
removeRollover(_root);
};
++k;
}
}
function countBasePower(who) {
var v2 = 0;
var v1 = 0;
while (v1 <= 9) {
v2 += 50 * who['building' + v1];
++v1;
}
return v2;
}
function tampilMenu() {
isPaused = true;
lockBaseButton();
_root.attachMovie('Strategy_menu', 'option', 9999);
option._x = 400;
option._y = 210;
option.resume_btn.onRollOver = function () {
soundFX('rolloverButton');
};
option.resume_btn.onRelease = function () {
soundFX('clickButton');
isPaused = false;
mouseLook = true;
menu_btn.enabled = true;
endturn_btn.enabled = true;
refreshBase();
this._parent.removeMovieClip();
};
option.option_btn.onRollOver = function () {
soundFX('rolloverButton');
};
option.option_btn.onRelease = function () {
soundFX('clickButton');
tampilOption();
this._parent.removeMovieClip();
};
option.save_btn.onRollOver = function () {
soundFX('rolloverButton');
};
option.save_btn.onRelease = function () {
saveDomination();
tampilNotifAbove('Data Saved!');
soundFX('clickButton');
};
option.walkthrough_btn.onRollOver = function () {
soundFX('rolloverButton');
};
option.walkthrough_btn.onRelease = function () {
soundFX('clickButton');
getURL('http://www.playhub.com/shooting-games/6469/Squadron-Auriga-Walkthrough.html?utm_medium=brandedgames_external&utm_campaign=squadron_auriga_wt&utm_source=ingame&utm_content=ingame&logo=2', '_blank');
};
option.quit_btn.onRollOver = function () {
soundFX('rolloverButton');
};
option.quit_btn.onRelease = function () {
soundFX('clickButton');
isPaused = false;
defaultCursor();
soundBGM('coverBGM');
gotoAndStop('coverMenu');
this._parent.removeMovieClip();
};
option.more_btn.onRollOver = function () {
soundFX('rolloverButton');
};
option.more_btn.onRelease = function () {
soundFX('clickButton');
getURL('http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=squadron_auriga&utm_source=ingame&utm_content=ingame&logo=2', '_blank');
};
}
function refreshInfo(container, _who) {
container.info_mc.duit.text = energy;
container.info_mc.judul.text = baseData['base' + _who.j + '_' + _who.k].nama;
baseData['base' + _who.j + '_' + _who.k].energyIncome = 300 * baseData['base' + _who.j + '_' + _who.k].building8;
container.info_mc.deskripsi.text = 'Income per turn: ' + baseData['base' + _who.j + '_' + _who.k].energyIncome;
container.info_mc.deskripsi.text += '\n\nBuildings Available ';
var v1 = 0;
while (v1 <= 9) {
container.info_mc['gambar' + v1]._visible = false;
if (baseData['base' + _who.j + '_' + _who.k]['building' + v1] > 0) {
container.info_mc.deskripsi.text += '\n- ' + buildingData['building' + v1].nama;
container.info_mc['gambar' + v1]._visible = true;
}
++v1;
}
if (baseData['base' + _who.j + '_' + _who.k].ally == 1) {
container.info_mc.tabtext_mc._visible = true;
container.info_mc.tab1._visible = true;
container.info_mc.tab2._visible = true;
container.info_mc.gambarMusuh._visible = false;
baseData['base' + _who.j + '_' + _who.k].basePower = countBasePower(baseData['base' + _who.j + '_' + _who.k]);
container.info_mc.attack_btn.enabled = false;
container.info_mc.attack_btn._visible = false;
container.info_mc.tab2.enabled = true;
} else {
container.info_mc.tabtext_mc._visible = false;
container.info_mc.tab1._visible = false;
container.info_mc.tab2._visible = false;
container.info_mc.gambarMusuh._visible = true;
container.info_mc.attack_btn.enabled = true;
container.info_mc.attack_btn._visible = true;
container.info_mc.attack_btn.onRelease = function () {
tampilAttackFrom(detectAround(baseData['base' + _who.j + '_' + _who.k]), _who);
};
container.info_mc.tab2.enabled = false;
}
container.info_mc.basePower.text = 'Base Power: ' + baseData['base' + _who.j + '_' + _who.k].basePower;
if (!cekUnlockArmy(container, _who)) {
cekUnlockReinforcement(container, _who);
}
}
function tampilInfo(container, whereX, whereY, _who) {
kotaDipilih = _who;
menu_btn.enabled = false;
endturn_btn.enabled = false;
defaultCursor();
removeRollover(_root);
container.attachMovie('Strategy_info', 'info_mc', 998);
container.info_mc._x = whereX;
container.info_mc._y = whereY;
refreshInfo(container, _who);
container.info_mc.tab1.gotoAndStop(1);
container.info_mc.tab2.gotoAndStop(1);
container.info_mc['tab' + container.info_mc._currentframe].gotoAndStop(2);
container.info_mc.tab1.onRelease = function () {
container.info_mc.gotoAndStop(1);
container.info_mc.tab1.gotoAndStop(1);
container.info_mc.tab2.gotoAndStop(1);
container.info_mc['tab' + container.info_mc._currentframe].gotoAndStop(2);
refreshInfo(container, _who);
};
container.info_mc.tab2.onRelease = function () {
if (!tutorialDomination[3] && tutorialDomination[2]) {
tampilDialog(awalDomination3);
tutorialDomination[3] = true;
}
container.info_mc.gotoAndStop(2);
container.info_mc.tab1.gotoAndStop(1);
container.info_mc.tab2.gotoAndStop(1);
container.info_mc.duit.text = energy;
container.info_mc['tab' + container.info_mc._currentframe].gotoAndStop(2);
var i = 1;
while (i <= 10) {
container.info_mc['upg' + i].i = i - 1;
container.info_mc['upg' + i].gotoAndStop(i);
container.info_mc['upg' + i].lev.text = baseData['base' + _who.j + '_' + _who.k]['building' + (i - 1)];
container.info_mc['upg' + i].who = _who;
container.info_mc['upg' + i].onRollOver = function () {
tampilRollover2(_root, _xmouse, _ymouse, true, buildingData['building' + this.i].nama, buildingData['building' + this.i].deskripsi + '\n\nCost: ' + buildingUpgradePrice[this.i]);
};
container.info_mc['upg' + i].onRollOut = function () {
removeRollover(_root);
};
container.info_mc['upg' + i].onRelease = function () {
if (baseData['base' + this.who.j + '_' + this.who.k]['building' + this.i] < 9) {
if (energy - buildingUpgradePrice[this.i] >= 0) {
soundFX('upgraded');
++baseData['base' + this.who.j + '_' + this.who.k]['building' + this.i];
container.info_mc['upg' + (this.i + 1)].lev.text = baseData['base' + this.who.j + '_' + this.who.k]['building' + this.i];
energy -= buildingUpgradePrice[this.i];
container.info_mc.duit.text = energy;
refreshBase();
if (!cekUnlockArmy(container, this.who)) {
cekUnlockReinforcement(container, this.who);
}
} else {
soundFX('failedUpgrade');
tampilDialog(duitGakCukup);
}
} else {
soundFX('failedUpgrade');
tampilDialog(maximumLevel);
}
};
++i;
}
if (!cekUnlockArmy(container, _who)) {
cekUnlockReinforcement(container, _who);
}
};
container.info_mc.close_btn.onRelease = closeInfo;
}
function closeInfo() {
changeCursor('Cursor_strategy');
refreshBase();
_root.info_mc.removeMovieClip();
_root.attack_mc.removeMovieClip();
menu_btn.enabled = true;
endturn_btn.enabled = true;
mouseLook = true;
}
function tampilAttackFrom(_array, _who) {
_root.attachMovie('Strategy_attackfrom', 'attack_mc', 999);
_root.attack_mc._x = 400;
_root.attack_mc._y = 210;
_root.attack_mc.gotoAndStop(_array.length + 1);
var i = 1;
while (i <= 4) {
_root.attack_mc['base' + i].text = '';
_root.attack_mc['base' + i].text = _array[i - 1].nama;
_root.attack_mc['btn' + i].i = i;
_root.attack_mc['btn' + i].onRelease = function () {
var v2 = 'jalur' + _array[this.i - 1].ID + '_' + _who.ID;
trace('jalur perang: ' + v2);
for (var v4 in jalurPerang) {
for (var v3 in jalurPerang[v4]) {
if (v2 == jalurPerang[v4][v3]) {
scene = v4;
}
}
}
baseBattleNow = baseData['base' + _who.j + '_' + _who.k];
attackerBattleNow = _array[this.i - 1];
gotoAndStop('preload');
closeInfo();
};
++i;
}
_root.attack_mc.black_btn.onRelease = function () {
attack_mc.removeMovieClip();
};
_root.attack_mc.black_btn.useHandCursor = false;
}
function tampilRollover1(container, whereX, whereY, _des) {
container.attachMovie('rollover_effect1', 'rollover_mc', 999);
container.rollover_mc._x = whereX;
container.rollover_mc._y = whereY;
container.rollover_mc.des = _des;
}
function tampilRollover2(container, whereX, whereY, _followMouse, _judul, _des) {
container.attachMovie('Strategy_info_rollover', 'rollover_mc', 999);
container.rollover_mc._x = -500;
container.rollover_mc._y = -500;
container.rollover_mc.judul.text = _judul;
container.rollover_mc.des.text = _des;
if (_followMouse) {
container.rollover_mc.onEnterFrame = function () {
if (_xmouse < 400) {
this._x = _xmouse + 25;
} else {
this._x = _xmouse - (this._width + 10);
}
if (_ymouse < 210) {
this._y = _ymouse;
} else {
this._y = _ymouse - (this._height + 10);
}
};
}
}
function removeRollover(container) {
delete container.rollover_mc.onEnterFrame;
container.rollover_mc.removeMovieClip();
}
function refreshBase() {
removeRollover(_root);
ourbase_teks.text = countBase(1);
enemybase_teks.text = countBase(2);
energy_teks.text = energy;
turn_teks.text = turn;
if (energy >= 10000) {
newAchievement(6);
}
if (energy >= 30000) {
newAchievement(7);
}
if (energy >= 50000) {
newAchievement(8);
}
if (countBase(1) >= 6) {
newAchievement(9);
}
var j = 1;
while (j <= 3) {
var k = 1;
while (k <= 3) {
if (baseData['base' + j + '_' + k].ally == 1) {
baseData['base' + j + '_' + k].basePower = countBasePower(baseData['base' + j + '_' + k]);
}
peta_mc['base' + j + '_' + k].j = j;
peta_mc['base' + j + '_' + k].k = k;
var v3 = 1;
while (v3 <= 9) {
peta_mc['base' + j + '_' + k]['building' + v3]._visible = false;
if (baseData['base' + j + '_' + k]['building' + v3] > 0) {
peta_mc['base' + j + '_' + k]['building' + v3]._visible = true;
}
++v3;
}
peta_mc['base' + j + '_' + k].ID = baseData['base' + j + '_' + k].ID;
peta_mc['base' + j + '_' + k].ally = baseData['base' + j + '_' + k].ally;
peta_mc['base' + j + '_' + k].gotoAndStop(baseData['base' + j + '_' + k].ally);
peta_mc['base' + j + '_' + k].enabled = true;
peta_mc['base' + j + '_' + k].onRollOver = function () {
soundFX('baseRollover');
tampilRollover1(peta_mc, this._x, this._y, baseData['base' + this.j + '_' + this.k].nama);
};
peta_mc['base' + j + '_' + k].onRollOut = function () {
removeRollover(peta_mc);
};
peta_mc['base' + j + '_' + k].onRelease = function () {
soundFX('baseClick');
if (this.ally == 1) {
if (!tutorialDomination[2]) {
tampilDialog(awalDomination2);
tutorialDomination[2] = true;
}
tampilInfo(_root, 400, 210, this);
mouseLook = false;
camTargetX = baseData['base' + this.j + '_' + this.k].coordinate[0];
camTargetY = baseData['base' + this.j + '_' + this.k].coordinate[1];
lockBaseButton();
tutorialDomination[2] = true;
} else {
if (!tutorialDomination[2]) {
tampilDialog(awalDomination2salah);
} else {
if (!tutorialDomination[4] && tutorialDomination[3]) {
tampilDialog(awalDomination4);
tutorialDomination[4] = true;
}
tampilInfo(_root, 400, 210, this);
mouseLook = false;
camTargetX = baseData['base' + this.j + '_' + this.k].coordinate[0];
camTargetY = baseData['base' + this.j + '_' + this.k].coordinate[1];
lockBaseButton();
}
}
};
peta_mc['base' + j + '_' + k].useHandCursor = false;
++k;
}
++j;
}
if (countBase(1) >= 9) {
lockBaseButton();
defaultCursor();
mouseLook = false;
camTargetX = -250;
camTargetY = -200;
tampilDialog(akhirDomination, false);
}
}
function lockBaseButton() {
var v2 = 1;
while (v2 <= 3) {
var v1 = 1;
while (v1 <= 3) {
peta_mc['base' + v2 + '_' + v1].enabled = false;
++v1;
}
++v2;
}
}
function collectEnergy() {
var v4 = 0;
var v3 = 1;
while (v3 <= 3) {
var v1 = 1;
while (v1 <= 3) {
if (baseData['base' + v3 + '_' + v1].ally == 1) {
var v2 = baseData['base' + v3 + '_' + v1];
v2.energyIncome = 300 * v2.building8;
v4 += v2.energyIncome;
}
++v1;
}
++v3;
}
return v4;
}
function spawnEnemyTurn() {
var v2 = 1;
while (v2 <= 3) {
var v1 = 1;
while (v1 <= 3) {
if (baseData['base' + v2 + '_' + v1].ally == 2 && baseData['base' + v2 + '_' + v1].basePower < 5000) {
var v3 = baseData['base' + v2 + '_' + v1];
if (v3.basePower < 2000) {
v3.basePower += 100;
}
}
++v1;
}
++v2;
}
}
function tampilAttackEnemy(_ourBase, _enemyBase, _des) {
soundFX('allert');
_root.attachMovie('Strategy_enemyAttack', 'attack_mc', 999);
_root.attack_mc._x = 400;
_root.attack_mc._y = 210;
_root.attack_mc.des.text = _des;
_root.attack_mc.onEnterFrame = function () {
defaultCursor();
mouseLook = false;
camTargetX = _ourBase.coordinate[0];
camTargetY = _ourBase.coordinate[1];
};
_root.attack_mc.resign_btn.onRelease = function () {
++TotalBaseLost;
saveAchievementData();
_ourBase.ally = 2;
refreshBase();
changeCursor('Cursor_strategy');
mouseLook = true;
delete attack_mc.onEnterFrame;
_root.attack_mc.removeMovieClip();
cekSeranganMusuh();
};
_root.attack_mc.defend_btn.onRelease = function () {
if (_ourBase.building1 > 0) {
baseBattleNow = _ourBase;
attackerBattleNow = _enemyBase;
gotoAndStop('preload');
delete attack_mc.onEnterFrame;
_root.attack_mc.removeMovieClip();
} else {
tampilDialog(gakPunyaBarrack, false);
}
};
}
function cekSeranganMusuh() {
tampilEndTurn();
var v6 = false;
var v5 = 1;
while (v5 <= 3) {
var v3 = 1;
while (v3 <= 3) {
if (baseData['base' + v5 + '_' + v3].ally == 2) {
var v1 = baseData['base' + v5 + '_' + v3];
for (var v9 in v1.around) {
if (baseData[v1.around[v9]].ally == 1 && !baseData[v1.around[v9]].sudahDiserang) {
var v2 = baseData[v1.around[v9]];
trace('base yg mau nyerang: ' + v1.nama + ' base power: ' + v1.basePower);
trace('base yg mau diserang: ' + v2.nama + ' base power: ' + v2.basePower);
if (v2.basePower - v1.basePower <= 0) {
trace('SERANGAN!! musuh menyerang dari: ' + v1.nama + ' menyerang kota: ' + v2.nama);
var v4 = 'jalur' + v1.ID + '_' + v2.ID;
tampilAttackEnemy(v2, v1, 'Enemy Attack from: ' + v1.nama + '\nOn our base: ' + v2.nama);
for (var v8 in jalurPerang) {
for (var v7 in jalurPerang[v8]) {
if (v4 == jalurPerang[v8][v7]) {
scene = v8;
}
}
}
v2.sudahDiserang = true;
v6 = true;
}
}
if (v6) {
break;
}
}
}
++v3;
}
++v5;
}
}
function tampilEndTurn() {
lockBaseButton();
defaultCursor();
mouseLook = false;
camTargetX = -250;
camTargetY = -200;
menu_btn.enabled = false;
endturn_btn.enabled = false;
_root.attachMovie('endturn_mc', 'endturn_mc', 999);
_root.endturn_mc.turn = turn + 1;
}
function cheatMoney() {
energy += 100;
refreshBase();
}
stop();
soundBGM('strategySound');
var mouseLook = true;
peta_mc.onEnterFrame = function () {
this.difX = camTargetX - this._x;
this.difY = camTargetY - this._y;
this._x += this.difX / 10;
this._y += this.difY / 10;
sky_mc.difX = camTargetX - sky_mc._x / 2;
sky_mc.difY = camTargetY - sky_mc._y / 2;
sky_mc._x += sky_mc.difX / 5;
sky_mc._y += sky_mc.difY / 5;
if (mouseLook) {
camTargetX = -(_xmouse * 1 / 2);
camTargetY = -_ymouse;
}
};
var scene = 1;
var baseBattleNow;
var jalurPerang = new Array();
jalurPerang[1] = ['jalur1_2', 'jalur2_1'];
jalurPerang[2] = ['jalur2_3', 'jalur3_2'];
jalurPerang[3] = ['jalur1_4', 'jalur4_1'];
jalurPerang[4] = ['jalur2_5', 'jalur5_2'];
jalurPerang[5] = ['jalur3_6', 'jalur6_3'];
jalurPerang[6] = ['jalur4_5', 'jalur5_4'];
jalurPerang[7] = ['jalur5_6', 'jalur6_5'];
jalurPerang[8] = ['jalur4_7', 'jalur7_4'];
jalurPerang[9] = ['jalur5_8', 'jalur8_5'];
jalurPerang[10] = ['jalur6_9', 'jalur9_6'];
jalurPerang[11] = ['jalur7_8', 'jalur8_7'];
jalurPerang[12] = ['jalur8_9', 'jalur9_8'];
refreshBase();
war_btn.onRelease = function () {
gotoAndStop('preload');
};
endturn_btn.onRelease = function () {
var v2 = 1;
while (v2 <= 3) {
var v1 = 1;
while (v1 <= 3) {
if (baseData['base' + v2 + '_' + v1].ally == 1) {
baseData['base' + v2 + '_' + v1].sudahDiserang = false;
}
++v1;
}
++v2;
}
lockBaseButton();
enemyTurn = true;
spawnEnemyTurn();
cekSeranganMusuh();
energy += collectEnergy();
};
menu_btn.onRelease = function () {
mouseLook = false;
camTargetX = -250;
camTargetY = -200;
menu_btn.enabled = false;
endturn_btn.enabled = false;
tampilMenu();
};
if (afterWar) {
lockBaseButton();
refreshBase();
defaultCursor();
if (enemyTurn) {
cekSeranganMusuh();
enemyTurn = false;
}
afterWar = false;
}
changeCursor('Cursor_strategy');
if (newDomination) {
lockBaseButton();
defaultCursor();
mouseLook = false;
camTargetX = -250;
camTargetY = -200;
var tutorialDomination = [null, false, false, false, false, false];
if (!tutorialDomination[1]) {
tampilDialog(awalDomination1);
tutorialDomination[1] = true;
}
newDomination = false;
} else {
var tutorialDomination = [null, true, true, true, true, true];
}
var tombolKu = new Object();
tombolKu.onKeyDown = function () {
if (Key.isDown(45)) {
cheatMoney();
}
};
Key.addListener(tombolKu);
}
// unknown tag 88 length 63
movieClip 2949 {
}
movieClip 2952 {
}
movieClip 2955 {
}
movieClip 2958 {
}
movieClip 2961 {
}
movieClip 2964 {
}
movieClip 2967 {
}
movieClip 2970 {
}
movieClip 2973 {
}
movieClip 2976 {
}
movieClip 2977 {
}
movieClip 2980 {
}
// unknown tag 88 length 73
frame 12 {
gotoAndStop('strategy');
}
frame 13 {
stop();
stopAllSounds();
defaultCursor();
var sebutanAlly = [0, 'Our Base', 'Enemy\'s Base'];
var ourBase = new Object();
acceptProperty(baseData.baseTemplate, ourBase);
var enemyPowerWaveTemplate = new Object();
enemyPowerWaveTemplate.spawnRate = 50;
enemyPowerWaveTemplate.musuhRarity = [0, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2];
enemyPowerWaveTemplate.musuhAvailable = [1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15];
enemyPowerWaveTemplate.bossAvailable = 0;
enemyPowerWaveTemplate.enemyBuildingsLife = 5000;
var enemyPowerWaveLvl1 = new Object();
acceptProperty(enemyPowerWaveTemplates, enemyPowerWaveLvl1);
enemyPowerWaveLvl1.spawnRate = 120;
enemyPowerWaveLvl1.musuhRarity = [0, 1, 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 2, 2];
enemyPowerWaveLvl1.musuhAvailable = [1, 2, 3, 5, 7];
enemyPowerWaveLvl1.bossAvailable = 0;
enemyPowerWaveLvl1.enemyBuildingsLife = 1000;
var enemyPowerWaveLvl2 = new Object();
acceptProperty(enemyPowerWaveTemplates, enemyPowerWaveLvl2);
enemyPowerWaveLvl2.spawnRate = 110;
enemyPowerWaveLvl2.musuhRarity = [0, 1, 1, 1, 3, 2, 2, 1, 1, 3, 1, 1, 1, 1, 2, 2];
enemyPowerWaveLvl2.musuhAvailable = [1, 2, 3, 4, 5, 6, 7];
enemyPowerWaveLvl2.bossAvailable = 0;
enemyPowerWaveLvl2.enemyBuildingsLife = 1000;
var enemyPowerWaveLvl3 = new Object();
acceptProperty(enemyPowerWaveTemplates, enemyPowerWaveLvl3);
enemyPowerWaveLvl3.spawnRate = 100;
enemyPowerWaveLvl3.musuhRarity = [0, 1, 1, 1, 2, 2, 2, 1, 2, 3, 1, 1, 1, 1, 2, 2];
enemyPowerWaveLvl3.musuhAvailable = [1, 2, 3, 4, 5, 6, 7, 8];
enemyPowerWaveLvl3.bossAvailable = 0;
enemyPowerWaveLvl3.enemyBuildingsLife = 1500;
var enemyPowerWaveLvl4 = new Object();
acceptProperty(enemyPowerWaveTemplates, enemyPowerWaveLvl4);
enemyPowerWaveLvl4.spawnRate = 90;
enemyPowerWaveLvl4.musuhRarity = [0, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 3, 2];
enemyPowerWaveLvl4.musuhAvailable = [1, 2, 3, 4, 5, 6, 7, 8, 9, 14];
enemyPowerWaveLvl4.bossAvailable = 0;
enemyPowerWaveLvl4.enemyBuildingsLife = 1500;
var enemyPowerWaveLvl5 = new Object();
acceptProperty(enemyPowerWaveTemplates, enemyPowerWaveLvl5);
enemyPowerWaveLvl5.spawnRate = 80;
enemyPowerWaveLvl5.musuhRarity = [0, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 2, 3, 2];
enemyPowerWaveLvl5.musuhAvailable = [1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14];
enemyPowerWaveLvl5.bossAvailable = 0;
enemyPowerWaveLvl5.enemyBuildingsLife = 2000;
var enemyPowerWaveLvl6 = new Object();
acceptProperty(enemyPowerWaveTemplates, enemyPowerWaveLvl6);
enemyPowerWaveLvl6.spawnRate = 70;
enemyPowerWaveLvl6.musuhRarity = [0, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2];
enemyPowerWaveLvl6.musuhAvailable = [1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14];
enemyPowerWaveLvl6.bossAvailable = 0;
enemyPowerWaveLvl6.enemyBuildingsLife = 2000;
var enemyPowerWaveLvl7 = new Object();
acceptProperty(enemyPowerWaveTemplates, enemyPowerWaveLvl7);
enemyPowerWaveLvl7.spawnRate = 60;
enemyPowerWaveLvl7.musuhRarity = [0, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 3];
enemyPowerWaveLvl7.musuhAvailable = [1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15];
enemyPowerWaveLvl7.bossAvailable = 0;
enemyPowerWaveLvl7.enemyBuildingsLife = 2500;
var enemyPowerWaveLvl8 = new Object();
acceptProperty(enemyPowerWaveTemplates, enemyPowerWaveLvl8);
enemyPowerWaveLvl8.spawnRate = 50;
enemyPowerWaveLvl8.musuhRarity = [0, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 3];
enemyPowerWaveLvl8.musuhAvailable = [1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15];
enemyPowerWaveLvl8.bossAvailable = 0;
enemyPowerWaveLvl8.enemyBuildingsLife = 2500;
var enemyPowerWaveLvl9 = new Object();
acceptProperty(enemyPowerWaveTemplates, enemyPowerWaveLvl9);
enemyPowerWaveLvl9.spawnRate = 50;
enemyPowerWaveLvl9.musuhRarity = [0, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 3];
enemyPowerWaveLvl9.musuhAvailable = [1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15];
enemyPowerWaveLvl9.bossAvailable = 1;
enemyPowerWaveLvl9.enemyBuildingsLife = 3000;
var enemyPowerWaveLvl10 = new Object();
acceptProperty(enemyPowerWaveTemplates, enemyPowerWaveLvl10);
enemyPowerWaveLvl10.spawnRate = 50;
enemyPowerWaveLvl10.musuhRarity = [0, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2];
enemyPowerWaveLvl10.musuhAvailable = [1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15];
enemyPowerWaveLvl10.bossAvailable = 2;
enemyPowerWaveLvl10.enemyBuildingsLife = 3000;
var enemyPowerWaveLvl11 = new Object();
acceptProperty(enemyPowerWaveTemplates, enemyPowerWaveLvl11);
enemyPowerWaveLvl11.spawnRate = 50;
enemyPowerWaveLvl11.musuhRarity = [0, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2];
enemyPowerWaveLvl11.musuhAvailable = [1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15];
enemyPowerWaveLvl11.bossAvailable = 3;
enemyPowerWaveLvl11.enemyBuildingsLife = 4000;
if (baseBattleNow.ally == 1) {
ourBase = baseBattleNow;
enemyBase = attackerBattleNow;
}
if (attackerBattleNow.ally == 1) {
ourBase = attackerBattleNow;
enemyBase = baseBattleNow;
}
var enemyLevel = 1 + Math.floor(enemyBase.basePower / 200);
var battleDuration = 0;
var unitCreated = 0;
var unitLost = 0;
var reinforcementUsed = 0;
var baseLife = 0;
var enemyBaseLife = 0;
var enemySpawned = 0;
var enemyKilled = 0;
var spawnRate = 50;
var musuhRarityAwal = [0, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2];
var musuhRarityCounter = [0, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2];
var listMusuhAvailable = [1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15];
var bossAvailable = 0;
var enemyBuildingsLife = 1000;
var winTimer = 0;
if (campaignMode > 0) {
des.text = deskripsiScene[campaignMode];
des2.text = '';
} else {
des.text = 'Battlefield: ' + baseBattleNow.nama + '\nAlly: ' + sebutanAlly[baseBattleNow.ally] + '\nBase Power: ' + baseBattleNow.basePower;
des2.text = 'Attacker: ' + attackerBattleNow.nama + '\nAlly: ' + sebutanAlly[attackerBattleNow.ally] + '\nBase Power: ' + attackerBattleNow.basePower;
}
var timer = 150;
onEnterFrame = function () {
--timer;
if (timer <= 0) {
delete onEnterFrame;
switch (campaignMode) {
case 1:
energy = 3000;
scene = 1;
ourBase.ID = 0;
ourBase.nama = 'Auriga';
ourBase.ally = 1;
ourBase.building0 = 6;
ourBase.building1 = 0;
ourBase.building2 = 7;
ourBase.building3 = 5;
ourBase.building4 = 0;
ourBase.building5 = 4;
ourBase.building6 = 6;
ourBase.building7 = 0;
ourBase.building8 = 4;
ourBase.building9 = 8;
ourBase.army1 = 0;
ourBase.army2 = 0;
ourBase.army3 = 0;
ourBase.army4 = 0;
ourBase.army5 = 0;
ourBase.army6 = 0;
ourBase.army7 = 0;
ourBase.army8 = 0;
ourBase.reinforcement1 = 0;
ourBase.reinforcement2 = 0;
ourBase.reinforcement3 = 0;
ourBase.reinforcement4 = 0;
ourBase.reinforcement5 = 0;
ourBase.reinforcement6 = 0;
ourBase.basePower = 4000;
enemyBuildingsLife = 0;
listMusuhAvailable = [1, 2, 3];
spawnRate = 100;
winTimer = 1800;
soundBGM('battle1');
break;
case 2:
energy = 2000;
scene = 2;
ourBase.ID = 0;
ourBase.nama = 'Auriga';
ourBase.ally = 1;
ourBase.building0 = 6;
ourBase.building1 = 5;
ourBase.building2 = 4;
ourBase.building3 = 3;
ourBase.building4 = 0;
ourBase.building5 = 3;
ourBase.building6 = 6;
ourBase.building7 = 0;
ourBase.building8 = 4;
ourBase.building9 = 8;
ourBase.army1 = 1;
ourBase.army2 = 1;
ourBase.army3 = 1;
ourBase.army4 = 1;
ourBase.army5 = 1;
ourBase.army6 = 1;
ourBase.army7 = 1;
ourBase.army8 = 1;
ourBase.reinforcement1 = 0;
ourBase.reinforcement2 = 0;
ourBase.reinforcement3 = 0;
ourBase.reinforcement4 = 0;
ourBase.reinforcement5 = 0;
ourBase.reinforcement6 = 0;
ourBase.basePower = 4000;
enemyBuildingsLife = 500;
listMusuhAvailable = [1, 2, 3];
spawnRate = 120;
soundBGM('battle1');
break;
case 3:
energy = 8000;
scene = 1;
ourBase.ID = 0;
ourBase.nama = 'Auriga';
ourBase.ally = 1;
ourBase.building0 = 4;
ourBase.building1 = 5;
ourBase.building2 = 3;
ourBase.building3 = 0;
ourBase.building4 = 0;
ourBase.building5 = 0;
ourBase.building6 = 0;
ourBase.building7 = 9;
ourBase.building8 = 0;
ourBase.building9 = 8;
ourBase.army1 = 1;
ourBase.army2 = 1;
ourBase.army3 = 1;
ourBase.army4 = 0;
ourBase.army5 = 0;
ourBase.army6 = 1;
ourBase.army7 = 0;
ourBase.army8 = 0;
ourBase.reinforcement1 = 1;
ourBase.reinforcement2 = 1;
ourBase.reinforcement3 = 1;
ourBase.reinforcement4 = 1;
ourBase.reinforcement5 = 1;
ourBase.reinforcement6 = 0;
ourBase.basePower = 4000;
enemyBuildingsLife = 0;
musuhRarityAwal = [0, 1, 1, 1, 3, 2, 2, 1, 2, 3, 1, 1, 1, 1, 2, 2];
musuhRarityCounter = [0, 1, 1, 1, 3, 2, 2, 1, 2, 3, 1, 1, 1, 1, 2, 2];
listMusuhAvailable = [1, 2, 3, 4, 7];
spawnRate = 100;
winTimer = 5400;
soundBGM('battle2');
break;
case 4:
energy = 3000;
scene = 7;
ourBase.ID = 0;
ourBase.nama = 'Auriga';
ourBase.ally = 1;
ourBase.building0 = 6;
ourBase.building1 = 5;
ourBase.building2 = 0;
ourBase.building3 = 3;
ourBase.building4 = 0;
ourBase.building5 = 4;
ourBase.building6 = 6;
ourBase.building7 = 5;
ourBase.building8 = 4;
ourBase.building9 = 1;
ourBase.army1 = 1;
ourBase.army2 = 1;
ourBase.army3 = 0;
ourBase.army4 = 1;
ourBase.army5 = 1;
ourBase.army6 = 1;
ourBase.army7 = 1;
ourBase.army8 = 0;
ourBase.reinforcement1 = 1;
ourBase.reinforcement2 = 1;
ourBase.reinforcement3 = 1;
ourBase.reinforcement4 = 0;
ourBase.reinforcement5 = 1;
ourBase.reinforcement6 = 0;
ourBase.basePower = 4000;
enemyBuildingsLife = 1000;
var musuhRarityAwal = [0, 1, 1, 1, 3, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2, 4];
var musuhRarityCounter = [0, 1, 1, 1, 3, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2, 4];
listMusuhAvailable = [1, 2, 3, 5, 7, 15];
spawnRate = 100;
soundBGM('battle1');
break;
case 5:
energy = 2000;
scene = 1;
ourBase.ID = 0;
ourBase.nama = 'Auriga';
ourBase.ally = 1;
ourBase.building0 = 6;
ourBase.building1 = 5;
ourBase.building2 = 4;
ourBase.building3 = 0;
ourBase.building4 = 0;
ourBase.building5 = 3;
ourBase.building6 = 6;
ourBase.building7 = 5;
ourBase.building8 = 4;
ourBase.building9 = 3;
ourBase.army1 = 1;
ourBase.army2 = 1;
ourBase.army3 = 1;
ourBase.army4 = 1;
ourBase.army5 = 1;
ourBase.army6 = 1;
ourBase.army7 = 0;
ourBase.army8 = 0;
ourBase.reinforcement1 = 1;
ourBase.reinforcement2 = 1;
ourBase.reinforcement3 = 1;
ourBase.reinforcement4 = 1;
ourBase.reinforcement5 = 1;
ourBase.reinforcement6 = 0;
ourBase.basePower = 4000;
enemyBuildingsLife = 1500;
var musuhRarityAwal = [0, 1, 1, 1, 3, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2, 3];
var musuhRarityCounter = [0, 1, 1, 1, 3, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2, 3];
listMusuhAvailable = [1, 2, 3, 4, 5, 6, 7, 8, 9, 15];
spawnRate = 100;
bossAvailable = 1;
soundBGM('battle1');
break;
case 6:
energy = 3000;
scene = 4;
ourBase.ID = 0;
ourBase.nama = 'Auriga';
ourBase.ally = 1;
ourBase.building0 = 1;
ourBase.building1 = 0;
ourBase.building2 = 9;
ourBase.building3 = 0;
ourBase.building4 = 0;
ourBase.building5 = 0;
ourBase.building6 = 1;
ourBase.building7 = 1;
ourBase.building8 = 0;
ourBase.building9 = 0;
ourBase.army1 = 0;
ourBase.army2 = 0;
ourBase.army3 = 0;
ourBase.army4 = 0;
ourBase.army5 = 0;
ourBase.army6 = 0;
ourBase.army7 = 0;
ourBase.army8 = 0;
ourBase.reinforcement1 = 1;
ourBase.reinforcement2 = 0;
ourBase.reinforcement3 = 0;
ourBase.reinforcement4 = 0;
ourBase.reinforcement5 = 0;
ourBase.reinforcement6 = 0;
ourBase.basePower = 4000;
enemyBuildingsLife = 0;
var musuhRarityAwal = [0, 1, 1, 1, 3, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2, 3];
var musuhRarityCounter = [0, 1, 1, 1, 3, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2, 3];
listMusuhAvailable = [1, 2, 3, 5, 7, 14];
spawnRate = 125;
soundBGM('battle1');
break;
case 7:
energy = 3000;
scene = 1;
ourBase.ID = 0;
ourBase.nama = 'Auriga';
ourBase.ally = 1;
ourBase.building0 = 6;
ourBase.building1 = 3;
ourBase.building2 = 7;
ourBase.building3 = 5;
ourBase.building4 = 0;
ourBase.building5 = 0;
ourBase.building6 = 6;
ourBase.building7 = 3;
ourBase.building8 = 4;
ourBase.building9 = 6;
ourBase.army1 = 1;
ourBase.army2 = 1;
ourBase.army3 = 1;
ourBase.army4 = 1;
ourBase.army5 = 1;
ourBase.army6 = 1;
ourBase.army7 = 1;
ourBase.army8 = 0;
ourBase.reinforcement1 = 1;
ourBase.reinforcement2 = 1;
ourBase.reinforcement3 = 1;
ourBase.reinforcement4 = 0;
ourBase.reinforcement5 = 0;
ourBase.reinforcement6 = 1;
ourBase.basePower = 4000;
enemyBuildingsLife = 0;
listMusuhAvailable = [1, 2, 3, 4, 5, 6, 8, 13, 14, 15];
spawnRate = 50;
winTimer = 8000;
soundBGM('battle2');
break;
case 8:
energy = 750;
scene = 7;
ourBase.ID = 0;
ourBase.nama = 'Auriga';
ourBase.ally = 1;
ourBase.building0 = 4;
ourBase.building1 = 3;
ourBase.building2 = 3;
ourBase.building3 = 3;
ourBase.building4 = 2;
ourBase.building5 = 0;
ourBase.building6 = 0;
ourBase.building7 = 3;
ourBase.building8 = 3;
ourBase.building9 = 1;
ourBase.army1 = 1;
ourBase.army2 = 1;
ourBase.army3 = 1;
ourBase.army4 = 0;
ourBase.army5 = 0;
ourBase.army6 = 0;
ourBase.army7 = 0;
ourBase.army8 = 0;
ourBase.reinforcement1 = 1;
ourBase.reinforcement2 = 1;
ourBase.reinforcement3 = 0;
ourBase.reinforcement4 = 0;
ourBase.reinforcement5 = 0;
ourBase.reinforcement6 = 0;
ourBase.basePower = 4000;
enemyBuildingsLife = 0;
listMusuhAvailable = [1, 2, 3, 4, 5, 6, 7, 8, 13, 14, 15];
spawnRate = 70;
soundBGM('battle2');
break;
case 9:
energy = 3000;
scene = 8;
ourBase.ID = 0;
ourBase.nama = 'Auriga';
ourBase.ally = 1;
ourBase.building0 = 6;
ourBase.building1 = 5;
ourBase.building2 = 0;
ourBase.building3 = 3;
ourBase.building4 = 0;
ourBase.building5 = 4;
ourBase.building6 = 6;
ourBase.building7 = 5;
ourBase.building8 = 4;
ourBase.building9 = 1;
ourBase.army1 = 1;
ourBase.army2 = 1;
ourBase.army3 = 0;
ourBase.army4 = 1;
ourBase.army5 = 1;
ourBase.army6 = 1;
ourBase.army7 = 1;
ourBase.army8 = 1;
ourBase.reinforcement1 = 1;
ourBase.reinforcement2 = 1;
ourBase.reinforcement3 = 1;
ourBase.reinforcement4 = 0;
ourBase.reinforcement5 = 1;
ourBase.reinforcement6 = 0;
ourBase.basePower = 4000;
enemyBuildingsLife = 2000;
listMusuhAvailable = [1, 2, 3, 4, 5, 6, 8, 13, 14, 15];
spawnRate = 70;
bossAvailable = 2;
soundBGM('battle1');
break;
case 10:
energy = 3000;
scene = 12;
ourBase.ID = 0;
ourBase.nama = 'Auriga';
ourBase.ally = 1;
ourBase.building0 = 4;
ourBase.building1 = 0;
ourBase.building2 = 0;
ourBase.building3 = 0;
ourBase.building4 = 0;
ourBase.building5 = 0;
ourBase.building6 = 0;
ourBase.building7 = 0;
ourBase.building8 = 0;
ourBase.building9 = 0;
ourBase.army1 = 0;
ourBase.army2 = 0;
ourBase.army3 = 0;
ourBase.army4 = 0;
ourBase.army5 = 0;
ourBase.army6 = 0;
ourBase.army7 = 0;
ourBase.army8 = 0;
ourBase.reinforcement1 = 0;
ourBase.reinforcement2 = 0;
ourBase.reinforcement3 = 0;
ourBase.reinforcement4 = 0;
ourBase.reinforcement5 = 0;
ourBase.reinforcement6 = 0;
ourBase.basePower = 4000;
enemyBuildingsLife = 0;
listMusuhAvailable = [1, 2, 3, 4, 5, 6, 8, 13, 14];
var musuhRarityAwal = [0, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3];
var musuhRarityCounter = [0, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3];
spawnRate = 80;
bossAvailable = 0;
soundBGM('battle2');
break;
case 11:
energy = 10000;
scene = 11;
ourBase.ID = 0;
ourBase.nama = 'Auriga';
ourBase.ally = 1;
ourBase.building0 = 4;
ourBase.building1 = 0;
ourBase.building2 = 0;
ourBase.building3 = 7;
ourBase.building4 = 0;
ourBase.building5 = 0;
ourBase.building6 = 0;
ourBase.building7 = 0;
ourBase.building8 = 0;
ourBase.building9 = 0;
ourBase.building11 = 9;
ourBase.army1 = 0;
ourBase.army2 = 0;
ourBase.army3 = 0;
ourBase.army4 = 0;
ourBase.army5 = 0;
ourBase.army6 = 0;
ourBase.army7 = 0;
ourBase.army8 = 0;
ourBase.reinforcement1 = 0;
ourBase.reinforcement2 = 0;
ourBase.reinforcement3 = 0;
ourBase.reinforcement4 = 0;
ourBase.reinforcement5 = 0;
ourBase.reinforcement6 = 0;
ourBase.basePower = 4000;
enemyBuildingsLife = 4000;
listMusuhAvailable = [2, 3, 5, 6, 8, 9, 13, 14];
spawnRate = 75;
soundBGM('battle1');
break;
case 12:
energy = 8000;
scene = 11;
ourBase.ID = 0;
ourBase.nama = 'Auriga';
ourBase.ally = 1;
ourBase.building0 = 9;
ourBase.building1 = 9;
ourBase.building2 = 8;
ourBase.building3 = 8;
ourBase.building4 = 8;
ourBase.building5 = 8;
ourBase.building6 = 9;
ourBase.building7 = 9;
ourBase.building8 = 8;
ourBase.building9 = 9;
ourBase.army1 = 1;
ourBase.army2 = 1;
ourBase.army3 = 1;
ourBase.army4 = 1;
ourBase.army5 = 1;
ourBase.army6 = 1;
ourBase.army7 = 1;
ourBase.army8 = 1;
ourBase.reinforcement1 = 1;
ourBase.reinforcement2 = 1;
ourBase.reinforcement3 = 1;
ourBase.reinforcement4 = 1;
ourBase.reinforcement5 = 1;
ourBase.reinforcement6 = 1;
ourBase.basePower = 10000;
bossAvailable = 3;
enemyBuildingsLife = 5000;
listMusuhAvailable = [1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15];
spawnRate = 30;
soundBGM('battle1');
break;
default:
spawnRate = _root['enemyPowerWaveLvl' + enemyLevel].spawnRate;
musuhRarityAwal = _root['enemyPowerWaveLvl' + enemyLevel].musuhRarity;
musuhRarityCounter = _root['enemyPowerWaveLvl' + enemyLevel].musuhRarity;
listMusuhAvailable = _root['enemyPowerWaveLvl' + enemyLevel].musuhAvailable;
bossAvailable = _root['enemyPowerWaveLvl' + enemyLevel].bossAvailable;
enemyBuildingsLife = _root['enemyPowerWaveLvl' + enemyLevel].enemyBuildingsLife;
trace(enemyLevel);
if (baseBattleNow.ally == 1) {
soundBGM('battle2');
}
if (attackerBattleNow.ally != 1) break;
soundBGM('battle1');
}
gotoAndStop('war');
}
};
Key.removeListener(tombolKu);
}
frame 14 {
function refreshCampaign() {
var j = 1;
while (j <= campaignSaved) {
_root['scene' + j + '_btn'].j = j;
_root['scene' + j + '_btn']._visible = true;
_root['scene' + j + '_btn'].selected_mc._visible = false;
_root['scene' + j + '_btn'].tulisan.text = judulScene[j];
_root['scene' + j + '_btn'].onRollOver = function () {
soundFX('rolloverButton');
};
_root['scene' + j + '_btn'].onRelease = function () {
soundFX('clickButton');
selectCampaign = this.j;
refreshCampaign();
};
++j;
}
_root['scene' + selectCampaign + '_btn'].selected_mc._visible = true;
judul.text = selectCampaign + '. ' + judulScene[selectCampaign];
deskripsi.text = deskripsiScene[selectCampaign];
map_mc.gotoAndStop(selectCampaign);
}
stop();
var i = 1;
while (i <= 12) {
_root['scene' + i + '_btn']._visible = false;
++i;
}
refreshCampaign();
cancel_btn.onRelease = function () {
posisiBGM = sBGM.position;
_root.gotoAndStop('coverMenu');
};
more_btn.onRelease = function () {
getURL('http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=squadron_auriga&utm_source=ingame&utm_content=ingame&logo=2', '_blank');
};
start_btn.onRelease = function () {
campaignMode = selectCampaign;
_root.gotoAndStop('story');
tampilDialog(_root['dialogStory' + campaignMode], true);
};
}
movieClip 3014 {
}
movieClip 3026 {
}
movieClip 3028 {
}
frame 15 {
function shock(durasi) {
_root.createEmptyMovieClip('gempa', this.getNextHighestDepth());
var count = 0;
_root.gempa.onEnterFrame = function () {
if (!isPaused) {
++count;
if (count % 2 == 1) {
_y = _y + (-3 + random(7));
_x = _x + (-5 + random(10));
} else {
_y = 0;
_x = 0;
}
if (count >= durasi) {
_y = 0;
_x = 0;
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
}
function showPointer(_whereX, _whereY) {
warzone_mc.attachMovie('pointer_mc', 'pointer_mc', 3001);
warzone_mc.pointer_mc._x = _whereX;
warzone_mc.pointer_mc._y = _whereY;
}
function scrollToLeft() {
camX = maxLeftPanFront[scene];
camBackX = maxLeftPanBack[scene];
}
function scrollToRight() {
camX = maxRightPanFront[scene];
camBackX = maxRightPanBack[scene];
}
function addMinimap() {
interface_mc.attachMovie('Interface_minimap' + minimapSize, 'minimap_mc', 987);
interface_mc.minimap_mc._x = minimapPos[minimapSize];
interface_mc.minimap_mc._y = 10;
interface_mc.minimap_mc.attachMovie('Interface_minimap_frame' + scene, 'map_frame', 99);
interface_mc.minimap_mc.onMouseDown = function () {
if (this.map_frame.hitTest(_xmouse, _ymouse, true)) {
if (-(_xmouse - this._x - 40) * 10 <= 0 && -(_xmouse - this._x - 40) * 10 >= maxRightPanFront[scene]) {
camX = -(_xmouse - this._x - 40) * 10;
camBackX = -(_xmouse - this._x - 40) * 10 / 4;
} else {
if (-(_xmouse - this._x - 40) * 10 > 0) {
camX = 0;
camBackX = 0;
}
if (-(_xmouse - this._x - 40) * 10 < maxRightPanFront[scene]) {
camX = maxRightPanFront[scene];
camBackX = maxRightPanFront[scene] / 4;
}
}
camY = 210 - ((_ymouse - this._y) / 63) * 210;
camBackY = (210 - ((_ymouse - this._y) / 63) * 210) / 4;
}
};
interface_mc.minimap_mc.map_mc.cam_mc.onEnterFrame = function () {
this._x = -warzone_mc._x / 10;
this._y = -warzone_mc._y / 10;
};
}
function rollOverUnit(_content) {
_root.attachMovie('rollover_mc_battle', 'rollover_mc', 20000);
rollover_mc.des.text = _content;
rollover_mc._x = 10;
rollover_mc._y = 250;
}
function removeRollOver() {
delete rollover_mc.onEnterFrame;
rollover_mc.removeMovieClip();
}
function popupBattle(_content) {
if (popup_mc._name == undefined) {
_root.attachMovie('popup_battle', 'popup_mc', 20001);
popup_mc._x = 10;
popup_mc._y = 10;
popup_mc.timer = 150;
}
if (popupBattleList.length >= 5) {
popupBattleList.shift();
}
popupBattleList[popupBattleList.length] = _content;
popup_mc.onEnterFrame = function () {
if (this.timer > 0) {
--this.timer;
} else {
popupBattleList.shift();
if (popupBattleList.length > 0) {
this.timer = 150;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
var v2 = 0;
while (v2 <= 5) {
if (popupBattleList[v2] == undefined) {
this['des' + v2].text = '';
} else {
this['des' + v2].text = popupBattleList[v2];
}
++v2;
}
};
}
function createParticle(_mc, _whereAwalX, _whereAkhirX, _whereAwalY, _whereAkhirY) {
if (particleDepth > particleDepthMax) {
particleDepth = 100;
}
++particleDepth;
var v2 = 'particle' + particleDepth;
warzone_mc.background2_mc.attachMovie(_mc, v2, particleDepth);
warzone_mc.background2_mc[v2]._x = _whereAwalX + random(_whereAkhirX);
warzone_mc.background2_mc[v2]._y = _whereAwalY + random(_whereAkhirY);
warzone_mc.background2_mc[v2].cacheAsBitmap = true;
warzone_mc.background2_mc[v2].speedX = 0;
warzone_mc.background2_mc[v2].speedY = 0.5;
warzone_mc.background2_mc[v2].moveX = 0.2;
warzone_mc.background2_mc[v2]._alpha = 0;
warzone_mc.background2_mc[v2].alp = 5;
warzone_mc.background2_mc[v2]._yscale = 30 + random(70);
warzone_mc.background2_mc[v2]._xscale = warzone_mc.background2_mc[v2]._yscale;
warzone_mc.background2_mc[v2].onEnterFrame = function () {
this._y -= this.speedY;
this.speedX += this.moveX;
this._x += this.speedX;
if (Math.abs(this.speedX) > 2) {
this.moveX *= -1;
}
this._alpha += this.alp;
if (this._alpha >= 100) {
this.alp *= -0.3333333333333333;
this._alpha = 99;
}
if (this._alpha < 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
}
function clearLevel() {
clearInterval(tampilParticle);
tempatMayat.dispose();
interface_mc.removeMovieClip();
warzoneBack_mc.removeMovieClip();
warzone_mc.removeMovieClip();
delete popup_mc.onEnterFrame;
popup_mc.removeMovieClip();
}
function tampilResign() {
isPaused = true;
lockBaseButton();
_root.attachMovie('resign_mc', 'resign_mc', 9999);
resign_mc._x = 400;
resign_mc._y = 210;
resign_mc.resign_btn.onRelease = function () {
showPopResult(2);
this._parent.removeMovieClip();
};
resign_mc.cancel_btn.onRelease = function () {
isPaused = false;
playAllChar();
this._parent.removeMovieClip();
};
}
function addSparkles(_targetX, _targetY, _sparkNumber, _distance, _sparkSize) {
var v5 = 0;
while (v5 < _sparkNumber) {
var v3 = warzone_mc.attachMovie('spark', 'spark_' + warzone_mc.getNextHighestDepth(), warzone_mc.getNextHighestDepth());
var v2 = warzone_mc.attachMovie('spark2', 'spark2_' + warzone_mc.getNextHighestDepth(), warzone_mc.getNextHighestDepth());
v3._x = _targetX + random(_distance) - _distance / 2;
v3._y = _targetY + random(_distance) - _distance / 2;
v2._x = _targetX + random(_distance) - _distance / 2;
v2._y = _targetY + random(_distance) - _distance / 2;
var v4 = random(_sparkSize) + _sparkSize / 4;
v3._xscale = v4;
v3._yscale = v4;
v4 = random(_sparkSize) + _sparkSize / 4;
v2._xscale = v4;
v2._yscale = v4;
v2._rotation = random(359);
v3._alpha = lightningAlpha;
v2._alpha = lightningAlpha;
++v5;
}
}
function showPopResult(_whoWin) {
pemenang = _whoWin;
isPaused = true;
stopAllChar();
interface_mc.properties_mc.option_btn.enabled = false;
interface_mc.properties_mc.resign_btn.enabled = false;
baseLife = warzone_mc.benteng_mc0.life;
enemyBaseLife = warzone_mc.nest_mc1.life;
if (_whoWin == 1) {
if (campaignMode >= 2) {
newAchievement(2);
}
if (campaignMode >= 3) {
newMedals(2);
}
if (campaignMode >= 5) {
newMedals(3);
}
if (campaignMode >= 6) {
newAchievement(3);
}
if (campaignMode >= 9) {
newMedals(4);
}
if (campaignMode >= 11) {
newAchievement(4);
}
if (campaignMode >= 12) {
newAchievement(5);
}
if (campaignMode > 0) {
if (campaignMode + 1 > campaignSaved) {
campaignSaved = campaignMode + 1;
saveCampaign();
}
}
++TotalBattleWin;
saveAchievementData();
if (campaignMode == 0) {
++TotalBaseGet;
saveAchievementData();
}
} else {
++TotalBattleLose;
saveAchievementData();
if (campaignMode == 0) {
++TotalBaseLost;
saveAchievementData();
}
}
var v3 = _root.attachMovie('Popup_result', 'popup_mc', 909);
v3._x = 400;
v3._y = 210;
v3.gotoAndStop(_whoWin);
v3.oke_btn.onRelease = function () {
baseBattleNow.ally = _whoWin;
soundBGM('fanfare' + _whoWin);
gotoAndStop('summary');
this._parent.removeMovieClip();
};
v3.more_btn.onRelease = function () {
getURL('http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=squadron_auriga&utm_source=ingame&utm_content=ingame&logo=2', '_blank');
};
}
function startReloading() {
reloadComplete = false;
reloadTimer = setInterval(this, 'gunReloaded', reloadSpeed);
screenTimer = setInterval(this, 'clearScreen', clearSpeed);
}
function clearScreen() {
clearInterval(screenTimer);
effectHolder.onEnterFrame = function () {
if (this._alpha > 0) {
this._alpha -= 10;
} else {
delete this.onEnterFrame;
effectHolder.clear();
}
};
}
function gunReloaded() {
clearInterval(reloadTimer);
reloadComplete = true;
}
function addExplosion(who, _type) {
shock(5);
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
soundFX('explosionSound');
var v3 = 'ledakan' + peluruDepth;
warzone_mc.attachMovie('Explossion' + _type, v3, peluruDepth);
warzone_mc[v3]._x = who._x;
warzone_mc[v3]._y = who._y;
warzone_mc[v3].attack = who.attack / 3;
warzone_mc[v3].cacheAsBitmap = true;
warzone_mc[v3].onEnterFrame = function () {
if (!isPaused) {
for (var v3 in warzone_mc.musuh_container) {
var v2 = warzone_mc.musuh_container[v3];
if (this.hitTest(v2)) {
v2.bleeding(5);
v2.damaged(this.attack, true);
}
}
}
};
}
function addExplosionIce(who) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
soundFX('membeku');
++peluruDepth;
var v3 = 'ledakan' + peluruDepth;
warzone_mc.attachMovie('ExplossionIce', v3, peluruDepth);
warzone_mc[v3]._x = who._x;
warzone_mc[v3]._y = who._y;
warzone_mc[v3].cacheAsBitmap = true;
warzone_mc[v3].onEnterFrame = function () {
if (!isPaused) {
for (var v3 in warzone_mc.musuh_container) {
var v2 = warzone_mc.musuh_container[v3];
if (this.hitTest(v2)) {
v2.frozzen = true;
v2.frozzenTime = 200;
}
}
}
};
}
function addExplosionNapalm(who) {
var v7 = 1;
while (v7 <= who.flameSpread) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v2 = 'flame' + peluruDepth;
warzone_mc.attachMovie('api_mc' + (1 + random(2)), v2, peluruDepth);
warzone_mc[v2]._x = who._x;
warzone_mc[v2]._y = who._y;
warzone_mc[v2].powX = -4 + random(9);
warzone_mc[v2].powY = -(3 + random(who.flameSpread));
warzone_mc[v2].timerTerbakar = 100;
warzone_mc[v2].pengaturAlpha = 5;
warzone_mc[v2].cacheAsBitmap = true;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
if (this._alpha < 100) {
this._alpha += this.pengaturAlpha;
}
this._rotation = 5 + Math.atan2(this.powY, this.powX) * 180 / Math.PI;
if (this.timerTerbakar <= 0) {
this.timerTerbakar = 0;
delete this.onEnterFrame;
this.onEnterFrame = function () {
if (this._alpha > 0) {
this._alpha -= this.pengaturAlpha;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
} else {
--this.timerTerbakar;
}
this._x += this.powX;
this._y += this.powY;
this.powY += gra / 2;
if (this.powY > 0) {
for (var v5 in warzone_mc.background_mc) {
var v3 = warzone_mc.background_mc[v5];
if (v3.hitTest(this.posX, this.posY, true)) {
delete this.powX;
delete this.powY;
this._rotation = 90;
}
}
}
for (var v4 in warzone_mc.musuh_container) {
if (!warzone_mc.musuh_container[v4].isDead) {
var v2 = warzone_mc.musuh_container[v4];
}
if (this.hitTest(v2)) {
v2.terbakar(80);
}
}
}
};
++v7;
}
}
function addExplosionHoax(who, _type) {
shock(5);
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
soundFX('explosionSound');
var v1 = 'ledakan' + peluruDepth;
warzone_mc.attachMovie('Explossion' + _type, v1, peluruDepth);
warzone_mc[v1]._x = who._x;
warzone_mc[v1]._y = who._y;
warzone_mc[v1].cacheAsBitmap = true;
}
function addBuilding(_type) {
var v3 = 'benteng_mc' + _type;
var v4 = 752 + buildingDepth[_type];
if (_type == 0) {
v4 = peluruDepthMax + 10;
}
warzone_mc.attachMovie('Benteng' + _type, v3, v4);
if (_type > 0) {
warzone_mc[v3]._x = 0;
} else {
warzone_mc[v3]._x = 375;
}
warzone_mc[v3]._y = buildingStartY[scene];
warzone_mc[v3]._type = _type;
acceptProperty(_root['building' + _type], warzone_mc[v3]);
warzone_mc[v3].onEnterFrame = warzone_mc[v3].updateFrame;
if (_type != 0) {
warzone_mc[v3].onRollOver = function () {
rollOverUnit(buildingData['building' + this._type].nama + '\n' + buildingData['building' + this._type].deskripsi);
};
warzone_mc[v3].onRollOut = function () {
removeRollOver();
};
warzone_mc[v3].onRelease = warzone_mc[v3].cekControl;
}
}
function addBuildingHoax(_mc, _depth, _posX, _posY) {
var v3 = _mc + _depth;
warzone_mc.attachMovie(_mc, v3, _depth);
warzone_mc[v3]._x = _posX;
warzone_mc[v3]._y = _posY;
if (_mc == 'Pesawat_rusak') {
warzone_mc[v3].visited = false;
warzone_mc[v3].onEnterFrame = function () {
if (!this.visited) {
for (var v3 in warzone_mc.pasukan_container) {
var v2 = warzone_mc.pasukan_container[v3];
if (Math.abs(v2._x - this._x) <= 100) {
tampilDialog(campaign10Dialog2);
delete interface_mc.timer_mc.onEnterFrame;
interface_mc.timer_mc.removeMovieClip();
spawnPasukanSpecial(10, this._x, this._y - 20);
spawnRate = 50;
this.visited = true;
break;
}
}
}
};
}
}
function addBuildingEnemy(_type) {
var v2 = 'nest_mc' + _type;
warzone_mc.attachMovie('Nest' + _type, v2, 785 + _type);
warzone_mc[v2]._x = startBuildingEnemy[scene][0];
warzone_mc[v2]._y = startBuildingEnemy[scene][1];
acceptProperty(_root['buildingEnemy' + _type], warzone_mc[v2]);
warzone_mc[v2].onEnterFrame = warzone_mc[v2].updateFrame;
}
function setPropertyBar() {
delete interface_mc.properties_mc.onEnterFrame;
interface_mc.properties_mc.display_mc.gotoAndStop(1);
if (controlledBuilding.id != undefined) {
unitSelectedID = undefined;
interface_mc.properties_mc.unitName.text = controlledBuilding.nama + ' (' + controlledBuilding.id + ')';
interface_mc.properties_mc.display_mc.gotoAndStop(1 + controlledBuilding.id);
interface_mc.properties_mc.display_mc.deskripsi.text = controlledBuilding.deskripsi;
interface_mc.properties_mc.display_mc.stat1.text = controlledBuilding.attack;
interface_mc.properties_mc.display_mc.stat2.text = controlledBuilding.lev;
var i = 1;
while (i <= 8) {
interface_mc.properties_mc.display_mc['pasukan' + i + '_btn'].i = i;
interface_mc.properties_mc.display_mc['pasukan' + i + '_btn'].gotoAndStop(i);
if (ourBase['army' + i] > 0) {
interface_mc.properties_mc.display_mc['pasukan' + i + '_btn'].locked_mc._visible = false;
interface_mc.properties_mc.display_mc['pasukan' + i + '_btn'].onRollOver = function () {
rollOverUnit(armyData['army' + this.i].nama + '\n' + armyData['army' + this.i].deskripsi + '\nCost: ' + armyPrice[this.i]);
};
interface_mc.properties_mc.display_mc['pasukan' + i + '_btn'].onRollOut = function () {
removeRollOver();
};
interface_mc.properties_mc.display_mc['pasukan' + i + '_btn'].onRelease = function () {
if (energy - armyPrice[this.i] >= 0) {
if (delayPasukan.length < 10) {
if (delayPasukan.length > 0) {
delayPasukan[delayPasukan.length] = this.i;
} else {
delayPasukan.push(this.i);
}
energy -= armyPrice[this.i];
interface_mc.duit.text = energy;
if (countUnit(warzone_mc.pasukan_container) >= maxUnit) {
popupBattle('Max units reached, not enough power to create another ' + armyData['army' + this.i].nama);
}
} else {
popupBattle('Max unit pending list reached, please wait until some unit spawned');
}
} else {
var v2 = armyPrice[this.i] - energy;
popupBattle('insufficient fund.. need more ' + v2 + ' energy to create another ' + armyData['army' + this.i].nama);
soundFX('unsuficientFundSound');
}
};
} else {
interface_mc.properties_mc.display_mc['pasukan' + i + '_btn'].onRollOver = function () {
rollOverUnit(armyData['army' + this.i].nama + '\nThis unit is not available in this base');
};
interface_mc.properties_mc.display_mc['pasukan' + i + '_btn'].onRollOut = function () {
removeRollOver();
};
}
++i;
}
interface_mc.properties_mc.display_mc.mercenary1_btn.i = 11;
interface_mc.properties_mc.display_mc.mercenary1_btn.gotoAndStop(9);
interface_mc.properties_mc.display_mc.mercenary1_btn.locked_mc._visible = false;
interface_mc.properties_mc.display_mc.mercenary1_btn.onRollOver = function () {
rollOverUnit(armyData['army' + this.i].nama + '\n' + armyData['army' + this.i].deskripsi + '\nCost: ' + armyPrice[this.i]);
};
interface_mc.properties_mc.display_mc.mercenary1_btn.onRollOut = function () {
removeRollOver();
};
interface_mc.properties_mc.display_mc.mercenary1_btn.onRelease = function () {
if (energy - armyPrice[this.i] >= 0) {
if (delayPasukan.length < 10) {
if (delayPasukan.length > 0) {
delayPasukan[delayPasukan.length] = this.i;
} else {
delayPasukan.push(this.i);
}
energy -= armyPrice[this.i];
interface_mc.duit.text = energy;
if (countUnit(warzone_mc.pasukan_container) >= maxUnit) {
popupBattle('Max units reached, not enough power to create another ' + armyData['army' + this.i].nama);
}
} else {
popupBattle('Max unit pending list reached, please wait until some unit spawned');
}
} else {
var v2 = armyPrice[this.i] - energy;
popupBattle('insufficient fund.. need more ' + v2 + ' energy to create another ' + armyData['army' + this.i].nama);
soundFX('unsuficientFundSound');
}
};
var j = 0;
while (j <= 9) {
interface_mc.properties_mc.display_mc['queue' + (j + 1)].j = j;
interface_mc.properties_mc.display_mc['queue' + (j + 1)].onEnterFrame = function () {
if (delayPasukan[this.j] != undefined) {
this.gotoAndStop(delayPasukan[this.j] + 1);
} else {
this.gotoAndStop(1);
}
if (this.j == 0) {
this.reload._yscale = (delayPasukanTimer[delayPasukan[0]] / delayPasukanTimerAwal[delayPasukan[0]]) * 100;
}
};
interface_mc.properties_mc.display_mc['queue' + (j + 1)].onRelease = function () {
energy += armyPrice[delayPasukan[this.j]];
interface_mc.duit.text = energy;
delayPasukanTimer[delayPasukan[this.j]] = delayPasukanTimerAwal[delayPasukan[this.j]];
delayPasukan.splice(this.j, 1);
};
++j;
}
var i = 1;
while (i <= 6) {
interface_mc.properties_mc.display_mc['reinforcement' + i + '_btn'].i = i;
interface_mc.properties_mc.display_mc['reinforcement' + i + '_btn'].gotoAndStop(i);
if (ourBase['reinforcement' + i] > 0) {
interface_mc.properties_mc.display_mc['reinforcement' + i + '_btn'].locked_mc._visible = false;
interface_mc.properties_mc.display_mc['reinforcement' + i + '_btn'].onRollOver = function () {
rollOverUnit(reinforcementData['reinforcement' + this.i].nama + '\n' + reinforcementData['reinforcement' + this.i].deskripsi + '\nCost: ' + reinforcementPrice[this.i]);
};
interface_mc.properties_mc.display_mc['reinforcement' + i + '_btn'].onRollOut = function () {
removeRollOver();
};
interface_mc.properties_mc.display_mc['reinforcement' + i + '_btn'].onRelease = function () {
if (delayReinforcementTimer[this.i] == 0) {
summonReinforcement(this.i);
delayReinforcementTimer[this.i] = delayReinforcementTimerMax[this.i];
} else {
if (!delayReinforcementQueue[this.i]) {
if (energy - reinforcementPrice[this.i] >= 0) {
delayReinforcementQueue[this.i] = true;
energy -= reinforcementPrice[this.i];
interface_mc.duit.text = energy;
} else {
var v2 = reinforcementPrice[this.i] - energy;
popupBattle('insufficient fund.. need more ' + v2 + ' energy to summon ' + reinforcementData['reinforcement' + this.i].nama + ' reinforcement');
soundFX('unsuficientFundSound');
}
} else {
popupBattle('summon reinforcement is in progress..');
}
}
};
interface_mc.properties_mc.display_mc['reinforcement' + i + '_btn'].onEnterFrame = function () {
if (delayReinforcementTimer[this.i] == delayReinforcementTimerMax[this.i]) {
this.reload_txt.text = '';
} else {
if (delayReinforcementTimer[this.i] == 0) {
this.reload_txt.text = 'Ready';
} else {
this.reload_txt.text = 100 - Math.round((delayReinforcementTimer[this.i] / delayReinforcementTimerMax[this.i]) * 100) + '%';
}
}
if (delayReinforcementQueue[this.i]) {
this.reload_mc._yscale = (delayReinforcementTimer[this.i] / delayReinforcementTimerMax[this.i]) * 100;
} else {
this.reload_mc._yscale = 0;
}
};
} else {
interface_mc.properties_mc.display_mc['reinforcement' + i + '_btn'].onRollOver = function () {
rollOverUnit(reinforcementData['reinforcement' + this.i].nama + '\nThis reinforcement is not available in this base');
};
interface_mc.properties_mc.display_mc['reinforcement' + i + '_btn'].onRollOut = function () {
removeRollOver();
};
}
++i;
}
}
if (unitSelectedID != undefined) {
interface_mc.properties_mc.display_mc.gotoAndStop(17);
interface_mc.properties_mc.unitName.text = unitSelectedID.nama;
interface_mc.properties_mc.display_mc.deskripsi.text = unitSelectedID.deskripsi;
interface_mc.properties_mc.display_mc.photo_mc.gotoAndStop(unitSelectedID.unitID);
interface_mc.properties_mc.onEnterFrame = function () {
interface_mc.properties_mc.display_mc.stat1.text = unitSelectedID.attack;
interface_mc.properties_mc.display_mc.stat2.text = unitSelectedID.defense;
interface_mc.properties_mc.display_mc.stat3.text = unitSelectedID.moveSpeed;
interface_mc.properties_mc.display_mc.lifeBar._xscale = (unitSelectedID.life / unitSelectedID.lifeAwal) * 100;
if (unitSelectedID.enableSpecial) {
interface_mc.properties_mc.display_mc.specialBar._xscale = (unitSelectedID.timerSpecial / unitSelectedID.timerSpecialMax) * 100;
} else {
interface_mc.properties_mc.display_mc.specialIcon._visible = false;
interface_mc.properties_mc.display_mc.specialBar._visible = false;
}
if (unitSelectedID.nama == undefined) {
unitSelectedID = undefined;
setPropertyBar();
}
};
}
}
function clearPropertiesInterface() {
controlledBuilding.setOriginalColor();
controlledBuilding.sasaran = undefined;
interface_mc.properties_mc.unitName.text = '';
setPropertyBar();
}
function clearControlBuildings() {
clearPropertiesInterface();
controlledBuilding = undefined;
for (var v1 in warzone_mc) {
if (warzone_mc[v1].controlled) {
warzone_mc[v1].controlled = false;
}
}
}
function addDebu(whereX, whereY) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v1 = 'debu' + peluruDepth;
warzone_mc.attachMovie('Debu', v1, peluruDepth);
warzone_mc[v1]._x = whereX + (-20 + random(40));
warzone_mc[v1]._y = whereY;
}
function taruhTempatMayat() {
tempatMayat = new flash.display.BitmapData(panjangKuburan[scene], warzone_mc._height, true, 0);
warzone_mc.background_mc.attachBitmap(tempatMayat, 51, 'auto', false);
}
function hapusTempatMayat() {
tempatMayat = new flash.display.BitmapData(panjangKuburan[scene], warzone_mc._height, true, 0);
warzone_mc.background_mc.attachBitmap(tempatMayat, 51, 'auto', false);
tempatMayat.dispose();
delete tempatMayat;
}
function drawMayat(_who) {
if (_who._parent.ally != undefined) {
if (_who._parent.ally == 1) {
++unitLost;
soundFX('unitLostSound');
} else {
++enemyKilled;
energy += _who._parent.energyGet;
energyCollected += _who._parent.energyGet;
interface_mc.duit.text = energy;
if (campaignMode == 8) {
if (energy >= 30000) {
showPopResult(1);
}
}
}
}
_who._parent.lifebar_mc.removeMovieClip();
_who._parent.api_mc.removeMovieClip();
_who._parent.rage_mc.removeMovieClip();
var v3 = new flash.geom.Matrix();
v3.tx = _who._parent._x;
v3.ty = _who._parent._y;
_who._xscale = _who._parent._xscale;
_who._rotation = _who._parent._rotation;
_root.tempatMayat.draw(_who._parent, v3, new flash.geom.ColorTransform(1, 1, 1, 1, -25, -25, -25, 30));
}
function drawSerpihanObject(_who) {
var v1 = new flash.geom.Matrix();
v1.tx = _who._x;
v1.ty = _who._y;
tempatMayat.draw(_who, v1, new flash.geom.ColorTransform(1, 1, 1, 1, -25, -25, -25, 30));
_who.removeMovieClip();
}
function addParticle(who, _type, _fadeOut, _rot) {
if (grapichParticle) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v2 = 'particle' + peluruDepth;
warzone_mc.attachMovie(_type, v2, peluruDepth);
warzone_mc[v2]._x = who._x;
warzone_mc[v2]._y = who._y;
warzone_mc[v2].moveX = -1 + random(3);
warzone_mc[v2].moveY = -(1 + random(3));
if (_rot) {
warzone_mc[v2]._rotation = who._rotation;
}
warzone_mc[v2].remove = _fadeOut + random(3);
warzone_mc[v2].onEnterFrame = function () {
this._x += this.moveX / 2;
this._y += this.moveY / 2;
this._alpha -= this.remove;
this._yscale += this.remove;
this._xscale = this._yscale;
if (this._alpha <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
}
}
function explodeSplats(_who) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v3 = 'ledakan' + peluruDepth;
warzone_mc.attachMovie('Explossion4', v3, peluruDepth);
warzone_mc[v3]._x = _who._x;
warzone_mc[v3]._y = _who._y;
warzone_mc[v3].attack = _who.attack / 2;
warzone_mc[v3].cacheAsBitmap = true;
warzone_mc[v3].onEnterFrame = function () {
if (!isPaused) {
for (var v3 in warzone_mc.pasukan_container) {
var v2 = warzone_mc.pasukan_container[v3];
if (this.hitTest(v2)) {
v2.bleeding(3);
v2.damaged(this.attack, false);
}
}
}
};
}
function doFollow(follower, target) {
follower.jarakX = target._x - follower._x;
follower.jarakY = target._y - follower._y;
follower.distanceX = follower.jarakX;
follower.distanceY = follower.jarakY;
follower.distanceTotal = Math.sqrt(follower.distanceX * follower.distanceX + follower.distanceY * follower.distanceY);
follower.moveDistanceX = follower.handling * follower.distanceX / follower.distanceTotal;
follower.moveDistanceY = follower.handling * follower.distanceY / follower.distanceTotal;
follower.moveX += follower.moveDistanceX;
follower.moveY += follower.moveDistanceY;
follower.totalmove = Math.sqrt(follower.moveX * follower.moveX + follower.moveY * follower.moveY);
follower.moveX = follower.speed * follower.moveX / follower.totalmove;
follower.moveY = follower.speed * follower.moveY / follower.totalmove;
follower._x += follower.moveX;
follower._y += follower.moveY;
follower._rotation = 180 * Math.atan2(follower.moveY, follower.moveX) / Math.PI;
}
function spawnMusuh(_id) {
++enemySpawned;
++enemyOut;
interface_mc.properties_mc.enemyOut.text = enemyOut;
if (spawnDepth > spawnDepthMax) {
spawnDepth = 100;
}
var v4 = 1 + random(3);
++spawnDepth;
var v3 = 'musuh' + spawnDepth;
warzone_mc.musuh_container.createEmptyMovieClip(v3, 500 * v4 + spawnDepth);
warzone_mc.musuh_container[v3]._x = startBuildingEnemy[scene][0] + 300;
warzone_mc.musuh_container[v3]._y = startBuildingEnemy[scene][1];
acceptProperty(_root['musuh' + _id], warzone_mc.musuh_container[v3]);
warzone_mc.musuh_container[v3].setStance(2);
if (ourBase.building6 > 0 || campaignMode == 6) {
warzone_mc.musuh_container[v3].addToMinimap();
}
if (warzone_mc.musuh_container[v3].flyingUnit) {
warzone_mc.musuh_container[v3]._y -= 100;
}
warzone_mc.musuh_container[v3].regisY = 10 * (v4 - 1);
warzone_mc.musuh_container[v3].cacheAsBitmap = true;
warzone_mc.musuh_container[v3].useHandCursor = false;
warzone_mc.musuh_container[v3].onRollOver = function () {
this.showLifeBar();
};
warzone_mc.musuh_container[v3].onRollOut = function () {
this.lifebar_mc.removeMovieClip();
};
warzone_mc.musuh_container[v3].onRelease = function () {
unitSelectedID = this;
if (controlledUnit.length == 0) {
setPropertyBar();
}
};
warzone_mc.musuh_container[v3].onEnterFrame = warzone_mc.musuh_container[v3].updateFrame;
interface_mc.ourUnit_txt.text = countUnit(warzone_mc.pasukan_container) + '/' + maxUnit;
interface_mc.enemyUnit_txt.text = countUnit(warzone_mc.musuh_container);
}
function spawnPasukan(_type) {
++unitCreated;
if (spawnDepth > spawnDepthMax) {
spawnDepth = 100;
}
var v3 = 1 + random(3);
++spawnDepth;
var v2 = 'pasukan' + spawnDepth;
warzone_mc.pasukan_container.createEmptyMovieClip(v2, 500 * v3 + spawnDepth);
warzone_mc.pasukan_container[v2]._x = 100;
warzone_mc.pasukan_container[v2]._y = buildingStartY[scene] - 40;
acceptProperty(_root['pasukan' + _type], warzone_mc.pasukan_container[v2]);
warzone_mc.pasukan_container[v2].setStance(2);
warzone_mc.pasukan_container[v2].posTarget = 450 + random(80);
if (ourBase.building6 > 0 || campaignMode == 6) {
warzone_mc.pasukan_container[v2].addToMinimap();
}
if (warzone_mc.pasukan_container[v2].flyingUnit) {
warzone_mc.pasukan_container[v2]._y = buildingStartY[scene] - 100;
warzone_mc.pasukan_container[v2].tujuanX = 450 + random(80);
warzone_mc.pasukan_container[v2].posTargetX = warzone_mc.pasukan_container[v2].tujuanX;
warzone_mc.pasukan_container[v2].tujuanY = buildingStartY[scene] - 200;
warzone_mc.pasukan_container[v2].posTargetY = warzone_mc.pasukan_container[v2].tujuanY;
}
warzone_mc.pasukan_container[v2].regisY = 10 * (v3 - 1);
warzone_mc.pasukan_container[v2].cacheAsBitmap = true;
warzone_mc.pasukan_container[v2].onEnterFrame = warzone_mc.pasukan_container[v2].updateFrame;
interface_mc.ourUnit_txt.text = countUnit(warzone_mc.pasukan_container) + '/' + maxUnit;
interface_mc.enemyUnit_txt.text = countUnit(warzone_mc.musuh_container);
}
function spawnPasukanSpecial(_type, posX, posY) {
++unitCreated;
if (spawnDepth > spawnDepthMax) {
spawnDepth = 100;
}
var v3 = 1 + random(3);
++spawnDepth;
var v2 = 'pasukan' + spawnDepth;
warzone_mc.pasukan_container.createEmptyMovieClip(v2, 500 * v3 + spawnDepth);
warzone_mc.pasukan_container[v2]._x = posX;
warzone_mc.pasukan_container[v2]._y = posY;
acceptProperty(_root['pasukan' + _type], warzone_mc.pasukan_container[v2]);
warzone_mc.pasukan_container[v2].setStance(2);
if (ourBase.building6 > 0 || campaignMode == 6) {
warzone_mc.pasukan_container[v2].addToMinimap();
}
if (warzone_mc.pasukan_container[v2].flyingUnit) {
warzone_mc.pasukan_container[v2]._y = buildingStartY[scene] - 100;
}
warzone_mc.pasukan_container[v2].regisY = 10 * (v3 - 1);
warzone_mc.pasukan_container[v2].posTarget = warzone_mc.pasukan_container[v2]._x;
warzone_mc.pasukan_container[v2].cacheAsBitmap = true;
warzone_mc.pasukan_container[v2].onEnterFrame = warzone_mc.pasukan_container[v2].updateFrame;
interface_mc.ourUnit_txt.text = countUnit(warzone_mc.pasukan_container) + '/' + maxUnit;
interface_mc.enemyUnit_txt.text = countUnit(warzone_mc.musuh_container);
}
function countUnit(_container) {
var v1 = 0;
for (var v3 in _container) {
++v1;
}
if (campaignMode > 0) {
if (_container == warzone_mc.pasukan_container && v1 >= 3) {
if (!tutorialStep2[3] && tutorialStep2[1] && tutorialStep2[2]) {
tampilDialog(tutorialAttack3);
tutorialStep2[3] = true;
}
}
}
return v1;
}
function summonReinforcement(_id) {
++reinforcementUsed;
if (_id == 1) {
changeCursor('Cursor_target');
pinPointShot = 1;
interface_mc._visible = false;
}
if (_id == 2) {
changeCursor('Cursor_target2');
parachuteBomb = 1;
}
if (_id == 3) {
changeCursor('Cursor_supply');
healingLasser = 1;
}
if (_id == 4) {
changeCursor('Cursor_supply');
supplyDrop = 1;
}
if (_id == 5) {
changeCursor('Cursor_target2');
frozzenBomb = 1;
}
if (_id == 6) {
changeCursor('Cursor_supply');
airStrike = 1;
}
}
function summonParachuteBomb(_jumlah, _whereX) {
var v4 = 1;
while (v4 <= _jumlah) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v2 = 'bomb' + peluruDepth;
warzone_mc.attachMovie('Parachute_bomb', v2, peluruDepth);
warzone_mc[v2]._x = _whereX + 5 * (-15 + random(30));
warzone_mc[v2]._y = -250 - random(100);
warzone_mc[v2].attack = 80;
warzone_mc[v2].jump = 1.8;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
this.isJumping = true;
for (var v3 in warzone_mc.background_mc) {
var v2 = warzone_mc.background_mc[v3];
if (v2.hitTest(this.posX, this.posY, true)) {
addExplosion(this, 1);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
if (this.isJumping) {
this._y += this.jump;
} else {
this.jump = 0;
}
if (this._y > 600) {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
++v4;
}
}
function healUnit(who) {
who.createEmptyMovieClip('heal_mc', 2);
who.heal_mc.timer = 100;
who.heal_mc.onEnterFrame = function () {
if (!isPaused) {
if (this.timer > 0) {
if (who.life < who.lifeAwal) {
++who.life;
}
--this.timer;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
}
function healAllUnit() {
var v4 = attachMovie('Heal_effect', 'heal_mc', this.getNextHighestDepth());
for (var v3 in warzone_mc.pasukan_container) {
var v2 = warzone_mc.pasukan_container[v3];
healUnit(v2);
}
}
function summonSupplyDrop(_jumlah, _whereX) {
var v6 = 1;
while (v6 <= _jumlah) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v3 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Supply_drop', v3, peluruDepth);
warzone_mc[v3]._x = _whereX + 5 * (-10 + random(20));
warzone_mc[v3]._y = -200 - random(50);
warzone_mc[v3].gotoAndStop(1);
warzone_mc[v3].supply = 50;
warzone_mc[v3].jump = 1.5;
warzone_mc[v3].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
this.isJumping = true;
for (var v5 in warzone_mc.background_mc) {
var v3 = warzone_mc.background_mc[v5];
if (v3.hitTest(this.posX, this.posY, true)) {
this.isJumping = false;
this.gotoAndStop(2);
}
}
if (this.isJumping) {
this._y += this.jump;
} else {
this.jump = 0;
}
if (this._y > 420) {
delete this.onEnterFrame;
this.removeMovieClip();
}
for (v5 in warzone_mc.pasukan_container) {
var v4 = warzone_mc.pasukan_container[v5];
if (this.hitTest(v4)) {
_root.energy += 1000;
energyCollected += 1000;
interface_mc.duit.text = energy;
if (campaignMode == 8) {
if (energy >= 30000) {
showPopResult(1);
}
}
delete this.onEnterFrame;
this.removeMovieClip();
}
}
}
};
++v6;
}
}
function summonFrozzenBomb(_jumlah, _whereX) {
var v4 = 1;
while (v4 <= _jumlah) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v2 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Frozzen_bomb', v2, peluruDepth);
warzone_mc[v2]._x = _whereX + 5 * (-10 + random(20));
warzone_mc[v2]._y = -200;
warzone_mc[v2].attack = 80;
warzone_mc[v2].powX = 0;
warzone_mc[v2].powY = 0;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
this._x += this.powX;
this._y += this.powY;
this.powY += gra;
this._rotation = 5 + Math.atan2(this.powY, this.powX) * 180 / Math.PI;
for (var v3 in warzone_mc.background_mc) {
var v2 = warzone_mc.background_mc[v3];
if (v2.hitTest(this)) {
addExplosionIce(this);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
if (this._y > 420) {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
++v4;
}
}
function summonAirStrike() {
var v4 = 1;
while (v4 <= 3) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v2 = 'jet' + peluruDepth;
warzone_mc.attachMovie('Reinforcement_jet', v2, peluruDepth);
warzone_mc[v2]._x = -1000 + random(1000);
warzone_mc[v2]._y = -250 + random(200);
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
this._x += 100;
if (this._x > 2800) {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
++v4;
}
var v5 = 1;
while (v5 <= 25) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
v2 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Reinforcement_bomb', v2, peluruDepth);
warzone_mc[v2]._x = -800 + 50 * v5;
warzone_mc[v2]._y = -500;
warzone_mc[v2].attack = 100;
warzone_mc[v2].powX = 25;
warzone_mc[v2].powY = -v5 * 3;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
this._x += this.powX;
this._y += this.powY;
this.powY += gra * 3;
this._rotation = 5 + Math.atan2(this.powY, this.powX) * 180 / Math.PI;
for (var v3 in warzone_mc.background_mc) {
var v2 = warzone_mc.background_mc[v3];
if (v2.hitTest(this)) {
addExplosion(this, 1);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
if (this._y > 420) {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
++v5;
}
}
function createSelection() {
_root.createEmptyMovieClip('rectangle_mc', 101);
rectangle_mc.lineStyle(1, 39168, 100);
rectangle_mc.beginFill(39168, 30);
rectangle_mc.moveTo(startXmouse, startYmouse);
rectangle_mc.lineTo(endXmouse, startYmouse);
rectangle_mc.lineTo(endXmouse, endYmouse);
rectangle_mc.lineTo(startXmouse, endYmouse);
rectangle_mc.lineTo(startXmouse, startYmouse);
rectangle_mc.endFill();
}
function cekSelection() {
for (var v3 in warzone_mc.pasukan_container) {
var v1 = warzone_mc.pasukan_container[v3];
if (rectangle_mc.hitTest(v1)) {
controlledUnit.push(v1);
}
}
if (controlledUnit.length == 1) {
unitSelectedID = controlledUnit[0];
setPropertyBar();
}
if (controlledUnit.length > 0) {
soundFX('selectedSound' + (1 + random(2)));
for (var v2 in controlledUnit) {
controlledUnit[v2].controlled = true;
controlledUnit[v2].showLifeBar();
}
if (campaignMode > 0) {
if (!tutorialStep2[4] && tutorialStep2[1] && tutorialStep2[2] && tutorialStep2[3]) {
tampilDialog(tutorialAttack4);
tutorialStep2[4] = true;
}
}
}
rectangle_mc.removeMovieClip();
}
function stopAllChar() {
for (var v3 in warzone_mc.musuh_container) {
var v1 = warzone_mc.musuh_container[v3];
v1.char.stop();
}
for (var v2 in warzone_mc.pasukan_container) {
v1 = warzone_mc.pasukan_container[v2];
v1.char.stop();
}
}
function playAllChar() {
for (var v3 in warzone_mc.musuh_container) {
var v1 = warzone_mc.musuh_container[v3];
v1.char.play();
}
for (var v2 in warzone_mc.pasukan_container) {
v1 = warzone_mc.pasukan_container[v2];
v1.char.play();
}
}
function clearControlUnits() {
controlledUnit = [];
for (var v2 in warzone_mc.pasukan_container) {
var v1 = warzone_mc.pasukan_container[v2];
v1.controlled = false;
v1.lifebar_mc.removeMovieClip();
}
}
stop();
defaultCursor();
var geserSpeed = 15;
var geserVel = 8;
var gra = 0.9;
var isPaused = false;
var maxLeftPanFront = new Array();
maxLeftPanFront[0] = 0;
maxLeftPanFront[1] = 0;
maxLeftPanFront[2] = 0;
maxLeftPanFront[3] = 0;
maxLeftPanFront[4] = 0;
maxLeftPanFront[5] = 0;
maxLeftPanFront[6] = 0;
maxLeftPanFront[7] = 0;
maxLeftPanFront[8] = 0;
maxLeftPanFront[9] = 0;
maxLeftPanFront[10] = 0;
maxLeftPanFront[11] = 0;
maxLeftPanFront[12] = 0;
var maxRightPanFront = new Array();
maxRightPanFront[0] = -1600;
maxRightPanFront[1] = -1600;
maxRightPanFront[2] = -1000;
maxRightPanFront[3] = -1000;
maxRightPanFront[4] = -2200;
maxRightPanFront[5] = -1600;
maxRightPanFront[6] = -1600;
maxRightPanFront[7] = -1600;
maxRightPanFront[8] = -1600;
maxRightPanFront[9] = -2200;
maxRightPanFront[10] = -1000;
maxRightPanFront[11] = -1600;
maxRightPanFront[12] = -2200;
var maxLeftPanBack = new Array();
maxLeftPanBack[0] = 0;
maxLeftPanBack[1] = 0;
maxLeftPanBack[2] = 0;
maxLeftPanBack[3] = 0;
maxLeftPanBack[4] = 0;
maxLeftPanBack[5] = 0;
maxLeftPanBack[6] = 0;
maxLeftPanBack[7] = 0;
maxLeftPanBack[8] = 0;
maxLeftPanBack[9] = 0;
maxLeftPanBack[10] = 0;
maxLeftPanBack[11] = 0;
maxLeftPanBack[12] = 0;
var maxRightPanBack = new Array();
maxRightPanBack[0] = -400;
maxRightPanBack[1] = -400;
maxRightPanBack[2] = -250;
maxRightPanBack[3] = -250;
maxRightPanBack[4] = -550;
maxRightPanBack[5] = -400;
maxRightPanBack[6] = -400;
maxRightPanBack[7] = -400;
maxRightPanBack[8] = -400;
maxRightPanBack[9] = -550;
maxRightPanBack[10] = -250;
maxRightPanBack[11] = -400;
maxRightPanBack[12] = -550;
_root.attachMovie('BG_back' + scene, 'warzoneBack_mc', 98);
_root.createEmptyMovieClip('warzone_mc', 99);
warzone_mc.attachMovie('BG_plate' + scene, 'background_mc', 1);
warzone_mc.attachMovie('BG_plate' + scene + 'front', 'background2_mc', 9999);
_root.attachMovie('Interface', 'interface_mc', 9998);
interface_mc.panelKanan_btn.onRelease = scrollToRight;
interface_mc.panelKiri_btn.onRelease = scrollToLeft;
if (maxRightPanFront[scene] >= -1000) {
var minimapSize = 1;
} else {
if (maxRightPanFront[scene] <= -2200) {
var minimapSize = 3;
} else {
var minimapSize = 2;
}
}
minimapPos = [0, 610, 550, 490];
if (ourBase.building6 > 0 || campaignMode == 6) {
addMinimap();
}
if (winTimer > 0) {
interface_mc.attachMovie('timer_mc', 'timer_mc', 986);
interface_mc.timer_mc._x = 792;
if (ourBase.building6 > 0) {
interface_mc.timer_mc._y = 110;
} else {
interface_mc.timer_mc._y = 50;
}
interface_mc.timer_mc.onEnterFrame = function () {
if (!isPaused) {
if (winTimer > 0) {
--winTimer;
if (winTimer <= 30) {
if (campaignMode == 1) {
if (!tutorialStep1[4]) {
tampilDialog(tutorialDefense4);
tutorialStep1[4] = true;
}
}
}
if (winTimer <= 90) {
if (campaignMode == 3) {
if (this._visible == true) {
tampilDialog(campaign3Dialog2);
summonAirStrike();
soundFX('reinforcementSound');
this._visible = false;
}
}
}
} else {
showPopResult(1);
delete this.onEnterFrame;
}
this.tulisan.text = 'time until reinforcements arrived';
this.tulisan2.text = (convertTimer(winTimer)).menit + ':' + (convertTimer(winTimer)).detik;
}
};
}
var energyCollected = 0;
interface_mc.duit.text = energy;
var tutorialStep1 = [null, true, true, true, true, true];
var tutorialStep2 = [null, true, true, true, true, true];
if (campaignMode == 1) {
var tutorialStep1 = [null, false, false, false, false, false];
}
if (campaignMode == 2) {
var tutorialStep2 = [null, false, false, false, false, false];
}
if (!tutorialStep1[1]) {
tampilDialog(tutorialDefense1);
tutorialStep1[1] = true;
}
if (!tutorialStep2[1]) {
tampilDialog(tutorialAttack1);
tutorialStep2[1] = true;
}
var popupBattleList = new Array();
var particleDepth = 100;
var particleDepth = 500;
if (scene == 2) {
var tampilParticle = setInterval(createParticle, 180, 'particle1', 700, 900, 250, 50);
} else {
if (scene == 3) {
var tampilParticle = setInterval(createParticle, 200, 'particle1', 0, 400, 250, 80);
}
}
interface_mc.properties_mc.resign_btn.onRelease = function () {
tampilResign();
stopAllChar();
};
interface_mc.properties_mc.option_btn.onRelease = function () {
tampilOption();
stopAllChar();
};
var sparkNumber = 5;
var sparkDistance = 10;
var sparkSize = 200;
var peluruDepth = 801;
var peluruDepthMax = 3000;
var buildingClass = new Object();
buildingClass.nama = 'Buildings';
buildingClass.deskripsi = 'Buildings description';
buildingClass.id = 0;
buildingClass.lev = 0;
buildingClass.ally = 1;
buildingClass.lifeAwal = 100;
buildingClass.life = buildingClass.lifeAwal;
buildingClass.attack = 5;
buildingClass.defense = 3;
buildingClass.range = 800;
buildingClass.lockEnemy = false;
buildingClass.isLoaded = true;
buildingClass.isReloading = false;
buildingClass.shootDurationAwal = 50;
buildingClass.shootDuration = 50;
buildingClass.reloadSpeedAwal = 30;
buildingClass.reloadSpeed = 30;
buildingClass.attackLand = true;
buildingClass.attackAir = true;
buildingClass.sasaran = undefined;
buildingClass.cekPos = function () {
this.posX = this._x + this._parent._x;
this.posY = this._y + this._parent._y;
};
buildingClass.cekControl = function () {
this.setColor(100, 100, 100);
unitSelectedID = undefined;
clearControlUnits();
clearControlBuildings();
if (campaignMode > 0) {
if (this.id == 2) {
if (tutorialStep1[2] && !tutorialStep1[3]) {
tampilDialog(tutorialDefense3);
tutorialStep1[3] = true;
}
}
if (!tutorialStep1[2]) {
tampilDialog(tutorialDefense2);
tutorialStep1[2] = true;
}
if (this.id == 1) {
if (!tutorialStep2[2]) {
tampilDialog(tutorialAttack2);
tutorialStep2[2] = true;
}
}
}
controlledBuilding = this;
setPropertyBar();
};
buildingClass.kelipKelip = function () {
this.setColor(100, 100, 100);
this.createEmptyMovieClip('selected_mc', 10);
this.selected_mc.timerSelected = 50;
this.selected_mc.onEnterFrame = function () {
if (this.timerSelected <= 0) {
this.timerSelected = 0;
this._parent.setOriginalColor();
delete this.onEnterFrame;
this.removeMovieClip();
} else {
--this.timerSelected;
if (this.timerSelected % 6 <= 2) {
this._parent.setOriginalColor();
} else {
this._parent.setColor(100, 100, 100);
}
}
};
};
buildingClass.damaged = function (_jumlah) {
var v2 = _jumlah - this.defense;
if (v2 > 0) {
this.life -= v2;
} else {
this.life -= 1;
}
if (campaignMode > 0) {
if (this.ally == 2) {
if (!tutorialStep2[5] && tutorialStep2[1] && tutorialStep2[2] && tutorialStep2[3] && tutorialStep2[4]) {
tampilDialog(tutorialAttack5);
tutorialStep2[5] = true;
}
}
}
interface_mc.properties_mc['lifebar' + this.ally + '_mc']._xscale = (this.life / this.lifeAwal) * 100;
this.cekDead();
};
buildingClass.cekDead = function () {
if (this.life <= 0) {
this.setStance(6);
this.life = 0;
this.isDead = true;
delete this.onEnterFrame;
}
};
buildingClass.setColor = function (_rb, _gb, _bb) {
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {'rb': _rb, 'gb': _gb, 'bb': _bb};
myColor.setTransform(myColorTransform);
};
buildingClass.setOriginalColor = function () {
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {'rb': 0, 'gb': 0, 'bb': 0};
myColor.setTransform(myColorTransform);
};
buildingClass.detectTarget = function () {
if (this.sasaran._name == undefined || this.sasaran.isDead) {
var v3 = this.range;
}
for (var v4 in warzone_mc.musuh_container) {
if (!warzone_mc.musuh_container[v4].isDead) {
var v2 = warzone_mc.musuh_container[v4];
}
if (this.attackLand && this.attackAir) {
if (Math.abs(v2.posX - this.posX) < v3) {
v3 = Math.abs(v2.posX - this.posX);
this.sasaran = v2;
}
} else {
if (this.attackLand && !this.attackAir) {
if (!v2.flyingUnit && Math.abs(v2.posX - this.posX) < v3) {
v3 = Math.abs(v2.posX - this.posX);
this.sasaran = v2;
}
} else {
if (!this.attackLand && this.attackAir) {
if (v2.flyingUnit && Math.abs(v2.posX - this.posX) < v3) {
v3 = Math.abs(v2.posX - this.posX);
this.sasaran = v2;
}
}
}
}
}
};
var building0 = new Object();
acceptProperty(buildingClass, building0);
building0.nama = 'Base';
building0.id = 0;
building0.lev = ourBase.building0;
building0.lifeAwal = buildingData.building0.life + 50 * ourBase.building0;
building0.life = building0.lifeAwal;
building0.defense = buildingData.building0.defense;
building0.cekDead = function () {
if (this.life <= 0) {
showPopResult(2);
this.setStance(6);
this.life = 0;
this.isDead = true;
delete this.onEnterFrame;
}
};
building0.updateFrame = function () {
if (!isPaused) {
this.cekPos();
}
};
var building1 = new Object();
acceptProperty(buildingClass, building1);
building1.nama = 'Barrack';
building1.deskripsi = buildingData.building1.deskripsi;
building1.id = 1;
building1.lev = ourBase.building1;
building1.updateFrame = function () {
if (!isPaused) {
this.cekPos();
}
};
var building2 = new Object();
acceptProperty(buildingClass, building2);
building2.nama = buildingData.building2.nama;
building2.deskripsi = buildingData.building2.deskripsi;
building2.id = 2;
building2.lev = ourBase.building2;
building2.attack = buildingData.building2.attack + ourBase.building2;
building2.defense = buildingData.building2.defense;
building2.range = buildingData.building2.range;
building2.pointToTarget = function () {
this.canon.posX = this.canon._x + this._x;
this.canon.posY = this.canon._y + this._y;
this.canon.difX = this.sasaran.posX - (this.canon.posX + warzone_mc._x);
this.canon.difY = this.sasaran.posY - (this.canon.posY + warzone_mc._y);
this.canon.rot = 57.29577951308232 * Math.atan2(this.canon.difY, this.canon.difX);
this.canon._rotation += (this.canon.rot - this.canon._rotation) / 10;
if (Math.abs(this.canon.rot - this.canon._rotation) < 1) {
this.lockEnemy = true;
} else {
this.lockEnemy = false;
}
};
building2.shoot = function () {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
soundFX('machineGunSound');
var v4 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru1', v4, peluruDepth);
warzone_mc[v4]._x = this.canon.posX;
warzone_mc[v4]._y = this.canon.posY;
warzone_mc[v4]._rotation = this.canon._rotation + (-2 + random(3));
warzone_mc[v4].attack = this.attack;
warzone_mc[v4].moveX = 100 * Math.cos(Math.PI * warzone_mc[v4]._rotation / 180);
warzone_mc[v4].moveY = 100 * Math.sin(Math.PI * warzone_mc[v4]._rotation / 180);
warzone_mc[v4].timer = 12;
warzone_mc[v4]._x += warzone_mc[v4].moveX;
warzone_mc[v4]._y += warzone_mc[v4].moveY;
warzone_mc[v4].cacheAsBitmap = true;
warzone_mc[v4].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
--this.timer;
if (this.timer <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
this._x += this.moveX;
this._y += this.moveY;
for (var v4 in warzone_mc.musuh_container) {
var v3 = warzone_mc.musuh_container[v4];
if (this.hitTest(v3)) {
v3.damaged(this.attack);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
for (var v5 in warzone_mc.background_mc) {
var v2 = warzone_mc.background_mc[v5];
if (v2.hitTest(this.posX, this.posY, true)) {
addDebu(this._x, v2._y);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
}
};
};
building2.updateFrame = function () {
if (!isPaused) {
this.cekPos();
if (this.isReloading) {
if (this.reloadSpeed > 0) {
--this.reloadSpeed;
} else {
this.isLoaded = true;
this.shootDuration = this.shootDurationAwal;
this.isReloading = false;
this.reloadSpeed = this.reloadSpeedAwal;
}
}
if (controlledBuilding == this) {
this.sasaran = mousePlayer;
this.pointToTarget();
if (isDownMouse) {
if (this.isLoaded) {
if (this.shootDuration > 0) {
--this.shootDuration;
this.shoot();
} else {
this.isReloading = true;
this.isLoaded = false;
}
}
}
} else {
this.detectTarget();
this.pointToTarget();
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (this.isLoaded && this.lockEnemy) {
if (this.shootDuration > 0) {
--this.shootDuration;
this.shoot();
} else {
this.isReloading = true;
this.isLoaded = false;
}
}
}
}
}
};
var building3 = new Object();
acceptProperty(buildingClass, building3);
building3.nama = buildingData.building3.nama;
building3.deskripsi = buildingData.building3.deskripsi;
building3.id = 3;
building3.lev = ourBase.building3;
building3.attack = buildingData.building3.attack + 2 * ourBase.building3;
building3.range = 1000;
var lightningOffset = 50;
var lightningFrequency = 20;
var lightningWidth = 1 + ourBase.building3 / 5;
var lightningColor = '0xFFFFFF';
var lightningAlpha = 100;
var lightningBranches = Math.ceil(ourBase.building3 / 3);
var reloadSpeed = 1000;
var clearSpeed = 100;
var glow_color = lightningColor;
var glow_alpha = 0.6;
var glow_blurX = 10;
var glow_blurY = 10;
var glow_strength = 5;
var glow_quality = 3;
warzone_mc.createEmptyMovieClip('effectHolder_mc', peluruDepthMax + 9);
var effectHolder = warzone_mc.effectHolder_mc;
var reloadTimer;
var screenTimer;
var reloadComplete = true;
var rotationDirection;
var filter_glow = new flash.filters.GlowFilter(glow_color, glow_alpha, glow_blurX, glow_blurY, glow_strength, glow_quality);
effectHolder.filters = [filter_glow];
building3.shoot = function (xEnd, yEnd) {
var xStart = 275;
var yStart = this._y - 250;
if (reloadComplete == true) {
soundFX('teslaSound');
effectHolder._alpha = 100;
effectHolder.onEnterFrame = function () {
effectHolder.clear();
effectHolder.lineStyle(lightningWidth, lightningColor, lightningAlpha, true);
var v12 = xStart - xEnd;
var v10 = yStart - yEnd;
var v11 = Math.sqrt(v12 * v12 + v10 * v10);
var v8 = v11 / lightningFrequency;
var v2 = Math.atan2(yStart - yEnd, xStart - xEnd);
var v9 = v11 / v8;
var v7 = 0;
while (v7 < lightningBranches) {
effectHolder.moveTo(xStart, yStart);
var v1 = 1;
while (v1 < v8 + 1) {
var v4 = v9 * v1;
var v3 = random(lightningOffset - lightningOffset / 2);
var v5 = xStart - Math.cos(v2) * v4 + Math.cos(v2 + 1.55) * v3;
var v6 = yStart - Math.sin(v2) * v4 + Math.sin(v2 + 1.55) * v3;
effectHolder.lineTo(v5, v6);
++v1;
}
++v7;
}
};
effectHolder.lineTo(xEnd, yEnd);
addSparkles(xEnd, yEnd, sparkNumber, sparkDistance, sparkSize);
for (var v11 in warzone_mc.musuh_container) {
var v3 = warzone_mc.musuh_container[v11];
if (Math.abs(v3._x - xEnd) <= 50 && Math.abs(v3._y - yEnd) <= 50) {
v3.bleeding(3);
v3.bleeding(4);
v3.bleeding(4);
v3.bleeding(5);
v3.bleeding(5);
v3.damaged(this.attack);
}
}
startReloading();
}
};
building3.updateFrame = function () {
if (!isPaused) {
this.cekPos();
if (controlledBuilding == this) {
this.sasaran = mousePlayer;
if (isDownMouse) {
this.shoot(_xmouse - warzone_mc._x, _ymouse - warzone_mc._y);
}
} else {
this.detectTarget();
if (this.sasaran._name != undefined) {
this.shoot(this.sasaran._x, this.sasaran._y);
}
}
}
};
var building4 = new Object();
acceptProperty(buildingClass, building4);
building4.nama = buildingData.building4.nama;
building4.deskripsi = buildingData.building4.deskripsi;
building4.id = 4;
building4.lev = ourBase.building4;
building4.attack = buildingData.building4.attack + ourBase.building4;
building4.reloadTimerAwal = 100;
building4.reloadTimer = 0;
building4.flameSpread = 5 + ourBase.building4;
building4.attackLand = true;
building4.attackAir = false;
building4.shoot = function () {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v3 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru4', v3, peluruDepth);
warzone_mc[v3]._x = 180;
warzone_mc[v3]._y = this._y - 275;
warzone_mc[v3].attack = this.attack;
warzone_mc[v3].weight = 0.2;
warzone_mc[v3].flameSpread = this.flameSpread;
warzone_mc[v3].powX = (this.sasaran.posX - (warzone_mc[v3]._x + warzone_mc._x)) / 35 + random(5);
warzone_mc[v3].powY = (this.sasaran.posY - Math.abs(warzone_mc[v3].powX * 25) - (warzone_mc[v3]._y + warzone_mc._y)) / 17;
warzone_mc[v3].timer = 1000;
warzone_mc[v3].cacheAsBitmap = true;
warzone_mc[v3].onEnterFrame = function () {
if (!isPaused) {
--this.timer;
if (this.timer <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
this._x += this.powX;
this._y += this.powY;
addParticle(this, 'smoke' + (1 + random(3)), 3, false);
this.powY += gra + this.weight;
this._rotation = 5 + Math.atan2(this.powY, this.powX) * 180 / Math.PI;
for (var v4 in warzone_mc.musuh_container) {
var v2 = warzone_mc.musuh_container[v4];
if (this.hitTest(v2)) {
v2.damaged(this.attack);
addExplosionNapalm(this);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
for (var v5 in warzone_mc.background_mc) {
var v3 = warzone_mc.background_mc[v5];
if (this.hitTest(v3)) {
addExplosionNapalm(this);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
}
};
this.reloadTimer = this.reloadTimerAwal;
this.reloaded = false;
};
building4.updateFrame = function () {
if (!isPaused) {
this.cekPos();
--this.reloadTimer;
if (this.reloadTimer <= 0) {
this.reloaded = true;
}
if (controlledBuilding == this) {
this.sasaran = mousePlayer;
if (isDownMouse) {
if (this.reloaded) {
this.shoot();
}
}
} else {
this.detectTarget();
if (this.sasaran._name != undefined) {
if (this.reloaded) {
this.shoot();
}
}
}
}
};
var building5 = new Object();
acceptProperty(building2, building5);
building5.nama = buildingData.building5.nama;
building5.deskripsi = buildingData.building5.deskripsi;
building5.id = 5;
building5.lev = ourBase.building5;
building5.attack = buildingData.building5.attack + ourBase.building5;
building5.powerSpread = 20 + ourBase.building5;
building5.range = 500;
building5.shoot = function () {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
soundFX('flameThrower');
var v4 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru5', v4, peluruDepth);
warzone_mc[v4]._x = this.canon.posX;
warzone_mc[v4]._y = this.canon.posY;
warzone_mc[v4]._rotation = this.canon._rotation + (-5 + random(10));
warzone_mc[v4].attack = this.attack;
warzone_mc[v4].moveX = this.powerSpread * Math.cos(Math.PI * warzone_mc[v4]._rotation / 180);
warzone_mc[v4].moveY = this.powerSpread * Math.sin(Math.PI * warzone_mc[v4]._rotation / 180);
warzone_mc[v4]._x += warzone_mc[v4].moveX * 1.5;
warzone_mc[v4]._y += warzone_mc[v4].moveY * 1.5;
warzone_mc[v4].cacheAsBitmap = true;
warzone_mc[v4].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
this._x += this.moveX;
this._y += this.moveY;
this.moveX *= 0.95;
this.moveY *= 0.95;
for (var v5 in warzone_mc.background_mc) {
var v3 = warzone_mc.background_mc[v5];
if (v3.hitTest(this.posX, this.posY, true)) {
this.moveX *= -0.5;
this.moveY *= -0.5;
}
}
for (var v4 in warzone_mc.musuh_container) {
if (!warzone_mc.musuh_container[v4].isDead) {
var v2 = warzone_mc.musuh_container[v4];
if (this.hitTest(v2)) {
v2.damaged(this.attack / 300, false, false);
v2.terbakar(80);
}
}
}
}
};
};
var building6 = new Object();
acceptProperty(buildingClass, building6);
building6.nama = buildingData.building6.nama;
building6.deskripsi = buildingData.building6.deskripsi;
building6.id = 6;
building6.lev = ourBase.building6;
building6.updateFrame = function () {
if (!isPaused) {
this.cekPos();
}
};
var building7 = new Object();
acceptProperty(buildingClass, building7);
building7.nama = buildingData.building7.nama;
building7.deskripsi = buildingData.building7.deskripsi;
building7.id = 7;
building7.lev = ourBase.building7;
building7.updateFrame = function () {
if (!isPaused) {
this.cekPos();
}
};
var building8 = new Object();
acceptProperty(buildingClass, building8);
building8.nama = buildingData.building8.nama;
building8.deskripsi = buildingData.building8.deskripsi;
building8.id = 8;
building8.lev = ourBase.building8;
building8.updateFrame = function () {
if (!isPaused) {
this.cekPos();
}
};
var building9 = new Object();
acceptProperty(buildingClass, building9);
building9.nama = buildingData.building9.nama;
building9.deskripsi = buildingData.building9.deskripsi;
building9.id = 9;
building9.lev = ourBase.building9;
building9.updateFrame = function () {
if (!isPaused) {
this.cekPos();
}
};
var building11 = new Object();
acceptProperty(buildingClass, building11);
building11.nama = 'Mercenary Barrack';
building11.deskripsi = buildingData.building11.deskripsi;
building11.id = 11;
building11.lev = '-';
building11.updateFrame = function () {
if (!isPaused) {
this.cekPos();
}
};
var buildingEnemy1 = new Object();
acceptProperty(buildingClass, buildingEnemy1);
buildingEnemy1.nama = 'Nest';
buildingEnemy1.ally = 2;
buildingEnemy1.id = 21;
buildingEnemy1.lifeAwal = enemyBuildingsLife;
buildingEnemy1.life = buildingEnemy1.lifeAwal;
buildingEnemy1.defense = 8;
buildingEnemy1.cekDead = function () {
if (this.life <= 0) {
this.setStance(6);
this.life = 0;
this.isDead = true;
showPopResult(1);
delete this.onEnterFrame;
}
};
buildingEnemy1.updateFrame = function () {
if (!isPaused) {
this.cekPos();
}
};
var controlledBuilding;
var buildingStartY = new Array();
buildingStartY[0] = 0;
buildingStartY[1] = 250;
buildingStartY[2] = 250;
buildingStartY[3] = 100;
buildingStartY[4] = 130;
buildingStartY[5] = 260;
buildingStartY[6] = 130;
buildingStartY[7] = 200;
buildingStartY[8] = 90;
buildingStartY[9] = 330;
buildingStartY[10] = 130;
buildingStartY[11] = 130;
buildingStartY[12] = 260;
var buildingDepth = new Array();
buildingDepth[0] = 10;
buildingDepth[1] = 8;
buildingDepth[2] = 5;
buildingDepth[3] = 4;
buildingDepth[4] = 3;
buildingDepth[5] = 2;
buildingDepth[6] = 9;
buildingDepth[7] = 1;
buildingDepth[8] = 6;
buildingDepth[9] = 7;
buildingDepth[11] = 8;
var i = 0;
while (i <= 11) {
if (ourBase['building' + i] > 0) {
addBuilding(i);
}
++i;
}
if (ourBase.building0 > 0) {
addBuildingHoax('Benteng_belakang', 98, 0, buildingStartY[scene]);
}
var startBuildingEnemy = new Array();
startBuildingEnemy[0] = [0, 0];
startBuildingEnemy[1] = [2100, 150];
startBuildingEnemy[2] = [1500, 150];
startBuildingEnemy[3] = [1500, 140];
startBuildingEnemy[4] = [2700, 180];
startBuildingEnemy[5] = [2100, 210];
startBuildingEnemy[6] = [2100, 60];
startBuildingEnemy[7] = [2100, 150];
startBuildingEnemy[8] = [2100, 300];
startBuildingEnemy[9] = [2700, 0];
startBuildingEnemy[10] = [1500, 160];
startBuildingEnemy[11] = [2100, 50];
startBuildingEnemy[12] = [2700, 70];
if (enemyBuildingsLife > 0) {
addBuildingEnemy(1);
}
var delayPasukan = new Array();
var delayPasukanTimerAwal = [0, 100, 120, 140, 180, 200, 180, 300, 450, 0, 0, 75];
var delayPasukanTimer = [0, 100, 120, 140, 180, 200, 180, 300, 450, 0, 0, 75];
var delayReinforcementQueue = [0, false, false, false, false, false, false];
var delayReinforcementTimer = [0, 500, 700, 1000, 1200, 1500, 1800];
var delayReinforcementTimerMax = [0, 500, 700, 1000, 1200, 1500, 1800];
setPropertyBar();
clearControlBuildings();
var controlledUnit = new Array();
var spawnDepth = 100;
var spawnDepthMax = 750;
var enemyOut = 0;
warzone_mc.createEmptyMovieClip('musuh_container', 100);
warzone_mc.createEmptyMovieClip('pasukan_container', 101);
var unitClass = new Object();
unitClass.unitID = 1;
unitClass.nama = 'Nama Unit';
unitClass.deskripsi = 'Deskripsi Unit ini nanti harus jelas, biar keren gamenya';
unitClass.mcType = 'Musuh1';
unitClass.bloodType = 'blood1';
unitClass.deadSound = 'deadMonster1';
unitClass.stance = 0;
unitClass.idle = false;
unitClass.lifeAwal = 60;
unitClass.life = unitClass.lifeAwal;
unitClass.attack = 5;
unitClass.defense = 3;
unitClass.energyGet = 20;
unitClass.timerSpecialMax = 500;
unitClass.timerSpecial = 500;
unitClass.isSpecial = false;
unitClass.enableSpecial = true;
unitClass.timer = 0;
unitClass.jump = 0;
unitClass.isDead = false;
unitClass.hancurable = true;
unitClass.jumlahPart = 6;
unitClass.frozzen = false;
unitClass.frozzenTime = 0;
unitClass.timerTerbakar = 0;
unitClass.ally = 2;
unitClass.rot = 0;
unitClass.moveSpeed = 3;
unitClass.sasaran = canon_mc;
unitClass.regisY = 0;
unitClass.range = 350;
unitClass.lineSight = 450;
unitClass.flyingUnit = false;
unitClass.followLandRot = true;
unitClass.posTarget = 0;
unitClass.controlled = false;
unitClass.attackLand = true;
unitClass.attackAir = true;
unitClass.containerTarget = warzone_mc.musuh_container;
unitClass.cekPos = function () {
if (this.sasaran._name != undefined) {
if (this.sasaran._x > this._x) {
this._xscale = 100;
} else {
this._xscale = -100;
}
}
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
};
unitClass.jalan = function (_arah) {
this.setStance(2);
this.isAttacking = false;
this.xspeed = this.moveSpeed * Math.cos(Math.PI * this.rot / 180);
this.yspeed = this.moveSpeed * Math.sin(Math.PI * this.rot / 180);
this._xscale = 100 * _arah;
this._x += this.xspeed * _arah;
this._y += this.yspeed * _arah;
if (this.ally == 1) {
if (this._x + this.moveSpeed >= startBuildingEnemy[scene][0]) {
this._x -= this.moveSpeed;
}
}
};
unitClass.showLifeBar = function () {
this.attachMovie('Lifebar_unit', 'lifebar_mc', 99);
this.lifebar_mc._y = -this._height;
this.lifebar_mc.onEnterFrame = function () {
this._rotation = this._parent._rotation * (this._parent._xscale / -100);
this.bar_mc._xscale = (this._parent.life / this._parent.lifeAwal) * 100;
};
};
unitClass.damaged = function (_jumlah, _ledakan, _bleeding) {
if (_ledakan == undefined) {
_ledakan = false;
}
if (_bleeding == undefined || _bleeding == true) {
this.bleeding(2);
}
var v2 = _jumlah - this.defense;
if (v2 > 0) {
this.life -= v2;
} else {
this.life -= 1;
}
this.cekDead(_ledakan);
};
unitClass.detectTarget = function () {
if (this.sasaran._name == undefined || this.sasaran.isDead) {
var v3 = this.range;
}
for (var v4 in this.containerTarget) {
var v2 = this.containerTarget[v4];
if (this.attackLand && this.attackAir) {
if (Math.abs(v2.posX - this.posX) < v3) {
v3 = Math.abs(v2.posX - this.posX);
this.sasaran = v2;
}
} else {
if (this.attackLand && !this.attackAir) {
if (!v2.flyingUnit && Math.abs(v2.posX - this.posX) < v3) {
v3 = Math.abs(v2.posX - this.posX);
this.sasaran = v2;
}
} else {
if (!this.attackLand && this.attackAir) {
if (v2.flyingUnit && Math.abs(v2.posX - this.posX) < v3) {
v3 = Math.abs(v2.posX - this.posX);
this.sasaran = v2;
}
}
}
}
}
};
unitClass.countGroup = function () {
var v3 = 0;
for (var v4 in warzone_mc.musuh_container) {
var v2 = warzone_mc.musuh_container[v4];
if (Math.abs(v2._x - this._x) < 100) {
++v3;
}
}
return v3;
};
unitClass.showStance = function () {
if (this.char._name == undefined) {
this.attachMovie(this.mcType + '_' + this.stance, 'char', 1);
}
};
unitClass.setStance = function (_stanceID, _mode) {
this.damaging = false;
if (_stanceID == 3) {
this.isAttack = true;
}
if (this.stance != _stanceID) {
if (_mode == undefined) {
this.attachMovie(this.mcType + '_' + _stanceID, 'char', 1);
} else {
this.attachMovie(this.mcType + '_' + _stanceID + '_' + _mode, 'char', 1);
}
this.stance = _stanceID;
this.cacheAsBitmap = true;
if (_stanceID == 6) {
soundFX(this.deadSound);
}
}
};
unitClass.hancur = function () {
if (this.ally == 2) {
++enemyKilled;
energy += this.energyGet;
energyCollected += this.energyGet;
interface_mc.duit.text = energy;
} else {
++unitLost;
soundFX('unitLostSound');
}
var v4 = 1;
while (v4 <= this.jumlahPart) {
this.bleeding(5);
this.bleeding(7);
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v2 = 'kepingan' + peluruDepth;
warzone_mc.attachMovie(this.mcType + '_part' + v4, v2, peluruDepth);
warzone_mc[v2]._x = this._x;
warzone_mc[v2]._y = this._y - this._height;
warzone_mc[v2].powX = -5 + random(10);
warzone_mc[v2].powY = 5 + random(5);
warzone_mc[v2].rot = 10 * (-5 + random(10));
if (this.frozzenTime > 0) {
setColor(warzone_mc[v2], 30, 30, 200);
}
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
this._rotation += this.rot;
this._x += this.powX;
this._y -= this.powY;
this.powY -= gra / 3;
if (this.powY < 0) {
for (var v3 in warzone_mc.background_mc) {
var v2 = warzone_mc.background_mc[v3];
if (v2.hitTest(this.posX, this.posY + random(20), true)) {
drawSerpihanObject(this);
delete this.onEnterFrame;
}
}
}
}
};
++v4;
}
delete this.onEnterFrame;
this.removeMovieClip();
};
unitClass.bleeding = function (_high) {
if (grapichBlood) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v3 = 'blood' + peluruDepth;
warzone_mc.attachMovie(this.bloodType + '_' + (1 + random(3)), v3, peluruDepth);
warzone_mc[v3]._x = this._x + random(15) * (Math.abs(this._xscale) / this._xscale);
warzone_mc[v3]._y = this._y - this._height / 2;
warzone_mc[v3].powX = -3 + random(7);
warzone_mc[v3].powY = -(_high + random(2));
warzone_mc[v3].rot = 2 * (-5 + random(10));
warzone_mc[v3].onEnterFrame = function () {
if (!isPaused) {
this._alpha -= 2;
this._xscale += 1;
this._yscale += 1;
this._rotation = 5 + Math.atan2(this.powY, this.powX) * 180 / Math.PI;
this._x += this.powX;
this._y += this.powY;
this.powY += gra / 3;
if (this.powY > 0) {
for (var v3 in warzone_mc.background_mc) {
var v2 = warzone_mc.background_mc[v3];
if (v2.hitTest(this)) {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
}
}
};
}
};
var panjangKuburan = new Array();
panjangKuburan[1] = 2400;
panjangKuburan[2] = 1800;
panjangKuburan[3] = 1800;
panjangKuburan[4] = 2880;
panjangKuburan[5] = 2400;
panjangKuburan[6] = 2400;
panjangKuburan[7] = 2400;
panjangKuburan[8] = 2400;
panjangKuburan[9] = 2880;
panjangKuburan[10] = 1800;
panjangKuburan[11] = 2400;
panjangKuburan[12] = 2880;
var tempatMayat;
taruhTempatMayat();
unitClass.cekDead = function (_ledakan) {
if (this.life <= 0) {
delete this.onEnterFrame;
this.lifebar_mc.removeMovieClip();
this.api_mc.removeMovieClip();
this.rage_mc.removeMovieClip();
this.setStance(6);
this.setOriginalColor();
this.life = 0;
this.isDead = true;
if (this.ally == 1) {
var v2 = 0;
while (v2 <= controlledUnit.length) {
if (controlledUnit[v2]._name == this._name) {
controlledUnit.splice(v2, 1);
}
++v2;
}
} else {
if (campaignMode == 1) {
newAchievement(1);
}
}
if (this.hancurable && _ledakan) {
if (campaignMode == 8) {
if (energy >= 30000) {
showPopResult(1);
}
}
this.hancur();
}
this.onEnterFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekGravity();
}
};
if (countUnit(warzone_mc.pasukan_container) < maxUnit) {
maxUnitReached = false;
}
interface_mc.ourUnit_txt.text = countUnit(warzone_mc.pasukan_container) + '/' + maxUnit;
interface_mc.enemyUnit_txt.text = countUnit(warzone_mc.musuh_container);
}
};
var miniDepth = 1;
var miniDepthMax = 100;
unitClass.addToMinimap = function () {
++miniDepth;
if (miniDepth > miniDepthMax) {
miniDepth = 1;
}
var v2 = 'mini' + this._name;
interface_mc.minimap_mc.map_mc.attachMovie('minimapUnit' + this.ally, v2, miniDepth);
interface_mc.minimap_mc.map_mc[v2]._x = this._x / 10;
interface_mc.minimap_mc.map_mc[v2]._y = this._y / 10;
interface_mc.minimap_mc.map_mc[v2].bapak = this;
interface_mc.minimap_mc.map_mc[v2].onEnterFrame = function () {
if (this.bapak._name != undefined) {
this._x = this.bapak._x / 10;
this._y = this.bapak._y / 10;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
};
setColor = function (_who, _rb, _gb, _bb) {
myColor = new Color(_who);
myColorTransform = new Object();
myColorTransform = {'rb': _rb, 'gb': _gb, 'bb': _bb};
myColor.setTransform(myColorTransform);
};
unitClass.setColor = function (_rb, _gb, _bb) {
myColor = new Color(this.char);
myColorTransform = new Object();
myColorTransform = {'rb': _rb, 'gb': _gb, 'bb': _bb};
myColor.setTransform(myColorTransform);
};
unitClass.setOriginalColor = function () {
myColor = new Color(this.char);
myColorTransform = new Object();
myColorTransform = {'rb': 0, 'gb': 0, 'bb': 0};
myColor.setTransform(myColorTransform);
};
unitClass.cekFrozzen = function () {
if (this.frozzen) {
soundFX('membeku');
delete this.onEnterFrame;
this.char.stop();
this.setColor(30, 30, 200);
this.onEnterFrame = function () {
if (!isPaused) {
--this.frozzenTime;
if (this.frozzenTime <= 0) {
this.frozzen = false;
this.char.play();
this.setOriginalColor();
this.onEnterFrame = this.updateFrame;
}
}
};
if (this.flyingUnit) {
this.onEnterFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekGravity();
if (!this.isJumping) {
this.hancur();
}
}
};
}
}
};
unitClass.terbakar = function (_duration) {
this.setColor(-60, -60, -60);
if (this.api_mc._name == undefined) {
this.attachMovie('api' + this.mcType, 'api_mc', 11);
this.api_mc._alpha = 0;
this.api_mc.pengaturAlpha = 5;
}
this.timerTerbakar = _duration;
this.api_mc.onEnterFrame = function () {
if (!isPaused) {
if (this._alpha < 100) {
this._alpha += this.pengaturAlpha;
}
if (this._parent.timerTerbakar <= 0) {
this._parent.timerTerbakar = 0;
this._parent.setOriginalColor();
delete this.onEnterFrame;
this.onEnterFrame = function () {
if (this._alpha > 0) {
this._alpha -= this.pengaturAlpha;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
} else {
--this._parent.timerTerbakar;
this._parent.damaged(0.025, false, false);
}
}
};
};
unitClass.setTargeted = function () {
this.setColor(100, 100, 100);
this.createEmptyMovieClip('selected_mc', 10);
this.selected_mc.timerSelected = 5;
this.selected_mc.onEnterFrame = function () {
if (this.timerSelected <= 0) {
this.timerSelected = 0;
this._parent.setOriginalColor();
delete this.onEnterFrame;
this.removeMovieClip();
} else {
--this.timerSelected;
}
};
};
unitClass.kelipKelip = function () {
this.setColor(100, 100, 100);
this.createEmptyMovieClip('selected_mc', 10);
this.selected_mc.timerSelected = 50;
this.selected_mc.onEnterFrame = function () {
if (this.timerSelected <= 0) {
this.timerSelected = 0;
this._parent.setOriginalColor();
delete this.onEnterFrame;
this.removeMovieClip();
} else {
--this.timerSelected;
if (this.timerSelected % 6 <= 2) {
this._parent.setOriginalColor();
} else {
this._parent.setColor(100, 100, 100);
}
}
};
};
unitClass.cekGravity = function () {
this.isJumping = true;
for (var v3 in warzone_mc.background_mc) {
var v2 = warzone_mc.background_mc[v3];
if (v2.hitTest(this.posX, this.posY + this.moveSpeed - this.regisY, true)) {
this.rot = v2._rotation;
this.isJumping = false;
this.xforce = 0;
this.attacked = false;
if (this.followLandRot) {
this._rotation += (this.rot - this._rotation) / 3;
}
}
}
if (this.isJumping) {
this._y += this.jump;
this.jump += gra;
} else {
this.jump = 0;
}
if (this._y > 420) {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
var musuh1 = new Object();
acceptProperty(unitClass, musuh1);
musuh1.unitID = 13;
musuh1.nama = 'Corro';
musuh1.deskripsi = 'An ugly and fast monster that came from dirty and disgusting place. He like bitting everything around him.';
musuh1.containerTarget = warzone_mc.pasukan_container;
musuh1.posTarget = 0;
musuh1.bloodType = 'Blood2';
musuh1.isSpecial = false;
musuh1.moveSpeed = 4;
musuh1.range = 50;
musuh1.energyGet = 25;
musuh1.enableSpecial = true;
musuh1.special = function (who) {
soundFX('monsterSlash');
if (who.hancurable) {
who.hancur();
who.bleeding(4);
who.bleeding(5);
who.bleeding(6);
} else {
who.damaged(this.attack * 2);
}
};
musuh1.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
if (this.timerSpecial < this.timerSpecialMax) {
++this.timerSpecial;
}
for (var v3 in this.containerTarget) {
if (!this.containerTarget[v3].isDead) {
var v2 = this.containerTarget[v3];
}
if (Math.abs(v2._x - this._x) < this.range + 20 && Math.abs(v2._y - this._y) < 50) {
this.sasaran = v2;
}
}
this.jarakSasaran = this.sasaran._x - this._x;
this.jarakSasaranY = this.sasaran._y - this._y;
if (this.sasaran._name == undefined) {
this.setStance(1);
if (this.timer > 0) {
--this.timer;
} else {
if (warzone_mc.benteng_mc0._name != undefined) {
this.sasaran = warzone_mc.benteng_mc0;
} else {
this.sasaran = warzone_mc.pasukan_container.pasukan101;
}
this.isAttacking = false;
}
}
if (Math.abs(this.sasaran._x - this._x) > this.range && !this.isSpecial) {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
if (!this.isAttacking) {
if (this.enableSpecial && this.timerSpecial >= this.timerSpecialMax) {
this.isSpecial = true;
this.setStance(5);
} else {
this.setStance(3 + random(2));
}
this.isAttacking = true;
if (this.sasaran == warzone_mc.benteng_mc0) {
this.timer = 0;
} else {
this.timer = 50;
}
}
if (this.damaging && !this.isSpecial) {
soundFX('monsterSlash');
this.sasaran.damaged(this.attack);
}
}
if (this.isSpecial) {
if (this.damaging) {
this.special(this.sasaran);
}
this.timer = 100;
}
this.cekGravity();
}
};
var musuh2 = new Object();
acceptProperty(unitClass, musuh2);
musuh2.unitID = 14;
musuh2.nama = 'Enthung';
musuh2.deskripsi = 'A fat monster that like eating human and always become hungry when get close to human. He launch attack from his butt.';
musuh2.mcType = 'Musuh2';
musuh2.bloodType = 'Blood2';
musuh2.containerTarget = warzone_mc.pasukan_container;
musuh2.lifeAwal = 100;
musuh2.life = 100;
musuh2.attack = 20;
musuh2.posTarget = 0;
musuh2.moveSpeed = 2;
musuh2.energyGet = 40;
musuh2.enableSpecial = false;
musuh2.hancurable = false;
musuh2.shoot = function (_sasaran) {
++peluruDepth;
var v4 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru6', v4, peluruDepth);
warzone_mc[v4]._x = this._x;
warzone_mc[v4]._y = this._y - this._height / 2;
warzone_mc[v4].attack = this.attack;
warzone_mc[v4].powX = (_sasaran._x - this._x) / 35 + random(5);
warzone_mc[v4].powY = (_sasaran._y - Math.abs(warzone_mc[v4].powX * 25) - this._y) / 17;
warzone_mc[v4]._x += warzone_mc[v4].powX;
warzone_mc[v4]._y += warzone_mc[v4].powY;
warzone_mc[v4].cacheAsBitmap = true;
warzone_mc[v4].onEnterFrame = function () {
if (!isPaused) {
addParticle(this, 'Peluru6_particle', 5, false);
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
this._x += this.powX;
this._y += this.powY;
this.powX *= 0.985;
this.powY += gra / 2;
this._rotation = 5 + Math.atan2(this.powY, this.powX) * 180 / Math.PI;
if (this.powY > 0) {
for (var v4 in warzone_mc.background_mc) {
var v3 = warzone_mc.background_mc[v4];
if (v3.hitTest(this.posX, this.posY, true)) {
explodeSplats(this);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
}
for (v4 in warzone_mc.pasukan_container) {
var v2 = warzone_mc.pasukan_container[v4];
if (Math.abs(v2._x - this._x) < 20 && Math.abs(v2._y - this._y) < 20) {
v2.damaged(this.attack);
explodeSplats(this);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
if (this.hitTest(warzone_mc.benteng_mc0)) {
warzone_mc.benteng_mc0.damaged(this.attack / 10);
}
}
};
};
musuh2.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
for (var v3 in this.containerTarget) {
if (!this.containerTarget[v3].isDead) {
var v2 = this.containerTarget[v3];
}
if (Math.abs(v2._x - this._x) < this.range + 20) {
this.sasaran = v2;
}
}
this.jarakSasaran = this.sasaran._x - this._x;
if (this.sasaran._name == undefined) {
this.setStance(1);
if (this.timer > 0) {
--this.timer;
} else {
if (warzone_mc.benteng_mc0._name != undefined) {
this.sasaran = warzone_mc.benteng_mc0;
} else {
this.sasaran = warzone_mc.pasukan_container.pasukan101;
}
this.isAttacking = false;
}
}
if (Math.abs(this.jarakSasaran) > this.range) {
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
if (!this.isAttacking) {
this.setStance(3);
this.isAttacking = true;
this.timer = 30;
}
if (this.damaging) {
this.shoot(this.sasaran);
this.damaging = false;
}
}
this.cekGravity();
}
};
var musuh3 = new Object();
acceptProperty(musuh1, musuh3);
musuh3.unitID = 15;
musuh3.nama = 'Baddack';
musuh3.deskripsi = 'A hard-skinned monster that always charge forward to attack the enemy with his horn. This monster have a short temperament and can easily offended. ';
musuh3.mcType = 'Musuh3';
musuh3.deadSound = 'deadMonster2';
musuh3.containerTarget = warzone_mc.pasukan_container;
musuh3.lifeAwal = 200;
musuh3.life = 200;
musuh3.moveSpeed = 1.5;
musuh3.posTarget = 0;
musuh3.energyGet = 45;
musuh3.hancurable = false;
musuh3.enableSpecial = true;
musuh3.special = function () {
soundFX('terompetMusuh');
for (var v3 in warzone_mc.musuh_container) {
var v2 = warzone_mc.musuh_container[v3];
if (Math.abs(v2._x - this._x) < 200) {
v2.attachMovie('rage', 'rage_mc', 50);
v2.attackTemp = v2.attack;
v2.rage_mc.onEnterFrame = function () {
if (!isPaused) {
if (this._alpha > 0) {
--this._alpha;
this._parent.attack = this._parent.attackTemp * 2;
} else {
this._parent.attack = this._parent.attackTemp;
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
}
}
};
musuh3.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
if (this.timerSpecial < this.timerSpecialMax) {
++this.timerSpecial;
}
for (var v3 in this.containerTarget) {
if (!this.containerTarget[v3].isDead) {
var v2 = this.containerTarget[v3];
}
if (Math.abs(v2._x - this._x) < this.range + 20 && Math.abs(v2._y - this._y) < 50) {
this.sasaran = v2;
}
}
this.jarakSasaran = this.sasaran._x - this._x;
this.jarakSasaranY = this.sasaran._y - this._y;
if (this.sasaran._name == undefined) {
this.setStance(1);
if (this.timer > 0) {
--this.timer;
} else {
if (warzone_mc.benteng_mc0._name != undefined) {
this.sasaran = warzone_mc.benteng_mc0;
} else {
this.sasaran = warzone_mc.pasukan_container.pasukan101;
}
this.isAttacking = false;
}
}
if (Math.abs(this.jarakSasaran) > this.range) {
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
if (this.enableSpecial && this.timerSpecial >= this.timerSpecialMax) {
if (!this.isAttacking) {
this.setStance(5);
this.isAttacking = true;
this.timer = 50;
}
if (this.damaging) {
this.special();
this.damaging = false;
}
} else {
if (!this.isAttacking) {
this.setStance(3);
this.isAttacking = true;
this.timer = 30;
}
if (this.damaging) {
this.sasaran.damaged(this.attack);
}
}
}
this.cekGravity();
}
};
var musuh4 = new Object();
acceptProperty(musuh1, musuh4);
musuh4.unitID = 16;
musuh4.nama = 'Ughed\'ughed';
musuh4.deskripsi = 'A brave monster that have no weapon or armor. His only attack is by blowing himself to kill the enemy around him.';
musuh4.mcType = 'Musuh4';
musuh4.containerTarget = warzone_mc.pasukan_container;
musuh4.moveSpeed = 4;
musuh4.lifeAwal = 50;
musuh4.life = 50;
musuh4.attack = 30;
musuh4.range = 30;
musuh4.posTarget = 0;
musuh4.energyGet = 30;
musuh4.hancurable = false;
musuh4.enableSpecial = false;
musuh4.explode = function () {
shock(8);
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
soundFX('explosionSound');
var v3 = 'ledakan' + peluruDepth;
warzone_mc.attachMovie('Explossion1', v3, peluruDepth);
warzone_mc[v3]._x = this._x;
warzone_mc[v3]._y = this._y;
warzone_mc[v3].attack = this.attack;
warzone_mc[v3].cacheAsBitmap = true;
warzone_mc[v3].onEnterFrame = function () {
if (!isPaused) {
for (var v3 in warzone_mc.pasukan_container) {
var v2 = warzone_mc.pasukan_container[v3];
if (this.hitTest(v2)) {
v2.bleeding(5);
v2.damaged(this.attack / 2, true);
}
}
if (this.hitTest(warzone_mc.benteng_mc0)) {
warzone_mc.benteng_mc0.damaged(this.attack / 5);
}
}
};
};
musuh4.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
for (var v3 in this.containerTarget) {
if (!this.containerTarget[v3].isDead) {
var v2 = this.containerTarget[v3];
}
if (Math.abs(v2._x - this._x) < this.range + 20 && Math.abs(v2._y - this._y) < 50) {
this.sasaran = v2;
}
}
this.jarakSasaran = this.sasaran._x - this._x;
this.jarakSasaranY = this.sasaran._y - this._y;
if (this.sasaran._name == undefined) {
this.setStance(1);
if (this.timer > 0) {
--this.timer;
} else {
if (warzone_mc.benteng_mc0._name != undefined) {
this.sasaran = warzone_mc.benteng_mc0;
} else {
this.sasaran = warzone_mc.pasukan_container.pasukan101;
}
this.isAttacking = false;
}
}
if (Math.abs(this.sasaran._x - this._x) > this.range) {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
if (!this.isAttacking) {
this.life = 0;
this.cekDead();
this.isAttacking = true;
}
}
this.cekGravity();
}
};
var musuh5 = new Object();
acceptProperty(musuh1, musuh5);
musuh5.unitID = 17;
musuh5.nama = 'Kolojenking';
musuh5.deskripsi = 'A scorpion-like monster that attack the enemy with his poisonous whip-like tail. His poison is very deadly and there is still no cure for it.';
musuh5.mcType = 'Musuh5';
musuh5.containerTarget = warzone_mc.pasukan_container;
musuh5.moveSpeed = 2.5;
musuh5.attack = 15;
musuh5.defense = 8;
musuh5.lifeAwal = 175;
musuh5.life = 175;
musuh5.posTarget = 0;
musuh5.energyGet = 55;
musuh5.enableSpecial = false;
musuh5.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
for (var v3 in this.containerTarget) {
if (!this.containerTarget[v3].isDead) {
var v2 = this.containerTarget[v3];
}
if (Math.abs(v2._x - this._x) < this.range + 20 && Math.abs(v2._y - this._y) < 50) {
this.sasaran = v2;
}
}
this.jarakSasaran = this.sasaran._x - this._x;
this.jarakSasaranY = this.sasaran._y - this._y;
if (this.sasaran._name == undefined) {
this.setStance(1);
if (this.timer > 0) {
--this.timer;
} else {
if (warzone_mc.benteng_mc0._name != undefined) {
this.sasaran = warzone_mc.benteng_mc0;
} else {
this.sasaran = warzone_mc.pasukan_container.pasukan101;
}
this.isAttacking = false;
}
}
if (Math.abs(this.jarakSasaran) > this.range) {
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
if (!this.isAttacking) {
this.setStance(3 + random(2));
this.isAttacking = true;
this.timer = 30;
}
if (this.damaging) {
this.sasaran.damaged(this.attack);
}
}
this.cekGravity();
}
};
var musuh6 = new Object();
acceptProperty(musuh1, musuh6);
musuh6.unitID = 18;
musuh6.nama = 'Gondho';
musuh6.deskripsi = 'A monster with big neck that used to placed a poisonous gas. He spray the gas to the enemy to make him can’t breath.';
musuh6.mcType = 'Musuh6';
musuh6.deadSound = 'deadMonster2';
musuh6.containerTarget = warzone_mc.pasukan_container;
musuh6.moveSpeed = 3;
musuh6.lifeAwal = 150;
musuh6.life = 150;
musuh6.posTarget = 0;
musuh6.range = 80;
musuh6.energyGet = 55;
musuh6.hancurable = false;
musuh6.enableSpecial = true;
musuh6.special = function (who) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v2 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru9', v2, peluruDepth);
warzone_mc[v2]._x = this._x;
warzone_mc[v2]._y = this._y - 30;
warzone_mc[v2].difX = who._x - warzone_mc[v2]._x;
warzone_mc[v2].difY = who._y - who._height / 2 - warzone_mc[v2]._y;
warzone_mc[v2]._rotation = 57.29577951308232 * Math.atan2(warzone_mc[v2].difY, warzone_mc[v2].difX) + (-4 + random(8));
warzone_mc[v2].attack = this.attack / 5;
warzone_mc[v2].moveX = 12 * Math.cos(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].moveY = 12 * Math.sin(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2]._x += warzone_mc[v2].moveX * 3;
warzone_mc[v2]._y += warzone_mc[v2].moveY;
warzone_mc[v2].shooter = this;
warzone_mc[v2].cacheAsBitmap = true;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
this._x += this.moveX;
this._y += this.moveY;
this.moveX *= 0.95;
this.moveY *= 0.95;
for (var v4 in this.shooter.containerTarget) {
var v2 = this.shooter.containerTarget[v4];
if (this.hitTest(v2)) {
v2.damaged(this.attack);
}
}
for (v4 in warzone_mc.background_mc) {
var v3 = warzone_mc.background_mc[v4];
if (v3.hitTest(this.posX, this.posY + this.moveSpeed - this.regisY, true)) {
this.moveX *= -0.5;
this.moveY *= -0.5;
}
}
}
};
};
var musuh7 = new Object();
acceptProperty(musuh1, musuh7);
musuh7.unitID = 23;
musuh7.nama = 'Laller';
musuh7.deskripsi = 'A flying monster that attack his ground-enemy by throwing a rock to him. his dark appearance make him hard to discover when flying at night.';
musuh7.mcType = 'Musuh7';
musuh7.containerTarget = warzone_mc.pasukan_container;
musuh7.moveSpeed = 3;
musuh7.posTarget = 0;
musuh7.range = 300;
musuh7.attack = 25;
musuh7.jumlahPart = 4;
musuh7.energyGet = 30;
musuh7.flyingUnit = true;
musuh7.enableSpecial = false;
musuh7.shoot = function (_sasaran) {
++peluruDepth;
var v4 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru7', v4, peluruDepth);
warzone_mc[v4]._x = this._x;
warzone_mc[v4]._y = this._y + this._height / 3;
warzone_mc[v4].attack = this.attack;
warzone_mc[v4].powX = (_sasaran._x - this._x + random(30)) / 20 + random(5);
warzone_mc[v4].powY = 0;
warzone_mc[v4]._x += warzone_mc[v4].powX;
warzone_mc[v4]._y += warzone_mc[v4].powY;
warzone_mc[v4].cacheAsBitmap = true;
warzone_mc[v4].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
this._x += this.powX;
this._y += this.powY;
this.powX *= 0.985;
this.powY += gra / 2;
this._rotation = 5 + Math.atan2(this.powY, this.powX) * 180 / Math.PI;
if (this.powY > 0) {
for (var v4 in warzone_mc.background_mc) {
var v3 = warzone_mc.background_mc[v4];
if (v3.hitTest(this.posX, this.posY, true)) {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
}
for (v4 in warzone_mc.pasukan_container) {
var v2 = warzone_mc.pasukan_container[v4];
if (Math.abs(v2._x - this._x) < 20 && Math.abs(v2._y - this._y) < 20) {
v2.damaged(this.attack);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
}
};
};
musuh7.jalan = function () {
this.setStance(2);
this.isAttacking = false;
if (this.jarakSasaran > 0) {
this._xscale = 100;
} else {
this._xscale = -100;
}
this._x += this.moveX;
this._y += this.moveY;
for (var v3 in warzone_mc.background_mc) {
var v2 = warzone_mc.background_mc[v3];
if (v2.hitTest(this.posX, this.posY + 80, true)) {
this._y -= this.moveSpeed / 2;
}
}
};
musuh7.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
for (var v3 in this.containerTarget) {
if (!this.containerTarget[v3].isDead) {
var v2 = this.containerTarget[v3];
}
if (Math.abs(v2._x - this._x) < this.range + 20) {
this.sasaran = v2;
this.posTarget = this.sasaran._x;
this.posTargetY = this.sasaran._y - 200;
this.difX = this.posTarget - this._x;
this.difY = this.posTargetY - this._y;
this.moveX = this.moveSpeed * Math.cos(Math.atan2(this.difY, this.difX));
this.moveY = this.moveSpeed * Math.sin(Math.atan2(this.difY, this.difX));
}
}
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name == undefined) {
this.setStance(1);
if (this.timer > 0) {
--this.timer;
} else {
this.sasaran = warzone_mc.benteng_mc0;
this.isAttacking = false;
this.posTarget = this.sasaran._x;
this.posTargetY = this.sasaran._y - 200;
this.difX = this.posTarget - this._x;
this.difY = this.posTargetY - this._y;
this.moveX = this.moveSpeed * Math.cos(Math.atan2(this.difY, this.difX));
this.moveY = this.moveSpeed * Math.sin(Math.atan2(this.difY, this.difX));
}
}
if (Math.abs(this.jarakSasaran) > this.range) {
if (this.jarakSasaran < 0) {
this.jalan();
}
} else {
if (!this.isAttacking) {
this.setStance(3);
this.isAttacking = true;
this.timer = 30;
}
if (this.damaging) {
this.shoot(this.sasaran);
this.damaging = false;
}
}
}
};
var musuh8 = new Object();
acceptProperty(musuh7, musuh8);
musuh8.unitID = 24;
musuh8.nama = 'Qutrix';
musuh8.deskripsi = 'A dragonfly-like monster which have a long and flexible tail. The tail have many needles that can be throwed to the enemy.';
musuh8.mcType = 'Musuh8';
musuh8.containerTarget = warzone_mc.pasukan_container;
musuh8.moveSpeed = 3;
musuh8.lifeAwal = 75;
musuh8.life = 75;
musuh8.posTarget = 0;
musuh8.range = 350;
musuh8.energyGet = 40;
musuh8.flyingUnit = true;
musuh8.enableSpecial = false;
musuh8.shoot = function (_sasaran) {
++peluruDepth;
var v4 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru8', v4, peluruDepth);
warzone_mc[v4]._x = this._x;
warzone_mc[v4]._y = this._y;
warzone_mc[v4].attack = this.attack;
warzone_mc[v4].powX = (_sasaran._x - this._x + random(30)) / 20 + random(5);
warzone_mc[v4].powY = (_sasaran._y - Math.abs(warzone_mc[v4].powX * 25) - this._y) / 17;
warzone_mc[v4]._x += warzone_mc[v4].powX;
warzone_mc[v4]._y += warzone_mc[v4].powY;
warzone_mc[v4].cacheAsBitmap = true;
warzone_mc[v4].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
this._x += this.powX;
this._y += this.powY;
this.powX *= 0.97;
this.powY += gra / 2;
this._rotation = 5 + Math.atan2(this.powY, this.powX) * 180 / Math.PI;
if (this.powY > 0) {
for (var v4 in warzone_mc.background_mc) {
var v3 = warzone_mc.background_mc[v4];
if (v3.hitTest(this.posX, this.posY + random(10), true)) {
drawMayat(this.char);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
}
for (v4 in warzone_mc.pasukan_container) {
var v2 = warzone_mc.pasukan_container[v4];
if (Math.abs(v2._x - this._x) < 20 && Math.abs(v2._y - this._y) < 20) {
v2.damaged(this.attack);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
}
};
};
musuh8.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
for (var v3 in this.containerTarget) {
if (!this.containerTarget[v3].isDead) {
var v2 = this.containerTarget[v3];
}
if (Math.abs(v2._x - this._x) < this.range + 20) {
this.sasaran = v2;
this.posTarget = this.sasaran._x;
this.posTargetY = this.sasaran._y - 200;
this.difX = this.posTarget - this._x;
this.difY = this.posTargetY - this._y;
this.moveX = this.moveSpeed * Math.cos(Math.atan2(this.difY, this.difX));
this.moveY = this.moveSpeed * Math.sin(Math.atan2(this.difY, this.difX));
}
}
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name == undefined) {
this.setStance(1);
if (this.timer > 0) {
--this.timer;
} else {
this.sasaran = warzone_mc.benteng_mc0;
this.isAttacking = false;
this.posTarget = this.sasaran._x;
this.posTargetY = this.sasaran._y - 200;
this.difX = this.posTarget - this._x;
this.difY = this.posTargetY - this._y;
this.moveX = this.moveSpeed * Math.cos(Math.atan2(this.difY, this.difX));
this.moveY = this.moveSpeed * Math.sin(Math.atan2(this.difY, this.difX));
}
}
if (Math.abs(this.jarakSasaran) > this.range) {
if (this.jarakSasaran < 0) {
this.jalan();
}
} else {
if (!this.isAttacking) {
this.setStance(3);
this.isAttacking = true;
this.timer = 30;
}
if (this.damaging) {
this.shoot(this.sasaran);
}
}
}
};
var musuh9 = new Object();
acceptProperty(musuh4, musuh9);
musuh9.unitID = 25;
musuh9.nama = 'Flying Ughed\'ughed';
musuh9.deskripsi = 'A flying version of Ughed – Ughed, have a same characteristic as his ground version, except that he have a wing and need to falling himself in order to blow.';
musuh9.mcType = 'Musuh9';
musuh9.range = 40;
musuh9.energyGet = 35;
musuh9.enableSpecial = false;
musuh9.jalan = function () {
this.setStance(2);
this.isAttacking = false;
if (this.jarakSasaran > 0) {
this._xscale = 100;
} else {
this._xscale = -100;
}
this._x += this.moveX;
this._y += this.moveY;
for (var v3 in warzone_mc.background_mc) {
var v2 = warzone_mc.background_mc[v3];
if (v2.hitTest(this.posX, this.posY + 60, true)) {
this._y -= this.moveSpeed / 2;
}
}
};
musuh9.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
for (var v3 in this.containerTarget) {
if (!this.containerTarget[v3].isDead) {
var v2 = this.containerTarget[v3];
}
if (Math.abs(v2._x - this._x) < this.range + 20) {
this.sasaran = v2;
this.posTarget = this.sasaran._x;
this.posTargetY = this.sasaran._y - 200;
this.difX = this.posTarget - this._x;
this.difY = this.posTargetY - this._y;
this.moveX = this.moveSpeed * Math.cos(Math.atan2(this.difY, this.difX));
this.moveY = this.moveSpeed * Math.sin(Math.atan2(this.difY, this.difX));
}
}
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name == undefined) {
this.setStance(1);
if (this.timer > 0) {
--this.timer;
} else {
this.sasaran = warzone_mc.benteng_mc0;
this.isAttacking = false;
this.posTarget = this.sasaran._x;
this.posTargetY = this.sasaran._y - 200;
this.difX = this.posTarget - this._x;
this.difY = this.posTargetY - this._y;
this.moveX = this.moveSpeed * Math.cos(Math.atan2(this.difY, this.difX));
this.moveY = this.moveSpeed * Math.sin(Math.atan2(this.difY, this.difX));
}
}
if (Math.abs(this.jarakSasaran) > this.range) {
if (this.jarakSasaran < 0) {
this.jalan();
}
} else {
if (!this.isAttacking) {
this.life = 0;
this.cekDead();
this.isAttacking = true;
}
}
}
};
var musuh10 = new Object();
acceptProperty(musuh1, musuh10);
musuh10.unitID = 26;
musuh10.nama = 'Tummo';
musuh10.deskripsi = 'A monster that role as a boss and able to create a loud and noisy sound to give a command to the other monsters. Tummo have a big body with a hard horn in his head, which allowing him to charge and stab the enemy. He also have useless wing on his back.';
musuh10.mcType = 'Musuh10';
musuh10.deadSound = 'deadMonster3';
musuh10.containerTarget = warzone_mc.pasukan_container;
musuh10.lifeAwal = 5000;
musuh10.life = 5000;
musuh10.lineSight = 300;
musuh10.attack = 10;
musuh10.moveSpeed = 1.5;
musuh10.posTarget = warzone_mc.nest_mc1._x - 400;
musuh10.energyGet = 2000;
musuh10.hancurable = false;
musuh10.enableSpecial = true;
musuh10.detectTarget = function () {
if (this.sasaran._name == undefined || this.sasaran.isDead) {
var v3 = this.lineSight;
}
for (var v4 in this.containerTarget) {
if (!this.containerTarget[v4].isDead) {
var v2 = this.containerTarget[v4];
}
if (Math.abs(v2._x - this._x) < v3) {
v3 = Math.abs(v2._x - this._x);
this.sasaran = v2;
}
}
};
musuh10.special = function () {
soundFX('terompetMusuh');
for (var v3 in warzone_mc.musuh_container) {
var v2 = warzone_mc.musuh_container[v3];
if (Math.abs(v2._x - this._x) < 300) {
v2.attachMovie('rage', 'rage_mc', 50);
v2.attackTemp = v2.attack;
v2.rage_mc.onEnterFrame = function () {
if (!isPaused) {
if (this._alpha > 0) {
--this._alpha;
this._parent.attack = this._parent.attackTemp * 3;
} else {
this._parent.attack = this._parent.attackTemp;
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
}
}
};
musuh10.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
if (this.timerSpecial < this.timerSpecialMax) {
++this.timerSpecial;
}
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (Math.abs(this.sasaran._x - this._x) < this.range) {
if (Math.abs(this.sasaran._x - this._x) < 50) {
if (this.enableSpecial && this.timerSpecial >= this.timerSpecialMax) {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(5);
} else {
if (this.damaging) {
this.special();
this.damaging = false;
this.timerSpecial = 0;
}
}
} else {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(3 + random(2));
} else {
if (this.damaging) {
this.sasaran.damaged(this.attack);
}
}
}
}
} else {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
}
} else {
this.isAttacking = false;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.posTarget = warzone_mc.nest_mc1._x - 300;
this.setStance(1);
this._xscale = -100;
this.detectTarget();
}
}
this.cekGravity();
}
};
var musuh11 = new Object();
acceptProperty(musuh10, musuh11);
musuh11.unitID = 27;
musuh11.nama = 'Wululandep';
musuh11.deskripsi = 'One of the monster’s boss. Have a sharp feather covering all his skin, from the head till the tail, which used to attack the enemy. Wululandep can shot an explosive acid ball to blow it\'s enemies';
musuh11.mcType = 'Musuh11';
musuh11.deadSound = 'deadMonster3';
musuh11.lifeAwal = 7500;
musuh11.life = 7500;
musuh11.lineSight = 400;
musuh11.range = 100;
musuh11.attack = 35;
musuh11.moveSpeed = 2;
musuh11.energyGet = 3000;
musuh11.enableSpecial = true;
musuh11.special = function (_sasaran, _attack) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v2 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru6', v2, peluruDepth);
warzone_mc[v2]._x = this._x + 50 * (Math.abs(this._xscale) / this._xscale);
warzone_mc[v2]._y = this._y - 40;
warzone_mc[v2].difX = _sasaran._x - warzone_mc[v2]._x;
warzone_mc[v2].difY = _sasaran._y - _sasaran._height / 2 - warzone_mc[v2]._y;
warzone_mc[v2]._rotation = 57.29577951308232 * Math.atan2(warzone_mc[v2].difY, warzone_mc[v2].difX) + (-2 + random(4));
warzone_mc[v2].attack = _attack;
warzone_mc[v2].moveX = 30 * Math.cos(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].moveY = 30 * Math.sin(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].timer = 50;
warzone_mc[v2].cacheAsBitmap = true;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
--this.timer;
if (this.timer <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
this._x += this.moveX;
this._y += this.moveY;
addParticle(this, 'Peluru6_particle', 5, false);
if (this.hitTest(_sasaran)) {
_sasaran.damaged(this.attack);
explodeSplats(this);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
};
musuh11.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
if (this.timerSpecial < this.timerSpecialMax) {
++this.timerSpecial;
}
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (this.enableSpecial && this.timerSpecial >= this.timerSpecialMax) {
this.range = this.lineSight;
} else {
this.range = 100;
}
if (Math.abs(this.sasaran._x - this._x) < this.range) {
if (this.enableSpecial && this.timerSpecial >= this.timerSpecialMax) {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(5);
} else {
if (this.damaging) {
this.special(this.sasaran, this.attack * 3);
this.damaging = false;
this.timerSpecial = 0;
}
}
} else {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(3 + random(2));
} else {
if (this.damaging) {
this.sasaran.damaged(this.attack);
}
}
}
} else {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
}
} else {
this.isAttacking = false;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.posTarget = warzone_mc.nest_mc1._x - 300;
this.setStance(1);
this._xscale = -100;
this.detectTarget();
}
}
this.cekGravity();
}
};
var musuh12 = new Object();
acceptProperty(musuh10, musuh12);
musuh12.unitID = 28;
musuh12.nama = 'Jangkreex';
musuh12.deskripsi = 'A big flying monster that destroying his enemy by falling on it. This monster is one of the strongest nest’s guardian. Jangkreex can also shoot a deadly acid breath to it\'s opponent';
musuh12.mcType = 'Musuh12';
musuh12.deadSound = 'deadMonster3';
musuh12.lifeAwal = 10000;
musuh12.life = 10000;
musuh12.lineSight = 500;
musuh12.range = 200;
musuh12.attack = 30;
musuh12.defense = 15;
musuh12.moveSpeed = 2;
musuh12.forceX = 0;
musuh12.energyGet = 5000;
musuh12.isSpecial = false;
musuh12.enableSpecial = true;
musuh12.followLandRot = false;
musuh12.enableSpecial = true;
musuh12.cekGravity = function () {
this.isJumping = true;
for (var v3 in warzone_mc.background_mc) {
var v2 = warzone_mc.background_mc[v3];
if (v2.hitTest(this.posX, this.posY + this.moveSpeed - this.regisY, true)) {
this.rot = v2._rotation;
this.isJumping = false;
this.xforce = 0;
this.attacked = false;
if (this.followLandRot) {
this._rotation += (this.rot - this._rotation) / 3;
}
if (this.jumping) {
this.char.play();
this.forceX = 0;
}
}
}
if (this.isJumping) {
this._x += this.forceX;
this.forceX *= 0.94;
this._y += this.jump;
this.jump += gra;
} else {
this.jump = 0;
}
if (this._y > 420) {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
musuh12.goingJump = function (_forceX) {
this.forceX = _forceX;
this._y -= 10;
this.isJumping = true;
this.jump = -15;
};
musuh12.shoot = function (who) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v2 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru9', v2, peluruDepth);
warzone_mc[v2]._x = this._x + 50 * (this._xscale / Math.abs(this._xscale));
warzone_mc[v2]._y = this._y - 75;
warzone_mc[v2].difX = who._x - warzone_mc[v2]._x;
warzone_mc[v2].difY = who._y - who._height / 2 - warzone_mc[v2]._y;
warzone_mc[v2]._rotation = 57.29577951308232 * Math.atan2(warzone_mc[v2].difY, warzone_mc[v2].difX) + (-4 + random(8));
warzone_mc[v2].attack = this.attack / 5;
warzone_mc[v2].moveX = 12 * Math.cos(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].moveY = 12 * Math.sin(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2]._x += warzone_mc[v2].moveX;
warzone_mc[v2]._y += warzone_mc[v2].moveY;
warzone_mc[v2].shooter = this;
warzone_mc[v2].cacheAsBitmap = true;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
this._x += this.moveX;
this._y += this.moveY;
for (var v4 in this.shooter.containerTarget) {
var v2 = this.shooter.containerTarget[v4];
if (this.hitTest(v2)) {
v2.damaged(this.attack);
}
}
for (v4 in warzone_mc.background_mc) {
var v3 = warzone_mc.background_mc[v4];
if (v3.hitTest(this.posX, this.posY + this.moveSpeed - this.regisY, true)) {
this.moveX *= -0.5;
this.moveY *= -0.5;
}
}
}
};
};
musuh12.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
if (this.timerSpecial < this.timerSpecialMax) {
++this.timerSpecial;
}
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (this.enableSpecial && this.timerSpecial >= this.timerSpecialMax) {
this.isSpecial = true;
} else {
if (Math.abs(this.sasaran._x - this._x) < this.range) {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(3);
} else {
if (this.damaging) {
this.shoot(this.sasaran);
}
}
} else {
if (!this.isSpecial) {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
}
}
}
} else {
if (!this.isSpecial) {
this.isAttacking = false;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.posTarget = warzone_mc.nest_mc1._x - 300;
this.setStance(1);
this._xscale = -100;
this.detectTarget();
}
}
}
if (this.isSpecial) {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(5);
} else {
if (this.damaging) {
for (var v3 in this.containerTarget) {
if (Math.abs(this.containerTarget[v3]._x - this._x) <= 80) {
var v2 = this.containerTarget[v3];
if (this.hitTest(v2)) {
v2.damaged(this.attack, true);
}
}
}
}
}
}
if (Math.abs(this.sasaran._x - this._x) > this.lineSight) {
this.sasaran = undefined;
this.posTarget = warzone_mc.nest_mc1._x - 300;
}
this.cekGravity();
}
};
var musuh13 = new Object();
acceptProperty(unitClass, musuh13);
musuh13.unitID = 19;
musuh13.nama = 'Orong';
musuh13.deskripsi = 'A fast-running monster who has ranged attack.. it run when the enemy come near close to it, because of his cowardness.';
musuh13.mcType = 'Musuh13';
musuh13.bloodType = 'Blood2';
musuh13.containerTarget = warzone_mc.pasukan_container;
musuh13.lifeAwal = 100;
musuh13.life = 100;
musuh13.attack = 8;
musuh13.range = 300;
musuh13.posTarget = 0;
musuh13.moveSpeed = 8;
musuh13.energyGet = 35;
musuh13.hancurable = false;
musuh13.enableSpecial = true;
musuh13.siapKabur = function () {
for (var v3 in this.containerTarget) {
var v2 = this.containerTarget[v3];
if (Math.abs(v2._x - this._x) <= 180) {
this.posTarget = this._x + 300;
return true;
}
}
};
musuh13.special = function (_sasaran) {
var v3 = 1;
while (v3 <= 3) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v2 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru11', v2, peluruDepth);
warzone_mc[v2]._x = this._x;
warzone_mc[v2]._y = this._y - 30;
warzone_mc[v2].difX = _sasaran._x - warzone_mc[v2]._x;
warzone_mc[v2].difY = _sasaran._y - _sasaran._height / 2 - warzone_mc[v2]._y + (v3 - 2) * 30;
warzone_mc[v2]._rotation = 57.29577951308232 * Math.atan2(warzone_mc[v2].difY, warzone_mc[v2].difX) + (-2 + random(4));
warzone_mc[v2].attack = this.attack;
warzone_mc[v2].moveX = 40 * Math.cos(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].moveY = 40 * Math.sin(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].timer = 12;
warzone_mc[v2].shooter = this;
warzone_mc[v2]._x += warzone_mc[v2].moveX;
warzone_mc[v2]._y += warzone_mc[v2].moveY;
warzone_mc[v2].cacheAsBitmap = true;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
addParticle(this, 'Peluru11_particle', 6, true);
--this.timer;
if (this.timer <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
this._x += this.moveX;
this._y += this.moveY;
if (this.hitTest(_sasaran)) {
_sasaran.damaged(this.attack);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
++v3;
}
};
musuh13.shoot = function (_sasaran) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v2 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru11', v2, peluruDepth);
warzone_mc[v2]._x = this._x;
warzone_mc[v2]._y = this._y - 30;
warzone_mc[v2].difX = _sasaran._x - warzone_mc[v2]._x;
warzone_mc[v2].difY = _sasaran._y - _sasaran._height / 2 - warzone_mc[v2]._y;
warzone_mc[v2]._rotation = 57.29577951308232 * Math.atan2(warzone_mc[v2].difY, warzone_mc[v2].difX) + (-2 + random(4));
warzone_mc[v2].attack = this.attack;
warzone_mc[v2].moveX = 40 * Math.cos(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].moveY = 40 * Math.sin(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].timer = 12;
warzone_mc[v2].shooter = this;
warzone_mc[v2]._x += warzone_mc[v2].moveX;
warzone_mc[v2]._y += warzone_mc[v2].moveY;
warzone_mc[v2].cacheAsBitmap = true;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
addParticle(this, 'Peluru11_particle', 6, true);
--this.timer;
if (this.timer <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
this._x += this.moveX;
this._y += this.moveY;
if (this.hitTest(_sasaran)) {
_sasaran.damaged(this.attack);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
};
musuh13.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
if (this.timerSpecial < this.timerSpecialMax) {
++this.timerSpecial;
}
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (!this.siapKabur()) {
for (var v3 in this.containerTarget) {
if (!this.containerTarget[v3].isDead) {
var v2 = this.containerTarget[v3];
}
if (Math.abs(v2._x - this._x) < this.range) {
this.sasaran = v2;
}
}
}
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (Math.abs(this.sasaran._x - this._x) < this.range) {
if (this.enableSpecial && this.timerSpecial >= this.timerSpecialMax) {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(5);
this.timer = 50;
} else {
if (this.damaging) {
this.special(this.sasaran);
this.damaging = false;
}
}
} else {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(3);
this.timer = 50;
} else {
if (this.damaging) {
this.shoot(this.sasaran);
this.damaging = false;
}
}
}
} else {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
}
} else {
this.isAttacking = false;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.setStance(1);
this.detectTarget();
}
}
if (this.sasaran._name == undefined) {
this.setStance(1);
if (this.timer > 0) {
--this.timer;
} else {
if (warzone_mc.benteng_mc0._name != undefined) {
this.sasaran = warzone_mc.benteng_mc0;
} else {
this.sasaran = warzone_mc.pasukan_container.pasukan101;
}
this.isAttacking = false;
}
}
this.cekGravity();
}
};
var musuh14 = new Object();
acceptProperty(musuh1, musuh14);
musuh14.unitID = 20;
musuh14.nama = 'Temonggo';
musuh14.deskripsi = 'A ‘female’ monster that always carrying the child inside her big stomach. If she killed, the child will break out from the stomach and avenge his mother’s death.';
musuh14.mcType = 'Musuh14';
musuh14.containerTarget = warzone_mc.pasukan_container;
musuh14.moveSpeed = 2.5;
musuh14.lifeAwal = 200;
musuh14.life = 200;
musuh14.posTarget = 0;
musuh14.energyGet = 55;
musuh14.hancurable = false;
musuh14.enableSpecial = false;
musuh14.summonChildren = function () {
if (spawnDepth > spawnDepthMax) {
spawnDepth = 100;
}
var v3 = 1 + random(3);
++spawnDepth;
var v2 = 'musuh' + spawnDepth;
warzone_mc.musuh_container.createEmptyMovieClip(v2, 500 * v3 + spawnDepth);
warzone_mc.musuh_container[v2]._x = this._x + (-20 + random(50));
warzone_mc.musuh_container[v2]._y = this._y - 30;
acceptProperty(musuh14, warzone_mc.musuh_container[v2]);
warzone_mc.musuh_container[v2].mcType = 'Musuh14b';
warzone_mc.musuh_container[v2].lifeAwal *= 0.5;
warzone_mc.musuh_container[v2].life = warzone_mc.musuh_container[v2].lifeAwal;
warzone_mc.musuh_container[v2].moveSpeed *= 0.7;
warzone_mc.musuh_container[v2].attack *= 0.7;
warzone_mc.musuh_container[v2].setStance(1);
if (ourBase.building6 > 0 || campaignMode == 6) {
warzone_mc.musuh_container[v2].addToMinimap();
}
warzone_mc.musuh_container[v2].regisY = 10 * (v3 - 1);
warzone_mc.musuh_container[v2].cacheAsBitmap = true;
warzone_mc.musuh_container[v2].onEnterFrame = warzone_mc.musuh_container[v2].updateFrame;
interface_mc.ourUnit_txt.text = countUnit(warzone_mc.pasukan_container) + '/' + maxUnit;
interface_mc.enemyUnit_txt.text = countUnit(warzone_mc.musuh_container);
};
musuh14.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
for (var v3 in this.containerTarget) {
if (!this.containerTarget[v3].isDead) {
var v2 = this.containerTarget[v3];
}
if (Math.abs(v2._x - this._x) < this.range + 20 && Math.abs(v2._y - this._y) < 50) {
this.sasaran = v2;
}
}
this.jarakSasaran = this.sasaran._x - this._x;
this.jarakSasaranY = this.sasaran._y - this._y;
if (this.sasaran._name == undefined) {
this.setStance(1);
if (this.timer > 0) {
--this.timer;
} else {
if (warzone_mc.benteng_mc0._name != undefined) {
this.sasaran = warzone_mc.benteng_mc0;
} else {
this.sasaran = warzone_mc.pasukan_container.pasukan101;
}
this.isAttacking = false;
}
}
if (Math.abs(this.jarakSasaran) > this.range) {
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
if (!this.isAttacking) {
this.setStance(3);
this.isAttacking = true;
this.timer = 30;
}
if (this.damaging) {
this.sasaran.damaged(this.attack);
}
}
this.cekGravity();
}
};
var musuh15 = new Object();
acceptProperty(musuh1, musuh15);
musuh15.unitID = 21;
musuh15.nama = 'Gentho';
musuh15.deskripsi = 'This big monster have a hard-brainless head. His dumbness make him can’t think another way to attack the enemy except by hitting his head.';
musuh15.mcType = 'Musuh15';
musuh15.deadSound = 'deadMonster3';
musuh15.containerTarget = warzone_mc.pasukan_container;
musuh15.moveSpeed = 4;
musuh15.lifeAwal = 400;
musuh15.life = 400;
musuh15.attack = 15;
musuh15.defense = 6;
musuh15.posTarget = 0;
musuh15.energyGet = 90;
musuh15.hancurable = false;
musuh15.enableSpecial = false;
musuh15.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
this.jarakSasaran = this.sasaran._x - this._x;
if (warzone_mc.benteng_mc0._name != undefined) {
this.sasaran = warzone_mc.benteng_mc0;
} else {
this.sasaran = warzone_mc.pasukan_container.pasukan101;
}
if (Math.abs(this.jarakSasaran) > this.range) {
this.jalan(-1);
} else {
if (!this.isAttacking) {
this.setStance(3);
this.isAttacking = true;
this.timer = 20;
}
if (this.damaging) {
shock(10);
this.sasaran.damaged(this.attack);
}
}
if (this.stance == 2) {
for (var v3 in this.containerTarget) {
if (!this.containerTarget[v3].isDead) {
var v2 = this.containerTarget[v3];
}
if (Math.abs(v2._x - this._x) < this.range + 20 && Math.abs(v2._y - this._y) < 50) {
v2.damaged(this.attack / 10);
}
}
}
this.cekGravity();
}
};
var musuh16 = new Object();
acceptProperty(musuh1, musuh16);
musuh16.unitID = 22;
musuh16.nama = 'Banthong';
musuh16.deskripsi = 'The smartest monster. Because of his smartness, he become one of the monster’s boss. His high IQ also help him in making a good strategy.';
musuh16.mcType = 'Musuh16';
musuh16.deadSound = 'deadMonster1';
musuh16.containerTarget = warzone_mc.pasukan_container;
musuh16.moveSpeed = 2.5;
musuh16.lifeAwal = 30;
musuh16.life = 30;
musuh16.attack = 0;
musuh16.defense = 2;
musuh16.posTarget = 2800;
musuh16.hancurable = false;
musuh16.enableSpecial = false;
musuh16.pos1 = 2800;
musuh16.pos2 = 2600;
musuh16.rally = 1;
musuh16.timerAwal = 80;
musuh16.timer = 80;
musuh16.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
this.jarakSasaran = this.posTarget - this._x;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.setStance(1);
if (this.timer > 0) {
--this.timer;
} else {
if (this.rally == 1) {
this.rally = 2;
} else {
this.rally = 1;
}
this.posTarget = this['pos' + this.rally];
this.timer = this.timerAwal;
}
}
this.cekGravity();
}
};
var pasukan1 = new Object();
acceptProperty(unitClass, pasukan1);
pasukan1.unitID = 1;
pasukan1.nama = armyData.army1.nama;
pasukan1.deskripsi = armyData.army1.deskripsi;
pasukan1.mcType = 'Pasukan1';
pasukan1.deadSound = 'deadUnit3';
pasukan1.ally = 1;
pasukan1.lifeAwal = armyData.army1.life;
pasukan1.life = pasukan1.lifeAwal;
pasukan1.attack = armyData.army1.attack;
pasukan1.defense = armyData.army1.defense;
pasukan1.moveSpeed = armyData.army1.speed;
pasukan1.jumlahPart = 3;
pasukan1.posTarget = 300;
pasukan1.range = 350;
pasukan1.timer = 0;
pasukan1.jumpAble = true;
pasukan1.followLandRot = false;
pasukan1.enableSpecial = true;
pasukan1.shoot = function (_sasaran) {
soundFX('rifleSound');
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v2 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru2', v2, peluruDepth);
warzone_mc[v2]._x = this._x;
warzone_mc[v2]._y = this._y - 38;
warzone_mc[v2].difX = _sasaran._x - warzone_mc[v2]._x;
warzone_mc[v2].difY = _sasaran._y - _sasaran._height / 2 - warzone_mc[v2]._y;
warzone_mc[v2]._rotation = 57.29577951308232 * Math.atan2(warzone_mc[v2].difY, warzone_mc[v2].difX) + (-2 + random(4));
warzone_mc[v2].attack = this.attack;
warzone_mc[v2].moveX = 50 * Math.cos(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].moveY = 50 * Math.sin(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].timer = 12;
warzone_mc[v2].shooter = this;
warzone_mc[v2]._x += warzone_mc[v2].moveX;
warzone_mc[v2]._y += warzone_mc[v2].moveY;
warzone_mc[v2].cacheAsBitmap = true;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
--this.timer;
if (this.timer <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
this._x += this.moveX;
this._y += this.moveY;
if (this.hitTest(_sasaran)) {
_sasaran.damaged(this.attack);
_sasaran.sasaran = this.shooter;
if (_sasaran.life <= 0) {
this.shooter.sasaran = undefined;
this.shooter.detectTarget();
}
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
};
pasukan1.special = function (_sasaran, _attack) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
soundFX('bazooka');
var v2 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru2_2', v2, peluruDepth);
warzone_mc[v2]._x = this._x + 50 * (Math.abs(this._xscale) / this._xscale);
warzone_mc[v2]._y = this._y - 40;
warzone_mc[v2].difX = _sasaran._x - warzone_mc[v2]._x;
warzone_mc[v2].difY = _sasaran._y - _sasaran._height / 2 - warzone_mc[v2]._y;
warzone_mc[v2]._rotation = 57.29577951308232 * Math.atan2(warzone_mc[v2].difY, warzone_mc[v2].difX) + (-2 + random(4));
warzone_mc[v2].attack = _attack;
warzone_mc[v2].moveX = 30 * Math.cos(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].moveY = 30 * Math.sin(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].timer = 50;
warzone_mc[v2].cacheAsBitmap = true;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
--this.timer;
if (this.timer <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
this._x += this.moveX;
this._y += this.moveY;
addParticle(this, 'smoke' + (1 + random(3)), 3, false);
if (this.hitTest(_sasaran)) {
_sasaran.damaged(this.attack);
addExplosion(this, 3);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
};
pasukan1.detectTarget = function () {
if (this.sasaran._name == undefined || this.sasaran.isDead) {
var v3 = this.lineSight;
}
for (var v4 in this.containerTarget) {
if (!this.containerTarget[v4].isDead) {
var v2 = this.containerTarget[v4];
}
if (Math.abs(v2._x - this._x) < v3) {
v3 = Math.abs(v2._x - this._x);
this.sasaran = v2;
}
}
if (Math.abs(warzone_mc.nest_mc1._x - this._x) < v3) {
v3 = Math.abs(warzone_mc.nest_mc1._x - this._x);
this.sasaran = warzone_mc.nest_mc1;
this.posTarget = this.sasaran._x;
this.posTargetY = this.sasaran._y;
}
};
pasukan1.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
if (this.timerSpecial < this.timerSpecialMax) {
++this.timerSpecial;
}
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (Math.abs(this.sasaran._x - this._x) < this.range) {
if (Math.abs(this.sasaran._x - this._x) < 50) {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(4, 1 + random(2));
this.isAttacking = true;
this.timer = 30;
}
if (this.damaging) {
this.sasaran.damaged(this.attack * 2);
}
} else {
if (this.enableSpecial && this.timerSpecial >= this.timerSpecialMax) {
if (!this.isAttacking) {
this.posTarget = this._x;
if (this.sasaran._y - this._y > 25) {
this.setStance(5, 1);
} else {
if (this.sasaran._y - this._y < -25) {
this.setStance(5, 3);
} else {
this.setStance(5, 2);
}
}
} else {
if (this.damaging) {
this.special(this.sasaran, this.attack * 5);
this.damaging = false;
this.timerSpecial = 0;
}
}
} else {
if (!this.isAttacking) {
this.posTarget = this._x;
if (this.sasaran._y - this._y > 25) {
this.setStance(3, 1);
} else {
if (this.sasaran._y - this._y < -25) {
this.setStance(3, 3);
} else {
this.setStance(3, 2);
}
}
} else {
if (this.damaging) {
this.shoot(this.sasaran);
}
}
}
}
} else {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
}
} else {
this.isAttacking = false;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.posTarget = this._x;
this.setStance(1);
this.detectTarget();
}
}
if (!this.controlled) {
if (this.idle) {
this.detectTarget();
}
}
this.cekGravity();
}
};
var pasukan2 = new Object();
acceptProperty(pasukan1, pasukan2);
pasukan2.unitID = 2;
pasukan2.nama = armyData.army2.nama;
pasukan2.deskripsi = armyData.army2.deskripsi;
pasukan2.mcType = 'Pasukan2';
pasukan2.deadSound = 'deadUnit2';
pasukan2.lifeAwal = armyData.army2.life;
pasukan2.life = pasukan2.lifeAwal;
pasukan2.attack = armyData.army2.attack;
pasukan2.defense = armyData.army2.defense;
pasukan2.moveSpeed = armyData.army2.speed;
pasukan2.enableSpecial = false;
pasukan2.posTarget = 300;
pasukan2.lineSight = 500;
pasukan2.enableSpecial = false;
pasukan2.shoot = function (_sasaran) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
soundFX('bazooka');
var v2 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru3', v2, peluruDepth);
warzone_mc[v2]._x = this._x;
warzone_mc[v2]._y = this._y - 43;
warzone_mc[v2].difX = _sasaran._x - warzone_mc[v2]._x;
warzone_mc[v2].difY = _sasaran._y - _sasaran._height / 2 - warzone_mc[v2]._y;
warzone_mc[v2]._rotation = 57.29577951308232 * Math.atan2(warzone_mc[v2].difY, warzone_mc[v2].difX) + (-2 + random(4));
warzone_mc[v2].attack = this.attack;
warzone_mc[v2].moveX = 50 * Math.cos(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].moveY = 50 * Math.sin(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].timer = 12;
warzone_mc[v2]._x += warzone_mc[v2].moveX;
warzone_mc[v2]._y += warzone_mc[v2].moveY;
warzone_mc[v2].shooter = this;
warzone_mc[v2].cacheAsBitmap = true;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
--this.timer;
if (this.timer <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
this._x += this.moveX;
this._y += this.moveY;
if (this.hitTest(_sasaran)) {
_sasaran.damaged(this.attack, true);
_sasaran.sasaran = this.shooter;
addExplosion(this, 3);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
};
pasukan2.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (Math.abs(this.sasaran._x - this._x) < this.range) {
if (Math.abs(this.sasaran._x - this._x) < 50) {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(4);
this.isAttacking = true;
this.timer = 30;
}
if (this.damaging) {
this.sasaran.damaged(this.attack * 2);
}
} else {
if (!this.isAttacking) {
this.posTarget = this._x;
if (this.sasaran._y - this._y > 25) {
this.setStance(3, 1);
} else {
if (this.sasaran._y - this._y < -25) {
this.setStance(3, 3);
} else {
this.setStance(3, 2);
}
}
} else {
if (this.damaging) {
this.shoot(this.sasaran);
this.damaging = false;
}
}
}
} else {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
}
} else {
this.isAttacking = false;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.posTarget = this._x;
this.setStance(1);
this.detectTarget();
}
}
if (!this.controlled) {
if (this.idle) {
this.detectTarget();
}
}
this.cekGravity();
}
};
var pasukan3 = new Object();
acceptProperty(pasukan1, pasukan3);
pasukan3.unitID = 3;
pasukan3.nama = armyData.army3.nama;
pasukan3.deskripsi = armyData.army3.deskripsi;
pasukan3.mcType = 'Pasukan3';
pasukan3.deadSound = 'deadUnit1';
pasukan3.lifeAwal = armyData.army3.life;
pasukan3.life = pasukan3.lifeAwal;
pasukan3.attack = armyData.army3.attack;
pasukan3.defense = armyData.army3.defense;
pasukan3.moveSpeed = armyData.army3.speed;
pasukan3.enableSpecial = false;
pasukan3.posTarget = 300;
pasukan3.range = 225;
pasukan3.attack = 3;
pasukan3.enableSpecial = false;
pasukan3.shoot = function (_sasaran) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
soundFX('flameThrower');
var v3 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru5', v3, peluruDepth);
warzone_mc[v3]._x = this._x;
warzone_mc[v3]._y = this._y - 28;
warzone_mc[v3].difX = _sasaran._x - warzone_mc[v3]._x;
warzone_mc[v3].difY = _sasaran._y - _sasaran._height / 2 - warzone_mc[v3]._y;
warzone_mc[v3]._rotation = 57.29577951308232 * Math.atan2(warzone_mc[v3].difY, warzone_mc[v3].difX) + (-4 + random(8));
warzone_mc[v3].attack = this.attack;
warzone_mc[v3].moveX = 18 * Math.cos(Math.PI * warzone_mc[v3]._rotation / 180);
warzone_mc[v3].moveY = 18 * Math.sin(Math.PI * warzone_mc[v3]._rotation / 180);
warzone_mc[v3]._x += warzone_mc[v3].moveX * 2;
warzone_mc[v3]._y += warzone_mc[v3].moveY;
warzone_mc[v3].cacheAsBitmap = true;
warzone_mc[v3].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
for (var v5 in warzone_mc.background_mc) {
var v3 = warzone_mc.background_mc[v5];
if (v3.hitTest(this.posX, this.posY, true)) {
this.moveX *= -0.5;
this.moveY *= -0.5;
}
}
this._x += this.moveX;
this._y += this.moveY;
this.moveX *= 0.95;
this.moveY *= 0.95;
for (var v4 in warzone_mc.musuh_container) {
if (!warzone_mc.musuh_container[v4].isDead) {
var v2 = warzone_mc.musuh_container[v4];
if (this.hitTest(v2)) {
v2.damaged(this.attack / 300, false, false);
v2.terbakar(80);
}
}
}
}
};
};
pasukan3.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (Math.abs(this.sasaran._x - this._x) < this.range) {
if (!this.isAttacking) {
this.posTarget = this._x;
if (this.sasaran._y - this._y > 25) {
this.setStance(3, 1);
} else {
if (this.sasaran._y - this._y < -25) {
this.setStance(3, 3);
} else {
this.setStance(3, 2);
}
}
} else {
if (this.damaging) {
this.shoot(this.sasaran);
}
}
} else {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
}
} else {
this.isAttacking = false;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.posTarget = this._x;
this.setStance(1);
this.detectTarget();
}
}
if (!this.controlled) {
if (this.idle) {
this.detectTarget();
}
}
this.cekGravity();
}
};
var pasukan4 = new Object();
acceptProperty(pasukan1, pasukan4);
pasukan4.unitID = 4;
pasukan4.nama = armyData.army4.nama;
pasukan4.deskripsi = armyData.army4.deskripsi;
pasukan4.mcType = 'Pasukan4';
pasukan4.bloodType = 'Blood3';
pasukan4.deadSound = 'deadUnit4';
pasukan4.lifeAwal = armyData.army4.life;
pasukan4.life = pasukan4.lifeAwal;
pasukan4.attack = armyData.army4.attack;
pasukan4.defense = armyData.army4.defense;
pasukan4.moveSpeed = armyData.army4.speed;
pasukan4.posTarget = 300;
pasukan4.jumpAble = false;
pasukan4.enableSpecial = true;
pasukan4.hancurable = false;
pasukan4.special = function (_sasaran) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
soundFX('rocketSound');
var v3 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru10', v3, peluruDepth);
warzone_mc[v3]._x = this._x + (Math.abs(this._xscale) / this._xscale) * 15;
warzone_mc[v3]._y = this._y - 40;
warzone_mc[v3].attack = 30;
warzone_mc[v3].speed = 8;
warzone_mc[v3].handling = 0.7;
warzone_mc[v3].moveX = 1;
warzone_mc[v3].moveY = 0;
warzone_mc[v3].cacheAsBitmap = true;
warzone_mc[v3].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
addParticle(this, 'smoke' + (1 + random(3)), 3, false);
doFollow(this, _sasaran);
if (Math.abs(this._x - _sasaran._x) <= 20 && Math.abs(this._y - _sasaran._y) <= 20) {
_sasaran.damaged(this.attack);
addExplosion(this, 3);
delete this.onEnterFrame;
this.removeMovieClip();
}
for (var v3 in warzone_mc.background_mc) {
var v2 = warzone_mc.background_mc[v3];
if (v2.hitTest(this.posX, this.posY, true)) {
addExplosion(this, 2);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
}
};
};
pasukan4.shoot = function (_sasaran) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
soundFX('rifleSound');
var v2 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru2_2', v2, peluruDepth);
warzone_mc[v2]._x = this._x;
warzone_mc[v2]._y = this._y - 33;
warzone_mc[v2].difX = _sasaran._x - warzone_mc[v2]._x;
warzone_mc[v2].difY = _sasaran._y - _sasaran._height / 2 - warzone_mc[v2]._y;
warzone_mc[v2]._rotation = 57.29577951308232 * Math.atan2(warzone_mc[v2].difY, warzone_mc[v2].difX) + (-2 + random(4));
warzone_mc[v2].attack = this.attack;
warzone_mc[v2].moveX = 50 * Math.cos(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].moveY = 50 * Math.sin(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].timer = 12;
warzone_mc[v2]._x += warzone_mc[v2].moveX;
warzone_mc[v2]._y += warzone_mc[v2].moveY;
warzone_mc[v2].cacheAsBitmap = true;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
--this.timer;
if (this.timer <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
this._x += this.moveX;
this._y += this.moveY;
if (this.hitTest(_sasaran)) {
_sasaran.damaged(this.attack);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
};
pasukan4.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
if (this.timerSpecial < this.timerSpecialMax) {
++this.timerSpecial;
}
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (Math.abs(this.sasaran._x - this._x) < this.range) {
if (Math.abs(this.sasaran._x - this._x) < 50) {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(4);
this.isAttacking = true;
this.timer = 30;
}
if (this.damaging) {
this.sasaran.damaged(this.attack * 2);
}
} else {
if (!this.isAttacking) {
this.posTarget = this._x;
if (this.enableSpecial && this.timerSpecial >= this.timerSpecialMax) {
this.isSpecial = true;
} else {
if (this.sasaran._y - this._y > 25) {
this.setStance(3, 1);
} else {
if (this.sasaran._y - this._y < -25) {
this.setStance(3, 3);
} else {
this.setStance(3, 2);
}
}
}
} else {
if (this.damaging && !this.isSpecial) {
this.shoot(this.sasaran);
}
}
}
} else {
if (!this.isSpecial) {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
}
}
} else {
if (!this.isSpecial) {
this.isAttacking = false;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.posTarget = this._x;
this.setStance(1);
this.detectTarget();
}
}
}
if (this.isSpecial) {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(5);
} else {
if (this.damaging) {
this.special(this.sasaran, this.attack * 5);
this.damaging = false;
}
}
}
if (!this.controlled) {
if (this.idle) {
this.detectTarget();
}
}
this.cekGravity();
}
};
var pasukan5 = new Object();
acceptProperty(pasukan1, pasukan5);
pasukan5.unitID = 5;
pasukan5.nama = armyData.army5.nama;
pasukan5.deskripsi = armyData.army5.deskripsi;
pasukan5.mcType = 'Pasukan5';
pasukan5.bloodType = 'Blood3';
pasukan5.deadSound = 'deadUnit4';
pasukan5.ally = 1;
pasukan5.lifeAwal = armyData.army5.life;
pasukan5.life = pasukan5.lifeAwal;
pasukan5.attack = armyData.army5.attack;
pasukan5.defense = armyData.army5.defense;
pasukan5.moveSpeed = armyData.army5.speed;
pasukan5.posTarget = 300;
pasukan5.range = 80;
pasukan5.hancurable = false;
pasukan5.jumpAble = false;
pasukan5.followLandRot = true;
pasukan5.enableSpecial = true;
pasukan5.detectTarget = function () {
if (this.sasaran._name == undefined || this.sasaran.isDead) {
var v3 = this.lineSight;
}
for (var v4 in this.containerTarget) {
if (!this.containerTarget[v4].isDead && !this.containerTarget[v4].flyingUnit) {
var v2 = this.containerTarget[v4];
}
if (Math.abs(v2._x - this._x) < v3) {
v3 = Math.abs(v2._x - this._x);
this.sasaran = v2;
}
}
if (Math.abs(warzone_mc.nest_mc1._x - this._x) < v3) {
v3 = Math.abs(warzone_mc.nest_mc1._x - this._x);
this.sasaran = warzone_mc.nest_mc1;
this.posTarget = this.sasaran._x;
this.posTargetY = this.sasaran._y;
}
};
pasukan5.addShade = function () {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v2 = 'shade' + peluruDepth;
warzone_mc.attachMovie('Pasukan5_shade', v2, peluruDepth);
warzone_mc[v2]._x = this._x;
warzone_mc[v2]._y = this._y;
warzone_mc[v2]._xscale = this._xscale;
warzone_mc[v2]._rotation = this._rotation;
warzone_mc[v2].remove = 5;
warzone_mc[v2].onEnterFrame = function () {
this._alpha -= this.remove;
if (this._alpha <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
};
pasukan5.special = function () {
this.xspeed = this.moveSpeed * Math.cos(Math.PI * this.rot / 180);
this.yspeed = this.moveSpeed * Math.sin(Math.PI * this.rot / 180);
this._xscale = 100 * this.arah;
this._x += 3 * this.xspeed * this.arah;
this._y += 3 * this.yspeed * this.arah;
for (var v3 in this.containerTarget) {
if (!this.containerTarget[v3].isDead && !this.containerTarget[v3].flyingUnit) {
var v2 = this.containerTarget[v3];
}
if (v2.hitTest(this)) {
v2.damaged(this.attack / 2, true);
}
}
};
pasukan5.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
if (this.timerSpecial < this.timerSpecialMax) {
++this.timerSpecial;
}
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (Math.abs(this.sasaran._x - this._x) < this.range) {
if (!this.isAttacking) {
this.posTarget = this._x;
if (this.enableSpecial && this.timerSpecial >= this.timerSpecialMax && this.sasaran._x < startBuildingEnemy[scene][0]) {
if (this.sasaran._x < this._x) {
this.arah = -1;
} else {
this.arah = 1;
}
this.setStance(5);
this.isSpecial = true;
} else {
this.setStance(3 + random(2));
}
this.isAttacking = true;
this.timer = 30;
}
if (this.damaging) {
this.sasaran.damaged(this.attack * 2);
}
} else {
if (!this.isSpecial) {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
}
}
} else {
if (!this.isSpecial) {
this.isAttacking = false;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.posTarget = this._x;
this.setStance(1);
this.detectTarget();
}
}
}
if (this.isSpecial) {
this.special();
if (this.damaging) {
this.addShade();
this.sasaran.damaged(this.attack * 2, true);
}
}
if (!this.controlled) {
if (this.idle) {
this.detectTarget();
}
}
this.cekGravity();
}
};
var pasukan6 = new Object();
acceptProperty(pasukan1, pasukan6);
pasukan6.unitID = 6;
pasukan6.nama = armyData.army6.nama;
pasukan6.deskripsi = armyData.army6.deskripsi;
pasukan6.mcType = 'Pasukan6';
pasukan6.bloodType = 'Blood3';
pasukan6.deadSound = 'deadUnit4';
pasukan6.lifeAwal = armyData.army6.life;
pasukan6.life = pasukan6.lifeAwal;
pasukan6.attack = armyData.army6.attack;
pasukan6.defense = armyData.army6.defense;
pasukan6.moveSpeed = armyData.army6.speed;
pasukan6.posTarget = 500;
pasukan6.posTargetY = 100;
pasukan6.tujuanX = 500;
pasukan6.tujuanY = 100;
pasukan6.moveX = 0;
pasukan6.moveY = 0;
pasukan6.hancurable = false;
pasukan6.jumpAble = false;
pasukan6.enableSpecial = false;
pasukan6.flyingUnit = true;
pasukan6.shoot = function (_sasaran) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
soundFX('rifleSound');
var v2 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru2', v2, peluruDepth);
warzone_mc[v2]._x = this._x + (Math.abs(this._xscale) / this._xscale) * 25;
warzone_mc[v2]._y = this._y;
warzone_mc[v2].difX = _sasaran._x - warzone_mc[v2]._x;
warzone_mc[v2].difY = _sasaran._y - warzone_mc[v2]._y;
warzone_mc[v2]._rotation = 57.29577951308232 * Math.atan2(warzone_mc[v2].difY, warzone_mc[v2].difX) + (-2 + random(4));
warzone_mc[v2].attack = this.attack;
warzone_mc[v2].moveX = 50 * Math.cos(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].moveY = 50 * Math.sin(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].timer = 12;
warzone_mc[v2]._x += warzone_mc[v2].moveX;
warzone_mc[v2]._y += warzone_mc[v2].moveY;
warzone_mc[v2].cacheAsBitmap = true;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
--this.timer;
if (this.timer <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
this._x += this.moveX;
this._y += this.moveY;
if (this.hitTest(_sasaran)) {
_sasaran.damaged(this.attack);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
};
pasukan6.detectTarget = function () {
if (this.sasaran._name == undefined || this.sasaran.isDead) {
var v3 = this.range + 20;
}
for (var v4 in this.containerTarget) {
if (!this.containerTarget[v4].isDead) {
var v2 = this.containerTarget[v4];
}
if (Math.abs(v2._x - this._x) < v3) {
v3 = Math.abs(v2._x - this._x);
this.sasaran = v2;
this.posTarget = this.sasaran._x;
if (this.sasaran.flyingUnit) {
this.posTargetY = this.sasaran._y;
} else {
this.posTargetY = this.sasaran._y - 200;
}
this.difX = this.posTarget - this._x;
this.difY = this.posTargetY - this._y;
this.moveX = this.moveSpeed * Math.cos(Math.atan2(this.difY, this.difX));
this.moveY = this.moveSpeed * Math.sin(Math.atan2(this.difY, this.difX));
}
}
};
pasukan6.jalan = function () {
this.setStance(2);
this.isAttacking = false;
if (this.jarakSasaran > 0) {
this._xscale = 100;
} else {
this._xscale = -100;
}
this.tujuanX += this.moveX;
this.tujuanY += this.moveY;
};
pasukan6.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
this._x += (this.tujuanX - this._x) / 8;
this._y += (this.tujuanY - this._y) / 8;
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (Math.abs(this.jarakSasaran) < this.range && Math.abs(this.jarakSasaranY) < this.range) {
if (!this.isAttacking) {
this.setStance(3);
} else {
if (this.damaging) {
this.shoot(this.sasaran);
}
}
} else {
this.jalan();
}
} else {
if (Math.abs(this.jarakSasaran) < 30 && Math.abs(this.jarakSasaranY) < 30) {
this.setStance(1);
this.detectTarget();
} else {
this.jalan();
}
if (this.stance != 2) {
this.detectTarget();
}
}
if (!this.controlled) {
this.detectTarget();
}
}
};
var pasukan7 = new Object();
acceptProperty(pasukan1, pasukan7);
pasukan7.unitID = 7;
pasukan7.nama = armyData.army7.nama;
pasukan7.deskripsi = armyData.army7.deskripsi;
pasukan7.mcType = 'Pasukan7';
pasukan7.bloodType = 'Blood3';
pasukan7.deadSound = 'deadUnit4';
pasukan7.lifeAwal = armyData.army7.life;
pasukan7.life = pasukan7.lifeAwal;
pasukan7.attack = armyData.army7.attack;
pasukan7.defense = armyData.army7.defense;
pasukan7.moveSpeed = armyData.army7.speed;
pasukan7.hancurable = false;
pasukan7.enableSpecial = true;
pasukan7.posTarget = 300;
pasukan7.range = 500;
pasukan7.jumpAble = false;
pasukan7.followLandRot = true;
pasukan7.special = function (_sasaran) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
soundFX('rocketSound');
var v3 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru10', v3, peluruDepth);
warzone_mc[v3]._x = this._x;
warzone_mc[v3]._y = this._y - 80;
warzone_mc[v3].attack = 30;
warzone_mc[v3].speed = 10;
warzone_mc[v3].handling = 0.8;
warzone_mc[v3].moveX = 1;
warzone_mc[v3].moveY = -1;
warzone_mc[v3].cacheAsBitmap = true;
warzone_mc[v3].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + warzone_mc._x;
this.posY = this._y + warzone_mc._y;
addParticle(this, 'smoke' + (1 + random(3)), 4, false);
doFollow(this, _sasaran);
if (Math.abs(this._x - _sasaran._x) <= 20 && Math.abs(this._y - _sasaran._y) <= 20) {
_sasaran.damaged(this.attack);
addExplosion(this, 3);
delete this.onEnterFrame;
this.removeMovieClip();
}
for (var v3 in warzone_mc.background_mc) {
var v2 = warzone_mc.background_mc[v3];
if (v2.hitTest(this.posX, this.posY, true)) {
addExplosion(this, 2);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
}
};
};
pasukan7.shoot = function (_sasaran) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
soundFX('bazooka');
var v2 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru3', v2, peluruDepth);
warzone_mc[v2]._x = this._x + 80 * (Math.abs(this._xscale) / this._xscale);
warzone_mc[v2]._y = this._y - 37;
warzone_mc[v2].difX = _sasaran._x - warzone_mc[v2]._x;
warzone_mc[v2].difY = _sasaran._y - _sasaran._height / 2 - warzone_mc[v2]._y;
warzone_mc[v2]._rotation = 57.29577951308232 * Math.atan2(warzone_mc[v2].difY, warzone_mc[v2].difX) + (-2 + random(4));
warzone_mc[v2].attack = this.attack;
warzone_mc[v2].moveX = 50 * Math.cos(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].moveY = 50 * Math.sin(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].timer = 12;
warzone_mc[v2]._x += warzone_mc[v2].moveX;
warzone_mc[v2]._y += warzone_mc[v2].moveY;
warzone_mc[v2].cacheAsBitmap = true;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
--this.timer;
if (this.timer <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
this._x += this.moveX;
this._y += this.moveY;
if (this.hitTest(_sasaran)) {
_sasaran.damaged(this.attack);
addExplosion(this, 3);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
};
pasukan7.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
if (this.timerSpecial < this.timerSpecialMax) {
++this.timerSpecial;
}
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (Math.abs(this.sasaran._x - this._x) < this.range) {
if (!this.isAttacking) {
this.posTarget = this._x;
if (this.enableSpecial && this.timerSpecial >= this.timerSpecialMax) {
this.isSpecial = true;
} else {
if (this.sasaran._y - this._y > 25) {
this.setStance(3, 1);
} else {
if (this.sasaran._y - this._y < -25) {
this.setStance(3, 3);
} else {
this.setStance(3, 2);
}
}
}
} else {
if (this.damaging && !this.isSpecial) {
this.shoot(this.sasaran);
this.damaging = false;
}
}
} else {
if (!this.isSpecial) {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
}
}
} else {
if (!this.isSpecial) {
this.isAttacking = false;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.posTarget = this._x;
this.setStance(1);
this.detectTarget();
}
}
}
if (this.isSpecial) {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(5);
} else {
if (this.damaging) {
this.special(this.sasaran);
this.damaging = false;
}
}
}
if (!this.controlled) {
if (this.idle) {
this.detectTarget();
}
}
this.cekGravity();
}
};
var pasukan8 = new Object();
acceptProperty(pasukan1, pasukan8);
pasukan8.unitID = 8;
pasukan8.nama = armyData.army8.nama;
pasukan8.deskripsi = armyData.army8.deskripsi;
pasukan8.mcType = 'Pasukan8';
pasukan8.bloodType = 'Blood3';
pasukan8.deadSound = 'deadUnit4';
pasukan8.lifeAwal = armyData.army8.life;
pasukan8.life = pasukan8.lifeAwal;
pasukan8.attack = armyData.army8.attack;
pasukan8.defense = armyData.army8.defense;
pasukan8.moveSpeed = armyData.army8.speed;
pasukan8.hancurable = false;
pasukan8.enableSpecial = true;
pasukan8.posTarget = 300;
pasukan8.range = 80;
pasukan8.jumpAble = false;
pasukan8.followLandRot = false;
pasukan8.special = function (_sasaran) {
shock(20);
for (var v3 in this.containerTarget) {
if (!this.containerTarget[v3].flyingUnit) {
var v2 = this.containerTarget[v3];
}
v2.damaged(this.attack / 2);
}
};
pasukan8.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
if (this.timerSpecial < this.timerSpecialMax) {
++this.timerSpecial;
}
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (Math.abs(this.sasaran._x - this._x) < this.range) {
if (!this.isAttacking) {
this.posTarget = this._x;
if (this.enableSpecial && this.timerSpecial >= this.timerSpecialMax) {
this.isSpecial = true;
} else {
this.setStance(3, 1 + random(3));
this.isAttacking = true;
this.timer = 30;
}
}
if (this.damaging) {
this.sasaran.damaged(this.attack);
}
} else {
if (!this.isSpecial) {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
}
}
} else {
if (!this.isSpecial) {
this.isAttacking = false;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.posTarget = this._x;
this.setStance(1);
this.detectTarget();
}
}
}
if (this.isSpecial) {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(5);
} else {
if (this.damaging) {
this.special();
}
}
}
if (!this.controlled) {
if (this.idle) {
this.detectTarget();
}
}
this.cekGravity();
}
};
var pasukan9 = new Object();
acceptProperty(pasukan1, pasukan9);
pasukan9.unitID = 10;
pasukan9.nama = armyData.army9.nama;
pasukan9.deskripsi = armyData.army9.deskripsi;
pasukan9.mcType = 'Pasukan9';
pasukan9.lifeAwal = armyData.army9.life;
pasukan9.life = pasukan9.lifeAwal;
pasukan9.attack = armyData.army9.attack;
pasukan9.defense = armyData.army9.defense;
pasukan9.moveSpeed = armyData.army9.speed;
pasukan9.enableSpecial = false;
pasukan9.range = 750;
pasukan9.lineSight = 800;
pasukan9.hancurable = false;
pasukan9.shoot = function (_sasaran) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
soundFX('sniperSound');
var v2 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru1', v2, peluruDepth);
warzone_mc[v2]._x = this._x;
warzone_mc[v2]._y = this._y - 30;
warzone_mc[v2].difX = _sasaran._x - warzone_mc[v2]._x;
warzone_mc[v2].difY = _sasaran._y - _sasaran._height / 2 - warzone_mc[v2]._y;
warzone_mc[v2]._rotation = 57.29577951308232 * Math.atan2(warzone_mc[v2].difY, warzone_mc[v2].difX);
warzone_mc[v2].attack = this.attack;
warzone_mc[v2].moveX = 75 * Math.cos(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].moveY = 75 * Math.sin(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].timer = 15;
warzone_mc[v2]._x += warzone_mc[v2].moveX;
warzone_mc[v2]._y += warzone_mc[v2].moveY;
warzone_mc[v2].shooter = this;
warzone_mc[v2].cacheAsBitmap = true;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
--this.timer;
if (this.timer <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
this._x += this.moveX;
this._y += this.moveY;
if (this.hitTest(_sasaran)) {
_sasaran.bleeding(3);
_sasaran.bleeding(4);
_sasaran.bleeding(4);
_sasaran.bleeding(5);
_sasaran.bleeding(5);
_sasaran.damaged(this.attack, false);
_sasaran.sasaran = this.shooter;
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
};
pasukan9.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (Math.abs(this.sasaran._x - this._x) < this.range) {
if (!this.isAttacking) {
this.posTarget = this._x;
if (this.sasaran._y - this._y > 25) {
this.setStance(3, 1);
} else {
if (this.sasaran._y - this._y < -25) {
this.setStance(3, 3);
} else {
this.setStance(3, 2);
}
}
} else {
if (this.damaging) {
this.shoot(this.sasaran);
this.damaging = false;
}
}
} else {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
}
} else {
this.isAttacking = false;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.posTarget = this._x;
this.setStance(1);
this.detectTarget();
}
}
if (!this.controlled) {
if (this.idle) {
this.detectTarget();
}
}
this.cekGravity();
}
};
var pasukan10 = new Object();
acceptProperty(pasukan1, pasukan10);
pasukan10.unitID = 11;
pasukan10.nama = armyData.army10.nama;
pasukan10.deskripsi = armyData.army10.deskripsi;
pasukan10.mcType = 'Pasukan10';
pasukan10.lifeAwal = armyData.army10.life;
pasukan10.life = pasukan10.lifeAwal;
pasukan10.attack = armyData.army10.attack;
pasukan10.defense = armyData.army10.defense;
pasukan10.moveSpeed = armyData.army10.speed;
pasukan10.enableSpecial = false;
pasukan10.range = 50;
pasukan10.lineSight = 80;
pasukan10.hancurable = false;
pasukan10.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
this.isAttacking = false;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.posTarget = this._x;
this.setStance(1);
}
if (this._x < 525) {
showPopResult(1);
}
this.cekGravity();
}
};
var pasukan11 = new Object();
acceptProperty(pasukan1, pasukan11);
pasukan11.unitID = 9;
pasukan11.nama = armyData.army11.nama;
pasukan11.deskripsi = armyData.army11.deskripsi;
pasukan11.mcType = 'Pasukan11';
pasukan11.bloodType = 'Blood1';
pasukan11.lifeAwal = armyData.army11.life;
pasukan11.life = pasukan11.lifeAwal;
pasukan11.attack = armyData.army11.attack;
pasukan11.defense = armyData.army11.defense;
pasukan11.moveSpeed = armyData.army11.speed;
pasukan11.hancurable = false;
pasukan11.enableSpecial = true;
pasukan11.posTarget = 300;
pasukan11.range = 90;
pasukan11.lineSight = 300;
pasukan11.jumpAble = false;
pasukan11.followLandRot = false;
pasukan11.special = function (_sasaran) {
_sasaran.damaged(this.attack * 2, true);
};
pasukan11.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
if (this.timerSpecial < this.timerSpecialMax) {
++this.timerSpecial;
}
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._y - this._y > this.range) {
this.sasaran = undefined;
}
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (Math.abs(this.sasaran._x - this._x) < this.range) {
if (!this.isAttacking) {
this.posTarget = this._x;
if (this.enableSpecial && this.timerSpecial >= this.timerSpecialMax) {
this.isSpecial = true;
} else {
this.setStance(3, 1 + random(2));
this.isAttacking = true;
this.timer = 30;
}
}
if (this.damaging) {
this.sasaran.damaged(this.attack);
}
} else {
if (!this.isSpecial) {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
}
}
} else {
if (!this.isSpecial) {
this.isAttacking = false;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.posTarget = this._x;
this.setStance(1);
this.detectTarget();
}
}
}
if (this.isSpecial) {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(5);
} else {
if (this.damaging) {
this.special(this.sasaran);
}
}
}
if (!this.controlled) {
if (this.idle) {
this.detectTarget();
}
}
this.cekGravity();
}
};
var pasukan12 = new Object();
acceptProperty(pasukan1, pasukan12);
pasukan12.unitID = 12;
pasukan12.nama = armyData.army12.nama;
pasukan12.deskripsi = armyData.army12.deskripsi;
pasukan12.mcType = 'Pasukan12';
pasukan12.bloodType = 'Blood3';
pasukan12.deadSound = 'deadUnit4';
pasukan12.lifeAwal = armyData.army12.life;
pasukan12.life = pasukan12.lifeAwal;
pasukan12.attack = armyData.army12.attack;
pasukan12.defense = armyData.army12.defense;
pasukan12.moveSpeed = armyData.army12.speed;
pasukan12.hancurable = false;
pasukan12.enableSpecial = true;
pasukan12.posTarget = 300;
pasukan12.range = 500;
pasukan12.jumpAble = false;
pasukan12.followLandRot = true;
pasukan12.special = function (_sasaran) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
warzone_mc.createEmptyMovieClip('laser_mc', peluruDepth);
warzone_mc.laser_mc.attachMovie('laser', 'mylaser', 1);
warzone_mc.laser_mc._x = this._x + 30;
warzone_mc.laser_mc._y = this._y - 90;
addSparkles(warzone_mc.laser_mc._x, warzone_mc.laser_mc._y, 8, 10, 100);
addSparkles(_sasaran._x, _sasaran._y, 8, 10, 100);
var v4 = _sasaran._x - warzone_mc.laser_mc._x;
var v3 = _sasaran._y - warzone_mc.laser_mc._y;
var v6 = Math.sqrt(Math.pow(v4, 2) + Math.pow(v3, 2));
var v5 = 57.29577951308232 * Math.atan2(v3, v4);
warzone_mc.laser_mc.mylaser._width = v6;
warzone_mc.laser_mc._rotation = v5;
_sasaran.terbakar(100);
_sasaran.damaged(this.attack * 4, true);
};
pasukan12.shoot = function (_sasaran) {
if (peluruDepth > peluruDepthMax) {
peluruDepth = 801;
}
++peluruDepth;
var v2 = 'peluru' + peluruDepth;
warzone_mc.attachMovie('Peluru2_2', v2, peluruDepth);
warzone_mc[v2]._x = this._x + 30;
warzone_mc[v2]._y = this._y - 80;
warzone_mc[v2].difX = _sasaran._x - warzone_mc[v2]._x;
warzone_mc[v2].difY = _sasaran._y - _sasaran._height / 2 - warzone_mc[v2]._y;
warzone_mc[v2]._rotation = 57.29577951308232 * Math.atan2(warzone_mc[v2].difY, warzone_mc[v2].difX) + (-2 + random(4));
warzone_mc[v2].attack = this.attack / 4;
warzone_mc[v2].moveX = 50 * Math.cos(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].moveY = 50 * Math.sin(Math.PI * warzone_mc[v2]._rotation / 180);
warzone_mc[v2].timer = 12;
warzone_mc[v2]._x += warzone_mc[v2].moveX;
warzone_mc[v2]._y += warzone_mc[v2].moveY;
warzone_mc[v2].cacheAsBitmap = true;
warzone_mc[v2].onEnterFrame = function () {
if (!isPaused) {
--this.timer;
if (this.timer <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
this._x += this.moveX;
this._y += this.moveY;
if (this.hitTest(_sasaran)) {
_sasaran.damaged(this.attack);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
};
pasukan12.updateFrame = function () {
if (!isPaused) {
this.cekPos();
this.cekFrozzen();
if (this.timerSpecial < this.timerSpecialMax) {
++this.timerSpecial;
}
this.jarakSasaran = this.posTarget - this._x;
this.jarakSasaranY = this.posTargetY - this._y;
if (this.sasaran._name != undefined && !this.sasaran.isDead) {
if (Math.abs(this.sasaran._x - this._x) < this.range) {
if (!this.isAttacking) {
this.posTarget = this._x;
if (this.enableSpecial && this.timerSpecial >= this.timerSpecialMax) {
this.isSpecial = true;
} else {
this.setStance(3);
}
} else {
if (this.damaging && !this.isSpecial) {
this.shoot(this.sasaran);
}
}
} else {
if (!this.isSpecial) {
if (this.sasaran._x - this._x < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
}
}
} else {
if (!this.isSpecial) {
this.isAttacking = false;
if (Math.abs(this.jarakSasaran) > 20) {
this.idle = false;
if (this.jarakSasaran < 0) {
this.jalan(-1);
} else {
this.jalan(1);
}
} else {
this.idle = true;
this.posTarget = this._x;
this.setStance(1);
this.detectTarget();
}
}
}
if (this.isSpecial) {
if (!this.isAttacking) {
this.posTarget = this._x;
this.setStance(5);
} else {
if (this.damaging) {
this.special(this.sasaran);
this.damaging = false;
}
}
}
if (!this.controlled) {
if (this.idle) {
this.detectTarget();
}
}
for (var v2 in warzone_mc.musuh_container) {
var sasaran = warzone_mc.musuh_container[v2];
if (this.hitTest(sasaran)) {
sasaran.damaged(this.attack / 5, true);
}
}
this.cekGravity();
}
};
var maxUnit = 10 + 2 * ourBase.building9;
interface_mc.ourUnit_txt.text = countUnit(warzone_mc.pasukan_container) + '/' + maxUnit;
interface_mc.enemyUnit_txt.text = countUnit(warzone_mc.musuh_container);
var baseDefense = 1000;
var pressedLeft = false;
var pressedRight = false;
var pressedUp = false;
var pressedDown = false;
var pressedSpace = false;
var camX = warzone_mc._x;
var camY = warzone_mc._y;
var camBackX = warzoneBack_mc._x;
var camBackY = warzoneBack_mc._y;
var startXmouse = 0;
var startYmouse = 0;
var endXmouse = 0;
var endYmouse = 0;
var mousePlayer = new Object();
var musuhSelected;
var timerMusuhSpawn = 0;
var camAwalY = new Array();
camAwalY[1] = 30;
camAwalY[2] = 30;
camAwalY[3] = 160;
camAwalY[4] = 140;
camAwalY[5] = 30;
camAwalY[6] = 160;
camAwalY[7] = 120;
camAwalY[8] = 210;
camAwalY[9] = 30;
camAwalY[10] = 180;
camAwalY[11] = 180;
camAwalY[12] = 30;
camY = camAwalY[scene];
if (bossAvailable > 0) {
spawnMusuh(9 + bossAvailable);
}
if (campaignMode == 3) {
tampilDialog(campaign3Dialog1);
}
if (campaignMode == 6) {
tampilDialog(campaign6Dialog1);
spawnPasukan(9);
var timerBantongMuncul = 3600;
interface_mc.attachMovie('timer_mc', 'timer_mc', 986);
interface_mc.timer_mc._x = 792;
interface_mc.timer_mc._y = 110;
interface_mc.timer_mc.tulisan.text = 'time until enemy commander sighted:';
interface_mc.timer_mc.tulisan2.text = (convertTimer(timerBantongMuncul)).menit + ':' + (convertTimer(timerBantongMuncul)).detik;
interface_mc.timer_mc.onEnterFrame = function () {
if (!isPaused) {
if (timerBantongMuncul > 0) {
--timerBantongMuncul;
} else {
spawnRate = 180;
tampilDialog(campaign6Dialog2);
spawnMusuh(16);
delete this.onEnterFrame;
this.removeMovieClip();
}
this.tulisan.text = 'time until enemy commander sighted:';
this.tulisan2.text = (convertTimer(timerBantongMuncul)).menit + ':' + (convertTimer(timerBantongMuncul)).detik;
}
};
}
if (campaignMode == 7) {
tampilDialog(campaign7Dialog1);
}
if (campaignMode == 8) {
tampilDialog(campaign8Dialog1);
supplyTimerAwal = 450;
var supplyTimer = 450;
_root.createEmptyMovieClip('supplyDropTimer', 9997);
supplyDropTimer.onEnterFrame = function () {
if (!isPaused) {
if (supplyTimer > 0) {
--supplyTimer;
} else {
summonSupplyDrop(1, 500 + random(1000));
supplyTimer = supplyTimerAwal;
}
}
};
} else {
delete supplyDropTimer.onEnterFrame;
supplyDropTimer.removeMovieClip();
}
if (campaignMode == 10) {
tampilDialog(campaign10Dialog1);
addBuildingHoax('Pesawat_rusak', 97, startBuildingEnemy[scene][0], startBuildingEnemy[scene][1]);
spawnPasukan(1);
spawnPasukan(1);
spawnPasukan(2);
spawnPasukan(4);
var timerReinforcement = 1350;
interface_mc.attachMovie('timer_mc', 'timer_mc', 986);
interface_mc.timer_mc._x = 792;
interface_mc.timer_mc._y = 50;
interface_mc.timer_mc.tulisan.text = 'time until reinforcement arrived:';
interface_mc.timer_mc.tulisan2.text = (convertTimer(timerReinforcement)).menit + ':' + (convertTimer(timerReinforcement)).detik;
interface_mc.timer_mc.onEnterFrame = function () {
if (!isPaused) {
if (timerReinforcement > 0) {
--timerReinforcement;
} else {
soundFX('reinforcementSound');
spawnPasukan(1);
spawnPasukan(1);
spawnPasukan(2);
spawnPasukan(4);
timerReinforcement = 1350;
}
this.tulisan.text = 'time until reinforcement arrived:';
this.tulisan2.text = (convertTimer(timerReinforcement)).menit + ':' + (convertTimer(timerReinforcement)).detik;
}
};
}
if (campaignMode == 11) {
tampilDialog(campaign11Dialog1);
}
if (campaignMode == 12) {
var timerReinforcement = 9000;
interface_mc.attachMovie('timer_mc', 'timer_mc', 986);
interface_mc.timer_mc._x = 792;
interface_mc.timer_mc._y = 110;
interface_mc.timer_mc.tulisan.text = 'time until Super Tank arrived:';
interface_mc.timer_mc.tulisan2.text = (convertTimer(timerReinforcement)).menit + ':' + (convertTimer(timerReinforcement)).detik;
interface_mc.timer_mc.onEnterFrame = function () {
if (!isPaused) {
if (timerReinforcement > 0) {
--timerReinforcement;
} else {
soundFX('reinforcementSound');
spawnPasukan(12);
delete this.onEnterFrame;
this.removeMovieClip();
}
this.tulisan.text = 'time until Super Tank arrived:';
this.tulisan2.text = (convertTimer(timerReinforcement)).menit + ':' + (convertTimer(timerReinforcement)).detik;
}
};
}
onEnterFrame = function () {
t = getTimer();
framerate = Math.round(1000 / (t - o));
o = t;
if (pressedRight || _xmouse > 720 && _ymouse < 360) {
if (camX > maxRightPanFront[scene]) {
camX -= geserSpeed;
camBackX -= geserSpeed / 4;
}
}
if (pressedLeft || _xmouse < 80 && _ymouse < 360) {
if (camX < maxLeftPanFront[scene]) {
camX += geserSpeed;
camBackX += geserSpeed / 4;
}
}
if (pressedUp || _ymouse < 30) {
if (camY < 210) {
camY += geserSpeed;
camBackY += geserSpeed / 4;
}
}
if (pressedDown || _ymouse > 320 && _ymouse < 360) {
if (camY > 0) {
camY -= geserSpeed;
camBackY -= geserSpeed / 4;
}
}
if (warzone_mc._x + (camX - warzone_mc._x) / geserVel < maxRightPanFront[scene]) {
warzone_mc._x = maxRightPanFront[scene];
}
if (warzone_mc._x + (camX - warzone_mc._x) / geserVel > maxLeftPanFront[scene]) {
warzone_mc._x = maxLeftPanFront[scene];
}
warzone_mc._x += (camX - warzone_mc._x) / geserVel;
warzone_mc._y += (camY - warzone_mc._y) / geserVel;
warzoneBack_mc._x += (camBackX - warzoneBack_mc._x) / geserVel;
warzoneBack_mc._y += (camBackY - warzoneBack_mc._y) / geserVel;
pressedLeft = false;
pressedRight = false;
pressedUp = false;
pressedDown = false;
pressedSpace = false;
if (Key.isDown(37) || Key.isDown(65)) {
pressedLeft = true;
}
if (Key.isDown(39) || Key.isDown(68)) {
pressedRight = true;
}
if (Key.isDown(38) || Key.isDown(87)) {
pressedUp = true;
}
if (Key.isDown(40) || Key.isDown(83)) {
pressedDown = true;
}
if (Key.isDown(32)) {
pressedSpace = true;
}
if (!isPaused) {
++battleDuration;
++timerMusuhSpawn;
if (timerMusuhSpawn > spawnRate) {
var v4 = listMusuhAvailable[random(listMusuhAvailable.length)];
--musuhRarityCounter[v4];
if (musuhRarityCounter[v4] <= 0) {
spawnMusuh(v4);
musuhRarityCounter[v4] = musuhRarityAwal[v4];
}
timerMusuhSpawn = 0;
}
if (delayPasukan.length > 0) {
if (delayPasukanTimer[delayPasukan[0]] > 0) {
--delayPasukanTimer[delayPasukan[0]];
} else {
if (!maxUnitReached) {
if (countUnit(warzone_mc.pasukan_container) < maxUnit) {
soundFX('unitReadySound');
spawnPasukan(delayPasukan[0]);
delayPasukanTimer[delayPasukan[0]] = delayPasukanTimerAwal[delayPasukan[0]];
delayPasukan.shift();
} else {
popupBattle('Max units reached, not enough power to create another ' + armyData['army' + this.i].nama);
maxUnitReached = true;
}
}
}
}
var v2 = 1;
while (v2 <= 6) {
if (delayReinforcementQueue[v2]) {
if (delayReinforcementTimer[v2] > 0) {
--delayReinforcementTimer[v2];
} else {
delayReinforcementQueue[v2] = false;
soundFX('reinforcementSound');
}
}
++v2;
}
interface_mc.fpscounter.text = framerate;
if (Key.isDown(35)) {
for (var i in warzone_mc.musuh_container) {
var v3 = warzone_mc.musuh_container[i];
v3.terbakar(100);
}
}
if (pressedSpace) {
unitSelectedID = undefined;
clearControlBuildings();
clearControlUnits();
setPropertyBar();
removeRollOver();
}
mousePlayer._name = 'mousePlayer';
mousePlayer._x = _xmouse;
mousePlayer._y = _ymouse;
mousePlayer.posX = _xmouse;
mousePlayer.posY = _ymouse;
if (isDownMouse) {
endXmouse = _xmouse;
endYmouse = _ymouse;
if (controlledBuilding == undefined && controlledUnit.length <= 0) {
createSelection();
}
}
}
};
var pinPointShot = 0;
var parachuteBomb = 0;
var healingLasser = 0;
var supplyDrop = 0;
var frozzenBomb = 0;
var airStrike = 0;
onMouseDown = function () {
startXmouse = _xmouse;
startYmouse = _ymouse;
musuhSelected = undefined;
for (var v2 in warzone_mc.musuh_container) {
var v3 = warzone_mc.musuh_container[v2];
if (v3.hitTest(_xmouse, _ymouse, true)) {
if (musuhSelected == undefined) {
musuhSelected = v3;
}
}
}
if (warzone_mc.nest_mc1.hitTest(_xmouse, _ymouse, true)) {
musuhSelected = warzone_mc.nest_mc1;
}
if (!isPaused) {
if (pinPointShot > 0) {
if (musuhSelected.unitID != 22) {
musuhSelected.damaged(250, false);
v2 = 1;
while (v2 <= 15) {
musuhSelected.bleeding(4);
++v2;
}
--pinPointShot;
if (pinPointShot <= 0) {
defaultCursor();
interface_mc._visible = true;
}
}
}
if (parachuteBomb > 0) {
summonParachuteBomb(3, startXmouse - warzone_mc._x);
--parachuteBomb;
if (parachuteBomb <= 0) {
defaultCursor();
}
}
if (healingLasser > 0) {
healAllUnit();
--healingLasser;
if (healingLasser <= 0) {
defaultCursor();
}
}
if (supplyDrop > 0) {
summonSupplyDrop(5, 500 + random(1000));
--supplyDrop;
if (supplyDrop <= 0) {
defaultCursor();
}
}
if (frozzenBomb > 0) {
summonFrozzenBomb(1, startXmouse - warzone_mc._x);
--frozzenBomb;
if (frozzenBomb <= 0) {
defaultCursor();
}
}
if (airStrike > 0) {
summonAirStrike();
--airStrike;
if (airStrike <= 0) {
defaultCursor();
}
}
}
if (startXmouse - warzone_mc._x > 400) {
for (var v4 in controlledUnit) {
var v1 = controlledUnit[v4];
v1.sasaran = musuhSelected;
v1.posTarget = startXmouse - warzone_mc._x + random(100);
v1.posTargetY = startYmouse - warzone_mc._y + random(30);
if (v1.flyingUnit) {
v1.posTarget = startXmouse - warzone_mc._x + random(30);
v1.posTargetY = startYmouse - warzone_mc._y + random(30);
v1.difX = v1.posTarget - v1._x;
v1.difY = v1.posTargetY - v1._y;
v1.moveX = v1.moveSpeed * Math.cos(Math.atan2(v1.difY, v1.difX));
v1.moveY = v1.moveSpeed * Math.sin(Math.atan2(v1.difY, v1.difX));
}
}
}
if (!isPaused) {
if (controlledUnit[0] != undefined) {
soundFX('moveSound' + (1 + random(4)));
if (musuhSelected == undefined) {
showPointer(startXmouse - warzone_mc._x, startYmouse - warzone_mc._y);
} else {
musuhSelected.setTargeted();
}
}
}
isDownMouse = true;
};
onMouseUp = function () {
isDownMouse = false;
if (controlledUnit.length <= 0) {
cekSelection();
}
};
var keyDetect = new Object();
keyDetect.onKeyDown = function () {
if (Key.isDown(80)) {
if (!isPaused) {
tampilOption();
isPaused = true;
stopAllChar();
} else {
removeOption();
playAllChar();
isPaused = false;
}
}
if (Key.isDown(36)) {
for (var v3 in warzone_mc.musuh_container) {
var v1 = warzone_mc.musuh_container[v3];
v1.frozzen = true;
v1.frozzenTime = 100;
}
}
if (Key.isDown(81)) {
scrollToLeft();
}
if (Key.isDown(69)) {
scrollToRight();
}
if (Key.isDown(90)) {
for (v3 in warzone_mc.pasukan_container) {
v1 = warzone_mc.pasukan_container[v3];
controlledUnit.push(v1);
}
if (controlledUnit.length == 1) {
unitSelectedID = controlledUnit[0];
setPropertyBar();
}
if (controlledUnit.length > 0) {
soundFX('selectedSound' + (1 + random(2)));
}
for (var v2 in controlledUnit) {
controlledUnit[v2].controlled = true;
controlledUnit[v2].showLifeBar();
}
clearControlBuildings();
setPropertyBar();
}
if (Key.isDown(49)) {
clearControlUnits();
clearControlBuildings();
warzone_mc.benteng_mc1.cekControl();
}
if (Key.isDown(50)) {
clearControlUnits();
clearControlBuildings();
warzone_mc.benteng_mc2.cekControl();
}
if (Key.isDown(51)) {
clearControlUnits();
clearControlBuildings();
warzone_mc.benteng_mc3.cekControl();
}
if (Key.isDown(52)) {
clearControlUnits();
clearControlBuildings();
warzone_mc.benteng_mc4.cekControl();
}
if (Key.isDown(53)) {
clearControlUnits();
clearControlBuildings();
warzone_mc.benteng_mc5.cekControl();
}
if (Key.isDown(54)) {
clearControlUnits();
clearControlBuildings();
warzone_mc.benteng_mc6.cekControl();
}
if (Key.isDown(55)) {
clearControlUnits();
clearControlBuildings();
warzone_mc.benteng_mc7.cekControl();
}
if (Key.isDown(56)) {
clearControlUnits();
clearControlBuildings();
warzone_mc.benteng_mc8.cekControl();
}
if (Key.isDown(57)) {
clearControlUnits();
clearControlBuildings();
warzone_mc.benteng_mc9.cekControl();
}
};
keyDetect.onKeyUp = function () {
if (Key.isDown(49)) {
trace('lepas angka 1');
}
};
Key.addListener(keyDetect);
}
frame 16 {
stop();
clearLevel();
var CPMStarContentSpotID = '3303Q26445B19';
System.security.allowDomain('server.cpmstar.com');
adBox.loadMovie('http://server.cpmstar.com/adviewas2.swf?contentspotid=' + CPMStarContentSpotID);
more_btn.onRelease = function () {
getURL('http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=squadron_auriga&utm_source=ingame&utm_content=ingame&logo=2', '_blank');
};
Key.removeListener(keyDetect);
clearControlBuildings();
clearControlUnits();
TotalBattleDuration += battleDuration;
++TotalBattlePlayed;
TotalEnergyCollected += energyCollected;
TotalUnitCreated += unitCreated;
TotalReinforcementUsed += reinforcementUsed;
TotalUnitsKilled += unitLost;
TotalMonstersKilled += enemyKilled;
TotalMonstersSpawned += enemySpawned;
saveAchievementData();
stat1.text = (convertTimer(battleDuration)).menit + ':' + (convertTimer(battleDuration)).detik;
stat2.text = unitCreated;
stat3.text = unitLost;
stat4.text = reinforcementUsed;
if (baseLife != undefined) {
stat5.text = baseLife;
} else {
stat5.text = '-';
}
if (enemyBaseLife != undefined) {
stat6.text = enemyBaseLife;
} else {
stat6.text = '-';
}
stat7.text = enemySpawned;
stat8.text = enemyKilled;
back_btn._visible = false;
back_text._visible = false;
back_btn._visible = true;
back_text._visible = true;
back_btn.onRelease = function () {
if (campaignMode > 0) {
if (campaignMode < 12) {
gotoAndStop('campaignmenu');
soundBGM('strategySound');
} else {
if (pemenang == 1) {
newMedals(5);
gotoAndStop('story');
isTamat = true;
tampilDialog(tamatOke);
} else {
gotoAndStop('campaignmenu');
soundBGM('strategySound');
}
}
} else {
afterWar = true;
gotoAndStop('strategy');
}
};
}